Javascript required
Skip to content Skip to sidebar Skip to footer

What Is the Rgb Color Model Used for

[ditty_news_ticker id="16452″]

If we see an image, we see multiple combinations of color(s). Every value carries information about the image and we can alter the values according to our requirement. The point is which value should we change for our particular requirement.

Also Check: UI UX Development Company

If we talk about the color sensors present in a human eye, cones are the sensors responsible for color vision. Approximately 65% of all cones are sensitive to Red, 33% are sensitive to green and left 2% are sensitive to blue light. However, blue cones are most sensitive.  So these are our primary colors – Red, Green, and Blue.

The word primary is widely misinterpreted that these three colors, when mixed in various intensity proportions, can produce all visible colors. Well!! This is not true. Wavelength also plays an important role in it about which we will talk later.

How manufacturing industries are using Mask Detection Video Analytics Solutions in Covid 19

What is the primary color??

The primary color is the one which absorbs a primary color and reflects the other two.

  • Mixing three primary colors or a secondary color with its opposite primary color produces white light as shown in Fig.1.

The primary colors can be added together to produce the secondary colors – magenta , cyan and yellow as you can see in the figure below-

Primary and Secondary colors in Color Image Processing

Fig. 1 Primary and Secondary colors

If we think about how can we differentiate one color from another. There must be some factor or characteristic based on which we can distinguish the color. Yes, of course!!! there are…

  • Brightness

This expresses the intensity or amount of the output.

If we talk about a practical example, this is what we see in the movies made before the 1930s.

  • Hue

As we know visible light has energy which is spread over a band of wavelengths. Hue represents the dominant wavelength in a mixture of all light waves.

It represents the dominant color as viewed by an observer.

  • Saturation

It shows the amount of white light mixed with the hue.

Hue and Saturation, together are called Chromaticity . Therefore, a color may be characterized by its chromaticity and intensity.

In Digital Image Processing, there are multiple color models present.

How Video Analytics is being used to  reduce Social Distancing Voilation in offices and manufacturing industries.

What is color space??

The color spaces in image processing aim to facilitate the specifications of colors in some standard way.

Different types of color spaces are used in multiple fields like in hardware, in multiple applications of creating animation, etc.

What is the color model??

The color model aims to facilitate the specifications of colors in some standard way.

Different types of color models are used in multiple fields like in hardware, in multiple applications of creating animation, etc.

  • In Digital Image Processing, the hardware-oriented models that are commonly used are the RGB model for printers and color monitors.
  • CMY(cyan, magenta, yellow) and CMYK(cyan, magenta, yellow, black) models are used for color printing.
  • HSI(hue, saturation, intensity) deals with colors as humans interpret.

Let's discuss each color model and its application. We will start with the most popular model that is the RGB model

RGB Model

In the RGB model, each color appears in its primary components of red, green and blue. This model is based on a Cartesian coordinate system as you can see in Fig.2.

RGB color cube in Color Image Processing

Fig.2. RGB color cube

We will see how an image is divided into three components.

          import cv2  image = cv2.imread('C:/Users/hp/images/1.jpg')  image = cv2.resize(image, (300, 300))   b = image[:,:,0:1]  g = image[:,:,1:2]  r = image[:,:,2:3]  # RGB - Blue  cv2.imshow('B-RGB', b)   # RGB - Green  cv2.imshow('G-RGB', g)   # # RGB - Red  cv2.imshow('R-RGB', r)   cv2.waitKey(0)        

Input image for Color Image Processing Fig. 3. Input image

R, G and B component of an image in Color Image Processing Fig.4. R, G and B component of an image

Application-

  • The RGB model is widely used in the representation and display of images in electronic systems like computers and televisions.
  • It is also used in conventional photography as well.
  • Image scanner which scans images and converts it to a digital image mostly supports RGB color.
  • It is used in web graphics.

CMY Model

This model contains the secondary colors. In this model, any secondary color when passed through white light will not reflect the color from which a combination of colors is made.

For example- when cyan is illuminated with white light, no red light will be reflected from the surface which means that the cyan subtracts the red light from the reflected white light (which itself is composed of red, green and white light).

color image processing (Eq. 1)

The formula given in equation 1 is for inter-conversion of RGB and CMY models.

Fig. 5. Input Image

Fig.6. C, M and Y components of an image

Application-

  • It is used in color printing as it uses colored inks.
  • It is used in most commercial printing like magazines, books, etc.

HSI Model (Hue, Saturation, Intensity)

It is a very important and attractive color model because it represents the colors the same way as the human eye senses colors.

We have already read about Saturation and Intensity.

Now, what is Hue?

Hue is a color component that describes a pure color (pure yellow, orange or red)

Saturation component represents the measure of the degree to which color is mixed with white color.

  • 0 degree – Red
  • 120 degree – Green
  • 240 degree – Blue
  • 60 degree – Yellow
  • 300 degree – Magenta

Intensity

  • Range is [0, 1]
  • 0 means white
  • 1 means black

The formula for conversion of RGB to HSI is quite complicated as compared to other color models.

HSI Model

Fig.7. HSI Model

The angle from the red axis gives the Hue, the length of the vector is the saturation and the intensity is given by the position of the plane on the vertical intensity axis.

The biggest application of this model is that it represents colors similarly to how the human eye senses colors.

So here we have learned about multiple color models and their applications.

I will explain the color manipulation in my next blog.

Keep reading and Keep learning!!!

If you've any doubts, please let us know through comment!!

Follow Us onFacebook |Twitter |LinkedIn.

Let CronJ assist you in Covid Pandemic situation. Improve your manufacturing safety with advanced video analytics solutions Mask Detection Software and Social distancing Software on the existing CCTV network

Thank you !!!

What Is the Rgb Color Model Used for

Source: https://www.cronj.com/blog/color-space-image-processing/