Color Image Processing A spectrum of possibilities…

11
Color Image Processing A spectrum of possibilities…

Transcript of Color Image Processing A spectrum of possibilities…

Page 1: Color Image Processing A spectrum of possibilities…

Color Image Processing

A spectrum of possibilities…

Page 2: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD2

Spectral Model Of Light

White light

Infrared

ultraviolet

Sir Isaac Newton, 1666

Page 3: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD3

Cone Cell Response

Peak sensitivity cones

– 65% red– 33% green– 2% blue

Blue cones are most sensitive

Observation is normally combination of colors

Thomas Young, 1802

Cone Cell Sensitivities

Wavelength

Res

pons

e le

vel

Blue

Green

Red

Page 4: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD4

CIE Chromaticity Diagram

Pure saturated colors lie along the edge and form a spectrum

Colors on a line from the edge to equal energy change only saturation (l1)

Along a line between two internal points lie all colors that can be produced additively from the end-point colors (l2)

Within a triangle are all colors that can be produced additively from the three vertices

Triangle shown is typical of the color characteristics, called the color gamut, of a video monitor

l1

l2

Page 5: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD5

RGB Color Cube

Red

Blue

Green

White

Black

Magenta

Yellow

Cyan

Gray scale

Page 6: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD6

Exercises

Develop code to render an RGB color cube. Compare with G&W text Figure 6.8. How does the video rendering compare with a

printed rendering? How many distinct colors can be represented if eight

bits are used for each color dimension R, G, and B? Generate a “safe” color cube (recall that for safe

colors the only allowable values for R, G, or B are 0x00, 0x33, 0x66, 0x99, 0xCC, and 0xFF)

How many “safe” colors are there?

Page 7: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD7

The HSI Color Model

Hue—the color Saturation—the amount of white that is

mixed with the hue Intensity—expresses the brightness or

luminance of the chromaticity (=hue and saturation)

Page 8: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD8

Converting from RGB to HSI

3

,,min31

2cos

if,360

if,

2

1

BGRI

BGR

BGRS

BGBRGR

BRGR

GB

GBH

Page 9: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD9

Converting from HSI to RGBCase R-G

needed. as rescaled bemay 1,,0 :Note

)(3

60cos

cos1

)1(

:)120(0 ,

360 rescale ,1,,0Given

BGR

BRIG

H

HSIR

SIB

H

HHISH

G-R Case

Page 10: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD10

Converting from HSI to RGBCase G-B

needed. as rescaled bemay 1,,0 :Note

)(3

60cos

cos1

)1(

120 Compute :)240(120 ,

360 rescale ,1,,0Given

BGR

GRIB

H

HSIG

SIR

H-HH

HHISH

B-G Case

Page 11: Color Image Processing A spectrum of possibilities…

04/19/23 Copyright GA Tagliarini, PhD11

Converting from HSI to RGBCase B-R

needed. as rescaled bemay 1,,0 :Note

)(3

60cos

cos1

)1(

240 Compute :)063(240 ,

360 rescale ,1,,0Given

BGR

GBIR

H

HSIB

SIG

H-HH

HHISH

R-B Case