1 内容介绍

为了提高可见光图像的识别和检测能力,提出基于OMP算法的可见光图像超分辨率重构方法.建立可见光图像的视觉信息采集模型,采用空间锚点邻域特征匹配方法进行的可见光图像超分辨特征分解,提取可见光图像边缘轮廓特征量,结合残差特征估计高分辨率图像特征融合和优化分割,建立可见光图像的超分辨率重建特征分布集,采用边缘信息空间区域融合方法进行可见光图像的像素信息融合和优化特征重组,提取可见光图像的模糊度特征分布集,结合OMP算法实现可见光图像超分辨率重构​。

2 部分代码

function Demo_CS_CoSaMP()

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% the DCT basis is selected as the sparse representation dictionary

% instead of seting the whole image as a vector, I process the image in the

% fashion of column-by-column, so as to reduce the complexity.

% Author: Chengfu Huo, roy@mail.ustc.edu.cn, http://home.ustc.edu.cn/~roy

% Reference: D. Deedell andJ. Tropp, “COSAMP: Iterative Signal Recovery from

% Incomplete and Inaccurate Samples,” 2008.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%------------ read in the image --------------

img=imread('lena.bmp');     % testing image

img=double(img);

[height,width]=size(img);

%------------ form the measurement matrix and base matrix ---------------

Phi=randn(floor(height/3),width);  % only keep one third of the original data

Phi = Phi./repmat(sqrt(sum(Phi.^2,1)),[floor(height/3),1]); % normalize each column

mat_dct_1d=zeros(256,256);  % building the DCT basis (corresponding to each column)

for k=0:1:255

