COLOR IMAGE PROCESSING — LECTURE NOTES
1. Introduction & Color Importance
• Excellent Descriptor: Color simplifies object identification, extraction, and discrimination from a scene.
• Human Visual Perception: Humans can distinguish thousands of color shades and intensities, but only a
few dozen shades of gray.
• Two Main Areas of Color Image Processing:
◦ Full-Color Processing: Images are acquired directly using a full-color sensor (e.g., color cameras).
◦ Pseudo-Color (False Color) Processing: Artificial colors are assigned to monochrome (grayscale)
images based on specific intensity criteria to enhance human visualization.
2. Color Fundamentals & Visible Spectrum
• Light Reflection: The perceived color of an object is determined by the specific nature of the light
reflected from it.
• Visible Light Spectrum: Comprises a relatively narrow electromagnetic band. Wavelengths range roughly
from 400 to 700 nanometers (nm).
• Reflectance Properties:
◦ A body reflecting light balanced across all visible wavelengths appears white.
◦ A body favoring a limited range exhibits a distinct color shade (e.g., green objects reflect primarily
between 500 to 570 nm while absorbing other wavelengths).
3. Human Perception of Color
• Retinal Receptors:
◦ Cones: Responsible for day vision and resolving fine details. They perceive color tones via three
specific types: Red, Green, and Blue cones.
◦ Rods: Responsible for night vision. They are color-blind and perceive brightness/luminance levels only.
• Characteristics of Color Sensation:
◦ Luminance (Brightness): Represents the total amount of perceived light energy (a scalar value
matching grayscale intensity).
◦ Chrominance: Split into two attributes:
▪ Hue: The dominant color tone associated with the primary wavelength.
▪ Saturation: The relative purity or amount of white light mixed with a hue (pure spectrum colors are
fully saturated; pink is less saturated red).
4. Digital Representation: Monochrome vs. Chromatic
• Monochromatic Static Images: Represented as a continuous 2D scalar function f(x, y) mapping integer
matrix coordinates (row, column) to bounded gray levels ranging from lowest (black) to highest (white).
Digital Image Processing Lecture Notes 1
• Chromatic Images: Color pixels are represented as a vector rather than a scalar value. Pixels are tracked
across multi-dimensional spaces like RGB, HSV, Yuv, or Luv.
5. Primaries & Secondary Colors
A. Mixtures of Light (Additive Primaries)
Used in active emitting displays like computer monitors and televisions. The primary colors project light
together to form secondary colors:
• Magenta = Red + Blue
• Cyan = Blue + Green
• Yellow = Green + Red
• Mixing all three primary colors of light in balanced amounts produces White light.
B. Mixtures of Pigments (Subtractive Primaries)
Used in passive materials like color inkjet printers or paints that absorb (subtract) light rather than emit it. A
primary pigment absorbs a primary color of light and reflects the remaining two:
• Primary colors of pigments are Magenta, Cyan, and Yellow (CMY).
• Magenta = White - Green
• Cyan = White - Red
• Yellow = White - Blue
• Combining these three subtractive pigments absorbs all light, producing Black.
6. Color Models (Spaces)
A color model is a standardized coordinate system where each unique color is specified by a single point.
Color Model Primary Application Nature
RGB (Red, Green, Blue) Computer Monitors, Active TV Displays Additive Model
CMY (Cyan, Magenta,
3-Color Printers, Color Copiers Subtractive Model
Yellow)
HSI (Hue, Saturation, Color Image Processing, Description, Human Decoupled Decriptive
Intensity) Visualization Model
A. The RGB Color Model Details
• Pixel Depth: The number of bits used to represent each color pixel in the RGB space.
• Full-Color Image (24-bit RGB): Consists of three 8-bit channels: (R, G, B) = (8 bits, 8 bits, 8 bits). This
allows for a total of (28)3 = 16,777,216 unique colors.
Digital Image Processing Lecture Notes 2
B. CMY Model Transformations
To convert from hardware-oriented RGB data into printing-oriented CMY coordinates, the inverse relationship
is applied:
C=1-R | M=1-G | Y=1-B
C. The HSI Color Model Details
The HSI space decouples intensity info from chromatic info, mimicking human language descriptions:
• Hue (H): Defined as an angle from 0° to 360° relative to a red axis:
◦ 0° = Red, 120° = Green, 240° = Blue.
• Saturation (S): Represents the percentage of distance from the center axis to the outer surface of the
color pyramid. Range is normalized between 0 and 1.
• Intensity (I): The straight vertical distance climbing up the monochrome axis from black (0) to white (1).
Image Manipulation under HSI: To process an image's structural brightness cleanly without distorting
its underlying color tint, the process follows:
RGB Image → Convert to HSI → Manipulate HSI Channels → Convert back to RGB.
7. Pseudocolor Image Processing
Consists of assigning colors to gray values based on explicit geometric rules. Main purpose is to expand
human visual detection limits (e.g., thermal imagery or medical scans).
A. Intensity Slicing
• The grayscale scale [0, L-1] can be viewed as a 3D landscape where intensity values equal topographical
heights.
• Planes are positioned perpendicular to the intensity axis at discrete levels l , l , ..., l .
1 2 p
• These P slicing planes partition the image into P + 1 zones (V ). Any pixel matching an interval is mapped
k
directly to an assigned distinct color:
f(x, y) = ck if f(x, y) ∈ Vk
• Rule: The inclusion of more slicing planes directly translates to a larger, more descriptive color palette
region output.
B. Gray Level to Color Transformation
A continuous approach where an input grayscale value f(x, y) passes through three independent structural
filter equations simultaneously (Red, Green, and Blue functional transformations) to map monochrome images
into a composite full RGB display output.
Digital Image Processing Lecture Notes 3
8. Spatial Processing of Color Images
A full color image pixel position maps to a spatial coordinate 3-component vector:
c(x, y) = [ R(x, y), G(x, y), B(x, y) ]T
A. Processing Paradigms
• Per-Color-Component Processing: Isolating and performing operations on each scalar channel
independently.
• Vector-Based Processing: Computing mathematical properties globally across all pixel color dimensions
simultaneously.
• Equivalency Condition: Per-component and Vector-based processing methods yield identical results only
if the spatial processing operation can be linearly evaluated on scalars and vectors, and the channel
operations remain fully independent of one another.
B. Categories of Spatial Filtering
• Pixel-wise Processing: Transformations occurring on a per-pixel basis (e.g., color mapping or tone
adjustments).
• Neighborhood Processing: Filtering fields computed across localized bounding matrices around pixels.
C. Smoothing (Blurring)
• Smoothing can be viewed as a spatial filtering operation where all coefficient weights inside the mask are
1's.
• RGB Implementation: Filter each of the R, G, and B color planes independently with the blurring filter
mask, then recombine channels.
• HSI Implementation: Isolate and smooth only the Intensity (I) component channel while leaving Hue and
Saturation completely unmodified. Both approaches yield equivalent visual smoothing.
D. Sharpening
• Sharpening highlights rapid shifts in spatial details using derivative calculations.
• Evaluated by computing the scalar Laplacian across each vector element independently:
∇2c(x, y) = [ ∇2R(x, y), ∇2G(x, y), ∇2B(x, y) ]T
Digital Image Processing Lecture Notes 4