0% found this document useful (0 votes)
14 views26 pages

CGM - U5 Color Model

Uploaded by

shivbairwa600
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views26 pages

CGM - U5 Color Model

Uploaded by

shivbairwa600
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

YIQ Color Model in Computer Graphics

During the early days of color television, black-and-white sets were still
expected to display what were originally color images. YIQ model separated
chrominance from luminance. Luminance information is contained on the Y-
channel, whereas color information is carried on I and Q channels (in-phase and
in-quadrature) , in-short YIQ(Luminance, In-phase, Quadrature). In addition to
providing a signal that could be displayed directly on black-and-white TVs, the
system provided easy coding and decoding of RGB signals which was not
directly possible.
Due to the fact that the Y-channel carries a lot of luminance information, it has a
bandwidth assigned to it of 4Mhz, I-channel has a bandwidth assigned to it of
1.5Mhz, and Q-channel has a bandwidth of 0.6Mhz.

The Y component is the grayscale to drive old black-and-white TVs. The I


component goes from orange to blue and the Q component goes from purple to
green.
To find I-channel and Q-channel:
In-Phase = Red - Yellow
Quadrature = Blue - Yellow
It is not possible to directly display a YIQ image while developing. The show
function only recognizes RGB colors. If you try to display an image in another
colorspace, the show function will display the wrong color. To use show, we
have to use conversions.
 From YIQ to RGB conversion:

 From RGB to YIQ conversion:

Advantages:
 The advantage of this model is that more width can be assigned to the Y-
component (Luminance) because the human visual system is more
sensitive to changes in luminance than to changes in hue or saturation.
 For display on a screen, color television sets map these channels Y, I, and
Q to R, G, and B.
Disadvantage:
 Due to the high implementation costs for true I and Q decoding, few
television sets do it.
 To accommodate the bandwidth variances between I and Q, each of I and
Q needs a distinct filter.
 Due to different bandwidths, the “I” filter has a time delay to match the
“Q” filter’s long delay.
 In black-and-white TV only Only Y can be noticed.
HSV Color Model in Computer Graphics
A color model is a multidimensional representation of the color spectrum. The
most relevant color spectrums are RGB, HSV, HSL and CMYK. A color model
can be represented as a 3D surface (e.g. for RGB) or go into much higher
dimensions (such as CMYK). By adjusting the parameters of these surfaces, we
can obtain different colors that we see in the color spectrum around us.

HSV:
An HSV color model is the most accurate color model as long as the way
humans perceive colors. How humans perceive colors is not like how RGB or
CMYK make colors. They are just primary colors fused to create the spectrum.
The H stands for Hue, S stands for Saturation, and the V stand for value.
Imagine a cone with a spectrum of red to blue from left to right, and from the
centre to the edge, the color intensity increases. From bottom to up, the
brightness increases. Hence resulting white at the center up layer. A
pictographic representation is also shown below.

 Hue: Hue tells the angle to look at the cylindrical disk. The hue
represents the color. The hue value ranges from o to 360 degrees.
Color
Angle (in degree)

0-60 Red

60-120 Yellow

120-180 Green

180-240 Cyan

240-300 Blue

300-360 Magenta

 Saturation: The saturation value tells us how much quantity of respective


color must be added. A 100% saturation means that complete pure color
is added, while a 0% saturation means no color is added, resulting in
grayscale.
 Value: The value represents the brightness concerning the saturation of
the color. the value 0 represents total black darkness, while the value 100
will mean a full brightness and depend on the saturation.
Advantages:
The advantage of HSV is that it generalizes how humans perceive color. Hence
it is the most accurate depiction of how we feel colors on the computer screen.
Also, the HSV color space separates the luma from the color information. this
allows us to perform the operations mentioned above in the applications section,
as the histogram equalization will only be required for intensity values.
Applications:
 HSV model is used in histogram equalization.
 Converting grayscale images to RGB color images.
 Visualization of images is easy as by plotting the H and S components we
can vary the V component or vice-versa and see the different
visualizations.

HSL stands for Hue, Saturation, and Lightness. It's a cylindrical-coordinate


representation of colors that can be used in web design and other forms of
digital media. HSL color values are specified with the hsl() function in CSS,
which makes it a convenient tool for web developers to define colors for web
pages.
HSL Color Components
 Hue: This is the degree on the color wheel ranging from 0 to 360. It
represents the color itself, with 0 (or 360) being red, 120 being green, and
240 being blue.
 Saturation: It describes the intensity or purity of the color and is a
percentage value. 100% saturation means full color without any shade of
gray, while 0% saturation results in a complete gray, making the color
unrecognizable.
 Lightness: This component represents the amount of light you want to
give the color. A lightness of 0% means no light (black), 50% lightness is
neither dark nor light (a lighter version of the color), and 100% lightness
means full light (white).
HSL and HSV are the two most common cylindrical-coordinate representations
of points in an RGB color model. The two representations rearrange the
geometry of RGB in an attempt to be more intuitive and perceptually relevant
than the cartesian (cube) representation. Developed in the 1970s for computer
graphics applications, HSL and HSV are used today in color pickers,
Basic Illumination Models
Illumination model, also known as Shading model or Lighting model, is used
to calculate the intensity of light that is reflected at a given point on surface.
There are three factors on which lighting effect depends on:
1. Light Source : Light source is the light emitting source. There are three
types of light sources: Their position, electromagnetic spectrum and
shape determine the lighting effect.
1. Point Sources – The source that emit rays in all directions (A bulb
in a room).
2. Parallel Sources – Can be considered as a point source which is
far from the surface (The sun).
3. Distributed Sources – Rays originate from a finite area (A
tubelight).
2. Surface : When light falls on a surface part of it is reflected and part of it
is absorbed. Now the surface structure decides the amount of reflection
and absorption of light. The position of the surface and positions of all the
nearby surfaces also determine the lighting effect.
3. Observer : The observer’s position and sensor spectrum sensitivities also
affect the lighting effect
1. Ambient Illumination
Assume you are standing on a road, facing a building with glass exterior and
sun rays are falling on that building reflecting back from it and the falling on the
object under observation. This would be Ambient Illumination,In simple
words, Ambient Illumination is the one where source of light is indirect. The
reflected intensity Iamb of any point on the surface is:
2. Diffuse Reflection
Diffuse reflection occurs on the surfaces which are rough or grainy. In this
reflection the brightness of a point depends upon the angle made by the light
source and the surface. The reflected intensity Idiff of a point on the surface is:

3. Specular Reflection
When light falls on any shiny or glossy surface most of it is reflected back, such
reflection is known as Specular Reflection. Phong Model is an empirical model
for Specular Reflection which provides us with the formula for calculation the
reflected intensity Ispec.

You might also like