Professional Documents
Culture Documents
University of Technology and Education: Image Processing
University of Technology and Education: Image Processing
University of Technology and Education: Image Processing
Lecture:
IMAGE PROCESSING
Chapter 4:
Image Filtering
1
Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering
Image Filtering
INTRODUCTION
-Image Filtering allows to apply various effects on images in order to
filter noise or to smooth image.
-The 2D filter is a 2D filter matrix
2
Assoc. Prof. Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering
Image Filtering
IMAGE FILTERING IN THE SPATIAL DOMAIN
Fig 4.1 describes a 3x3 spatial filter. Assume that one needs
to calculate an image pixel in an image, the
corresponding pixel of the output image is calculated
by the sum of products of coefficients (values) between the
filter and the image.
3
Assoc. Prof. Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering
Image Filtering
Figure describes one 3x3 filter and one spatial image which are convoluted
together to produce the filtered image. In particular, the 3x3 filter with the w(0,0)
center, called mask, is used to calculate the middle position of one 3x3 image
part and similar to other values from left to right and from up-position to down-
one.
4
Assoc. Prof. Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering
Image Filtering
IMAGE FILTERING IN THE SPATIAL DOMAIN
- Notice: the center coefficient of filter is , corresponding to the image
pixel considered . With a filter of , assume that and
, in which and are positive integers. The size of the odd and
smallest filter is .
5
Assoc. Prof. Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering
Image Filtering
IMAGE FILTERING IN THE SPATIAL DOMAIN
Correlation and convolution in spatial domain
6
Assoc. Prof. Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering
Image Filtering
In general, the correlation expression is described as below equation, the
filter with the size of , the image and called
The symbol minus means that the image is rotated 180 degrees. 7
Assoc. Prof. Nguyen Thanh Hai, PhD
University of Technology and Education
Faculty of Electrical & Electronic Engineering
Image Filtering
Ex: Using the correlation and convolution methods to calculate
the output image at the position g(2,1).
y: 0 to 4 y
1 1 1 2 2
t: -1 to -1
1 1 1 2 2
x: 0 to 4 1 1 1 2 2 1 1 1 x 12
2 2 2 2 2 s: -1 to 1 1 1 1
2 2 2 2 2 1 1 1
The End
9
Assoc. Prof. Nguyen Thanh Hai, PhD