0% found this document useful (0 votes)
153 views58 pages

Color Image Processing

The document discusses color image processing and various aspects related to color such as color perception, color models, and color spaces. It provides details on: 1) How humans perceive color through retinal cones and opponent color theory. 2) Common color models like RGB, HSI, CMYK, YCbCr and color spaces like CIE L*a*b* that are used to represent colors. 3) Concepts of color perception, specification and gamut. 4) Types of color image processing including pseudo color processing for intensity images and full color processing on individual color components or vector-based approaches.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views58 pages

Color Image Processing

The document discusses color image processing and various aspects related to color such as color perception, color models, and color spaces. It provides details on: 1) How humans perceive color through retinal cones and opponent color theory. 2) Common color models like RGB, HSI, CMYK, YCbCr and color spaces like CIE L*a*b* that are used to represent colors. 3) Concepts of color perception, specification and gamut. 4) Types of color image processing including pseudo color processing for intensity images and full color processing on individual color components or vector-based approaches.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 58

Color Image Processing

Color Image Compression


 Color Image
 Color is a powerful descriptor that helps or simplifies object
identification, and extraction of objects from a scene.

 A color image is an M x N x 3 array of color pixels, where each


pixel is a triplet corresponding to the color components.

 Appropriate color models/color spaces according to the application


are used generally to facilitate the specification of colors in some
standard, accepted way.

Eg. RGB, HSI, YUV, HSV, CMY, CMYK, YCbCr, CIE L*a*b* ,
CIE L*u*v* etc.
Color Perception
 3 types of cones: L (64%), M (32%), S (2%)
Retinal Physiology and Color
 Human retinas have (at least) four types of
photoreceptors
 Three types of ‘cones’
 High light level, high acuity vision

 Each type of cone has a different spectral


response
 One type of ‘rods’
 Low-light level and peripheral vision
Color Perception
 Tri chromatic theory
 Opponent Color theory
 HVS Color perception can be modeled in two steps
 The received light is first transformed into three signals as
received by the three types of cones in the retina.
 The received signals are combined into three components one
achromatic and two chromatic.

 Red/Green opponent signal: R-G


 Yellow/Blue opponent signal: (R+G)-B
Color Perception
Original

Red-Green Blue-Yellow
opponency opponency
Primary and Secondary colors
Additive Color System: By
adding the primary colors of
light
Subtractive Color System: By
subtracting a primary color of
light, absorbing the primary
color and reflecting the other
two – eg. printing industry
Eg. Yellow – absorbs blue and
transmits Red & Green
Color Specification
 Color can be specified using the tri-stimulus values R, G,
and B.

 The amounts of Red, Green and Blue needed to form a


particular color are called the tri-stimulus values.

 A color can be then specified by its tri-chromatic


coefficients, (x,y,z) where
R G B
x ,y ,z 
RG B RG B RG B
 Color can be specified in terms of Hue (H) Saturation (S)
and Intensity (I).
Chromaticity Diagram
Colour Gamut
Color Models
 Specify colors in a standard accepted way.

 A color model is a specification of a coordinate system and


a subspace within that system where each color is
represented by a single point.

 Oriented toward hardware or toward application where


color manipulation is the goal.

 Eg. RGB, HSI, NTSC, HSV, CMY, CMYK, YCbCr, CIE


L*a*b* , CIE L*u*v* etc.
RGB Color Model
 Specify Colour in terms of three primary colours: red, green
and blue, mixed together.

 The model is based on a Cartesian coordinate system

 Used in television, computer monitors, etc.

 We specify the levels of R, G and B in the range [0, 1], but


they can easily be extended to other ranges (8-bit integers for
example).

 A full colour image – 24-bit RGB. Safe RGB colours – 216


+ 40 – 256 colours
The RGB Color Cube
HSI Color Model
 RGB is good for generating colors but not for
describing colors as humans perceive them.

 HSI - Specify color in terms of Hue Saturation and


Intensity.

 Color information is decoupled from intensity – I


gives an intensity image.
RGB - HSI model
Colors on this triangle
Have the same hue

Intensity
line

saturation
RGB - HSI model
HSI model
RGB to HSI conversion
 if B  G
H 
360   if B  G
with
 

1
( R  G )  ( R  B) 
  cos  1 2
1 



 ( R  G ) 2  ( R  B )(G  B ) 2

3
S  1 [min( R, G , B )]
( R  G  B)
1
I  ( R  G  B)
3
HUE BRIGHTNESS SATURATION

R
G
B

HUE BRIGHTNESS SATURATION

M
Y
C
CIE L*a*b* Color Space

 The CIE L*a*b* Color Space


 L* defines lightness, a* denotes the red/green
value and b* the yellow/blue value
 The CIE L*a*b* is approximately perceptually
uniform
 There exists no direct conversion between the
RGB and the CIE L*a*b* color space
CIE L*a*b* Color Space
 the conversion can be done via the CIE XYZ color space
 The linear transformation between RGB and XYZ values is
