Announce

PukiWiki contents have been moved into SONOTS Plugin (20070703)

Code: Spatial Filters

Table of Contents

Introduction

Basic Image Processing tools. Spatial filters such as average filter, sobel filter, high boost filter, median filter.

Lena.png

IV1LenaRoberts45_96.png

First Edition: 2003/05(c++). Last Modified: 2007/02(matlab).
Tag: Scientific ImagePocessing EdgeDetection Smoothing Sharpening

Required tool

Smooth

Average Filter

cvpr:cvAverageFilter2.m

imshow(uint8(cvAverageFilter2(I, 3)));

Boat1.png

IIIBoat1Average.png

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.

cvpr:cvMedianFilter2.m

imshow(uint8(cvMedianFilter2(I, 3)))

Boat2.png

IIIBoat2Median.png

Edge Detection

Roberts

cvpr:cvRoberts.m

cvRoberts(I, 32, '45')

Lena.png

IV1LenaRoberts45_96.png

Prewitt

cvpr:cvPrewitt.m

Lena.png

IV1LenaPrewittHorizontal96.png Horizontal, Threshold 96

IV1LenaPrewittVertical96.png Vertical, Threshold 96

Sobel

cvpr:cvSobel.m

Lena.png

IV1LenaSobelHorizontal96.png Horizontal, Threshold 96

IV1LenaSobelVertical96.png Vertical, Threshold 96

Laplacian

cvpr:cvLaplacian.m

cvLaplacian(I, 200)

Lena.png

IV1LenaLaplacian96.png Threshold 200

LoG (Laplacian of Gaussian)

cvpr:cvLoG.m

Lena.png

IV1LenaLoG96.png Threshold 200

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.

cvpr:cvHighboostFilter2.m

LenaBlur.png

II3LenaHighboostA1B1m3.png Mask size m = 3, All pass factor A = 1, Division factor B = 1 (default)

II3LenaHighboostA1B1m5.png Mask size m = 5, All pass factor A = 1, Division factor B = 1 (default)