PROJECT 03-06
Unsharp Masking
(a) Use theprograms developed in Projects 03-03 and 03-04 to implement highboostfiltering, as given in Eq. (3.7-8).The averaging part of the process should be done using the mask in Fig. 3.34(a).
(b) DownloadFig. 3.43(a) and enhance it using the program you developed in (a).Your objective is to choose constantA so that your result visuallyapproximates Fig.3.43(d).
实验代码:
close all
f=imread('I:\ImagineProcessing\PROJECT\DIP3E_Original_Images_CH03\Fig0343(a)(skeleton_orig).tif');
figure(1);imshow(f);
f=double(f);
w=fspecial('average',3);
%w=[1/9 1/9 1/9;1/9 1/9 1/9;1/9 1/9 1/9];
f=double(f);
c=conv2(f,w,'same');
g=f-c;
figure(2);imshow(g);
A=[0.6,1,1.7,2.3,2.9,5,10]
for i=1:7
d=f+A(i)*c;
d=uint8(d);
figure(i+2);imshow(d);
end