Image Processing Toolbox User's Guide Previous page   Next Page
fspecial

Create special 2-D filters

Syntax

Description

h = fspecial(type) creates a two-dimensional filter h of the specified type. fspecial returns h as a correlation kernel, which is the appropriate form to use with imfilter. type is a string having one of these values.

Value
Description
'average'
Averaging filter
'disk'
Gaussian lowpass filter
'gaussian'
Gaussian lowpass filter
'laplacian'
Filter approximating the two-dimensional Laplacian operator
'log'
Laplacian of Gaussian filter
'motion'
Prewitt horizontal edge-emphasizing filter
'prewitt'
Prewitt horizontal edge-emphasizing filter
'sobel'
Sobel horizontal edge-emphasizing filter
'unsharp'
Unsharp contrast enhancement filter

h = fspecial(type,parameters) accepts a filter type plus additional modifying parameters particular to the type of filter chosen. If you omit these arguments, fspecial uses default values for the parameters.

The following list shows the syntax for each filter type. Where applicable, additional parameters are also shown.

Class Support

h is of class double.

Example

Algorithms

fspecial creates Gaussian filters using

fspecial creates Laplacian filters using

fspecial creates Laplacian of Gaussian (LoG) filters using

fspecial creates averaging filters using

fspecial creates unsharp filters using

See Also

conv2, edge, filter2, fsamp2, fwind1, fwind2, imfilter

del2 in the MATLAB Function Reference


Previous page  fsamp2 ftrans2 Next page

© 1994-2005 The MathWorks, Inc.