as follows  X  0.412453 0.357580 0.180423  R 
 Y    0.212671 0.715160 0.072169 G 
    
 Z  0.019334 0.119193 0.950227  B 

 The transformation between XYZ and L*a*b* values is


nonlinear:

116 .(Y / Yn )
1/ 3
 16 Y / Yn  0.008856
L 
*

903 .3.Y / Yn otherwise
a *  500 .( f ( X / X n )  f (Y / Yn ))
t 1/ 3 t  0.008856
b  200 .( f (Y / Yn )  f ( Z / Z n ))
* f (t )  
7.787.t  16 / 116 otherwise
CIE L*a*b* Color Space

 Xn, Yn and Zn denote the tristimulus values of the


reference white.
 For D65, [Xn, Yn, Zn] = [95.047,100,108.883].
The YCbCr Color Space

 The YCbCr Color Space


 YCbCr is a family of color spaces used as a part of the
Color image pipeline in video and digital photography
systems.
 Y is the luma component and Cb and Cr are the blue-
difference and red-difference chroma components.
 YCbCr is a practical approximation to color processing
and perceptual uniformity, where the Primary colours
corresponding roughly to Red, Green and Blue are
processed into perceptually meaningful information
The YCbCr Color Space

 To convert from RGB to YCbCr, the


following operation is used.

Y  0.2989 R  0.5866G  0.1145B

Cr  0.1687 R  0.3312G  0.5000 B

Cb  0.5000 R  0.4183G  0.0816 B


Processing Color Images
Introduction

 Two major areas of color image


processing are
 Full color Processing: Images acquired with
full color sensors are used for processing

 Pseudo Color Processing: A color will be


assigned to a particular monochrome intensity
or range of intensities.
Pseudo Color Processing
Intensity slicing

 3-D view of intensity image

Color 1

Color 2

Image plane
 Alternative representation of intensity slicing
 More slicing plane, more colors
Application 1

Radiation test pattern 8 color regions

* See the gradual gray-level changes


Application 2

X-ray image of a weld


Application 3

Rainfall statistics –
in tropical regions of
earth
Washington D.C. – Potomac River

R G

Near
Infrared
(sensitive
B to biomass)

R+G+B near-infrared+G+B
Full Color Processing
 Two approaches
 Each component processed separately –
Per-Color-Component Processing.

 Work with each pixel treating it as a


vector having three components – Vector
Based Processing.
Color pixel

 A pixel at (x,y) is a vector in the color space


 RGB color space
 R( x, y) 
c( x, y)  G( x, y)
 B( x, y) 
 gray-scale image

f(x,y) = I(x,y)
Example: spatial mask
How to deal with color vector?
 Per-color-component processing
 Process each color component

 Vector-based processing
 Process the color vector of each pixel

 When can the above methods be equivalent?


 Process can be applied to both scalars and vectors

 Operation on each component of a vector must be

independent of the other component


Full Color Processing
Example Marginal  R  100 
  
median  V  100 
 
 B0 
 R  100   R0   R  100 
     
 V 0   V  100   V  100 
     
 B0   B0   B  100 
 R0 
 
Vectorial  V  100 
median  
 B  0 
Full Color Processing

False
Colours !!
Marginal
Median

Vectorial
Median
Full Color Processing
 Color Transformations
 Intensity modification
 Color complements
 Color Slicing
 Histogram processing
 Color image smoothing and sharpening
 Noise removal
 Color image Compression
 Color image segmentation
Color transformation

 Similar to gray scale transformation


 g(x,y)=T[f(x,y)]

 Color transformation
si  Ti (r1 , r2 ,..., rn ) , i  1,2,..., n
Use which color model in color
transformation?
 RGB CMY(K)  HSI

 Theoretically, any transformation can be


performed in any color model

 Practically, some operations are better suited to


specific color model
Example: modify intensity of a color
image
 Example: g(x,y)=k f(x,y), 0<k<1
 HSI color space
 Intensity: s3 = k r3

 RGB color space


 For each R,G,B component: si = k ri

 CMY color space


 For each C,M,Y component: si = k ri +(1-k)

Processing results are the same. Which operations is the fastest?


Original image k=0.7 (reduce intensity)

I H,S
Color complement

 The Color Circle


Transformation: Color complement
Color slicing

 Recall the pseudo-color intensity slicing

1-D intensity
Color slicing
 How to take a region of colors of interest?

Sphere region Cube region

prototype color
prototype color
Application

cube sphere
Color Slicing


0.5 if [ r j  a j  W 1 j  n
si   2

ri otherwise


if  rj  a j   R0
n
1 j  n
2 2
0.5
si   j 1
r
i otherwise
Histogram processing
Color image smoothing

 Neighborhood processing
Color image smoothing: averaging
mask
1
c( x, y ) 
K
 c( x, y )
( x , y )S xy
vector processing

Neighborhood
Centered at (x,y)

1 
  R ( x, y ) 
 K ( x , y )S xy 
1 
c( x, y )    G ( x, y )  per-component processing
 K ( x , y )S xy 
1 
 K  B ( x, y ) 
 ( x , y )S xy 
Image Smoothing
Image Smoothing
Image sharpening
Image Compression

You might also like