Color Image

Processing

Color Fundamentals
Color fundamentals and models
Color transformations
Smoothing and sharpening
Color segmentation
Pseudocolor
Slicing
False-color maps
Index color
Multispectral color models

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

There is substantive genetic diversity in color
receptors
 Different spectral response of photoreceptor
 Absence of one of the pigments
 Many more phenomena...

Color Fundamentals

Color Fundamentals .

Color Fundamentals .

Color Fundamentals .

Color Fundamentals .

Color Fundamentals .

Color Fundamentals .

Spectral Response of Cones .

.

Color Fundamentals .

Color Fundamentals .

CIE CHROMATICITY DIAGRAM .

.

X Y  Z 1 . and Z. z X Y  Z X Y  Z X Y  Z  Only two chromaticity coefficients are necessary to specify the chrominance of a light.Tristimulus value  The amounts of red. y .  Trichromatic coefficients X Y Z x . and blue needed to form any particular color are called the tristimulus values. denoted by X. green. Y.

CIE CHROMATICITY DIAGRAM .

CIE CHROMATICITY DIAGRAM .

.

COLOR MODELS .

RGB color Model .

RGB color Model .

RGB In the RGB model each colour appears in its primary spectral components of red. green and blue The model is based on a Cartesian coordinate system RGB values are at 3 corners Cyan magenta and yellow are at three other corners Black is at the origin White is the corner furthest from the origin Different colours are points on or inside the cube represented by RGB vectors .

RGB color Model .

com Active displays.mitsubishi. green and blue light. such as computer monitors and television sets. This is an additive color model 26 . emit combinations of red.RGB Color model Source: www.

RGB (cont…) Images represented in the RGB colour model consist of three component images – one for each primary colour When fed into a monitor these images are combined to create a composite colour image The number of bits used to represent each pixel is referred to as the colour depth A 24-bit image is often referred to as a fullcolour image as it allows = 16.777.216 3 colours 8 2  .

RGB color Model .

Chapter 6 Color Image Processing .

RGB Example Original Red Band Green Band Blue Band 30 .

m.g.y≤1 (also coordinates 0-255 can be used).CMY color model If the intensities are represented as 0≤r.b≤1 and 0≤c. then the relation between RGB and CMY can be described as:  c   1  r   m   1   g       y 1 b .

CMY Color model Source: www. such as color inkjet printers. absorb light instead of emitting it. magenta and yellow inks are used. Combinations of cyan. 32 .com Passive displays.hp. This is a subtractive color model.

CMYK model For printing and graphics art industry. is added. . Conversions between RGB and CMYK are possible. CMY is not enough. although they require some extra processing. K which stands for black. a fourth primary.

HIS color model .

HSI Color Model  Based on human perception of colors. Color is “decoupled” from intensity.  HUE A subjective measure of color Average human eye can perceive ~200 different colors  Saturation Relative purity of the color. Pink has the same hue as red but less saturation  Intensity The brightness or darkness of an object 35 . Mixing more “white” with a color reduces its saturation.

 Values range from 0 to 1 36 .  Values range from 0 to 1.  Intensity is denoted as the distance “up” the axis from black.HSI Color Model  Hue is defined as an angle  0 degrees is RED  120 degrees is GREEN  240 degrees is BLUE  Saturation is defined as the percentage of distance from the center of the HSI triangle to the pyramid surface.

HSI. Intensity & RGB Intensity can be extracted from RGB images – which is not surprising if we stop to think about it Remember the diagonal on the RGB colour cube that we saw previously ran from black to white Now consider if we stand this cube on the black vertex and position the white vertex directly above it .

Images taken from Gonzalez & Woods. Intensity & RGB (cont…) Now the intensity component of any colour can be determined by passing a plane perpendicular to the intenisty axis and containing the colour point The intersection of the plane with the intensity axis gives us the intensity component of the colour . Digital Image Processing (2002) HSI.

Digital Image Processing (2002) HSI. Hue & RGB In a similar way we can extract the hue from the RGB colour cube Consider a plane defined by the three points cyan.Images taken from Gonzalez & Woods. black and white All points contained in this plane must have the same hue (cyan) as black and white cannot contribute hue information to a colour .

Digital Image Processing (2002) The HSI Colour Model (cont…) To the right we see a hexagonal shape and an arbitrary colour point The hue is determined by an angle from a reference point. usually red The saturation is the distance from the origin to the point The intensity is determined by how far up the vertical intenisty axis this hexagonal plane sits (not apparent from this diagram .Images taken from Gonzalez & Woods.

Images taken from Gonzalez & Woods. Digital Image Processing (2002) The HSI Colour Model (cont…) Because the only important things are the angle and the length of the saturation vector this plane is also often represented as a circle or a triangle .

Digital Image Processing (2002) HSI Model Examples .Images taken from Gonzalez & Woods.

Digital Image Processing (2002) HSI Model Examples .Images taken from Gonzalez & Woods.

Converting colors from RGB to HSI .

Converting from HSI to RGB .

.

.

Manipulating Images In The HSI Model In order to manipulate an image under the HIS model we: First convert it from RGB to HIS Perform our manipulations under HSI Finally convert the image back from HSI to RGB RGB RGB Image Image HSI HSI Image Image Manipulations RGB RGB Image Image .

.

.

compared to only about two dozen or so shades of grey .Pseudocolour Image Processing Pseudocolour (also called false colour) image processing consists of assigning colours to grey values based on a specific criterion The principle use of pseudocolour image processing is for human visualisation Humans can discern between thousands of colour shades and intensities.

Pseudo Colour Image Processing –
Intensity Slicing

Intensity slicing and colour coding is one of the
simplest kinds of pseudocolour image processing
First we consider an image as a 3D function
mapping spatial coordinates to intensities (that
we can consider heights)
Now consider placing planes at certain levels
parallel to the coordinate plane
If a value is one side of such a plane it is
rendered in one colour, and a different colour if
on the other side

Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Pseudocolour Image Processing –
Intensity Slicing (cont…)

Pseudocolour Image Processing –
Intensity Slicing (cont…)
In general intensity slicing can be summarised
as:
Let [0, L-1] represent the grey scale
Let l0 represent black [f(x, y) = 0] and let lL-1
represent white [f(x, y) = L-1]
Suppose P planes perpendicular to the intensity
axis are defined at levels l1, l2, …, lp
Assuming that 0 < P < L-1 then the P planes
partition the grey scale into P + 1 intervals V1, V2,
…,VP+1

Pseudocolour Image Processing –
Intensity Slicing (cont…)
Grey level colour assignments can then be
made according to the relation:
f (x, y)  c k          if f (x, y)  Vk
where ck is the colour associated with the kth
intensity level Vk defined by the partitioning
planes at l = k – 1 and l = k

Images taken from Gonzalez & Woods. Digital Image Processing (2002) RGB -> HSI -> RGB (cont…) .

Digital Image Processing (2002) RGB -> HSI -> RGB (cont…) .Images taken from Gonzalez & Woods.

Digital Image Processing (2002) RGB -> HSI -> RGB (cont…) .Images taken from Gonzalez & Woods.

Images taken from Gonzalez & Woods. Digital Image Processing (2002) RGB -> HSI -> RGB (cont…) .

.

.

.

Color Transformations Formulation .

Color Transformations Formulation .

.

.

.

Tone and Color Corrections .

Tone and Color Corrections .

Tone and Color Corrections .

Histogram Processing .

.

Smoothing and Sharpening Color Image Smoothing .

Color Image Sharpening .

Color Segmentation .

.

Segmentation in RGB Vector Space .

.

Color Edge Detection .

Color Edge Detection .