200 likes | 226 Views
Digital Image Processing Lecture 26: Color Processing June 20, 2005. Prof. Charlene Tsai. Color Model (Review). Group 4 for final project did a very good job on experimentation with different color models. We’ll focus on RGB and HSI models in this lecture
E N D
Digital Image Processing Lecture 26: Color ProcessingJune 20, 2005 Prof. Charlene Tsai
Color Model (Review) • Group 4 for final project did a very good job on experimentation with different color models. • We’ll focus on RGB and HSI models in this lecture • RGB: Red-Gree-Blue model for color monitors and color video cameras • HIS: Hue-Intensity-Saturation model. Color and gray-scale information decoupled, so suitable for many existing gray-scale techniques.
RGB Model HIS Model
Color Transformations • Techniques that process the components of a color image with in the context of a single color model, as apposed to conversion between models. • Techniques of interest • Color complements • Color slicing • Histogram processing
Color Complements • Analogous to gray-scale negatives • Similar to conventional color film negatives Directly opposite on another on the color circle
Color Slicing • Highlighting a specific range of colors in an image • Separating object from their surroundings • The simplest is to define the range of interest by a cube, or a sphere for sphere
Color Slicing - Example sphere cubic
Histogram Equalization • Review: producing an image with an uniform histogram of intensity values. • How to go about doing it? • Erroneous if performing HE on individual color component. • More logical in HIS space • Hue and saturation unchanges • HE on color intensity
Histogram Equalization - Example Before HE, median=0.36 After HE, median=0.5
Smoothing – Neighborhood Averaging • RGB: each component can be smoothed independently • HIS: smoothing only the intensity component (so more efficient)
Sharpening – Laplacian Enhancement • RGB: computing the Laplacian of each component independently • HIS: Computing only the Laplacian of the intensity component
Color Segmentation in RGB • Works better than HIS model • more systematic, • less application-dependent • Given a set of sample colors of interest: • compute the average vector a • for each pixel, determine if the color is in specified vicinity D0 of a • the similarity measure is the Euclidean distance • Very similar to color slicing
(con’t) • C is the covariance matrix of the samples. If C=I , D(z,a) is reduced to |z-a| (the Euclidean distance). Reducing computation
Color Edge Detection • There are many ways of doing edge detection on color images • Method I: generating the gradient information on individual planes and combining the results • Method II: computing the gradient of vector c at any point (x,y)
Color Edge Detection: Method II • Let r, g, and b be the unit vector along the R,G, and B axis of the RGB color space • Define the vectors: • Let the quantities gxx, gyy, and gxy be
(con’t) • The direction and magnitude of max rate of change of c(x,y) is
Method II Diff. Method I