0% found this document useful (0 votes)
72 views7 pages

Image Filtering Notes

Linear filtering involves emphasizing or de-emphasizing spatial properties of an image through operations like convolution and correlation using a small filter kernel. Convolution involves flipping the filter kernel before applying it, while correlation does not. Common linear filters include mean filters, Gaussian filters, and difference filters. Gaussian and mean filters are used to smooth images, while difference filters detect intensity changes to find image gradients. Image gradients can be used to detect features and edges.

Uploaded by

Bhavyaa Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views7 pages

Image Filtering Notes

Linear filtering involves emphasizing or de-emphasizing spatial properties of an image through operations like convolution and correlation using a small filter kernel. Convolution involves flipping the filter kernel before applying it, while correlation does not. Common linear filters include mean filters, Gaussian filters, and difference filters. Gaussian and mean filters are used to smooth images, while difference filters detect intensity changes to find image gradients. Image gradients can be used to detect features and edges.

Uploaded by

Bhavyaa Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

1

Image Filtering (Ch. 4)


Images courtesy of Forsyth & Ponce.

It is the process of emphasizing/de-emphasizing certain spatial


properties of an image.

Linear filtering: When the intensity at a pixel in the output


is a linear combination of intensities of pixels in a small
neighborhood in the input.
H

This is mathematically defined by

H is assumed to be (2k+1)(2k+1). This operation is known as


correlation.

Convolution: The same as above but after flipping the filter


kernel. Note that when the filter kernel is symmetric, correlation and convolution become the same. Most filter kernels are
symmetric.

CEG-7550 Computer Vision

Fall 2014

Arthur Goshtasby

Convolution:

Example: When sum of the entries in H is 1, H is called a


smoothing filter. In addition, if all entries of H are the same, H
is called a mean filter.

Smoothing by a mean filter

When filter kernel is a 2-D Gaussian, the filter is called a

Gaussian filter.

CEG-7550 Computer Vision

Fall 2014

Arthur Goshtasby

A Gaussian filter

Smoothing by a Gaussian filter

Note that a 2-D Gaussian can be split into two 1-D Gaussians:
so that

Therefore, when a Gaussian is used, smoothing is performed


in 1-D, first row-by-row, and then column-by-column.
CEG-7550 Computer Vision

Fall 2014

Arthur Goshtasby

If a 2-D m xn filter can be separated into two 1-D filters, the


number of multiplications at each pixel can be reduced from
mn to m+n.
As the size of a filter kernel increases, more smoothing is
performed but at a proportionately higher computational
cost.

Difference operator: When the sum of entries of a filter


kernel is 0, the filter detects intensity changes in an image.

Example: When H = [1 0 -1], the filter responses to changes


in intensity as the image is scanned horizontally.

An image and its gradients in horizontal direction. Zero values are shown by 128 (gray).

This difference filter can be considered the first derivative of


mean filter [1 1]/2.
CEG-7550 Computer Vision

Fall 2014

Arthur Goshtasby

When the smoothing filter is a Gaussian, since

We have,

implying that we can convolve the image with the first


derivative of a 1-D Gaussian row-by-row, and convolve the
result with a 1-D Gaussian column-by-column.

Note: Convolution with a Gaussian de-emphasizes or blurs


intensity changes, while convolution with the first derivative
of a Gaussian enhances intensity changes. Also, note that
intensity changes can be dues to noise or image details.

Intensity derivative/changes horizontally of an image and its noisy versions.

Detecting intensity changes in arbitrary directions: Find


changes horizontally and vertically. Then, find direction and
magnitude of change from them.
Horizontal
change:
CEG-7550 Computer Vision

Fall 2014

Arthur Goshtasby

Vertical
change:
Gradient
magnitude:
Gradient
direction:
Iu and I v can be computed via convolution.
1. Convolve G u(u)G(v) with image I: Iu
2. Convolve G v(v)G(u) with image I: Iv
3. Calculate gradient magnitude and direction pixel-bypixel.
Therefore, we can calculate gradient magnitude and
direction by filtering.

CEG-7550 Computer Vision

Fall 2014

Arthur Goshtasby

Gaussian pyramid: An image pyramid where the bottom


image is the original image and images above it are smoothed
versions of the original image with an increasingly larger
Gaussian and resampling at a proportionately lower rate.

Image pyramids can be used to locate a pattern in an image


efficiently. A coarse but quick search is performed at the
lowest resolution to approximately locate the pattern. Then,
the localization accuracy is gradually improved by increasing
the resolution and searching locally.
CEG-7550 Computer Vision

Fall 2014

Arthur Goshtasby

You might also like