Top Banner
Color Image Processing Jen-Chang Liu, Spring 2006
63

Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Mar 30, 2018

Download

Documents

lexuyen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Color Image Processing

Jen-Chang Liu, Spring 2006

Page 2: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

� For a long time I limited myself to one color – as a form of discipline.

� Pablo Picasso

� It is only after years of preparation that the young artist should touch color – not color used descriptively, that is, but as a means of personal expression.

� Henri Matisse

Page 3: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Preview� Why use color in image processing?

� Color is a powerful descriptor

� Object identification and extraction

� eg. Face detection using skin colors

� Humans can discern thousands of color shades and

intensities

� c.f. Human discern only two dozen shades of grays

Page 4: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Preview (cont.)

� Two category of color image processing

� Full color processing

� Images are acquired from full-color sensor or equipments

� Pseudo-color processing

� In the past decade, color sensors and processing hardware are not available

� Colors are assigned to a range of monochrome intensities

Page 5: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Outline

� Color fundamentals

� Color models

� Pseudo-color image processing

� Basics of full-color image processing

� Color transformations

� Smoothing and sharpening

Page 6: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Color fundamentals

� Physical phenomenon

� Physical nature of color is known

� Psysio-psychological phenomenon

� How human brain perceive and interpret color?

Page 7: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Color fundamentals (cont.)

� 1666, Isaac Newton 三稜鏡

Page 8: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Visible light

� Chromatic light span the electromagnetic spectrum (EM) from 400 to 700 nm

Page 9: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Color fundamentals (cont.)

� The color that human perceive in an object = the light reflected from the object

Illumination sourcescene

reflectioneye

Page 10: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Physical quantities to describe a chromatic light source

� Radiance: total amount of energy that flow from the light source, measured in watts (W)

� Luminance: amount of energy an observer perceives from a light source, measured in lumens (lm 流明)

� Far infrared light: high radiance, but 0 luminance

� Brightness: subjective descriptor that is hard to measure, similar to the achromatic notion of

intensity

Page 11: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

How human eyes sense light?� 6~7M Cones are the sensors in the eye

� 3 principal sensing categories in eyes

� Red light 65%, green light 33%, and blue

light 2%

Page 12: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Primary and secondary colors

� In 1931, CIE(International Commission on Illumination) defines specific wavelength

values to the primary colors

� B = 435.8 nm, G = 546.1 nm, R = 700 nm

� However, we know that no single color may be

called red, green, or blue

� Secondary colors: G+B=Cyan, R+G=Yellow, R+B=Magenta

Page 13: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired
Page 14: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Primary colors of light v.s.primary colors of pigments

� Primary color of pigments

� Color that subtracts or absorbs a primary color

of light and reflects or transmits the other two

Color of light: R G B

Color of pigments: absorb R absorb G absorb BCyan Magenta Yellow

Page 15: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Application of additive nature of light colors

� Color TV

Page 16: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

CIE XYZ model

� RGB -> CIE XYZ model

� Normalized tristimulus values

ZYX

Xx

++=

ZYX

Yy

++=

ZYX

Zz

++=

=

B

G

R

Z

Y

X

939.0130.0020.0

071.0707.0222.0

178.0342.0431.0

=> x+y+z=1. Thus, x, y (chromaticity coordinate) isenough to describe all colors

Page 17: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

色度圖

Page 18: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

By additivity of colors:Any color inside the

triangle can be producedby combinations of thethree initial colors

RGB gamut ofmonitors

Color gamut ofprinters

Page 19: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Outline

� Color fundamentals

� Color models

� Pseudo-color image processing

� Basics of full-color image processing

� Color transformations

� Smoothing and sharpening

Page 20: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Color models

� Color model, color space, color system� Specify colors in a standard way

� A coordinate system that each color is represented by a single point

� RGB model

� CYM model

� CYMK model

� HSI model

Suitable for hardware orapplications

- match the human description

Page 21: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

RGB color model

Page 22: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Pixel depth

� Pixel depth: the number of bits used to represent each pixel in RGB space

� Full-color image: 24-bit RGB color image

� (R, G, B) = (8 bits, 8 bits, 8 bits)

Page 23: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Safe RGB colors

� Subset of colors is enough for some application

� Safe RGB colors (safe Web colors, safe

browser colors)

(6)3 = 216

Page 24: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Safe RGB color (cont.)

Safe color cubeFull color cube

Page 25: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

CMY model (+Black = CMYK)

� CMY: secondary colors of light, or primary colors of pigments

� Used to generate hardcopy output

=

B

G

R

Y

M

C

1

1

1

Page 26: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

HSI color model

� Will you describe a color using its R, G, B components?

� Human describe a color by its hue,

saturation, and brightness

� Hue 色度: color attribute

