Lecture 2 HIS space

„ Last week:

„ introduction and tri-color representation

Digital Image Processing „ HSI perceptual

„ Readings: G&W 6.1-6.2, Jain 3.7-3.8 Prof. Shih-Fu Chang „ This week:

„ Review and MATLAB demo of HSI conversion Digital and Multimedia Lab Columbia University „ More Color Coordinate Systems (Jain 3.7-3.9) Jan. 27 2005 „ Pseudo-Coloring (G&W 6.3)

http://www.ee.columbia.edu/dvmm „ Optimal Quantization (G&W 2.4, Jain 4.5-4.8)

Most images are downloaded from the web site of the Gonzalez/Woods textbook Lec #2 Slide 1 Lec #2 Slide 2

Chromaticity Diagram Understanding HSI from RGB

„ Turn the RGB cube so that „ Convert 3D cube to 2D diagram - axis is vertical „ Each plane containing the „ Each RGB is normalized by dividing the color values by B-W axis and any color SUM(R,G,B) point contains all the of the same (because „ Coordinate of each point indicates the proportion of of the mixing property) R,G,B in the composition „ Hue can be represented as „ Only shows the of angle between the plane the color, does not specify the and a reference plane (e.g. intensity ) r = R /(R + G + B) „ Boundary points are spectral „ Color of the same hue can colors g = G /(R + G + B) be made less saturated by „ Equal energy point is the white mixing more colors = + + color b B /(R G B) (shift closer to the b-w „ Points on a line are all the axis)

mixed colors using two colors „ Intensity can be measured on the ends by the intersection position „ Points in a triangle are mixed between the horizontal by colors on three vertices plane (containing the point) Æ reproducible colors by RGB and the B-W axis.

Lec #2 Slide 3 Lec #2 Slide 4

1 Formation of the HIS color cone Colors on the HIS color cone

„ Cross sections of the RGB „ Saturated colors on the cube along the B-W axis outer points „ The cross section shape „ The maximum saturation changes from triangle to values occur at the hexagon to triangle intermediate intensity „ Hue is represented by the levels. angle from Red line „ Note the different „ Saturation is represented equations used in the by the distance to the textbook and the reference origin book „ The hexagonal shape can be approximated by a (Mathematical proof on the circle or a triangle. Web site)

Lec #2 Slide 5 Lec #2 Slide 6

Manipulations in the HSI space Other Issues of Color Spaces

„ Uniform Color Spaces and MacAdam Ellipses (see hand notes)

„ space for

„ Pseudo Coloring „ Hue of and regions are set to 0.

„ Saturation of is reduced „ HSI values of „ HSI allows independent by half.

„ Intensityprimary/secondary of the White color manipulations of colors are reduced by half. colors „ See Matlab demo

Lec #2 Slide 7 Lec #2 Slide 8

2 Additive vs. Subtractive Colors Color

„ Triangle includes

„ Additive colors for display all the colors „ subtractive colors for producible by CIE printing RGB primaries „ See hand notes for equations „ Irregular region includes all the printable colors

Lec #2 Slide 9 Lec #2 Slide 10

Pseudo Coloring Reading: G&W Sec. 6.3 Intensity Slicing

„ How to decide the mapping function?

Lec #2 Slide 11 Lec #2 Slide 12

3 Example of intensity slicing Gray level to color transformation

„ Map gray level 255 to

„ The rest to blue

„ 255 „ Mapped to 8 colors corresponds „ Note the color variations to cracks or „ How to design the transformation functions? in the left lobe of the porosities in radiation test pattern the weld

Lec #2 Slide 13 Lec #2 Slide 14

Example of Gray-Color Transformation How does it work?

„ 3 channels use sinusoidal functions with the same frequency but different phases.

„ Adjust the frequency to obtain the best quality/information.

Lec #2 Slide 15 Lec #2 Slide 16

4 Pseudocoloring using multiple images Sampling & Quantization

R G Reading: G&W Sec. 2.4 Jain 4.5-4.8

B R’

near-infrared

„ Note the difference between human- made features (blue) and the bio-mass (red)

Lec #2 Slide 17 Lec #2 Slide 18

Sampling – Spatial Resolution Quantization – Grey-Scale Resolution

See hand notes „ Concept of the Nyquist Rate „ Varying # of per „ Non-uniform sampling and Interlaced sampling used in digital video

pixel replication use interpolation

Varying spatial resolution

Lec #2 Slide 19 Lec #2 Slide 20

5 Tradeoff between gray-level resolution and spatial resolution # bits

„ Curves show isopreference points

„ For low-, moderate-detail images, increasing NxN pixels K or N will help perceptual quality

„ For high-detail images, increasing N is more important. Lec #2 Slide 21

6