0% found this document useful (0 votes)
87 views17 pages

Color Ip2

Color image processing involves assigning colors to images to aid in identification and extraction of objects. It has two parts: pseudo-color processing assigns false colors to a grayscale image, and full-color processing uses images captured with color sensors. The human eye can distinguish many more colors than shades of gray, making color useful for human image analysis.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
87 views17 pages

Color Ip2

Color image processing involves assigning colors to images to aid in identification and extraction of objects. It has two parts: pseudo-color processing assigns false colors to a grayscale image, and full-color processing uses images captured with color sensors. The human eye can distinguish many more colors than shades of gray, making color useful for human image analysis.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Color Image Processing

• In automated image analysis, color is a powerful descriptor, which


simplifies object identification and extraction.

• The human eye can distinguish between thousands of color shades


and intensities but only about 20-30 shades of gray. Hence, use of
color in human image processing would be very effective.

• Color image processing consists of two parts: Pseudo-color


processing and Full color processing.

• In pseudo-color processing, (false) colors are assigned to a


monochrome image. For example, objects with different intensity
values maybe assigned different colors, which would enable easy
identification/recognition by humans.

• In full-color processing, images are acquired with full color


sensors/cameras. This has become common in the last decade or so,
due to the easy and cheap availability of color sensors and hardware.
Color Fundamentals
• When a beam of sunlight is passed through a glass prism, the
emerging beam of light is not white but consists of a continuous
spectrum of colors (Sir Isaac Newton, 1666).

• The color spectrum can be divided into six broad regions: violet, blue,
green, yellow, orange, and red.

• The different colors in the spectrum do not end abruptly but each
color blends smoothly into the next.

• Color perceived by the human eye depends on the nature of light


reflected by an object. Light that is relatively balanced in all visible
wavelengths is perceived as white. Objects that appear green reflect
more light in the 500-570 nm range (absorbing other wavelengths of
light).

• Characterization of light is important for the understanding of


color.

• If the light is achromatic (devoid of color), its only attribute is its


intensity (amount of light). This is what we have been dealing
with so far. The term graylevel refers to the scalar measure of the
intensity of light --- black to grays to white.

• Chromatic light spans the electromagnetic (EM) spectrum from


approximately 400 nm to 700 nm.

• Three basic quantities are used to describe the quality of a


chromatic source of light:

• Radiance is the total amount of light that flows from a light source
(measured in Watts).
• Luminance gives a measure of the amount of energy an observer
perceives from a light source (measured in lumens).
• Brightness is a subjective descriptor that is impossible to measure.

• Cones in the retina are responsible for color perception in the human
eye.

• Six to seven million cones in the human eye can be divided into three
categories: red light sensitive cones (65%), green light sensitive cones
(33%) and blue light sensitive cones (2%). The latter cones are the
most sensitive ones.

• Absorption of light by the three types of cones is illustrated in the


figure below:
• Due to the absorption characteristics of the human eye, all colors
perceived by the human can be considered as a variable combination
of the so called three primary colors:
• Red (R) (700 nm)
• Green (G) (546.1 nm)
• Blue (B) (435.8 nm)

• The wavelengths for the three primary colors are established by


standardization by the CIE (International Commission on
Illumination). They correspond to the experimental curve only
approximately.
• Note that the specific color wavelengths are used mainly for
standardization. It is not possible to produce all colors purely by
combining these specific wavelengths.

• Primary colors when added produce secondary colors:


• Magenta (red + blue)
• Cyan (green + blue)
• Yellow (red + green)
• Mixing the three primaries, or a secondary with its opposite primary,
in the right intensities produces white light.

• A primary color of pigment is defined as one that subtracts or absorbs


a primary color of light and reflects or transmits the other two.

• Therefore, the primary colors of pigments are magenta, cyan, and


yellow, and the secondary pigment colors are red, green, and blue.

• Mixing the three pigment primaries, or a secondary with its opposite


primary, in the right intensities produces black.

• Color television or a computer monitor is an example of additive


nature of the color of light. The inside of the screen is coated with
dots of phosphor, each being capable of producing one of the three
primary colors. A combination of light of the three primary colors
produces all the different colors we see.

• Printing is an example of the subtractive nature of color pigments. For


example, a pigment of red color actually absorbs light of all
wavelengths, except that corresponding to red color.
• The characteristics used to distinguish one color from another are:
• Brightness (or value) embodies the chromatic notion of intensity.
• Hue is an attribute associated with the dominant wavelength in a
mixture of light waves. It represents the dominant color as
perceived by an observer (ex. orange, red, violet).
• Saturation refers to the relative purity or the amount of white light
mixed with a hue. Pure colors are fully saturated. Colors such as
pink (red + white) and lavendar (violet + white) are less saturated,
with the saturation being inversely proportional to the amount of
white light added.

• Hue and saturation together are called chromaticity. A color can be


