6.1 color fundamentals digital image processing 6.2 color...

9
1 Digital Image Processing Jen-Hui Chuang Department of Computer Science National Chiao Tung University 2 6 Color Image Processing 6.1 Color Fundamentals 6.2 Color Models 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing 6.5 Color Transformations 6.6 Smoothing and Sharpening 6.7 Image Segmentation Based on Color 6.8 Noise in Color Images 6.9 Color Image Compression 3 Color Spectrum 6.1 Color Fundamentals 4 6.1 Color Fundamentals Spectrum of Electromagnetic Waves 5 6.1 Color Fundamentals Three basic quantities to describe the quality of a chromatic light source: Radiance — … energy … light source Luminance — … energy … observer Brightness —… a subjective descriptor … 6 Absorption of light by cones in human eye Primary colors (CIE): R: 700 nm G: 546.1 nm B: 435.8 nm 2% 32% 65%

Upload: duonghanh

Post on 30-Mar-2018

224 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 6.1 Color Fundamentals Digital Image Processing 6.2 Color ...ocw.nctu.edu.tw/course/iip052/iip052_ch6.pdf · 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing

1

Digital Image Processing

Jen-Hui Chuang

Department of Computer ScienceNational Chiao Tung University

2

6 Color Image Processing6.1 Color Fundamentals 6.2 Color Models 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing 6.5 Color Transformations 6.6 Smoothing and Sharpening 6.7 Image Segmentation Based on Color 6.8 Noise in Color Images 6.9 Color Image Compression

3

Color Spectrum

6.1 Color Fundamentals

4

6.1 Color Fundamentals

Spectrum of Electromagnetic Waves

5

6.1 Color Fundamentals

Three basic quantities to describe the quality of a chromatic light source:

Radiance — … energy … light source

Luminance — … energy … observer

Brightness —… a subjective descriptor …

6

Absorption of light by cones in human eye

Primary colors (CIE):

R: 700 nmG: 546.1 nmB: 435.8 nm

2% 32% 65%

Page 2: 6.1 Color Fundamentals Digital Image Processing 6.2 Color ...ocw.nctu.edu.tw/course/iip052/iip052_ch6.pdf · 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing

77

Primary and secondary colors

Trisitimulus values: X, Y, and Z

Trichromatic coefficients:

x = X / (X + Y + Z)y = Y / (X + Y + Z)z = Z / (X + Y + Z)

8

Chromaticity Diagram

88888

z = 1 – x – y

99

Typical color gamut of color monitors andcolor printing devices

10

6.2 Color Models6.2.1 The RGB Color Model

Ex. 6.1 The RGB color cube

10

11

Ex. 6.1 The RGB color cube (cont.)

1 12

Ex. 6.1 The RGB color cube (cont.)

1

Page 3: 6.1 Color Fundamentals Digital Image Processing 6.2 Color ...ocw.nctu.edu.tw/course/iip052/iip052_ch6.pdf · 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing

13

The RGB safe-color cube

11111111111111133 14

6.2.2 The CMY and CMYK Color Models

6.2.3 The HSI Color ModelConceptual relationship between RGB and HSI models

C = 1 – RM = 1 – G subtractive Y = 1 – B

15

Hue, Saturation and Intensity

16

Hue, Saturation and Intensity

16

GBif-360GBif

