Chapter 6 : Color and Shading PowerPoint PPT Presentation

presentation player overlay
1 / 29
About This Presentation
Transcript and Presenter's Notes

Title: Chapter 6 : Color and Shading


1
Chapter 6 Color and Shading
  • Computer Vision Lab.
  • 2005. 7. 18
  • ???
  • ???

2
Contents
  • 6.1 Some physics of color
  • 6.2 The RGB basis for color
  • 6.3 Other color bases

3
Some physics of color (1)
  • perception of color
  • nanometer 10-9 meter

4
Some physics of color (2)
  • Sensing illuminated objects
  • The sensation, or perception, of an objects
    color depends upon three general factors
  • the spectrum of energy
  • the spectrum reflectance of the objects surface
  • the spectral sensitivity of the sensor
  • White light is composed of
  • approximately equal energy
  • in all wavelengths of the
  • visible spectrum.

5
Some physics of color (3)
  • Additional factors
  • variation of intensity with distance
  • variation of intensity with surface normal
  • Sensitivity of receptors

6
The RGB basis for color
  • RGB
  • (28)3 or 16 million color codes
  • additive color system (ex black(0,0,0))
  • one way to normalize image data
  • intensity I (RGB)/3
  • normalized red r R/(RGB)
  • normalized green g G/(RGB)
  • normalized blue b B/(RGB)
  • r g b 1

7
Other color bases (1)
  • The CMY subtractive color system
  • printing on white paper
  • abbreviation of Cyan-Magenta-Yellow
  • subtractive system for the encoding for
    absorption
  • white(0, 0, 0)
  • black(255, 255, 255)
  • yellow(0 0 255)

8
Other color bases (1)
  • HSI Hue-Saturation-Intensity
  • HSV Hue-Saturation-Value

9
Other color bases (1)
10
Other color bases (2)
  • YIQ and YUV for TV signals
  • YIQ encoding
  • luminance Y 0.3R 0.59G 0.11B
  • R-cyan I 0.6R 0.28G 0.32B
  • magenta-green Q 0.21R - 0.52G - 0.31B
  • YUV encoding
  • Digital video products and compression algorithms
    such as JPEG and MPEG
  • Y 0.3R 0.59G 0.11B
  • U 0.493(B - Y)
  • V 0.877(R Y)

11
Other color bases (3)
  • Using color for classification
  • finding a human face
  • prone to error
  • interpretation of an individual pixel
  • specular reflection
  • particular regions of the color space

12
Contents
  • 6.4 Color histograms
  • 6.5 Color Segmentation

13
Color Histograms
  • Why do make the histograms
  • Histogram is fast and easy to compute.
  • Size can easily be normalized so that different
    image histograms can be compared.
  • Can match color histograms for database query or
    classification.

14
Color Histograms
  • Creating a histogram
  • Gray

15
Color Histograms
  • How to make a color histograms
  • Make 3 histograms and concatenate them
  • using higher n bits of each RGB
  • ex) if n 2 then 26 64 bins
  • Can normalize histogram to hold frequencies so
    that bins total 1.0

16
Color Histograms
  • How to make a color histograms
  • Make 3 histograms

17
Color Histograms
  • How to make a color histograms
  • using higher n bits of each RGB

4 bit 48 bins
18
Color Histograms
  • Histogram Matching for Color Object Recognition
  • Swain and Ballards

H(I)
H(M)
19
Color Segmentation
  • Segmentation is the process of identifying based
    on common properties
  • These properties could include intensity, color,
    texture, etc.
  • Thresholding grayscale images can be useful for
    segmentation

20
Color Segmentation
  • Application

21
Color Segmentation
  • Application
  • Training samples of skin color in RGB-space
  • RGB-space divided into skin versus non-skin
  • Input image pixels labeled skin versus non-skin
  • Connected components extracted
  • Small regions thrown away, largest one kept
  • Some regions merged into largest face region

22
Color Segmentation
  • Application

(left) input video frame, (center) pixels
classified according to RGB space, (right)
largest connected component with aspect similar
to a face (all work contributed by Vera Bakic)
23
Color Segmentation
  • (a) Original image.
  • (b) Pixels detected as skin.
  • (c) Segmentation after histogram clustering.
  • (d) Label erosion of size 2 of c.
  • (e) Label dilation of size 2 of d.
  • (f) Watershed segmentation using the markers of e.

24
Shading
  • Several factors affect how am image is viewed or
    captures
  • specularity of the surface
  • distance of the light source and the camera
  • angle of the light source on the object surface
  • all play a role in the perception of an object

25
Shading
  • Radiation from one light source
  • Received i n ? s.
  • Cj/Aj cos?j
  • ?j angle between nj and s

26
Shading
  • Diffuse reflection
  • Diffuse reflected i nj ? s
  • A diffuse reflecting surface reflects light
    uniformly in all directions
  • Uniform brightness for all viewpoints of a planar
    surface.

27
Shading
  • Diffuse reflection from lambertain objects

28
Shading
  • Sepecular reflection

R is the ray of reflection V is direction
from the surface toward the viewpoint ? is
the shininess parameter
29
Shading
  • Darkening with distance
  • The intensity of light received by any object
    surface will decrease with square of its distance
    from the source.
Write a Comment
User Comments (0)
About PowerShow.com