Color Image Processing: Preview
Color Image Processing: Preview
Color Image Processing: Preview
Preview
Preview
Light
What do we see?
If its wavelength is comprised between 400 and 700 nm 1) a dominant wavelength (or frequency) which is the color
(visible spectrum), the wave can be detected by the human of the light (hue),
eye and is called monochromatic light 2) brightness (luminance), intensity of the light (value ),
1
18-11-2015
Primary Primary
color color Subtractive primary colors: CMY
use in the case of pigments in
printing devices
White subtracted by CMY to get
Black
2
18-11-2015
amount of red (X), green (Y) and blue (Z) to form any particular
color is called tristimulus.
Points on the boundary are
fully saturated colors
x
(Images from Rafael C. Gonzalez and Richard E.
nd
Wood, Digital Image Processing, 2 Edition.
3
18-11-2015
Color Monitors
Printing devices
The purpose of a color model (also called color space or color system)
Tri-stimulus values: The amount of Red, Green and
Blue needed to form any particular color is to facilitate the specification of colors in some standard, generally
Denoted by: X, Y and Z accept way.
RGB (red, green, blue) : monitor, video camera.
Tri-chromatic coefficient:
CMY(cyan, magenta, yellow),CMYK (CMY, black) model for color
printing.
and HSI model, which corresponds closely with the way humans
describe and interpret color.
Here we assume that r,g,b are real numbers in the interval [0,1].
You will often see the values of r,g,b as integers in the interval
[0,255].
4
18-11-2015
Source: www.mitsubishi.com
R = 8 bits
Color depth 24 bits Red fixed at 127
G = 8 bits = 16777216 colors
B = 8 bits
Hidden faces
of the cube
(Images from Rafael C. Gonzalez and Richard E. (Images from Rafael C. Gonzalez and Richard E.
nd nd
Wood, Digital Image Processing, 2 Edition. Wood, Digital Image Processing, 2 Edition.
• Eight bits means the channel can make eight combinations of on or off
of the color, per pixel, 256 colors total. You have three channels. How
many colors can be generated?
5
18-11-2015
(Images from Rafael C. Gonzalez and Richard E. (Images from Rafael C. Gonzalez and Richard E.
nd nd
Wood, Digital Image Processing, 2 Edition. Wood, Digital Image Processing, 2 Edition.
6
18-11-2015
• Why?
Pigments absorb light
7
18-11-2015
giving,
The image on the left was printed with only CMY inks
that is, red and blue. Black inks add contrast and depth to image on the image on
the right
8
18-11-2015
Relationship Between RGB and HSI Color Models Relationship Between RGB and HSI Color Models
• Will you describe a color using its R, G, B components? RGB, CMY models are not good for human interpreting
• Human describe a color by its hue, saturation, and
brightness HSI Color model:
Hue: Dominant color
– Hue : color attribute
Color carrying
– Saturation : purity of color (white->0, primary color->1) Saturation: Relative purity (inversely proportional information
– Brightness : achromatic notion of intensity to amount of white light added)
Intensity: Brightness
H
dominant
wavelength
S
purity
% white
I
Intensity
RGB HSI
Source: http://www.cs.cornell. edu/courses/cs631/1999sp/
53 (Images from Rafael C. Gonzalez and Richard E.
nd
Wood, Digital Image Processing, 2 Edition.
9
18-11-2015
Intensity is given by a position on the vertical axis. Intensity is given by a position on the vertical axis.
Example: HSI Components of RGB Cube Converting Colors from RGB to HSI
RGB Cube
10
18-11-2015
Converting Colors from HSI to RGB Example: HSI Components of RGB Colors
RG sector: GB sector:
RGB
Image Hue
BR sector:
Saturation Intensity
T C2
C1
0 T L-1
Intensity
A gray scale image viewed as a 3D surface.
(Images from Rafael C. Gonzalez and Richard E.
nd
Wood, Digital Image Processing, 2 Edition.
11
18-11-2015
Ck = Color No. k
An X-ray image of a weld with cracks l k = Threshold level k
Color
Ck
Ck-1
C3
Color
map
Blue component
Color
coded
images
12
18-11-2015
An X-ray image An X-ray image of a Used in the case where there are many monochrome images such as multispectral
of a garment bag garment bag with a satellite images.
simulated explosive
device
Color
coded
images
A close-up
(Images from Rafael C. Gonzalez and Richard E. (Images from Rafael C. Gonzalez and Richard E.
nd nd
Wood, Digital Image Processing, 2 Edition. Wood, Digital Image Processing, 2 Edition.
13
18-11-2015
Example: Full-Color Image and Variouis Color Space Components Color Transformation
Use to transform colors to colors.
Color image
Formulation:
CMYK components f(x,y) = input color image, g(x,y) = output color image
T = operation on f over a spatial neighborhood of (x,y)
i= 1, 2, …, n
HSI components
Where r i = color component of f(x,y) For RGB images, n = 3
(Images from Rafael C. Gonzalez and Richard E.
si = color component of g(x,y)
nd
Wood, Digital Image Processing, 2 Edition.
Color circle
Formula for CMY: I H,S
Set to gray
Set to gray
14
18-11-2015
Original image
Contrast enhancement
(Images from Rafael C. Gonzalez and Richard E. (Images from Rafael C. Gonzalez and Richard E.
nd nd
Wood, Digital Image Processing, 2 Edition. Wood, Digital Image Processing, 2 Edition.
where r and s are intensity components of input and output color image.
(Images from Rafael C. Gonzalez and Richard E.
nd
Wood, Digital Image Processing, 2 Edition.
15
18-11-2015
Color Image Smoothing Example (cont.) Color Image Smoothing Example (cont.)
HSI Components
Green Blue
(Images from Rafael C. Gonzalez and Richard E. (Images from Rafael C. Gonzalez and Richard E.
nd nd
Wood, Digital Image Processing, 2 Edition. Wood, Digital Image Processing, 2 Edition.
Color Image Smoothing Example (cont.) Color Image Smoothing Example (cont.)
Difference between
smoothed results from 2
methods in the previous
slide.
(Images from Rafael C. Gonzalez and Richard E. (Images from Rafael C. Gonzalez and Richard E.
nd nd
Wood, Digital Image Processing, 2 Edition. Wood, Digital Image Processing, 2 Edition.
16
18-11-2015
3 4
Color Segmentation in HSI Color Space (cont.) Color Segmentation in HSI Color Space (cont.)
Binary thresholding of S component
Product of 2 and 5
with T = 10%
5 6
7 8
(Images from Rafael C. (Images from Rafael C.
Gonzalez and Richard E. Gonzalez and Richard E.
Wood, Digital Image
nd
Histogram of 6 Segmentation of red color pixels Wood, Digital Image
nd
Processing, 2 Edition. Processing, 2 Edition.
Color Segmentation in RGB Vector Space Example: Segmentation in RGB Vector Space
Color image
17
18-11-2015
We see
4 objects.
Edges
(Images from Rafael C. Gonzalez and Richard E. (Images from Rafael C. Gonzalez and Richard E.
nd nd
Wood, Digital Image Processing, 2 Edition. Wood, Digital Image Processing, 2 Edition.
AWGN sh2=800
Noise is less
noticeable
in a color
image
18
18-11-2015
Saturation Intensity
JPEG2000 File
19