Light:: Lecture 6 Assignment Name: Hazrat Ullah Roll No: 170387 Section: BSCS F-17 - C

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Lecture 6 Assignment

Name : Hazrat Ullah


Roll no : 170387
Section: BSCS F-17 –C

Light:
Visible light is in the 400 nm – 700 nm range of electromagnetic spectrum.

Color Fundamental:
Colors are seen as variable combinations of the primary color s of light: red (R), green
(G), and blue (B). The primary colors can be mixed to produce the secondary colors:
magenta (red+blue), cyan (green+blue), and yellow (red+green). Mixing the three
primaries, or a secondary with its opposite primary color, produces white light.

RGB colors are used for color TV, monitors, and video cameras.
However, the primary colors of pigments are cyan (C), magenta (M), and yellow (Y),
and the secondary colors are red, green, and blue. A proper combination of the three
pigment primaries, or a secondary with its opposite primary, produces black.

Color characteristics
The characteristics used to distinguish one color from another are:
• Brightness: means the amount of intensity (i.e. color level).
• Hue: represents dominant color as perceived by an observer.
• Saturation: refers to the amount of white light mixed with a hue.

Color Models in Images:


Color models most commonly used in image processing are:
o RGB model for color monitors and video cameras
o CMY and CMYK (cyan, magenta, yellow, black) models for color
printing
o HSI (hue, saturation, intensity) model
o Graphics/Image Data Structure Model
o Monochrome & Gray-scale Images Model
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.

CMY and CMYK:


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

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

The HSI color model:


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.
Graphics/Image Data Structure Model:
A digital image is an image f(x,y) that has been discretized both in spatial
coordinates and brightness. ... A simple image model: • To be suitable for
computer processing, an image f(x,y) must be digitalized both spatially and in
amplitude.
Pseudo-color processing:
Pseudo-color processing is a technique that maps each of the grey levels of a black
and white image into an assigned color. This colored image, when displayed, can
make the identification of certain features easier for the observer. ... Pseudo-color
schemes can also be designed to preserve or remove intensity information.

Intensity to color transformation:


Color Transformation
As with the gray-level transformation, we model color transformations using the
expression
g(x, y) = T [f (x ,y )]
where f(x, y) is a color input image, g(x, y) is the transformed color output image, and
T is the color transform.
For example, we wish to modify the intensity of the image shown in Figure 14.8(a)
using
g (x , y) = 0.7 f(x ,y )
o In the RGB color space, three components must be transformed:
Si = 0.7 ri i = 1,2,3
o In CMY space, also three component images must be transformed
Si = 0.7 + 0.3 ri i = 1,2,3
o In HSI space, only intensity component is transformed
Si = 0.7 r3

Color Models in Video

YUV Color Model


• Initially, for PAL analog video, it is now also used in CCIR 601 standard for
digital video
• Y (luminance) is the CIE Y primary.

Y = 0.299R + 0.587G + 0.114B
• Chrominance is defined as the difference between a color and a reference white
at the same luminance. It can be represented by U and V -- the color
differences.

U=B-Y
V=R-Y

U = 0.492 (B - Y)
V = 0.877 (R - Y)

• Sample YUV Decomposition:


Y U V

YCbCr Color Model


• The YCbCr model is closely related to the YUV, it is a scaled and shifted YUV

Cb = (B - Y) / 1.772 + 0.5
Cr = (R - Y) / 1.402 + 0.5
• The chrominance values in YCbCr are always in the range of 0 to 1.
• YCbCr is used in JPEG and MPEG.
YIQ Color Model

• YIQ is used in NTSC color TV broadcasting, it is downward compatible with


B/W TV where only Y is used
I is the orange-blue axis, Q is the purple-green axis.
I and Q axes are scaled and rotated R - Y and B - Y (by 33 degrees clockwise).
I = 0.877(R - Y) cos 33 - 0.492(B - Y) sin 33
Q = 0.877(R - Y) sin 33 + 0.492(B - Y) cos 33
Namely,
I = 0.736(R - Y) - 0.268(B - Y) = 0.596R - 0.275G - 0.321B
Q = 0.478(R - Y) + 0.413(B - Y) = 0.212R - 0.523G + 0.311B
• The YIQ transform:

Summary
• Color images are encoded as triplets of values.
• RGB is an additive color model that is used for light-emitting devices, e.g.,
CRT displays

CMY is a subtractive model that is used often for printers
• Two common color models in imaging are RGB and CMY, two common color
models in video are YUV and YIQ.
• YUV uses properties of the human eye to prioritize information. Y is the black
and white (luminance) image, U and V are the color difference (chrominance)
images. YIQ uses similar idea.
• Besides the hardware-oriented color models (i.e., RGB, CMY, YUV, YIQ),
HSB (Hue, Saturation, and Brightness) and HLS (Hue, Lightness, and
Saturation) are also commonly used.

You might also like