Image Processing Toolbox User's Guide |
Using Predefined Filter Types
The fspecial
function produces several kinds of predefined filters, in the form of correlation kernels. After creating a filter with fspecial
, you can apply it directly to your image data using imfilter
. This example illustrates applying an unsharp masking filter to an grayscale image. The unsharp masking filter has the effect of making edges and fine detail in the image more crisp.
I = imread('moon.tif'); h = fspecial('unsharp'); I2 = imfilter(I,h); imshow(I), title('Original Image') figure, imshow(I2), title('Filtered Image')
Filtering Using imfilter | Filter Design |
© 1994-2005 The MathWorks, Inc.