资源简介

图形图像处理经典模型—tv模型的matlab源代码以及所需的图片

资源截图

代码片段和文件信息

clf
colormap(gray)


%I = zeros(100200);
%I(40:6050:150)=255;
%I=255-I;
I = imresize(double(rgb2gray(imread(‘test.bmp‘)))/2550.4);


M = logical(roipoly(I));
%M = logical(zeros(5050));  M(25:5025:50) = logical(1);

% original image
subplot(221)
imagesc(I[0 1])
title(‘original‘)

% masked image
subplot(222)
IM = I;
IM(find(M))=1 ; %rand(size(find(M))); %=1;
imagesc(IM[0 1]);
title(‘missing data‘)

%harmonic inpainting
subplot(224)
Ih = inpaint_iterate(IMM@ip_mean[]1);
title(‘harmonic inpainting‘)

figure(gcf);
pause(0.1)

subplot(223)
args{1} = 0.00000001;  % a

fn = @ip_tvh; %_filter;

%args{2} = 0.005;  % delta t
%args{3} = 25;  % contextarea
%args{4} = 1;  % b

%*sqrt(length(find(M)))

tolfn = inline(‘max(abs(Inew(:) - Iold(:

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      18406  2006-02-11 10:33  TV_inpainting\a.bmp

     文件       1072  2005-10-01 16:00  TV_inpainting\inpaint.m

     文件     580319  2005-10-01 15:46  TV_inpainting\inpainting.pdf

     文件       1985  2005-09-09 01:30  TV_inpainting\inpaint_iterate.m

     文件        692  2005-09-09 01:30  TV_inpainting\inpaint_iterate_ms.m

     文件        149  2005-09-09 01:30  TV_inpainting\ip_mean.m

     文件        984  2005-09-09 01:30  TV_inpainting\ip_tvh.m

     文件       1787  2005-09-09 01:30  TV_inpainting\ip_tvhcurv.m

     文件       7771  2005-09-09 01:29  TV_inpainting\Lab5.m

     文件      23014  2005-09-08 14:52  TV_inpainting\test.bmp

     目录          0  2009-08-25 15:08  TV_inpainting

----------- ---------  ---------- -----  ----

               636179                    11


评论

共有 条评论