0% found this document useful (0 votes)
11 views

Lecture-6 (Color Image Processing)

Uploaded by

eisha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Lecture-6 (Color Image Processing)

Uploaded by

eisha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Color Image Processing

 History of Image and Video  Color Model in Video,


Capturing, - YIQ Color Model,
 Light, - YUV Color Model,
- Intensity of Light, - YCrCb Color Model.
 Color Fundamental,  Video Communication/
 Color Models in Images, Broadcast System,
- RGB color model, - Camera Operation,
- Graphics/Image Data Structure, - Video display scanning,
- Monochrome & Gray-scale Images, - Scanning Video,
- Pseudo & True-Color Images. - Interlaced scanning.
 Pseudocolor Image processing,  Video Standards over Screen
- Intensity slicing, Display,
- Intensity of color transformation, - NTSC Video,
 Smoothing and Sharpening, - PAL Video.
@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)
1. Light
• Light exhibits some properties that make it appear to
consist of particles; at other times, it behaves like a wave.
• Light is electromagnetic energy that radiates from a
source of energy (or a source of light) in the form of
waves.
• Visible light is in the 400 nm – 700 nm range of
electromagnetic spectrum.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


1.1 Intensity of Light
• The strength of the radiation from a light source is measured using
the unit called the candela, or candle power. The total energy from
the light source, including heat and all electromagnetic radiation, is
called radiance and is usually expressed in watts.
• Luminance is a measure of the light strength that is actually perceived
by the human eye. Radiance is a measure of the total output of the
source; luminance measures just the portion that is perceived.
• Brightness is a subjective, psychological measure of perceived
intensity. Brightness is practically impossible to measure objectively.
It is relative. For example, a burning candle in a darkened room will
appear bright to the viewer; it will not appear bright in full sunshine.
• The strength of light diminishes is inverse square proportion to its
distance from its source. This effect accounts for the need for high
intensity projectors for showing multimedia productions on a screen
to an audience.
@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)
2. Color Fundamentals (Basics of Color)
• Color is the sensation registered when light of different wavelengths
is perceived by the brain.
• Observed in objects that reflect or emit certain wavelengths of light.
• Can create the sensation of any color by mixing appropriate amounts
of the three primary colors — red, green, and blue.

• Can create colors on computer monitors using the emission of 3


wavelengths of light in appropriate combinations.
• Hue distinguishes among colors such as red, green, and yellow.
• Saturation refers to how far color is from a gray of equal intensity.
• Lightness embodies the achromatic notion of perceived intensity of a
reflecting object.
• Brightness is used instead of lightness for a self-luminous object such
as CRT.
@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)
2. Color Fundamentals (Basics of Color)(Cont…)
Hue, Saturation and Brightness/Luminance

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


2. Color Fundamentals (Basics of Color)(Cont…)
Color spectrum and visible range

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


2. Color Fundamentals (Basics of Color)(Cont…)
• 6 to 7 million cones in the human eye can be divided into three
principal sensing categories, corresponding roughly to red, green,
and blue.
65%: red 33%: green 2%: blue (blue cones are the most
sensitive)

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


2. Color Fundamentals (Basics of Color)(Cont…)
• Absorption characteristics of the human eye, color are seen as
variable combinations of the so-called primary colors red (R),
green (G) and blue (B).
• The following specific wavelength values to the three primary
colors. Blue = 445 nm, green = 535nm and red = 575nm

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


2. Color Fundamentals (Basics of Color)(Cont…)
• Primary and secondary colors

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


3. Color Models in Images
(1) RGB color model:
 Each displayed color is described by three independent parameters-
the luminance of each of the three primary colors (0 – 1) - primary
used in color CRT monitors

 Employs a Cartesian coordinate system. The RGB primaries are


additive; which means that individual contributions of each primary are
added for the creation of a new color.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


3. Color Models in Images

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


3. Color Models in Images (Cont…)
(2) Graphics/Image Data Structure Model:
 Pixels: picture elements in digital images
 Image resolution (M*N): number of pixels in a digital image

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


3. Color Models in Images (Cont…)
(3) Monochrome & Gray-scale Images Model:

• Monochrome image • Gray-scale image (p(x, y)=0~1)


– Each pixel is stored as a single – Each pixel is usually stored as a
bit (p(x, y)=0 or 1). byte (0 to 125~127 levels).
– A 640 X 480 monochrome image – A 640 x 480 gray-scale image
requires 37.5 Kbytes. requires over 300KBytes.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


