資源簡介
把分裂Bregman方法運用到圖像處理中,這種方法比以前去模糊方法要好很多。
代碼片段和文件信息
%??????????test_mrics.m?by?Tom?Goldstein??(tagoldst@math.ucla.edu)
%???This?file?is?meant?to?demonstrate?how?to?properly?use?mrics.m
%???When?this?script?is?run?it?will?first?build?a?simple?test?image.??The
%???method?then?builds?a?sampling?matrix?R?with?entries?randomly?chosen?
%???to?be?1?or?0.??The?compressed?sensing?data?is?then?computed?using?the
%???folrmula?F?=?R.*fft2(image).??Gaussian?noisy?is?added?to?the?CS?data.
%???Finally?the?mrics?method?is?used?to?reconstruct?the?image?form?the
%???sub-sampled?K-Space?data.
??
N?=?128;?%?The?image?will?be?NxN
sparsity?=?.25;?%?use?only?30%?on?the?K-Space?data?for?CS?
??%?build?an?image?of?a?square
image?=?zeros(NN);
image(N/4:3*N/4N/4:3*N/4)=255;
?
?%?build?the?sampling?matrix?R
R?=?rand(NN);
R?=?R
?%?Form?the?CS?data
F?=?R.*fft2(image);
%?Recover?the?image
recovered?=?mrics(RF?1?1?1e-510?4);
%?build?a?figure?to?display?results
figure;
subplot(221);
imagesc(abs(image));?colormap(‘gray‘);
title(‘Original‘);
subplot(222);
imagesc(abs(R));?colormap(‘gray‘);
title(‘R‘);
subplot(223);
imagesc(abs(ifft2(F)));?colormap(‘gray‘);
title(‘Set?unknown?to?0‘);
subplot(224);
imagesc(abs(recovered));?colormap(‘gray‘);
title(‘Split?Bregman?Recovery‘);
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????4463??2008-12-08?16:18??Split?Bregman\yuan.m
?????文件????????1241??2008-08-09?13:38??Split?Bregman\split.m
- 上一篇:FOC_PMSM
- 下一篇:MATLAB圖像去霧處理
評論
共有 條評論