Code: Spatial Filters
| Table of Contents |
Introduction
Basic Image Processing tools. Spatial filters such as average filter, sobel filter, high boost filter, median filter.
First Edition: 2003/05(c++). Last Modified: 2007/02(matlab).
Tag: Scientific ImagePocessing EdgeDetection Smoothing Sharpening
Tag: Scientific ImagePocessing EdgeDetection Smoothing Sharpening
Required tool
- 2-D Convolution cvpr:cvConv2.m
- 2-D Zero Crossing cvpr:cvZeroCross2.m

Smooth
Average Filter
imshow(uint8(cvAverageFilter2(I, 3)));
Median Filter
Median filter is not a smoothing filter, but let me place at here because both median filter and smoothing filter is used for noisy images.
imshow(uint8(cvMedianFilter2(I, 3)))
Edge Detection
Roberts
cvRoberts(I, 32, '45')
Prewitt
Sobel
Laplacian
cvLaplacian(I, 200)
LoG (Laplacian of Gaussian)
Sharpen
High Boost Filter
High boost filter is composed by an all pass filter and a edge detection filter (laplacian filter). Thus, it emphasizes edges and results in image sharpener.
Mask size m = 3, All pass factor A = 1, Division factor B = 1 (default)
Mask size m = 5, All pass factor A = 1, Division factor B = 1 (default)