H

})])(()[(

)]()[(21

{cos 2/121

BGBRGR

BRGR

)],,[min(31 BGRBGR

S

)(31 BGRI

= 1 – min(R,G,B)/I

17

Ex. 6.2 HSI values and the RGB color cube

H S I

)(31 BGRIS = 1 – min(R,G,B)/IH

18

Manipulating HSI component images

?

?

?

H

S I

Page 4: 6.1 Color Fundamentals Digital Image Processing 6.2 Color ...ocw.nctu.edu.tw/course/iip052/iip052_ch6.pdf · 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing

19

Manipulating HSI component images (cont.)

H S

I20

6.3 Pseudocolor Image Processing

6.3.1 Intensity Slicing

222222222222222222222222222222222000000000

21

6.3.1 Intensity Slicing

Ex. 6.3

22

Ex. X-ray image of a weld

23

Ex. 6.4 Use of color to highlight rainfall levels

24

Ex. 6.4 Use of color to highlight …

Page 5: 6.1 Color Fundamentals Digital Image Processing 6.2 Color ...ocw.nctu.edu.tw/course/iip052/iip052_ch6.pdf · 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing

25

Ex. 6.4 Use of color to highlight …

26

6.3.2 Gray Level to Color Transformations

27

Ex. 6.5 Use of pseudocolor to highlight explosives

28

Color coding of multispectral images

29

Ex. 6.6 Color coding of multispectral images

222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222299999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999R1

G

B

R2

30

Ex. 6.6 (cont.)

yellow: old sulfur depositsred: new from volcano

Page 6: 6.1 Color Fundamentals Digital Image Processing 6.2 Color ...ocw.nctu.edu.tw/course/iip052/iip052_ch6.pdf · 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing

31

6.4 Basics of Full-Color Image Processing

Per-color-component and vector-based processingif two conditions are satisfied

Ex. Neighborhood averaging

32

6.5 Color Transformations6.5.1 Formulation

Ex. A full-color image and its various color space components

33

Ex. Adjusting the intensity of a color image

K = 0.7

34

6.5.2 Color Complements

Color Circle

35

Ex. 6.7 Computing color image complements

36

6.5.3 Color SlicingEx. 6.8

36Volume: 0.0166 : 0.0173

Page 7: 6.1 Color Fundamentals Digital Image Processing 6.2 Color ...ocw.nctu.edu.tw/course/iip052/iip052_ch6.pdf · 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing

37

6.5.4 Tone and Color Corrections

Color Management Systems (CMS)

38

6.5.4 Tone and Color Corrections

Device-independent color model: CIE LAB

)]()([500*

)]()([500*

16)(116*

WW

WW

W

ZZh

YYhb

YYh

XXha

YYhL

where

008856.0116/16787.7008856.0)(

3

qqqqqh

XW , YW , ZW : reference white. (e.g., x = 0.3127, y = 0.3290 in Fig. 6.5)

39

6.5.4 Tone and Color CorrectionsEx. 6.9 Tonal transformations

40

6.5.4 Tone and Color CorrectionsEx. 6.9 Tonal transformations (cont)

41

Ex. 6.10 Color balancing

41 42

6.5.5 Histogram ProcessingEx. 6.11 Histogram equalization in the HSI color space

Page 8: 6.1 Color Fundamentals Digital Image Processing 6.2 Color ...ocw.nctu.edu.tw/course/iip052/iip052_ch6.pdf · 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing

43

6.6 Smoothing and Sharpening6.6.1 Color Image SmoothingEx. 6.12 Color image smoothing by neighborhood averaging

R

G Bxy

xy

xy

Syx

Syx

Syx

yxBK

yxGK

yxRK

yx

),(

),(

),(

),(1

),(1

),(1

),(

4444444444444444

Ex. 6.12 (cont.)

H S I

(Smoothing I only)(Smoothing R, G, &B)

45

Ex. 6.13 Sharpening with the Laplacian

6.6.2 Color Image Sharpening

(Sharpening I only)(Sharpening R, G, &B)

),(),(),(

)],([2

2

2

2

yxByxGyxR

yx

46

6.7 Color Segmentation6.7.1 Segmentation in HSI Color Space

H

S I

4747

6.7.2 Segmentation in RGB Vector Space

Three Approaches

Ex. 6.15 Color image segmentation in RGB Space

R, G, B: 1.2548

6.7.3 Color Edge DetectionGradient Operator for Vector Quantities ?

R G B

R G B

Page 9: 6.1 Color Fundamentals Digital Image Processing 6.2 Color ...ocw.nctu.edu.tw/course/iip052/iip052_ch6.pdf · 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processing

49

Ex. 6.16 Edge detection in vector space

(6.7-9)

(next page)50

Ex. 6.16 (cont.)

50

R G B

515555555555555555555555555555555555555555555555555555555555111111111111111111111111111111111111111111111111111111111111111

6.8 Noise in Color Images

Ex. 6.17 Effects of converting noisy RGB

images to HSI

R G

BN(0, 800)

52

6.8 Noise in Color Images

Ex. 6.17 (cont.)

H S I

53

Ex. 6.17 (cont.)

H

S I

“Green” corrupted(S & P)

54

6.9 Color Image Compression

1:230or

1min : 4hr

5555555555555555555555555555555555555555555555555555555555555555555555555555554444444444444444444444444444444444