Sie sind auf Seite 1von 20

4/24/2019

DIGITAL IMAGE PROCESSING

COLOR IMAGE PROCSSING

• IMPORTANT NOTE:

– Students must read all relevant topics of Chapter 6


of the Book.
– Exams may include short Theoretical Questions
from the text in the book which will test Student’s
understanding of the Color Image.

1
4/24/2019

COLOR IMAGE PROCSSING


SEQUENCE
• Informal introduction to Color Images RGB
• Human Eye
• Color Cameras and Color LCDs description
• Color Fundamentals
• Color Models (along with Matlab Demo)
• Conversion between Color Models
• Color Image Processing
– Smoothing
– Sharpening
– Color Changing
– Color Transformations

– …..
• Pseudocolor Image Processing

COLOR IMAGE PROCSSING


Introduction
Color is a powerful descriptor
• How many shades of gray can Human
Discern?
– Answer = approx 2 dozen
• How many colors human can discern?
– Answer - Thousands

2
4/24/2019

COLOR IMAGE PROCSSING


Introduction
• Color is a physio-psychological phenomenon that is not fully understood.
• 1666 Isaac Newton discovered splitting of colors through prism
• Why we see colors ?
– Reflectance of different wavelengths by different objects
• Chromatic light range on EM Spectrum
– 400nm - 700nm (approx)
• Each color smoothly runs into next.

•Achromatic (void of color) – only attribute is intensity


•Color/Chromatic: Violet…. Blue….. Green….. Yellow….. Orange…… red

COLOR IMAGE PROCSSING


Introduction
• How to describe Colors ?
– 3 basic quantities are used to describe color source
• Radiance (Transmitter Part): Total amount of energy
radiating from light source. Measured in Watts.
• Luminance (Receiver Part:) measure in lumens. Amount of
energy an observer perceives from the light source.
Example. InfraRed light source may have high radiance but
zero luminance (as humans can not perceive it).
• Brightness. It is a subjective descriptor and impossible to
measure. It embodies the achromatic notion of intensity.

3
4/24/2019

COLOR IMAGE PROCSSING


Human Visual System
• Optical receptors:
– Cones (6-7 million)
– Rods (75-150 million)
• In human eye, cones are the sensor responsible for color vision
• 65% cones are sensitive to Red Light,33% to Green Light and 2% to Blue
light. But Blue cones are most sensitive than green and red cones.

COLOR IMAGE PROCSSING


Experimental Results of absorption of Light by Human eye

4
4/24/2019

COLOR IMAGE PROCSSING


Primary Colors
• Due to the absorption characteristics of human eye (previous slide), colors are
seen as variable combinations of so called PRIMARY COLORS (Red, Green, Blue)
• It can be seen from Dig that no Color can be called Blue, green or Red but for the
purpose of Standardization, CIE(Commission Internationale de l’Eclairage)
designated following wavelength to colors in 1931.
• Red (R): 700 nm
• Green (G): 546.1 nm
• Blue (B): 435.8 nm
• Wavelength assignment was done before Fig 6.3 was available (previous slide)
• Secondary Colors (by adding primary colors): CMY
• Magenta (C) = (R+B)
• Cyan (C) = (G+B)
• Yellow (Y) = (R+G)
• Mixing 3 Primary colors or secondary color with its opposite primary color in the
right intensities produces white light

Mixing Colors
LIGHT SOURCE
Primary color (of light) is the one that
transmits the primary color and
subtracts the other two.

PIGMENT ( REFLECTION)
Primary color (of pigments) is the one
that subtracts or absorbs a primary
color of light and reflects or transmits
the other two.
A pigment is a material that changes the
color of reflected or transmitted light as
the result of wavelength-selective
absorption. e.g printed paper or any
object which reflects light.

5
4/24/2019

Characteristics to distinguish Colors


• Brightness: Achromatic/chromatic notion of intensity
and impossible to measure.
• Hue: Associated with the dominant wavelength in a
mixture of light waves. Hue represents dominant color
as perceived by an observer.
• Saturation: Relative purity or the amount of white light
mixed with hue. Pure spectrum colors are fully
saturated. Pink (red + white) and lavender ( violet and
white) are less saturated.
• Chromaticity: Hue and saturation taken together. A
color may be characterized by its brightness and
chromaticity.

