EE 604
Image Processing
Spatial averaging
• This involves the convolution of the input image with a ‘template’ image. Equivalently, this
is equivalent to the application of an FIR filter in 2D.
• Output image size is a bit bigger than input, as required by convolution, the peripheral
pixels are ignored.
• Used to LP filter before down sampling, and to reduce noise by averaging.
Template examples
Spatial averaging example
Gonzalez
Directional smoothing
Gonzalez
Sharpening operators
•
Un sharp masking
Gonzalez
Google
images
The gradient image
Different
Laplacian
operators
Roberts
Sobel
Gradient modeling
Locating the edge
• Even for 1D a gradual ‘edge’, one is faced
with the question of finding its precise
location.
• So, one proceeds to find the first derivative
(difference), and ‘locates’ the edge
transition point at the maximum of the
gradient.
• Even better, we look for the zero crossing of
the 2nd difference.
• In 2D, the ‘edge’ is defined as the locus of
the edge points. The profile of the transition
can itself vary along the edge, as well as the
start and end levels.
Sumana Gupta
Edge strength and direction
•
Edge detector examples
• Original image with all vertical, and all
horizontal edges found separately.
• The edge operators of different kinds.
Google Images
Canny Edge detector
Currently, the most popular edge detector
is the Canny edge detector, which is a 2
pass algorithm that applies a combination
of initial
• Gaussian smoothing,
• gradient generation,
• maximum suppression,
• double thresholding and
• hysteresis
to ensure to link up broken edges and not
be affected by noise.
Median filtering
• Median filter is nonlinear function of the input image. Does not smear localized noise like a
linear averaging filter dies (mid image below); instead removes it clean.
• The median filter replaces the center pixel by the median value of the neighbours.
• It is not invertible. Very effective in removing salt and pepper noise.
• Fails completely if the noise is so prevalent that it dominates the image.
Morphological processing
• Binary image objects are treated as subsets of a
square grid, consisting only of pixels = 1.
• The remaining pixels, = 0 are called the
‘background object’
• Structuring element: This is a small pre defined
shape that determines the kind of effects that
will result. Usually, a small square, circle, etc.
Dilation and erosion