The analysis of digital images by an
electronic processor (e.g., a computer or microprocessor)
Other Approaches:
The analysis of either digital or analog images
by a person (e.g., aerial image analysis)
Common Tasks
Image Comparison:
Object Detection
Motion Detection
Object Identification:
Optical Character Recognition (OCR)
Object Classification (e.g., species classification,
military target classification)
Facial Recognition
Medical Analysis
Object Detection
The Task:
Compare two images to determine if one contains
an object that is not in the other
A Very Naive Algorithm:
Compare the two images pixel by pixel to determine
if there are any differences
Object Detection (cont.)
Problems with the Very Naive Algorithm:
Because of the way
digital cameras work, the pixels in two
images recorded almost simultaneously can vary (even when not
compressed)
Because the camera may move (even slightly) two images
recorded almost simultaneously may
be translated or rotated
Improving the Naive Algorithm:
We will improve upon the naive algorithm using techniques
that are easy to understand conceptually
There are very sophisticated algorithms (using advanced
mathematics) that are well beyond the scope of this
lecture
Object Detection (cont.)
Correcting for Small Color Differences:
We can use one of several measures of
distance
to determine the similarity between corresponding pixels
in images of the same "scene" taken at different times
The Resulting Algorithm:
Count the number of pixels that are father apart
than some threshold
If the number of pixels is large, conclude that there
is an object in one and not the other
Object Detection (cont.)
An Intuitive Distance Measure:
Using the supremum distance we can determine if the
red, green or blue component differs by more than a
given threshold
An Example:
Object Detection (cont.)
With a Threshold of 10:
About 3% of the pixels are different
Visualization:
Object Detection (cont.)
A Shortcoming of this Algorithm:
The pixels that are different may not be contiguous
Overcoming this Shortcoming:
Only conclude that an object has been detected if the
pixels that are different are close to each other
Object Detection (cont.)
One Way to Account for Translated Images:
Instead of comparing the two images pixel-by-pixel,
calculate a single value for the entire image (or a value
for each row, or a value for each column) by finding the
color distance between each pixel and all of its
neighbors
An Example:
12 pixels will be identified as different if we don't
account for the translation
The total distance between neighbors for row 3 will be:
\(|255-0| + |0-255| = 510\) in both images
Object Detection (cont.)
Another Way to Account for Translated Images:
Use a lower resolution version of the image (e.g., take
the average of nine neighboring pixels to create an image that
is one third as large in both dimensions) and effectively "blur"
small differences
An Example:
Optical Character Recognition
The Task:
Identify a letter/number in a digital image
A Very Naive Algorithm:
Compare the black-and-white image containing the
character to recognize to a set of black-and-white images
containing all of the candidate characters and choose the
candidate with the smallest number of different
pixels
Optical Character Recognition (cont.)
Problems with the Very Naive Algorithm:
The number of different pixels will be determined, in
large part, by the number of black pixels
The image containing the character to recognize is likely
to be translated
Improving the Naive Algorithm:
For each black pixel in the character to recognize, find the
closest black pixel in the candidate character
Calculate the sum of the pixel-by-pixel distances and
call it the distance between the character to recognize and
the candidate
Find the candidate that is closest (in total) to the character to
recognize
Optical Character Recognition (cont.)
An Example:
Some of the Calculations:
Pixel (3,0) in the character is closest to pixel (3,1)
in the candidate with a distance of 1
Pixel (3,3) in the character is closest to pixel (3,3)
in the candidate, with a distance of 0
The sum of all of this distances is the distance between the
character and this candidate
Do this for every candidate and pick the closest
Optical Character Recognition (cont.)
Making the Problem Easier:
Use a font in which the characters are as distinct
as possible (e.g., 1, I, and i are distinct)
An Example Font (OCR-A):
Motion Detection
Approaches:
Blob-Based
Contour-Based
Model/Database-Based (i.e., detected objects are matched
to a database)
Color-Based
Classification-Based (e.g., pattern recognition using
support vector machines)
Important Issues:
Camera Orientation (e.g., upstream, downstream, side view)
Platform Stability
Time of Day
Weather
Dirt on the Lens
Infrared Sensors
An Observation:
We've been thinking about cameras that sense light in
the visible spectrum, but there's no reason not to use
infrared
Types:
Active - illuminated the detection zone with low-power
infrared energy
Passive - detect the energy that is emitted from objects