Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 49

Digital Image Processing &

Computer Vision

Color Edges
Agenda
 Canny Edge Detector

 The Shen-Castan (ISEF) Edge Detection

 Comparison of Optimal Edge Detectors

 Color Edges

2
Shen-Castan Edge Detection

• Edge detection is an image processing technique for finding the boundaries of objects within images.
• Edge detection is used for image segmentation and data extraction in areas such as image processing, computer
vision, and machine vision.

• One of the edge detection techniques that used in the image processing with noise input.

• Advantage and Disadvantage


• The unique feature of the Shen-Castan Edge Detection is that it can detect the edge of an image with noise.
• By using an Infinite Symmetric Exponential Filter, the noise will be eliminated.
• Also, Shen-Castan Edge Detection provides better localization than Canny's operator, because the
implementation of Canny's algorithm approximates his optimal filter by the derivative of a Gaussian
function, whereas Shen-Castan Edge Detection use the optimal filter directly.
3
• The disadvantage of the Shen-Castan Edge Detection is that the calculation/processing time is longer than other edge detection algorithm.

• Algorithms[1]

• Input data with Infinite Symmetric Exponential Filter (ISEF). The ISEF will filtering out any noise that will affect the quality of the
image. The Optimal ISEF function:

• Then find the localization edges by zero crossing of the Laplacian. To get Laplacian approximation, use smoothed image subtract
original image. The result will be a band limited Laplacian image. The final step will be to set all positive value to 1 and other to 0 to
get binary Laplacian image.

4
Comparison

• The Canny algorithm convolves the image with the derivative of a Gaussian, and then performs nonmaximum
suppression and hysteresis thresholding.
• The Shen- Castan algorithm convolves the image with the Infinite Symmetric Exponential Filter, computes the BLI,
suppresses false zero crossings, performs adaptive gradient thresholding, and finally also applies hysteresis
thresholding.

5
Color Image Processing
Preview

• Why use color in image processing?


• Color is a powerful descriptor
• Object identification and extraction
• eg. Face detection using skin colors
• Humans can discern thousands of color shades and intensities
• c.f. Human discern only two dozen shades of grays
Preview (cont.)
• Two category of color image processing
• Full color processing
• Images are acquired from full-color sensor or equipments
• Pseudo-color processing
• In the past decade, color sensors and processing hardware are not available
• Colors are assigned to a range of monochrome intensities
Outline

• Color fundamentals
• Color models
• Pseudo-color image processing
• Basics of full-color image processing
• Color transformations
• Smoothing and sharpening
Color fundamentals
• Physical phenomenon
• Physical nature of color is known

• Psysio-psychological phenomenon
• How human brain perceive and interpret color?
Color fundamentals (cont.)
• 1666, Isaac Newton 三稜鏡
Visible light

• Chromatic light span the electromagnetic spectrum


(EM) from 400 to 700 nm
Color fundamentals (cont.)
• The color that human perceive in an object = the light reflected from
the object

scene
Illumination source

reflection
eye
Physical quantities to describe a
chromatic light source
• Radiance: total amount of energy that flow from the
light source, measured in watts (W)
• Luminance: amount of energy an observer perceives
from a light source, measured in lumens (lm 流明 )
• Far infrared light: high radiance, but 0 luminance
• Brightness: subjective descriptor that is hard to
measure, similar to the achromatic notion of intensity
How human eyes sense light?

• 6~7M Cones are the sensors in the eye


• 3 principal sensing categories in eyes
• Red light 65%, green light 33%, and blue light 2%
Primary and secondary colors

• In 1931, CIE(International Commission on Illumination)


defines specific wavelength values to the primary colors
• B = 435.8 nm, G = 546.1 nm, R = 700 nm
• However, we know that no single color may be called red,
green, or blue
• Secondary colors: G+B=Cyan, R+G=Yellow,
R+B=Magenta
Primary colors of light v.s.
primary colors of pigments

• Primary color of pigments


• Color that subtracts or absorbs a primary color of light and
reflects or transmits the other two

Color of light: R G B

Color of pigments: absorb R absorb G absorb B


Cyan Magenta Yellow
Application of additive nature of light colors
• Color TV
CIE XYZ model
• RGB -> CIE XYZ model

• Normalized tristimulus values

=> x+y+z=1. Thus, x, y (chromaticity coordinate) is


enough to describe all colors
色度圖
By additivity of colors:
Any color inside the
triangle can be produced
by combinations of the
three initial colors

RGB gamut of
monitors
Color gamut of
printers
Outline

• Color fundamentals
• Color models
• Pseudo-color image processing
• Basics of full-color image processing
• Color transformations
• Smoothing and sharpening
Color models
• Color model, color space, color system
• Specify colors in a standard way
• A coordinate system that each color is represented by a single point

• RGB model Suitable for hardware or


• CYM model applications
• CYMK model
• HSI model - match the human description
RGB color model
Pixel depth

• Pixel depth: the number of bits used to represent each


pixel in RGB space
• Full-color image: 24-bit RGB color image
• (R, G, B) = (8 bits, 8 bits, 8 bits)
Safe RGB colors
• Subset of colors is enough for some application
• Safe RGB colors (safe Web colors, safe browser colors)

(6)3 = 216
Safe RGB color (cont.)

Full color cube Safe color cube


CMY model (+Black = CMYK)
• CMY: secondary colors of light, or primary colors of pigments
• Used to generate hardcopy output
HSI color model
• Will you describe a color using its R, G, B components?
• Human describe a color by its hue, saturation, and brightness
• Hue 色度 : color attribute
• Saturation: purity of color (white->0, primary color->1)
• Brightness: achromatic notion of intensity
HSI color model (cont.)

• RGB -> HSI model


Colors on this triangle
Have the same hue
Intensity
line
saturation
HSI model: hue and saturation
HSI model
HSI component images

R,G,B Hue

intensity
saturation
Edge detection
• Goal: Identify sudden
changes (discontinuities) in
an image
– Intuitively, most semantic and
shape information from the
image can be encoded in the
edges
– More compact than pixels

• Ideal: artist’s line drawing


(but artist is also using
object-level knowledge) Source: D. Lowe

Stanford University Lecture 5


35 10-Oct-17
-
Why do we care about edges?
• Extract information,
recognize objects

• Recover geometry and Vertical vanishing


point
(at infinity)
Vanishing

viewpoint line

Vanishing Vanishing
point point

Source: J. Hayes

Stanford University Lecture 5


36 10-Oct-17
-
Origins of
edges

surface normal discontinuity

depth discontinuity surface

color discontinuity

illumination discontinuity

Source: D. Hoiem

Stanford University Lecture 5


37 10-Oct-17
-
Closeup of edges

Surface normal discontinuity

Source: D. Hoiem

Stanford University
10-Oct-17 Lecture 5 -
Closeup of edges

Depth discontinuity

Source: D. Hoiem

Stanford University
10-Oct-17 Lecture 5 -
Closeup of edges

Surface color discontinuity

Source: D. Hoiem

Stanford University
10-Oct-17 Lecture 5 -
Convolution

41
Slide credit: Ulas Bagci

11
2D convolution
example

43 6-Oct-16
2D convolution
example

44 6-Oct-16
2D convolution
example

45 6-Oct-16
2D convolution
example

46 6-Oct-16
2D convolution
example

47 6-Oct-16
2D convolution
example

48 6-Oct-16
2D convolution
example

49 6-Oct-16

You might also like