� Saturation: purity of color (white->0, primary

color->1)

� Brightness: achromatic notion of intensity

Page 27: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

HSI color model (cont.)

� RGB -> HSI model

Intensityline

saturation

Colors on this triangleHave the same hue

Page 28: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

HSI model: hue and saturation

Page 29: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

HSI model

Page 30: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

HSI component images

R,G,B Hue

saturationintensity

Page 31: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Outline

� Color fundamentals

� Color models

� Pseudo-color image processing

� Basics of full-color image processing

� Color transformations

� Smoothing and sharpening

Page 32: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Pseudo-color image processing

� Assign colors to gray values based on a specified criterion

� For human visualization and interpretation

of gray-scale events

� Intensity slicing

� Gray level to color transformations

Page 33: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Intensity slicing

� 3-D view of intensity image

Image plane

Color 1

Color 2

Page 34: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Intensity slicing (cont.)

� Alternative representation of intensity slicing

Page 35: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Intensity slicing (cont.)

� More slicing plane, more colors

Page 36: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Application 1

8 color regionsRadiation test pattern

* See the gradual gray-level changes

Page 37: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Application 2

X-ray image of a weld

焊接物

Page 38: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Application 3

Rainfall statistics

Page 39: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Gray level to color transformation

� Intensity slicing: piecewise linear transformation

� General Gray level to color transformation

Page 40: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Gray level to color transformation

Page 41: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Application 1

Page 42: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Combine several monochrome images

Example: multi-spectral images

Page 43: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

R G

B

NearInfrared(sensitiveto biomass)

R+G+B near-infrared+G+B

Washington D.C.

Page 44: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Outline

� Color fundamentals

� Color models

� Pseudo-color image processing

� Basics of full-color image processing

� Color transformations

� Smoothing and sharpening

Page 45: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Color pixel

� A pixel at (x,y) is a vector in the color space

� RGB color space

=

),(

),(

),(

),(

yxB

yxG

yxR

yxc

c.f. gray-scale image

f(x,y) = I(x,y)

Page 46: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Example: spatial mask

Page 47: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

How to deal with color vector?

� Per-color-component processing

� Process each color component

� Vector-based processing

� Process the color vector of each pixel

� When can the above methods be equivalent?

� Process can be applied to both scalars and

vectors

� Operation on each component of a vector

must be independent of the other component

Page 48: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Two spatial processing categories

� Similar to gray scale processing studied before, we have to major categories

� Pixel-wise processing

� Neighborhood processing

Page 49: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Outline

� Color fundamentals

� Color models

� Pseudo-color image processing

� Basics of full-color image processing

� Color transformations

� Smoothing and sharpening

Page 50: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Color transformation

� Similar to gray scale transformation

� g(x,y)=T[f(x,y)]

� Color transformation

nirrrTsnii

,...,2,1 , ),...,,(21

==

g(x,y) f(x,y)

s1

s2

…sn

f1

f2

…fn

T1

T2

…Tn

Page 51: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Use which color model in color transformation?

� RGB �CMY(K) � HSI

� Theoretically, any transformation can be performed in any color model

� Practically, some operations are better

suited to specific color model

Page 52: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Example: modify intensity of a color image

� Example: g(x,y)=k f(x,y), 0<k<1

� HSI color space

� Intensity: s3 = k r3

� Note: transform to HSI requires complex operations

� RGB color space

� For each R,G,B component: si = k ri

� CMY color space

� For each C,M,Y component:

� si = k ri +(1-k)

Page 53: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

I H,S

Page 54: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired
Page 55: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Problem of using Hue component

dis-continuous

Un-definedover grayaxis

Page 56: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Implementation of color slicing

� Recall the pseudo-color intensity slicing

1-D intensity

Page 57: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Implementation of color slicing

� How to take a region of colors of interest?

prototype color

Sphere region

prototype color

Cube region

Page 58: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Application

cube sphere

Page 59: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Outline

� Color fundamentals

� Color models

� Pseudo-color image processing

� Basics of full-color image processing

� Color transformations

� Smoothing and sharpening

Page 60: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Color image smoothing

� Neighborhood processing

Page 61: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Color image smoothing: averaging mask

∑∈

=xySyx

yxK

yx),(

),(1

),( cc

NeighborhoodCentered at (x,y)

=

xy

xy

xy

Syx

Syx

Syx

yxBK

yxGK

yxRK

yx

),(

),(

),(

),(1

),(1

),(1

),(c

vector processing

per-component processing

Page 62: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

original R

G G

H S I

Page 63: Color Image Processing - libvolume6.xyzlibvolume6.xyz/.../colorimageprocessingpresentation2.pdf · Two category of color image processing Full color processing Images are acquired

Example: 5x5 smoothing mask

RGB model

Smooth Iin HSI model difference