资源简介
图像压缩感知资料及代码,里面包含BP ,MP ,OMP,BCS等经典算法。
代码片段和文件信息
% GenDataFig14: Generate images for figure 14:
% Multiscale CS reconstruction of a Mondrian painting with BPFDRFAR.
I0 = imread(‘mondrian.tif‘);
I0 = double(I0);
% Set finest coarsest scales
j1 = 9;
j0 = 5;
qmf = MakeONFilter(‘Symmlet‘8);
Narr = [0.8 0.6 0.4 0.2];
S = 30;
% Do Multi-CS scheme:
% Sample 4^j0 resume coefficients (coarse-scale
% coeffs) at scale 2^(-j0) x 2^(-j0)
alpha0 = FTWT2_PO(I0 j0 qmf);
alpha_BP = zeros(size(alpha0));
alpha_BP(1:2^j01:2^j0) = alpha0(1:2^j01:2^j0);
alpha_FDR = alpha_BP;
alpha_FAR = alpha_BP;
N_CS = 4^j0;
t_BP = 0;
t_FDR = 0;
t_FAR = 0;
thetas = cell(j1-j01);
alphas_BP = cell(j1-j01);
alphas_FDR = cell(j1-j01);
alphas_FAR = cell(j1-j01);
% For each scale apply CS scheme
for jj = (j0):(j1-1)
% Construct the vector theta of detail wavelet
% coeffs on scale jj
theta1 = alpha0((2^jj+1):2^(jj+1)1:2^jj);
theta2 = alpha0(1:2^(jj+1)(2^jj+1):2^(jj+1));
n1 = prod(size(theta1));
n2 = prod(size(theta2));
theta = [theta1(:); theta2(:)];
thetas(jj-j0+1) = {theta};
Mdetail = 4^(jj+1) - 4^jj;
Ndetail = floor(Mdetail .* Narr(jj-j0+1));
N_CS = N_CS + Ndetail;
% Sample Ndetail compressed samples using the CS operator
y = FastCSOperator(1NdetailMdetailtheta1:MdetailMdetail);
% Solve the CS problem with BP
tic
alpha = SolveBP(‘FastCSOperator‘ y Mdetail);
t_BP = t_BP + toc;
alpha_BP((2^jj+1):2^(jj+1)1:2^jj) = reshape(alpha(1:n1) 2^(jj+1)-2^jj 2^jj);
alpha_BP(1:2^(jj+1)(2^jj+1):2^(jj+1)) = reshape(alpha(n1+1:n1+n2) 2^(jj+1) 2^(jj+1)-2^jj);
alphas_BP(jj-j0+1) = {alpha};
% Solve the CS problem with FDR thresholding
q = 0.9;
tic
[alpha iters] = SolveStOMP(‘FastCSOperator‘ y Mdetail ‘FDR‘ q S 1);
t_FDR = t_FDR + toc;
alpha_FDR((2^jj+1):2^(jj+1)1:2^jj) = reshape(alpha(1:n1) 2^(jj+1)-2^jj 2^jj);
alpha_FDR(1:2^(jj+1)(2^jj+1):2^(jj+1)) = reshape(alpha(n1+1:n1+n2) 2^(jj+1) 2^(jj+1)-2^jj);
alphas_FDR(jj-j0+1) = {alpha};
% Solve the CS problem with FAR thresholding
a_0 = (0.4*Ndetail/Mdetail)/S;
tic
[alpha iters] = SolveStOMP(‘FastCSOperator‘ y Mdetail ‘FAR‘ a_0 S 1);
t_FAR = t_FAR + toc;
alpha_FAR((2^jj+1):2^(jj+1)1:2^jj) = reshape(alpha(1:n1) 2^(jj+1)-2^jj 2^jj);
alpha_FAR(1:2^(jj+1)(2^jj+1):2^(jj+1)) = reshape(alpha(n1+1:n1+n2) 2^(jj+1) 2^(jj+1)-2^jj);
alphas_FAR(jj-j0+1) = {alpha};
end
% Reconstruct and compute error
I_BP = ITWT2_PO(alpha_BP j0 qmf);
I_FDR = ITWT2_PO(alpha_FDR j0 qmf);
I_FAR = ITWT2_PO(alpha_FAR j0 qmf);
E_BP = norm(I0 - I_BP‘fro‘) / norm(I0‘fro‘);
E_FDR = norm(I0 - I_FDR‘fro‘) / norm(I0‘fro‘);
E_FAR = norm(I0 - I_FAR‘fro‘) / norm(I0‘fro‘);
save DataFig14.mat Narr N_CS j0 j1 I0 I_BP I_FDR I_FAR ...
t_BP t_FAR t_FDR E_BP E_FAR E_FDR thetas alphas_BP alphas_FDR alphas_FAR
%
% Copyright (c) 2006. D
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 860 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\aconv.m
文件 185727 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\barbara.png
文件 5531 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\BCS_fast_rvm.m
文件 177762 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\boat.png
文件 262750 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\cameraman.tif
文件 226 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\DataFig08b_random.mat
文件 606 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\DownDyadHi.m
文件 585 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\DownDyadLo.m
文件 4795 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\example.asv
文件 4793 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\example.m
文件 7246 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\FastLaplace.m
文件 1106 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\FWT2_PO.m
文件 3263 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\GenDataFig08b_random.m
文件 777 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\iconv.m
文件 1212 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\IWT2_PO.m
文件 466 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\lshift.m
文件 10081 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\MakeONFilter.m
文件 262750 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\mandril_gray.tif
文件 591 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\MirrorFilt.m
文件 264168 2010-05-27 22:30 fastlaplacemorian\FastLaplace mondrian\mondrian(2)\Mondrian.tif
..A..H. 25088 2010-05-27 22:30 fastlaplacemorian\FastLaplace mondrian\mondrian(2)\Thumbs.db
文件 29209 2010-05-27 22:30 fastlaplacemorian\FastLaplace mondrian\mondrian(2)\unti
文件 42458 2010-05-27 22:30 fastlaplacemorian\FastLaplace mondrian\mondrian(2)\unti
文件 30465 2010-05-27 22:30 fastlaplacemorian\FastLaplace mondrian\mondrian(2)\unti
文件 34847 2010-05-27 22:30 fastlaplacemorian\FastLaplace mondrian\mondrian(2)\unti
文件 42806 2010-05-27 22:30 fastlaplacemorian\FastLaplace mondrian\mondrian(2)\unti
文件 38827 2010-05-27 22:30 fastlaplacemorian\FastLaplace mondrian\mondrian(2)\unti
文件 54596 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\pdco.m
文件 10186 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\pdcoSet.m
文件 3824 2010-05-27 22:29 fastlaplacemorian\FastLaplace mondrian\phantom_256.tif
............此处省略70个文件信息
相关资源
- robotics toolbox 8.0工具箱
- 基于运动想象脑电信号的多特征融合
- 图像分块BCS稀疏表示与重建
- matlab robotics toolbox
- 贝叶斯压缩感知matlab源代码
- Robotics Modelling Planning and Control
- simmechanics完整版教程
- MATLAB Text Analytics Toolbox官方教程
- Computational Statistics Handbook with MATLAB统
- matlab statsstatistics工具箱
- Robotics工具箱用户手册
- 全桥ZVZCS 软开关变换器仿真及报告
- matlab statistics learning toolbox
- ElasticSearch 技术解析与实战 kindle电子
- Computational Fourier Optics _ a MATLAB tutori
- MechanicsOfCompositeMaterialsWithMatlab.pdf 英文
- matlab开发-CSF批次模拟过滤器
- 超分辨率matlab源码pocs-superresolution_v
- Matlab高阶统计量工具箱(高阶谱)H
- SimMechanics教程
- matlab robotics toolboox_10.2教程
- 基于MATLAB&CCS;实现代码生成及
- 贝叶斯压缩感知matlab函数包
- MATLAB工具箱robotics toolbox 9.10
- Wheeled Mobile Robotics From Fundamentals Towa
- Orbital Mechanics for Engineering Students Thi
- Multiphysics Modeling Using COMSOL5 and MATLAB书
- matlab2016B robotics toolbox
- 机器人工具箱 Matlab 最新版,Robotics
- 压缩感知CS最全matlab程序,二维三维图
评论
共有 条评论