Color Image Processing By Dr Rajeev Srivastava Color
Color Image Processing By Dr. Rajeev Srivastava
Color Image Processing (CIP) One of the most important aspects of any object is its color. CIP provides an overview of the following: • Color fundamentals • Devices for managing colors • Color models • Pseudo color image processing • True color image processing
Color: Its necessity The color is necessary for two reasons. • To identify the object • To facilitate the manual analysis by highlighting the Region Of Interest(ROI) in different colors.
CIP Color Image Processing is divided into two major groups viz. • Full(or true) color processing • Pseudo color processing
Full color processing This deals with acquisition, display, and printing of fullcolor images. Now-a-days, all the fields, except a few like medical domains, are using the color images in wide variations. Hence Full Color Processing is useful in all domain where full color images are used.
Pseudo color processing It is used to assign artificial color to a monochrome image.
Color Fundamentals •
The physical intensity and perceptual brightness are linked, as perceptual brightness is directly proportional to total number of absorbed photon. Where
Color Fundamentals… Human eyes have two kinds of photoreceptors, namely rods and cones. Cones provide a low-level light or scotopic vision where there is no color perception. They are sensitive to wavelenghts around 555 nm. Rods provide a high-level or photopic vision where color sensation is present
Color Fundamentals… Between photopic and scotopic, there is another type of vision called mestopic vision where both cons and rods provide meaningful information. Three types of cones cells, long, medium and short. They are sensitive to red, green and blue light respectively
Color Fundamentals… The ability to perceive same color of an object in different lighting conditions, is called color constancy. Whenever an additional correction is required to maintain the same color, as in digital cameras, its called chromatic adaptation
Color Fundamentals… •
Color Fundamentals… •
Color Fundamentals… The essence of a color can be conveyed by the following parameters • Brightness or luminance, • Hue, and • saturation
Color Fundamentals… Luminance is the power of light and is indicated by the area under the entire spectrum The dominant wavelength is called hue Saturation is measured as a percentage of the luminance in the dominant component of the spectrum
Devices for color imaging They may include cameras and color monitors etc. The earliest cameras were collectively called as vidicon camera, which is a storage type camera tube based on photoemission. It contained i)an electron gun and ii)a target and faceplate.
Color imaging… • In late 90 s they were replaced by charge. Couple device based(CCD) cameras. • CCD-based cameras have i. )Lens ii. )photosensitive sensors and iii. )electronic circuits
Color imaging… • Color monitors have three separate electron guns one each for red, green and blue. the image is perceived as a combination of these three colors • The quality of image is determined by the graphics adapter card. Video Graphics Array(VGA) and Super-VGA are some of the graphics cards.
Color image storage and processing There are two • Component ways of ordering, and storing • Packed ordering color images
Component ordering
Packed ordering • Packed Ordering
Indexed Images An indexed image is a special category of full color image The number of colors in a full color image can be reduced, since the human eyes can see only a limited number of colors, by the various methods They include creating an additional color map, color gamut or palette with the image.
Conversion of color to grey scale image •
RGB to Gray… •
RGB to Gray… •
Color models Colors are represented as a tuple of numbers (mostly three and four in case of CMYK model). A set of colors is described as an abstract mathematical model called a color model. There are many ways of classifying colour models.
Color Models There are many ways to classify color models, they are called color systems, as • Primary systems • Luminance-chrominance systems • Perceptual systems, and • Statistical systems
Luminance-chrominance systems These systems use one component for luminance and two components for the chrominance part. Primary systems • They are the color models that are based on the trichromatic theory. Examples include RGB and CIEXYZ
Perceptual systems • These systems try to use quantification of subjective color perception in terms of intensity, hue, and saturation. • Examples include HSV and HLS. • The main disadvantage of these systems is the device dependence. Statistical systems Statistically independent component color spaces use statistic methods for color generation.
Color matching It stops when there is a match between test color and combination of test lights. Here R, G, B indicate red, green, and blue components and r, g, b represent the amount of each primary color used in matching.
Color matching… This leads to standardization as defined by the International Commission of Illumination, or Commission Internationale de l’Eclairage(CIE). The components hue and saturation together are called chromaticity. Red blue and green are called tri-stimulus and are denoted by X- Y- and Z-axes.
Color models can be grouped as follows • Additive color models • Subtractive color models • If the combination of two or more colors result in new color with higher luminance, its additive color model • If the combination of two or more colors result in new color with lower luminance, its subtractive color model
Color Models RGB color models HSI color models HSV color models HLS color models TV- color models
RGB color model In this, colors are represented by a cube. Origin is represented by black while the opposite corners are by white. The lines connecting the primaries represent the various shades of a given color Used in TV, cameras scanners and computer monitors.
HSI color model H represent Hue, S represent Saturation, and I represent Intensity. The component I is the average of the R, G and B components and hue is expressed as an angle.
RGB HSI •
HIS to RGB •
HSV color models It includes Hue, Saturation, and Value. Like the RGB model, it is represented by a six-sided pyramid Vertical axis is called Brightness or value Horizontal distance from the axis represent the saturation The angle represent the hue
RGB HSV •
HLS model It stands for Hue, Luminance, and Saturation The storage representation is a double pyramid, but is mathematically represented as a cylinder The hue value of the HLS space is similar to that of HSV space.
HSV model to RGB model conversion is done as •
HSV to RGB…. •
TV color models Video standards specify many aspects relatted to video signals such as Scan rate Interlacing Image aspect ratio Synchronizing signals Some of the video standards include • National Television System Committee(NTSC)
Printing color models They are the color models that are used extensively in printers They are • CMY model, and • CMYK model
CMY and CMYK •
From RGB to CMY •
Color Quantization The tuples that are generated during the conversion of model to an image may be floating point numbers It is necessary to convert floating point numbers to binary values before they are either displayed or stored.
Color Quantization The process of converting the floating points into a binary value is called Quantization. Also the human eye cannot recognize millions of colors, thus the process of picking the best 256 colors that the eye recognizes, is called color quantization
Color Quantization……. Given M tuples, the problem is to identify the best K colors that can be representative of the whole population. If such colors are found, they can replace the whole color population which is the purpose of color quantization algorithms
Color Quantization……. Color Quantization Algorithms Non-uniform Quantization Uniform Quantization Popularity Algorithm Median-Cut Algorithm Octree Algorithm
Popularity Algorithm • In this, we give priority to the colors that occur frequently in the image. The procedure is as follows • Form a list of colors present in the image • Sort the list based on the frequency of occurrence of colors • Choose the best K predefined colors in the sorted list • Replace each color by its closest representative, which is determined by the mean-square distance
Median-cut Algorithm • In this, we split the color space into sub blocks using the median value such that the sub blocks have the same color dots. The procedure is as following • Take an original cube of the image • Find the median value. Using the value, split the cube along its lowest dimension. The split is such that each block has approximately N/2 dots.
Contd… • Repeat the above step, until there are exactly K- sub blocks • For each sub block, pick a color representative, which is the centre of the subblock • Replace the original color with the representative • Exit
Octree Based Algorithm • Octree is a data structure where every node has eight children nodes. The idea is to partition the color space into octree cubic subspaces The procedure is as follows: • Initially the quantization tree is empty. Decide the predefined colors K. • Read the color tuple
Contd. . • Check and insert the color tuple in the quantization tree. If the color tuple is not present then, -if the number of nodes is less than K, create a new node -if the number of nodes is K, the existing nodes of a similar color are merged. • Replace by locating the best color in the octree
END
- Slides: 57