Characteristics to distinguish Colors


• Tri-stimulus values: The amount of red, green and
blue to make any specific color. A color is specified by
its trichromatic coefficients:

X Y Z
x y z
X Y  Z X Y  Z X Y  Z

x  y  z 1

Where X=red, Y=green, Z=blue color values

6
4/24/2019

Chromaticity Diagram
• A way of showing/specifying color
• Green pt marked (62% green, 25%
red and 13% blue)
• Boundary of tongue shaped shows
pure colors (violet 380nm to red
780nm)
• Straight line between two pts
shows color profiles between them
• Any pt on the boundary is fully
saturated (max Saturation)
• As the point leaves boundary and
reaches point of equal energy
becomes less and less saturated
• Saturation = Zero, at the Point of
Equal Energy.
• Extension of this to three colors is
simple

Color
Gamut

COLOR LCD (Only Additive


color mixing operations)

Color Printer (Additive and


subtractive color mixing
operations)

7
4/24/2019

Common Misperception
• A common misperception is that
we can produce all possible colors
by adding three primary colors.
• We can produce limited colors by
additive color mixing of three
primary (or any three) colors; But
not all.
• You can see that any triangle with
three vertices fixed at any three
colors in the diagram can not cover
the entire spectrum.
• So, we would also need to change
wavelength for full spectrum.

Color Models
• Specification of colors
• Color models:
– RGB (red, green blue)
– CMY (cyan, magenta, yellow)
– CMYK (cyan, magenta, yellow, black)
– HSI (hue, saturation, intensity)

8
4/24/2019

RGB Color Model

RGB Color Model


•Pixel Depth: Number of bits required to represent each pixel in a
color space
•Each color is 8 bits
•Pixel depth is 24
•Full-color image is used to denote a 24-bit RGB color image
•Total # of colors in 24 bit RGB image is (28)3 = 16,777,216 (16 Megs)

9
4/24/2019

RGB Color Model

Safe RGB Colors


• 24 bit RGB ( (28)^3 = 16,777,216 colors) is too
much for some systems
• 256 color system 8bit RGB is acceptable
• 40 of 256 are known to be processed
differently by different operating systems
• Rest 216 colors are de facto standard for safe
colors
• Specially used for internet/web applications

10
4/24/2019

RGB Color Model


For Safe Colors the values are limited to only six values as fol;

So total Safe Colors = 63 = 216 safe colors

RGB SAFE Color Model

11
4/24/2019

CMY or CMYK Model


• CMY are secondary colors of light or primary
colors for pigments
• In CMY-K model, K is used for printers for Black

 C  1  R 
 M   1  G 
    
 Y  1  B 

• Assumption is that colors are normalized (0-1)

HSI Model •For Human visualization


•% of RGB in an object
•Or HSI in an object
•Car example

12
4/24/2019

HSI Model

Humans do not interpret colors as combination of RGB


HSI model is more intuitive (light pink, dark yellow)

HSI Model

13
4/24/2019

HSI
Model

HSI Model

14
4/24/2019

RGB to HSI

  if B  G 
1
( R  G )  ( R  B) 
  cos  2
H 
1
1/ 2 
360   if B  G 
 ( R  G )  ( R  B)(G  B ) 
2

 

3
S  1 [min( R, G, B)]
( R  G  B)

1
I  ( R  G  B)
3

RGB to HSI

15
4/24/2019

HSI to RGB

Pseudocolor Image Processing


(Intensity Slicing)

16
4/24/2019

Intensity Slicing

Intensity Slicing – 8 Colors

17
4/24/2019

Intensity
Slicing

Intensity Slicing

18
4/24/2019

Gray level to Color Transformations

Color Images

Full-color image
(Image obtained by
Pseudo-color image
genuine acquisition
(Color is artificially
system like camera,
generated to show
scanner)
functionality)

19
4/24/2019

SAMPLE QUESTIONS
• Convert an Image from RGB to HSI and vice versa
• Convert an Image from RGB to grey scale
• Allocate a grey scale image pseudo colors according to a plotted function.
• Color Image segmentation. Convert to HIS and then filter on Hue for color
• Color image Smoothing and Sharpening
• Short Questions to test concepts

20

Das könnte Ihnen auch gefallen