dct_1d=cos([0:1:255]'*k*pi/256);

if k>0

dct_1d=dct_1d-mean(dct_1d);

end

mat_dct_1d(:,k+1)=dct_1d/norm(dct_1d);

end

%--------- projection ---------

img_cs_1d=Phi*img;          % treat each column as a independent signal

%-------- recover using omp ------------

sparse_rec_1d=zeros(height,width);

Theta_1d=Phi*mat_dct_1d;

for i=1:width

column_rec=cs_cosamp(img_cs_1d(:,i),Theta_1d,height);

sparse_rec_1d(:,i)=column_rec';           % sparse representation

end

img_rec_1d=mat_dct_1d*sparse_rec_1d;          % inverse transform

%------------ show the results --------------------

figure(1)

subplot(2,2,1),imagesc(img),title('original image')

subplot(2,2,2),imagesc(Phi),title('measurement mat')

subplot(2,2,3),imagesc(mat_dct_1d),title('1d dct mat')

psnr = 20*log10(255/sqrt(mean((img(:)-img_rec_1d(:)).^2)))

subplot(2,2,4),imagesc(img_rec_1d),title(strcat('1d rec img ',num2str(psnr),'dB'))

disp('over')

%************************************************************************%

function hat_x=cs_cosamp(y,T_Mat,m)

% y=T_Mat*x, T_Mat is n-by-m

% y - measurements

% T_Mat - combination of random matrix and sparse representation basis

% m - size of the original signal

% the sparsity is length(y)/4

n=length(y);                           % length of measurements

s=floor(n/4);                                 % sparsity

r_n=y;                                 % initial residuals

sig_pos_lt=[];                         % significant pos for last time iteration

for times=1:s                          % number of iterations

product=abs(T_Mat'*r_n);

[val,pos]=sort(product,'descend');

sig_pos_cr=pos(1:2*s);             % significant pos for curretn iteration

sig_pos=union(sig_pos_cr,sig_pos_lt);

Aug_t=T_Mat(:,sig_pos);            % current selected entries of T_Mat

aug_x_cr=zeros(m,1);

aug_x_cr(sig_pos)=(Aug_t'*Aug_t)^(-1)*Aug_t'*y;  % temp recovered x (sparse)

[val,pos]=sort(abs(aug_x_cr),'descend');

hat_x=zeros(1,m);

hat_x(pos(1:s))=aug_x_cr(pos(1:s));% recovered x with s sparsity

sig_pos_lt=pos(1:s);               % refresh the significant positions

r_n=y-T_Mat*hat_x';

end

3 运行结果

4 参考文献

[1]陈宁, 阎琳, 邱岳恒. 基于OMP算法的图像重构研究与FPGA实现[J]. 计算机测量与控制, 2014, 22(9):3.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机、雷达通信、无线传感器等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。

【图像重构】基于OMP算法实现图像重构附matlab代码相关推荐

  1. MATLAB应用实战系列( 七十五) -图像处理应用 MATLAB实现基于分水岭算法的图像分割 (附matlab代码)

    一.简介 二.源代码 clear, close all; clc; %1.读取图像并求取图像的边界.rgb = imread('tree.jpeg');%读取原图像 I = rgb2gray(rgb) ...

  2. 【数据聚类】基于蝙蝠算法实现数据聚类附matlab代码

    ✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信.

  3. 【优化调度】基于蚁狮算法求解经济调度问题附matlab代码

    ✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信.

  4. 【优化求解】基于蝗虫算法求解单目标问题matlab代码

    1 简介 蝗虫算法( Grasshopper Optimization Algorithm,GOA ) 是 由 Saremi 等[1]于2017 年提出的一种元启发式仿生优化算法.具体原理如下: 2 ...

  5. 【图像加密】基于混沌系统进行灰度图像加密附Matlab代码

    1 简介 ​ 1 基于混沌系统的图像加密解密 Logistic混沌置乱,先不说有多复杂,其实很简单. Logistic函数是源于一个人口统计的动力学系统,其系统方程形式如下: **X(k+1) = u ...

  6. 【信号处理】基于优化算法的 SAR 信号处理(Matlab代码实现)

    目录 1 概述 2 BP神经网络:通过反投影算法进行脉冲聚光灯 SAR 模拟和重建 3 通过距离堆叠算法进行脉冲聚光灯 SAR 模拟和重建​编辑 第9个图: ​ 4 通过 TDC 算法进行脉冲聚光灯 ...

  7. 【路径优化】基于帝企鹅算法求解TSP问题(Matlab代码实现)

    目录 1 帝企鹅算法 2 旅行商问题(TSP) 3 运行结果 4 参考文献 5 Matlab代码实现 1 帝企鹅算法 帝企鹅优化算法(emperor penguin optimizer,EPO)是Ga ...

  8. 【车间调度】基于改进帝国企鹅算法求解车间调度问题附matlab代码

    1 内容介绍 传统车间调度问题仅仅考虑工件的分配问题.而柔性车间调度问题在传统车间调度问题上做了一定的延伸,它更接近实际生产过程的原因是由于其在传统车间调度问题中加入了对加工机器的选择.因此对其的研究 ...

  9. 【图像重建】基于布雷格曼迭代(bregman alteration)算法集合ART算法实现CT图像重建附matlab代码

    1 简介 Fluorescence diffuse optical tomography (fDOT) is a noninvasive imaging technique that makes it ...

  10. 【雷达】基于RD、RMA、CS三种算法实现雷达成像附matlab代码

    1 简介 基于RD.RMA.CS三种算法实现雷达成像matlab代码​ 2 完整代码 %Chirp Scaling二维成像仿真. %抛物面聚焦,条带测绘,正侧视工作方式. 匹配滤波.%目标为3个散射点 ...

最新文章

  1. (转载)从无知到有知
  2. [浅谈 演示] 你所不知道的HTML - 从 XHTML2 到 HTML5 (1)
  3. java加快内存回收_java内存管理之垃圾回收及JVM调优
  4. impdp导入数据时出现BUG
  5. SAP JAM的回收站
  6. Datastream 开发打包问题
  7. CSDN云计算是什么?云计算可以应用在哪些方面?
  8. 几何画板是哪方面的计算机应用,几何画板在几何中的奇妙应用
  9. sourcetree使用简介
  10. ACdream区域赛指导赛之手速赛系列(7)
  11. python骗局-python 无良培训忽悠骗局知多少?
  12. 项目中的文件夹与tomcat/webapp中manager文件夹重名
  13. 也用 Log4Net 之走进Log4Net (四)
  14. .net core快速开发平台,learun自主工作流引擎设计规范
  15. 树莓派运用阿里云API实现语音识别
  16. 北漂生活-租房那些事
  17. eclipse优化之eclipse验证设置,让eclipse跑得更快
  18. 温度上报实时监控项目——客户端
  19. JavaScript基础修炼(14)——WebRTC在浏览器中如何获得指定格式的PCM数据
  20. Python 函数传参详解

热门文章

  1. Verilog数字信号处理---基础1
  2. 深入浅出设计模式之策略模式、观察者模式
  3. 网络工程设计教程--系统集成方法
  4. java 名片通讯录,jsp实现通讯录系统
  5. C++学习记录一——VS2019报错“C2011 ”tagPOINT“:“struct“类型重定义
  6. 人行地区代码一览表_世界各国和地区名称代码表
  7. 快逸报表整合至MyEclipse项目中
  8. 史上最详细Git使用教程
  9. CIC Dips Its Toe Back In US Waters
  10. IC卡读写器c#源码