K Mean Black

K Mean Black

“Develop success from failures. Discouragement and failure are two of the surest stepping stones to success.”

Notes Image
  • Name: Printing Technology
  • Branch: Printing Technology Diploma 5th Sem
  • Published: May 26, 2025

Color Management part - 2

Unit – 3

 

Color Models

The purpose of a color model 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 most commonly used in image processing are:

 

    • RGB model for color monitors and video cameras
    • CMY and CMYK (cyan, magenta, yellow, black) models for color printing
    • HSI (hue, saturation, intensity) model

 

The RGB color model

In this model, each color appears in its primary colors red, green, and blue. This model is based on a Cartesian coordinate system. The color subspace is the cube shown in the figure below. The different colors in this model are points on or inside the cube, and are defined by vectors extending from the origin.

      

Figure 15.3 RGB color model

All color values R, G, and B have been normalized in the range [0, 1]. However, we can represent each of R, G, and B from 0 to 255.

Each RGB color image consists of three component images, one for each primary color as shown in the figure below. These three images are combined on the screen to produce a color image.

 

 

 

Figure 15.4 Scheme of RGB color image

 

The total number of bits used to represent each pixel in RGB image is called pixel depth. For example, in an RGB image if each of the red, green, and blue images is an 8-bit image, the pixel depth of the RGB image is 24-bits. The figure below shows the component images of an RGB image.

Full color

           

Red        Green    Blue

Figure 15.5 A full-color image and its RGB component images

 

 

The CMY and CMYK color model

Cyan, magenta, and yellow are the primary colors of pigments. Most printing devices such as color printers and copiers require CMY data input or perform an RGB to CMY conversion internally. This conversion is performed using the equation

𝐶              1             𝑅

[𝑀] = [1] − [𝐺]

𝑌              1             𝐵

where, all color values have been normalized to the range [0, 1].

In printing, combining equal amounts of cyan, magenta, and yellow produce muddy-looking black. In order to produce true black, a fourth color, black, is added, giving rise to the CMYK color model.

The figure below shows the CMYK component images of an RGB image.

 

 

 

 

 

 

 

 

The HSI color model

The RGB and CMY color models are not suited for describing colors in terms of human interpretation. When we view a color object, we describe it by its hue, saturation, and brightness (intensity). Hence the HSI color model has been presented. The HSI model decouples the intensity component from the color-carrying information (hue and saturation) in a color image. As a result, this model is an ideal tool for developing color image processing algorithms.

The hue, saturation, and intensity values can be obtained from the RGB color cube. That is, we can convert any RGB point to a corresponding point is the HSI color model by working out the geometrical formulas.

 

 

Converting colors from RGB to HSI

The hue H is given by

 

 

𝐻 = {

 

𝜃               if 𝐵 𝐺

}

 

 

Where

 

360 − 𝜃             if 𝐵 > 𝐺

 

1 [(𝑅 𝐺) + (𝑅 𝐵)]

𝜃 = 𝑐o𝑠−1 {                    2                                                             }

√(𝑅 𝐺)2 + (𝑅 𝐵)(𝐺 𝐵)

 

 

 

The saturation S is given by

𝑆 = 1 −                      3

(𝑅 + 𝐺 + 𝐵)

 

 

 

[min (𝑅, 𝐺, 𝐵)]

 

The intensity is given by

 

𝐼

 

 

 

= 3

 

All RGB values are normalized to the range [0,1].

 

Converting colors from HSI to RGB

The applicable equations depend on the value of H:

If 0°𝐻 < 120° :

𝐵 = (1 − 𝑆)

𝑅 = 𝐼 [1 +                     𝑆 cos 𝐻         ]

cos (60°− 𝐻)

𝐺 = 3𝐼 − (𝑅 + 𝐵)

 

 

If 120°𝐻 < 240° :

𝐻 = 𝐻 − 120°

𝑅 = (1 − 𝑆)

𝐺 = 𝐼 [1 +                    𝑆 cos 𝐻        ]

cos (60°−𝐻)

𝐵 = 3𝐼 − (𝑅 + 𝐺)

 

 

If 240°𝐻 ≤ 360° :

𝐻 = 𝐻 − 240°

𝐺 = (1 − 𝑆)

𝐵 = 𝐼 [1 +                    𝑆 cos 𝐻        ]

cos (60°−𝐻)

𝑅 = 3𝐼 − (𝐺 + 𝐵)

 

 

The next figure shows the HSI component images of an RGB image.

 

 

Full color

           

Hue                                             Saturation                                                  Intensity Figure 15.7 A full-color image and its HSI component images

 

Basics of Full-Color Image Processing

Full-color image processing approaches fall into two major categories:

    • Approaches that process each component image individually and then form a composite processed color image from the individually processed components.
    • Approaches that work with color pixels directly.

In full-color images, color pixels really are vectors. For example, in the RGB system, each color pixel can be expressed as

 

𝑐𝑅(𝑥, 𝑦)

 

𝑅(𝑥, 𝑦)

 

𝑐(𝑥, 𝑦) = [𝑐𝐺(𝑥, 𝑦)] = [𝐺(𝑥, 𝑦)]

 

𝑐𝐵(𝑥, 𝑦)

 

𝐵(𝑥, 𝑦)

 

For an image of size M×N, there are MN such vectors, c(x, y), for x = 0,1, 2,...,M-1; y = 0,1,2,...,N-1.

Color Transformation

As with the gray-level transformation, we model color transformations using the expression

(𝑥, 𝑦) = 𝑇[ƒ(𝑥, 𝑦)]

where f(x, y) is a color input image, g(x, y) is the transformed color output image, and T is the color transform.

This color transform can also be written

𝑠i = 𝑇i(𝑟1, 𝑟2, , 𝑟𝑛)                           i = 1,2, … , 𝑛

For example, we wish to modify the intensity of the image shown in Figure 14.8(a) using

(𝑥, 𝑦) = 0.7ƒ(𝑥, 𝑦)

    • In the RGB color space, three components must be transformed:

𝑠i = 0.7𝑟i                  i = 1,2,3

    • In CMY space, also three component images must be transformed

𝑠i = 0.7𝑟i + 0.3                       i = 1,2,3

    • In HSI space, only intensity component 𝑟3is transformed

𝑠3 = 0.7𝑟3

      1. (b)

Figure 15.8 (a) Original image. (b) Result of decreasing its intensity

Follow us -

Let's Talk?

© 2022 K Mean Black. All rights reserved.

  • " Privacy "
  • " Terms & conditions "