Ch06-Color Image Processing
Ch06-Color Image Processing
1
www.imageprocessingbook.com
Chapter 6
Color
Image
Processing
www.ImageProcessingPlace.com
w.csie.ntnu.edu.tw/~violet/IP93/Chapter06.ppt
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. 2
www.imageprocessingbook.com
Color Fundamentals
Color Fundamentals
Color Fundamentals
• The actual color perceived by a human of an object
depends on both the color of the illumination and the
reflectivity of the object, as well as the sensitivity of
human perception.
• Objects appear to be different colors because they absorb
and reflect different colors of light. A blue object, for
example, reflects blue light while absorbing other colors.
• Grey objects or grey images reflect and absorb all
frequencies of light about equally, so they do not appear
colored.
Color Fundamentals
• Color is sensed by the eye using three kinds of cones, each sensitive primarily to
red, green or blue, though there is significant overlap.
• We refer to red, green and blue
as the primary colors,
and denote to set as RGB:
blue = 435.8nm
green = 546.1nm
red = 700nm
• Approximately:
65% cones are sensitive to red
33% cones are sensitive to green
2% cones are sensitive to blue
Color Fundamentals
• Secondary colors:
Magenta (red + blue)
Cyan (green + blue)
Yellow (red + green)
Color Fundamentals
Chromaticity
• Brightness: associated with intensity
• Hue: associated with the dominant wavelength in a
mixture of light waves. It represents dominant color as
perceived by an observer.
• Saturation: refers to the relative purity or the amount of
white light mixed with a hue.
Chromaticity Diagram
Chromaticity Diagram
Chromaticity Diagram
Chromaticity Diagram
1. Intensity images
2. Binary images
3. RGB images
4. Indexed images
>> I = imread('filename');
>> imtool(I)
>> f=imread('bt.jpg');
>> whos f
Name Size Bytes Class Attributes
f 1536x2048x3 9437184 uint8
>> imshow(f);
>> fR = f(:, :, 1);
>> fG = f(:, :, 2);
>> fB = f(:, :, 3);
>> f1=cat(3, fR, fG, fB);
>> imshow(f1)
© 2002 R. C. Gonzalez & R. E. Woods
Digital Image Processing, 2nd ed. 29
www.imageprocessingbook.com
>> g = rgb2gray(f);
>> g1 = dither(g);
>> imshow(g);
>> figure, imshow(g1);
Color Transformations
Color Transformations
Color Transformations
Intensity transformation
CMY: si = k ri + (1-k), i = 1, 2, 3
RGB: si = k ri , i = 1, 2, 3
HSI: si = ri , i = 1, 2, s3 = k r3
Color Transformations
Intensity transformation
Color Transformations
Intensity transformation
Color Transformations
Color Complements Transformation
• Identical to the gray-scale negative transformation.
• Complements are basically given by subtracting one color from
white, or by changing a hue by 180 degrees.
• Useful for visualization of image detail obscured by dark regions.
Color Transformations
Color Complements Transformation
Exercise:
[2, Problems 6.20]
Assignment
[1, Appendix B]
Create ICE graphical user interface and submit its
softcopy until April 24, 2008. This is a group
assignment and group leader will submit it by
email. Test this function ICE with all parameters
discussed in [1, Ch. 6].
References
1. Gonzalez R. C., Woods R. E., Eddins S. L., Digital Image
Processing Using Matlab, Pearson Education, 2006.
2. Gonzalez R. C., Woods R. E., Digital Image Processing,
Pearson Education, 2006.
3. http://www.imageprocessingplace.com/
4. http://www.cs.umu.se/kurser/TDBC30/VT05/