described in terms of its brightness and chromaticity.
Tristimulus values
• The amounts of red, green, and blue needed to form any particular
color are called the tristimulus values and are denoted by X, Y, and Z,
respectively.

• In general, color is specified by its three trichromatic coefficients:

X
x=
X +Y + Z
Y
y=
X +Y + Z
Z
z=
X +Y + Z

• Naturally, x + y + z = 1.
Chromaticity diagram
• Another approach to specifying colors is via the CIE chromaticity
diagram, which represents color composition by means of x (red) and
y (green) values.

• For any value of x (red) and y (green), the corresponding value of z


(blue) is given by z = 1 − ( x + y ) .
• The positions of various spectrum colors (completely saturated or
“pure” colors) are indicated along the boundary of the tongue-shaped
chromaticity diagram.

• Points inside this region represent some mixture of the pure colors.

• Point of equal energy corresponds to equal fractions of the three


primary colors. It represents the Commission Internationale de
l’Eclairge --- The International Commission on Illumination (CIE)
standard for white light.

• As a point leaves the boundary and moves towards the center, more
white light is added to the color and it becomes less saturated.

• The point of equal energy corresponds to zero saturation.

• The chromaticity diagram can be used for color mixing, since a line
joining two points in the diagram represents all the colors that can be
obtained by mixing the two colors additively.

• A line joining the point of equal energy to any point on the boundary
represents different shades of that color.

• Similarly, the triangular region enclosed by the line segments joining


three points in the chromaticity diagram represents all the colors that
can be obtained by combining the three colors.

• This is consistent with the remark made earlier that the three pure
primary colors by themselves cannot produce all the colors (unless we
change the wavelengths as well).

• The triangular region shown in the figure below represents the typical
range of colors (gamut of colors) produced by RGB monitors.
• The irregular region inside the triangular region represents the color
gamut of modern high-quality color printers.

• Color printing is a complicated process and it is more difficult to


control the color of printed object than it is to control the color
displayed on a monitor.
Color Models
• The purpose of a color model (or color space or color system) is to
facilitate the specification of color in some standard fashion.

• A color model is a specification of a 3-D coordinate system and a


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

• Most color models in use today are either based on hardware (color
camera, printer) or on applications involving color manipulation
(computer graphics, animation).

• In image processing, the hardware based color models mainly used


are: RGB, CMYK, and HSI.

• The RGB (red, green, blue) color system is used mainly in color
monitors and video cameras.

• The CMYK (cyan, magenta, yellow, black) color system is used in


printing devices.

• The HSI (hue, saturation, intensity) is based on the way humans


describe and interpret color. It also helps in separating the color and
grayscale information in an image.
RGB Color model
• Each color appears in its primary spectral components of red (R),
green (G), and blue (B).

• Mainly used for hardware such as color monitors and color video
camera.

• It is based on a Cartesian coordinate system. All color values are


normalized so that the values of R, G, and B are in the range [0,1].
Thus, the color subspace of interest is the unit cube.

• The primary colors red, green, and blue correspond to three corners of
the cube, whereas the secondary colors cyan, magenta, and yellow
correspond to three other corners. Origin (0,0,0) represents black and
(1,1,1) represents white.

• Grayscale (monochrome) is represented by the diagonal joining blak


to white.
• Different points on or inside the cube correspond to different colors
and can be represents as a vector or three values or coordinates. Each
coordinate represents the amount of that primary color present in the
given color.

• Images in the RGB model consist of three independent component


images, one for each primary color.

• When fed to into an RGB monitor, these three images combine on the
phosphor screen to produce a composite color image.

• The number of bits used to represent each pixel in RGB space is


called pixel depth.

• For example, if eight bits are used to represent each of the primary
components, each RGB color pixel would have a depth of 24 bits.
This is usually referred to as a full color image.

• There are 2 24 = 16,777,216 unique colors possible in this system.


+

+
• Although high-end monitors can display true 24-bit colors, more
modest display devices are limited to smaller (typically 256) set of
colors.

• Moreover, in many applications, it not useful to use more than a few


(say 10-20) colors.

• Given the variety of display devices, it is useful to have a small subset


of colors that are reproduced reliably and faithfully, independently of
the display hardware specifics. This subset of colors is referred to as
safe RGB colors or the set of all-systems-safe colors. They are also
referred to as safe web colors or safe browser colors in internet
applications.

• Assuming 256 distinct colors as the minimum capability of any color


display device, a standard notation to refer to these “safe” colors is
necessary.

• Forty of these 256 colors are known to be processed differently by


various operating systems, leaving 216 colors that are common to
most systems.

• These 216 colors are formed by a combination of RGB values, where


each component is restricted to be one of possible six values in the set
{0, 51, 102, 153, 204, 255} or using hexadecimal notation {00, 33,
66, 99, CC, FF}. Note that all the values are divisible by 3.

• These 26 = 216 colors have become de facto standard for safe colors,
especially in internet applications. They are commonly used,
whenever it is desired that the colors viewed by most people appear
the same.

You might also like