I = imread('eight.tif');
c = [222 272 300 270 221 194];
r = [21 21 75 121 121 75];
BW = roipoly(I,c,r);
imshow(I)
figure, imshow(BW)
c = [222 272 300 270 221 194];
r = [21 21 75 121 121 75];
BW = roipoly(I,c,r);
% 指定区域
h = fspecial('unsharp');
% 指定滤波器形式
J = roifilt2(h,I,BW);
imshow(I), figure, imshow(J)
MATLAB图像处理—孙兆林编著—清华大学出版社