資源簡介
采用小波對獲取的圖像進行細節銳化,本文采用過的是matlab
代碼片段和文件信息
%對圖像進行銳化處理
%?clear?all;
%?clc;
%?load?chess;
%?blur1=X;
%?blur2=X;
%?subplot(221);image(wcodemat(X192));
%?colormap(gray(256));xlabel(‘(a)原始圖像‘);
%?subplot(222);image(wcodemat(X192));
%?colormap(gray(256));xlabel(‘(b)原始圖像‘);
%?ffl=dct2(X);
%?for?i=1:256
%?????for?j=1:256
%?????????ffl(ij)=ffl(ij)/(1+(32768/(i*j+j*j))^2);
%?????end
%?end
%?blur1=idct2(ffl);
%?[cl]=wavedec2(X2‘db3‘);
%?csize=size(c);
%?for?i=1:csize(2);
%?????if(c(i)<300)
%?????????c(i)=c(i)*2;
%?????else
%?????????c(i)=c(i)/2;
%?????end
%?end
%?blur2=waverec2(cl‘db3‘);
%?subplot(223);image(wcodemat(blur1192));
%?colormap(gray(256));xlabel(‘(c)采用DCT方法銳化圖像‘);
%?subplot(224);image(wcodemat(blur2192));
%?colormap(gray(256));xlabel(‘(d)采用
評論
共有 條評論