Create spatial filters for image processing.
type determines the shape of the filter and can be
'average'
- Rectangular averaging filter.
'disk'
- Circular averaging filter.
'gaussian'
- Gaussian filter.
'log'
- Laplacian of Gaussian.
'laplacian'
- 3x3 approximation of the laplacian.
'unsharp'
- Sharpening filter.
'motion'
- Moion blur filter of width 1 pixel.
'sobel'
- Horizontal Sobel edge filter.
'prewitt'
- Horizontal Prewitt edge filter.
The parameters that need to be specified depend on the filtertype.
Examples of use and associated default values:
f = fspecial('average',sze) # sze can be a 1 or 2 vector # default is [3, 3]. f = fspecial('disk',radius) # default radius = 5 f = fspecial('gaussian',sze, sigma) # default sigma is 0.5 f = fspecial('laplacian',sze, sigma) # default sze is [5, 5] # default sigma is 0.5 f = fspecial('log'); f = fspecial('motion', length, angle) # default length is 9 # default angle is 0 (degrees) f = fspecial('sobel'); f = fspecial('prewitt');When sze is specified as a single value the filter will be square.