Chapter 6: Color Image Processing
Notes based on Digital Image Processing by Rafael C. Gonzalez and Richard E. Woo
August 3, 2025
Overview
Chapter 6 explores color image processing, extending grayscale techniques to color im-
ages. It covers color fundamentals, color models, and techniques for processing color
images, including transformations, smoothing, sharpening, and segmentation. The chap-
ter emphasizes the importance of color in image analysis and practical implementation
using tools like MATLAB.
1 Key Concepts
1.1 Color Fundamentals
• Color Perception: Human vision perceives color through cones in the retina,
sensitive to red, green, and blue wavelengths.
• Primary Colors: Red (R), Green (G), Blue (B) are additive primaries; their
combinations form other colors.
• Color Characteristics:
– Brightness: Intensity of light.
– Hue: Dominant wavelength (color type, e.g., red, blue).
– Saturation: Purity of color (vividness).
• Chromaticity: Hue and saturation together, described by the CIE chromaticity
diagram.
1.2 Color Models
• RGB Model: Additive model for displays (e.g., monitors).
– Each pixel is a triplet (R, G, B), typically 8 bits per channel (0–255).
– Suitable for image capture and display.
• CMY/CMYK Model: Subtractive model for printing.
– Cyan (C), Magenta (M), Yellow (Y), and Black (K) for better black reproduc-
tion.
1
– Conversion from RGB: C = 1 − R, M = 1 − G, Y = 1 − B.
• HSI Model: Hue, Saturation, Intensity model, aligns with human perception.
– Hue: Color type (0–360°).
– Saturation: Color purity (0–1).
– Intensity: Brightness (0–1).
– Conversion from RGB is nonlinear, involving trigonometric functions.
• Other Models: YCbCr (video), LAB (perceptually uniform), HSV (similar to
HSI).
1.3 Color Transformations
• Definition: Modify pixel values in a color image, similar to intensity transforma-
tions in grayscale (Chapter 3).
• Types:
– Per-Channel Processing: Apply transformations (e.g., gamma correction) to
R, G, B channels independently.
– HSI Processing: Adjust hue, saturation, or intensity (e.g., increase saturation
for vivid colors).
• Color Complements: Analogous to grayscale negative, inverts colors (e.g., red
to cyan).
• Color Slicing: Highlight specific color ranges for segmentation.
1.4 Color Image Smoothing
• Per-Channel Smoothing: Apply spatial filters (e.g., mean, Gaussian) to each
RGB channel separately.
• HSI Smoothing: Smooth only the intensity channel to preserve color information.
• Example: 3x3 mean filter on RGB channels:
1 ∑
R′ (x, y) = R(s, t)
9
(s,t)∈N
Similar for G, B channels.
1.5 Color Image Sharpening
• Per-Channel Sharpening: Apply high-pass filters (e.g., Laplacian) to RGB chan-
nels.
• HSI Sharpening: Sharpen only the intensity channel to avoid color distortion.
• Example: Laplacian filter on intensity channel in HSI model.
2
1.6 Color Image Segmentation
• Definition: Partition an image into regions based on color properties.
• Methods:
– Thresholding: Segment based on color ranges in RGB or HSI.
– Clustering: Group pixels with similar colors (e.g., k-means in RGB space).
• HSI Advantage: Segmentation in HSI space often focuses on hue for color-based
separation.
1.7 Color Noise Reduction
• Noise Types: Similar to grayscale (e.g., Gaussian, salt-and-pepper), but affects
color channels.
• Techniques: Median filtering per channel or on intensity in HSI to reduce noise
while preserving color.
1.8 Practical Implementation
• MATLAB’s Image Processing Toolbox supports color image processing (e.g., rgb2hsv,
imfilter).
• Example: Converting RGB to HSI and adjusting saturation in MATLAB:
img = imread('color_image.png');
hsi = rgb2hsv(img);
hsi(:,:,2) = hsi(:,:,2) * 1.5; % Increase saturation
rgb_enhanced = hsv2rgb(hsi);
imshow(rgb_enhanced);
2 Simple Notes
• Color Basics:
– Primary Colors: Red, Green, Blue (additive).
– Characteristics: Brightness (intensity), Hue (color type), Saturation (purity).
• Color Models:
– RGB: For displays, (R, G, B) triplets.
– CMYK: For printing, subtractive.
– HSI : Hue, Saturation, Intensity, human-friendly.
• Color Transformations:
– Adjust R, G, B or H, S, I (e.g., brighten, change hue).
3
– Complements: Invert colors (red to cyan).
– Slicing: Highlight specific colors.
• Smoothing: Apply filters (e.g., mean) to RGB or intensity (HSI).
• Sharpening: Apply filters (e.g., Laplacian) to RGB or intensity.
• Segmentation: Group pixels by color (e.g., threshold hue in HSI).
• Noise Reduction: Use median filter on channels or intensity.
• Tools: MATLAB (rgb2hsv, imfilter) for color processing.
3 Key Takeaways
• Color image processing extends grayscale techniques to handle RGB, HSI, or other
models.
• HSI model is intuitive for human perception, useful for segmentation and enhance-
ment.
• Transformations, smoothing, and sharpening can be applied per channel or in HSI
space.
• Color segmentation and noise reduction are critical for analysis and enhancement.
• MATLAB facilitates practical color image processing.
4 Study Tips
• Visualize: Study color model diagrams (e.g., RGB cube, HSI cone) in the book.
• Practice: Use MATLAB to convert images between RGB and HSI, apply filters.
• Math: Review RGB to HSI conversion formulas.
• Experiment: Test color transformations (e.g., saturation adjustment) on sample
images.
5 Additional Notes
• The 4th edition includes MATLAB projects at www.ImageProcessingPlace.com.
• Chapter 6 builds on Chapters 3 (spatial filtering) and 4 (frequency domain).
• Later chapters (e.g., segmentation, object recognition) use color information exten-
sively.