3. Color Models in Images (Cont…)
(4) Pseudo & True-Color Images Model:

• 8-bit (pseudo) color image • 24-bit (true) color image


– One byte for each pixel – Three bytes for each pixel.
– Support 256 colors – Support 256X256X256 colors.
– A 640 X 480 8-bit color image – A 640 X 480 24-bit color image
requires 307.2 Kbytes. requires 921.6 Kbytes.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


3. Color Models in Images (Cont…)
(5) CMY and CMYK Color Models:-
- Cyan, magenta and yellow are the secondary colors of light or,
alternatively; the primary colors of pigments.
- Cyan subtracts red light from reflected white.

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

- Pure magenta doesn't reflect green, and pure yellow doesn't


reflect blue.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


3. Color Models in Images (Cont…)
(5) CMY and CMYK Color Models:

CMY vs. CMYK

4/25/2022 16
@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)
3. Color Models in Images (Cont…)
(6) HIS Color Models:

brightness: the achromatic notion of intensity.

hue: dominant wavelength in a mixture of light waves, represents


dominant color as perceived by an observer.

saturation: relative purity or the amount of white light mixed with


its hue.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


3. Color Models in Images (Cont…)
(6) HIS Color Models:

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


4. Pseudocolor Image Processing
• Pseudocolor ( also called false color) image processing consists of
assigning colors to gray values based on a specified criterion.

• Pseudo or false color is used to differentiate the process of


assigning color to monochrome images from the processes
associates with true color images.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


4. Pseudocolor Image Processing (Cont…)
1) Intensity Slicing:-
- Intensity (sometimes called density) slicing and color coding is
one of the simplest examples of pseudocolor image processing.

- placing planes parallel to the coordinates plane of the image;


each plane then “slices” the function in the area of intersection.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


4. Pseudocolor Image Processing (Cont…)
1) Intensity Slicing:-
- Any pixel whose gray level is above the place will be coded
with one color and
- any pixel below the plane be coded with the other.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


4. Pseudocolor Image Processing (Cont…)
1) Intensity Slicing:-
- The idea f planes is useful primarily for a geometric
interpretation of the intensity-slicing techniques.

- When more levels are used, the mapping function takes on a


staircase form.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


4. Pseudocolor Image Processing (Cont…)

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


4. Pseudocolor Image Processing (Cont…)
2) Intensity to Color Transformation:-

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


4. Pseudocolor Image Processing (Cont…)
2) Intensity to Color Transformation:-

The images are


obtained from an
airport X-ray scanning
system.
The left contains
ordinary articles and
the right contains the
same articles as well as
a block of simulated
plastic explosives.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


5. Smoothing and Sharpening
1) Color Image Smoothing

Let S xy denote the set of coordinates defining a neighborhood


centered at (x, y ) in an RGB color image. The average of the
RGB component vectors in this neighborhood is
1 
  R ( s, t ) 
 K ( s ,t )S xy 
1 1 
c( x, y )  
K ( s ,t )S xy
c ( s, t )   
 K ( s ,t )S xy
G ( s, t ) 

 
1 B ( s, t ) 

 K ( s ,t )S xy 
 

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


5. Smoothing and Sharpening (Cont…)
1) Color Image Smoothing

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


5. Smoothing and Sharpening (Cont…)
1) Color Image Smoothing

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


5. Smoothing and Sharpening (Cont…)
1) Color Image Smoothing

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


5. Smoothing and Sharpening (Cont…)
2) Color Image Sharpening :-
- From vector analysis, we know that the Laplacian of a vector is
defined as:
. A vector whose components are equal to the Laplacian of the
individual scalar components of the input.
. In the RGB color system, the Laplacian of vector c:-

The Laplacian of vector c is

  2 R ( x, y ) 
 2 
  c ( x , y )    G ( x , y ) 
2

  2 B ( x, y ) 
 
@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)
6. Video Communication/Broadcast System
 Overall flow of video transmission from the source (camera) to the Receiver end
(monitor display).

Goals:
1. Efficient use of bandwidth.
2. High viewer perception of quality.

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


6. Video Communication/Broadcast System (Cont…)
(1) Camera Operation:

• Camera has 1, 2, or 3 tubes for sampling.


• More tubes (CCD’s) and better lens produce better pictures.
• Video composed of luminance and chrominance signals.
• Composite video combines luminance and chrominance.
• Component video sends signals separately.
@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)
6. Video Communication/Broadcast System (Cont…)
(2) Video Display Scanning:

