Color Models in Digital Image Processing, Lecture notes of Digital Image Processing

Color Models in Digital Image Processing, Color Model conversions

Typology: Lecture notes

2017/2018

Uploaded on 01/15/2018

momina.idrees
momina.idrees 🇵🇰

4.5

(2)

4 documents

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Digital image processing
BSCS-7 FALL 2014-18
Assignment
Color Image Processing
Team Members
Ume Aymen # 1430328
Momina Idrees #1430303
Ayesha Tahir # 1430278
Submitted to: Mam Amna
DEPARTMENT OF COMPUTER SCIENCE
Post Graduate College, Samnabad Lahore.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Color Models in Digital Image Processing and more Lecture notes Digital Image Processing in PDF only on Docsity!

Digital image processing

BSCS- 7 – FALL 2014- 18

Assignment

Color Image Processing

Team Members

Ume Aymen # 1430328

Momina Idrees

Ayesha Tahir # 1430278

Submitted to: Mam Amna

DEPARTMENT OF COMPUTER SCIENCE

Post Graduate College, Samnabad Lahore.

Color in image processing

The use of color in image processing is primarily motivated by two major factors:

  • Humans can perceive thousands of shades of color as opposed to only about two dozen shades of gray
  • Color is a powerful descriptor that greatly simplifies object segmentation and identification Color image processing is divided into two major areas:
  • Full-color processing – images are acquired and processed in full color
  • Pseudo-color processing – images are by nature gray-scale and are converted to color images for visualization purposes.

Color is light

The colors that are perceived by a viewer or a sensor are made up by light of different wavelengths. As light propagates through medias and is reflected off objects these different wavelengths are affected in different ways.

Chromatic light

Chromatic light is described by three basic quantities:

  • Radiance The total amount of energy that flows from the light source Measured in Watts.

The Cones

Colors are seen as combination of the primary colors: red, green and blue (no single color is entirely red, green or blue – it is the combination) Three fixed color components cannot generate all spectrum colors.

Primary & Secondary colors

A primary color of pigment is defined as one that absorbs one primary color of light and reflects the other two. The primary colors of light constitute the secondary colors of pigment and vice versa. The primary colors can be added to produce the secondary colors. magenta = red + blue cyan = green + blue yellow = red + green Combining a primary with a complementary secondary color produces white. magenta + green = white

Distinguishing Between Colors

Three characteristics are used to distinguish one color from another

  • Hue : The dominant wavelength or color of light as perceived by the receiver. “This ball is red”.
  • Saturation : The relative purity of the light (the amount of white vs pigment color). The pure spectrum colors are fully saturated.
  • Brightness : The (chromatic) intensity of the light from the light source. Hue and saturation together are called chromaticity.

Color Models

Color models provide a standard way to specify a particular color, by defining a 3D coordinate system, and a subspace that contains all constructible colors within a particular model. Any color that can be specified using a model will correspond to a single point within the subspace it defines. Each color model is oriented towards either specific hardware (RGB, CMY, YIQ), or image processing applications (HSI).

  • The RGB Model In the RGB model, an image consists of three independent image planes, one in each of the primary colors: red, green and blue. (The standard wavelengths for the three primaries are as shown in figure 1 ). Figure 1: The visible spectrum

Figure 3: The CIE Chromaticity Diagram showing all visible colors. x and y are the normalized amounts of the X and Y primaries present, and hence z = 1 - x - y gives the amount of the Z primary required. The RGB model is used for color monitors and most video cameras.

  • The CMY Model The CMY (cyan-magenta-yellow) model is a subtractive model appropriate to absorption of colors, for example due to pigments in paints. Whereas the RGB model asks what is added to black to get a particular color, the CMY model asks what is subtracted from white. In this case, the primaries are cyan, magenta and yellow, with red, green and blue as secondary colors (see the image on the right of figure 4 ). When a surface coated with cyan pigment is illuminated by white light, no red light is reflected, and similarly for magenta and green, and yellow and blue. The relationship between the RGB and CMY models is given by:

The CMY model is used by printing devices and filters. Figure 4: The figure on the left shows the additive mixing of red, green and blue primaries to form the three secondary colors yellow (red + green), cyan (blue + green) and magenta (red + blue), and white ((red + green + blue). The figure on the right shows the three subtractive primaries, and their pairwise combinations to form red, green and blue, and finally black by subtracting all three primaries from white.

Info: Why does blue paint plus yellow paint give green?

As all schoolchildren know, the way to make green paint is to mix blue paint with yellow. But how does this work? If blue paint absorbs all but blue light, and yellow absorbs blue only, when combined no light should be reflected and black paint result. However, what actually happens is that imperfections in the paint are exploited. In practice, blue paint reflects not only blue, but also some green. Since the yellow paint also reflects green (since yellow = green + red), some green is reflected by both pigments, and all other colors are absorbed, resulting in green paint.

  • The HSI Model Color may be specified by the three quantities hue, saturation and intensity. This is the HSI model, and the entire space of colors that may be specified in this way is shown in figure 5.

Conversion: RGB to HSI

Here is the RGB to HSI conversion without derivation. Given an image in RGB color format, the H component with 𝜃, the saturation and intensity component of each RGB pixel is obtained using equation: It is assumed that the RGB values have been normalized to the range [0, 1], and that angle 𝜃 is measured with respect to the red axis of the HSI space. Hue can be normalized to the range [0,1] by dividing by 360° all values resulting from the equation for H. The other two HSI components already are in this range if the given RGB values are in the interval [0, 1].

Conversion: HSI to RGB:

Given values of HSI in the interval [0, 1], we now find the corresponding RGB values in the same range. The applicable equations depend on the values of H. There are three sectors of interest, corresponding to the 120° intervals in the, separation of primaries (see Fig. 6.7). We begin by multiplying H by 360°, which returns the hue to its original range of [0°, 360°].

RG Sector:

GB Sector:

BR Sector:

Pseudocolor image processing

Pseudocolor image processing (also known as false color image processing). Assigning colors to gray level values based on certain criteria. The principal use of pseudocolor image processing is (human) visualization. Major use is interpretation of gray level images. Two techniques are used:

  • Intensity slicing
  • Gray level to color transformations

Intensity slicing:

The image (viewed as a 3D function) is “sliced” / thresholded using a plane perpendicular to the intensity axis. Color is awarded pixels in the resulting image based on a plane-by-plane basis Intensity slicing is at its best when slicing is based on physical characteristics.

  • Any plane slices the image function into two levels.
  • Different color is assigned to each plane. Any pixel whose gray level is above the plane will be coded with one color and below the plane will be coded with other.
  • Pixels on the plane can be assigned any color.
  • Result is two color images.
  • When more colors are used, mapping function takes staircase form.

Generalization of intensity slicing Smooth functions can be used instead of piece-

wise linear functions

Several grayscale images can be visualized as one-color image; useful for

visualization of multiresolution analysis data. The “Additional processing” block

can consist of for example color balancing or image data selection based on

(additional) sensor information.

Reference:

  • Edacuk. (2018). Edacuk. Retrieved 11 January, 2018, from http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/OWENS/LECT14/lecture12.ht ml
  • Csumuse. (2018). Csumuse. Retrieved 11 January, 2018, from https://www8.cs.umu.se/kurser/TDBC30/VT05/material/lecture6.pdf