Multimedia Processing and
Applications
Image Segmentation
Continuation
Edge Linking and Boundary Detection
Local Processing
Two properties of edge points are useful for edge linking:
the strength (or magnitude) of the detected edge points
their directions (determined from gradient directions)
This is usually done in local neighborhoods.
Adjacent edge points with similar magnitude and direction are linked.
For example, an edge pixel with coordinates (x0,y0) in a predefined
neighborhood of (x,y) is similar to the pixel at (x,y) if
f ( x, y ) f ( x0 , y0 ) E , E : a nonnegative threshold
( x, y ) ( x0 , y0 ) A, A : a nonegative angle threshold
Edge Linking and Boundary Detection
Local Processing: Example
In this example,
we can find the
license plate
candidate after
edge linking
process.
Edge Linking and Boundary Detection
Global Processing via the Hough Transform
Hough transform: a way of finding edge points in an image that lie
along a straight line.
Example: xy-plane v.s. ab-plane (parameter space)
yi axi b
Edge Linking and Boundary Detection
Global Processing via the Hough Transform
The Hough transform consists of
finding all pairs of values of and
which satisfy the equations that pass
through (x,y).
These are accumulated in what is
basically a 2-dimensional histogram.
When plotted these pairs of and
will look like a sine wave. The process
is repeated for all appropriate (x,y)
locations.
x cos y sin
Edge Linking and Boundary Detection
Hough Transform Example
The intersection of the
curves corresponding to
points 1,3,5
2,3,4
1,4
Edge Linking and Boundary Detection
Hough Transform Example
Thresholding
Assumption: the range of intensity levels covered by objects of interest
is different from the background.
1 if f ( x, y ) T
g ( x, y )
0 if f ( x, y ) T
Single threshold Multiple threshold
Thresholding
The Role of Illumination
Thresholding
Basic Global Thresholding
Thresholding
Basic Global Thresholding
Thresholding
Basic Adaptive Thresholding
Thresholding
Basic Adaptive Thresholding
How to solve this problem?
Thresholding
Basic Adaptive Thresholding
Answer: subdivision
Thresholding
Optimal Global and Adaptive Thresholding
This method treats pixel values as probability density functions.
The goal of this method is to minimize the probability of misclassifying
pixels as either object or background.
There are two kinds of error:
mislabeling an object pixel as background, and
mislabeling a background pixel as object.
Thresholding
Use of Boundary Characteristics
Region-Based Segmentation
Edges and thresholds sometimes do not give good results
for segmentation.
Region-based segmentation is based on the connectivity
of similar pixels in a region.
Each region must be uniform.
Connectivity of the pixels within the region is very important.
There are two main approaches to region-based
segmentation: region growing and region splitting.
Region-Based Segmentation
Region Growing
Fig. 10.41 shows the histogram of Fig. 10.40 (a). It is difficult to
segment the defects by thresholding methods. (Applying region growing
methods are better in this case.)
Figure 10.40(a) Figure 10.41
Region-Based Segmentation
Region Splitting and Merging
Region splitting is the opposite of region growing.
First there is a large region (possible the entire image).
Then a predicate (measurement) is used to determine if the region
is uniform.
If not, then the method requires that the region be split into two
regions.
Then each of these two regions is independently tested by the
predicate (measurement).
This procedure continues until all resulting regions are uniform.
Region-Based Segmentation
Region Splitting
The main problem with region splitting is determining where to split a
region.
One method to divide a region is to use a quadtree structure.
Quadtree: a tree in which nodes have exactly four descendants.
Region-Based Segmentation
Region Splitting and Merging
The split and merge procedure:
Split into four disjoint quadrants any region Ri for which P(Ri) =
FALSE.
Merge any adjacent regions Rj and Rk for which P(RjURk) = TRUE.
(the quadtree structure may not be preserved)
Stop when no further merging or splitting is possible.
Color Image Processing
Preview
Motive
- Color is a powerful descriptor that often simplifies
object identification and extraction from a scene.
- Human can discern thousands of color shades and
intensities, compared to about only two dozen shades of
gray.
Preview
Preview
Preview
Color image processing is divide into two major
area:
Full-Color Processing
Pseudo-Color Processing
Color Fundamentals
The experiment of Sir Isaac Newton, in 1666.
Color Fundamentals (con’t)c
Color Fundamentals (con’t)
Standard wavelength values for the
primary colors
Color Fundamentals (con’t)
Color Fundamentals (con’t)
The characteristics generally used to distinguish one color
from another are Brightness, Hue, and Saturation.
Hue: Represents dominant color as perceive by an observer.
Saturation: Relative purity or the amount of white light mixed with
a hue
Hue and saturation taken together are called Chromaticity,
and therefore, a color may be characterized by its
Brightness and Chromaticity.
Color Fundamentals (con’t)
Chromaticity Diagram
Green Point =
62% green,
25% red,
13% blue.
Color Fundamentals (con’t)
Color Gamut
produced by RGB
monitors
Color Gamut
produced by high
quality color printing
device
Color Models
The purpose of a color model (also called color space or
color system) is to facilitate the specification of colors in
some standard, generally accept way.
RGB (red,green,blue) : monitor, video camera.
CMY(cyan,magenta,yellow),CMYK (CMY, black) model for
color printing.
and HSI model,which corresponds closely with the way humans
describe and interpret color.
The RGB Color Models
The RGB Color Models (con’t)
2
8 3
16,777,216 Colors
The RGB Color Models (con’t)
The CMY and CMYK Color Models
Cyan, Magenta and Yellow are the secondary colors
of light
Most devices that deposit colored pigments on
paper, such as color printers and copiers, require
CMY data input.
C 1 R
M 1 G
Y 1 B
The CMYKColor Models
The HSI Color Models
The HSI Color Models
The HSI Color Models
Converting colors from RGB to HSI
if B G
H
360 if B G
1
[( R G ) ( R B )]
1
cos 2
1/ 2
[( R G ) 2
( R B )(G B )]
3
S 1 [min( R, G, B)]
( R G B)
1
I ( R G B)
3
The HSI Color Models
Converting colors from HIS to
RGB
RG sector :
0 H 120
B I (1 S )
S cos H
R I 1
cos( 60
H )
G 3I ( R B )
The HSI Color Models
Converting colors from HSI to
RGB
GB sector :
120 H 240
H H 120
R I (1 S )
S cos H
G I 1
cos( 60
H )
B 3I ( R G )
The HSI Color Models
Converting colors from HIS to
RGB
BR sector :
240 H 360
H H 240
G I (1 S )
S cos H
B I 1
cos( 60
H )
R 3I (G B)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
HSI & RGB
H, S, and I Components of RGB Colour Cube
RGB Colour Cube
Manipulating Images In The HSI
Model
In order to manipulate an image under the HIS model we:
First convert it from RGB to HSI
Perform our manipulations under HSI
Finally convert the image back from HSI to RGB
RGB RGB
HSI Image
Image Image
Manipulations