• Three guns (RGB) energize phosphors


– Varying energy changes perceived intensity
– Different energies to different phosphors produces different colors
– Phosphors decay so you have to refresh
• Different technologies
– Shadow mask (delta-gun dot mask)
– PIL slot mask
– Single-gun (3@Copyrights:
beams) Digitalaperture-grille (Trinitron)
Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)
6. Video Communication/Broadcast System (Cont…)
(3) Scanning Video:
•Video is obtained via raster scanning, which transforms a 3-D signal
p(x, y, t) into a one-dimensional signal s(t) which can be transmitted.
• Progressive scanning: left-to-right and top-to-bottom
– Samples in time: frames/sec
– Samples along y: lines
– Samples along x: pixels

(only for digital video)


• We perceive the images as
continuous, not discrete:
human visual system
performs the interpolation !
• How many frames, lines, and pixels ?
@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)
6. Video Communication/Broadcast System (Cont…)
(4) Interlaced Scanning:
• If the frame rate is too slow - > flickering and jagged movements
• Tradeoff between spatial and temporal resolution
– Slow moving objects with high spatial resolution
– Fast moving objects with high frame rate
• Interlaced scanning: scan all even lines, then scan all odd lines.
• A frame is divided into 2 fields (sampled at different time)

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


7. Color Model in Video
 YIQ and YUV are the two commonly used color models in video.
(1)YIQ Color Model:-
• YIQ color model: used in NTSC color TV
• Y - Luminance containing brightness and detail (monochrome TV)
• To create the Y signal, the red, green and blue inputs to the Y signal
must be balanced to compensate for the color perception misbalance of
the eye.
– Y = 0.3R + 0.59G + 0.11B

• Chrominance
– I = 0.6R – 0.28G - 0.32B (cyan-orange axis)
– Q = 0.21R – 0.52G + 0.31B (purple-green axis)

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


7. Color Model in Video (Cont…)
(1) YIQ Color Model:-
• Human eyes are most sensitive to Y, next to I, next to Q.
• In NTSC broadcast TV, 4.2 MHz is allocated to Y, 1.5 MHz to I and
0.55 MHz to Q. For VCR, Y is cut down to 3.2 MHz and I to 0.63
MHz.
Example:-

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


7. Color Model in Video (Cont…)
(2) YUV Color Model:-
• used for PAL TV and CCIR 601 standard
• Same definition for Y as in YIQ model.
– Y = 0.3R + 0.59G + 0.11B

•Chrominance is defined as the difference between a color and a


reference white at the same luminance.
•It can be represented by U and V -- the color differences.

U=B-Y
V=R-Y
– If b/w image, then U = V = 0. --> No chrominance!

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


7. Color Model in Video (Cont…)
(2) YUV Color Model:-
• Eye is most sensitive to Y. In PAL, 5 (or 5.5) MHz is allocated to Y,
1.3 MHz to U and V.

Example:-

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


7. Color Model in Video (Cont…)
(3) YCrCb Color Model:-

• YCbCr color model: used in JPEG and MPEG

• Closely related to YUV: scaled and shifted YUV


– Cb = ((B – Y)/2) + 0.5
– Cr = ((R – Y)/1.6) + 0.5

• Chrominance value in YCbCr are always in the range of 0 to 1


(normalization)
-> Make digital processing easy

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


8. Video Standards over Screen Display
• NTSC Video: Japan, US, …
- 525 scan lines per frame, 30 frames per second
- Interlaced, each frame is divided into 2 fields, 262.5 lines/field
- 20 lines reserved for control information at the beginning of each
field
- So a maximum of 485 lines of visible data
- Color representation: YIQ color model

• PAL Video: China, UK, …


- 625 scan lines per frame, 25 frames per second (40 msec/frame)
Interlaced, each frame is divided into 2 fields, 312.5 lines/field
- Uses YUV color model
- Approximately 20% more lines than NTSC
- NTSC vs. PAL@Copyrights:
-> roughly sameOrganized
Digital Image Processing bandwidth
by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)
8. Video Standards over Screen Display (Cont…)

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)


9. Pixel Resolution For PSNR Adjustment
• Pixel resolution depends quantization levels/bits
• Usually, 8 bits for each luma/chroma sample when no compression
-> 8bits/1byte per pixel for gray image, 24bits/3byetes for true color
image

@Copyrights: Digital Image Processing Organized by Dr. Ahmad Jalal (http://portals.au.edu.pk/imc/)

You might also like