1 / 67

Computer Graphics & Image Processing Chapter # 6 Color Image Processing

Computer Graphics & Image Processing Chapter # 6 Color Image Processing. ALI JAVED Lecturer SOFTWARE ENGINEERING DEPARTMENT U.E.T TAXILA Email:: ali.javed@uettaxila.edu.pk Office Room #:: 7. Color Image Processing.

zbigniew
Download Presentation

Computer Graphics & Image Processing Chapter # 6 Color Image Processing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Graphics & Image Processing Chapter # 6 Color Image Processing

  2. ALI JAVED Lecturer SOFTWARE ENGINEERING DEPARTMENT U.E.T TAXILA Email:: ali.javed@uettaxila.edu.pk Office Room #:: 7

  3. Color Image Processing • The use of color Image Processing is motivated by two principal factors: • Color is a powerful descriptor • Humans can distinguish between thousands of color shades and intensities compared to about only two dozen shades of gray

  4. Full Color Processing vs Pseudo-Color Processing • In Full Color Processing the image in question typically are acquired with a Full-Color sensor e.g. Color TV camera or Color Scanner • In Pseudo-color Processing the problem is of assigning a color to a particular monochrome intensity or a range of intensities

  5. Color Spectrum

  6. Electromagnetic Spectrum

  7. Physical Background • Visible light: a narrow band of electromagnetic radiation → 380nm (blue) - 780nm (red) • Wavelength:Each physically distinct colour corresponds to at least one wavelength in this band.

  8. Color Fundamentals • The colors that humans and some animals perceive in an object are determined by the nature of light reflected from the object

  9. Achromatic vs Chromatic Light • Achromatic (void of color) Light: Its only contribute is its ‘Intensity’ or amount • Chromatic Light: spans the electromagnetic spectrum from approximately 400 to 700nm

  10. Quantities for description of quantity of Chromatic Source of Light • Three basic quantities are used to describe the quantity of a chromatic source of light: • Radiance • Luminance • Brightness

  11. Radiance • The total amount of Energy that flows from a Light Source • It is measured in Watts

  12. Luminance • Luminance gives a measure of amount of energy an observer perceives from a light source (measured in Lumens(lm) ) • For example light emitted from a source operating in Infrared region of Spectrum could have significant energy (Radiance) but a human observer will hardly perceive it so luminance is zero.

  13. Brightness • It is a subjective measure • It embodies the achromatic notion of intensity and is one of the key factors in describing color sensation

  14. Human Perception • Detailed experimental evidences has established that the 6 to 7 million cones in the human eye can be divided into three principal sensing categories, corresponding roughly to red, green and blue • Approximately 65% of all cones are sensitive to Red Light, 33% are sensitive to Green Light and about 2% are sensitive to Blue Light (most sensitive)

  15. Human Perception • Due to these absorption characteristic of Human Eye colors are seen as variable combinations of the so-called ‘Primary Colors’ Red, Green and Blue • The primary colors can be added to produce secondary colors of Light • Magenta(Red+Blue) • Cyan(Green+Blue) • Yellow(Red+Green)

  16. Absorption of Light by red, green and blue cones in Human Eye • Mixing the three primaries or a secondary with its opposite primary colors in the right intensities produces white light

  17. Primary Color of Light vs Primary Color of Pigments • Red, Green and Blue Colors are Primary Colors of Light • In Primary Color of Pigments a primary color is defined as the one that subtracts or absorbs a primary color of Light and reflects or transmits the other two • Therefore the Primary Colors of Pigments are Magenta, Cyan and Yellow and secondary colors are Red, Green and Blue • A proper combination of three pigment primaries or a secondary with its opposite primary produces Black • Color Television Reception is an example of the additive nature of Light Colors

  18. Tri-Stimulus Values • The amount of Red, Green and Blue needed to form a particular color (denoted by X, Y and Z) • A color is then specified by its “Tri-chromatic Coefficients” • Thus x+y+z=1

  19. Chromaticity Diagram • Another approach for specifying colors is to use chromaticity diagram • Shows color compositions as a function of x(red) and y(green) • For any x and y the corresponding value of z(blue) can be obtained as z=1-x-y

  20. Chromaticity Diagram

  21. Chromaticity Diagram • To determine the range of colors that can be obtained from the 3 given colors in the CD, we simply draw connecting lines to each of the three color points. • The result is a triangle and any color inside a triangle is produced by various combinations of the three initial colors. • The triangle shows a typical range of colors (called the color gamut) produced by RGB monitor

  22. Color Models • The purpose of a color model (also called Color Space or Color System) is to facilitate the specification of colors in some standard way • A color model is a specification of a coordinate system and a subspace within that system where each color is represented by a single point • Color Models RGB (Red, Green, Blue) CMY (Cyan, Magenta, Yellow) HSI (Hue, Saturation, Intensity) YIQ (Luminance,In phase, Quadrature) YUV (Y' stands for the luma component (the brightness) and U and V are the chrominance (color) components )

  23. RGB Model • Each color is represented in its primary color components Red, Green and Blue • This model is based on Cartesian Coordinate System

  24. RGB Model In this model, the primary colors are red, green, and blue. It is an additive model, in which colors are produced by adding components, with white having all colors present and black being the absence of any color. This is the model used for active displays such as television and computer screens. The RGB model is usually represented by a unit cube with one corner located at the origin of a three-dimensional color coordinate system, the axes being labeled R, G, B, and having a range of values [0, 1]. The origin (0, 0, 0) is considered black and the diagonally opposite corner (1, 1, 1) is called white. The line joining black to white represents a gray scale and has equal components of R, G, B.

  25. RGB Color Cube • The total number of colors in a 24 Bit image is (28)3 =16,777,216 (> 16 million)

  26. Generating RGB image

  27. CMY and CMYK Color Model • Cyan, magenta, and yellow are the secondary colors with respect to the primary colors of red, green, and blue. However, in this subtractive model, they are the primary colors and red, green, and blue, are the secondaries. In this model, colors are formed by subtraction, where adding different pigments causes various colors not to be reflected and thus not to be seen. Here, white is the absence of colors, and black is the sum of all of them. This is generally the model used for printing. • Most devices that deposit color pigments on paper (such as Color Printers and Copiers) requires CMY data input or perform RGB to CMY conversion internally - =

  28. CMY and CMYK Color Model • CMY is a Subtractive Color Model • Equal amounts of Pigment primaries (Cyan, Magenta and Yellow) should produce Black • In practice combining these colors for printing produces a “Muddy-Black” color • So in order to produce “True-Black” a fourth color “Black” is added giving rise to CMYK model

  29. CMY Color Model

  30. CMY Color Model

  31. HSI Color Model • Hue (dominant colour seen) • Wavelength of the pure colour observed in the signal. • Distinguishes red, yellow, green, etc. • More the 400 hues can be seen by the human eye. • Saturation (degree of dilution) • Inverse of the quantity of “white” present in the signal. A pure colour has 100% saturation, the white and grey have 0% saturation. • Distinguishes red from pink, marine blue from royal blue, etc. • About 20 saturation levels are visible per hue. • Intensity • Distinguishes the gray levels.

  32. HSI Color Model Separates out intensity I from the coding Two values (Hue & Saturation) encode chromaticity Intensity encode monochrome part. Hue and saturation of colors respond closely to the way humans perceive color, and thus this model is suited for interactive manipulation of color images .

  33. Properties of HSI (HSV) • Hue H is defined by an angle • Saturation S models the purity of the color • I=(R+G+B)/3

  34. Conversion from RGB to HSI • Given an image in RGB color format, the H component of each RGB pixel is obtained using the equation:

  35. Conversion from HSI to RGB

  36. Conversion from HSI to RGB

  37. Pseudo-Color (False Color) Image Processing • Pseudo-color Image Processing consists of assigning colors to gray levels based on specific criterion • Generally, the eye cannot distinguish more than about 50 gray levels in an image. Thus subtle detail can easily be lost in looking at gray scale images. To enhance variations in gray level and make them more obvious, gray scale images are frequently pseudo-colored, where each gray scale (generally at least 256 levels for most displays) are mapped to a color level through a LUT. The eye is extremely sensitive to color and can distinguish thousands of color values in a picture.

  38. Pseudo-Coloring using LUT CLUT(Color lookup table):: A mapping of a pixel value to a color value shown on a display device. For example, in a grayscale image with levels 0, 1, 2, 3, and 4, pseudocoloring is a color lookup table that maps 0 to black, 1 to red, 2 to green, 3 to blue, and 4 to white.

  39. Intensity Slicing • The technique of intensity slicing or density slicing or color coding is one of the simplest example of Pseudo-color image processing

  40. Intensity Slicing • The Gray Scale [0,L-1] is divided into L levels; where l0 represents Black (f(x,y)=0) and lL-1 represents white (f(x,y)=L-1) • Suppose that P planes perpendicular to the intensity axis are defined at levels l1,l2…..,lp • Then assuming that 0<P<L-1 the P planes partition the gray scale into P+1 intervals, V1,V2…….Vp+1

  41. Intensity Slicing • Gray level to color assignments are made according to the relation: f(x,y)= ck if f(x,y)€vk • Where ck is the color associated with the kth intensity interval vk defined by the partition planes at l=k-1 and l=k

  42. An Alternative View of Intensity Slicing

  43. Basics of Full Color Image Processing Full color image processing fall into 2 categories. In 1st category we process each component image individually and then form a composite processed color image from the individually processed component. In 2nd category we work with color pixels directly. Because full color images have at least three components, color pixels are really vectors. Let c represent an arbitrary vector in RGB color space:

  44. Basics of Full Color Image Processing Color components are the function of co-ordinates(x,y) so we can write it as: For an image of size MxN there are MN such vectors, c(x,y), for x=0,1,2,…,M-1; y=0,1,2,…,N-1

  45. Basics of Full Color Image Processing

  46. Color Transformations Color transformation can be represented by the expression :: g(x,y)=T[f(x,y)] f(x,y): input image g(x,y): processed (output) image T[*]: an operator on f defined over neighborhood of (x,y). The pixel values here are triplets or quartets (i.e group of 3 or 4 values)

More Related