24
COLOR MODELS Ramya Sarma-106111073 Anusha Holla-106111015

COLOR MODELS Ramya Sarma-106111073 Anusha Holla-106111015

Embed Size (px)

Citation preview

COLOR MODELSRamya Sarma-106111073

Anusha Holla-106111015

INTRODUCTION

Light can be characterized as chromatic and achromatic (void of color)

Achromatic light has intensity as its only attribute

Chromatic Light: Radiance: Total amount of energy that flows

from the light source. Measured in watts (W) Luminance: amount of energy that an

observer perceives from a light source. Measure in lumens (lm)

Brightness: It is a subjective descriptor. It is impossible to measure

LIGHT VS. PIGMENTS

Primary colors can be added to produced secondary colorsPrimary colors of light: Red, Blue and GreenSecondary colors of light: Magenta (red plus

blue) Cyan (green plus blue) Yellow (red plus green)

Primary color is one that absorbs a primary color of light and reflects or absorbs the other two. Primary colors of

light: Magenta, Cyan, Yellow

Secondary colors of light:

Red, Green, Blue

LIGHT PIGMENTS

LIGHT VS. PIGMENTS

COLOR MODELS

Purpose is to provide standard specification of colors

A color system is a specification of coordinate system

Each color is represented by a point in the coordinate system

THE RGB COLOR MODEL

Based on the cartesian coordinate system

24 bit color cube

THE RGB COLOR MODEL

Pixel Depth: The number of bits used to represent each pixel

For 8-bit imagePixel depth= 24 bits [(R,G,B)]In a 24 bit RGB image,Total no. of colors=

THE CMY AND CMYK COLOR MODELS

CMY model (Cyan, Magenta, Yellow) Cyan, Magenta and Yellow are the primary

colors for light and secondary colors for pigments

This model is used in color printers and copiers

RGB to CMY color conversion is performed internally

THE CMY AND CMYK COLOR MODELS

(assuming normalised values) =-

In reality, this model produces a muddy-looking black

Hence, we introduce a fourth color called black in the CMYK model (Cyan, Magenta, Yellow and Black).

DISADVANTAGES OF RGB AND CMY

RGB and CMY Models are well suited for Hardware Implementation and for Color Generation, but not well suited for describing Colors in the terms that are practical for Human Interpretation.

Hence HSI Model is used for color description

HSI MODEL

The HSI model uses three measures to describe colors:

Hue: A color attribute that describes a pure color (pure yellow, orange or red)

Saturation: Gives a measure of how much a pure color is diluted with white light

Intensity: Brightness is nearly impossible to measure because it is so subjective. Instead we use intensity. Intensity is the same achromatic notion that we have seen in grey level images

Consider if we make the RGB cube stand on the black vertex and position the white vertex directly above it.

The Line Joining Black and White is called the Intensityaxis

CALCULATING INTENSITY•Intensity component of any color can be determined by passing a plane perpendicular to the intensity axis and containing the color point.•The intersection of the plane with the intensity axis gives us the intensity component of the color

CALCULATING SATURATION Saturation is the

Perpendicular Distance of the color Point from the Intensity axis.

Saturation(Purity) of the Color Increasesas a function of distance from the Intensity axis.

Saturation of the Point on Intensity axis is 0.

CALCULATING HUE

In a similar way we can extract the hue from the RGB color cube . Consider a plane defined by the three points cyan, black and white.All points contained in this plane have the same hue (cyan) as black and white cannot contribute hue information to a colour

PROJECTION OF RGB CUBEConsider if we look straight down at the RGB cube as it was arranged previouslyWe would see a hexagonal shape with each primary colour separated by 120° and secondary colours at 60° from the primaries

RGB-HSI RELATION

To the right we see a hexagonal shape and an arbitrary color point

The hue is determined by an angle from a reference point, usually Red

The saturation is the distance from the origin to the point

The intensity is determined by how far up the vertical intensty axis this hexagonal plane sits (not apparent from this diagram)

CONVERTING COLORS FROM RGB TO HSIGiven a color as R, G, and B its H, S, and I values are calculated as follows:

H if B G

360 if B G

cos 112 R G R B

R G 2 R B G B 12

S 13

R G B min R,G,B

I 13 R G B

CONVERTING COLORS FROM HSI TO RGBGiven a color as H, S, and I its R, G, and B values are calculated as follows:

RG sector (0 <= H < 120°)

GB sector (120° <= H < 240°)

G 3I R B

B I 1 S

R I 1S cosH

cos 60 H

B 3I R G

R I 1 S

G I 1Scos H 120 cos H 60

CONVERTING COLORS FROM HSI TO RGB (CONT…)

BR sector (240° <= H <= 360°)

BGIR 3 SIG 1

B I 1S cos H 240 cos H 180

COLOR PERCEPTION IN HSI MODEL

RGB TO HSI EXAMPLE

APPLICATIONS

The Original purpose of HSL is in color selection tools.

REFERENCES

Digital Image Processing By Rafael C. Gonzalez, Richard E. Woods