color image processing - sharif university of...

98
ee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 Digital Image Processing Color Image Processing 1 Color Image Processing: – Full-Color Processing: • Color is acquired with a full-color sensor – Pseudo-Color Processing: • Assigning colors to monochrome images

Upload: truongxuyen

Post on 11-Apr-2018

228 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

1

Digital Image Processing

Color Image Processing

1

• Color Image Processing:

– Full-Color Processing:

• Color is acquired with a full-color sensor

– Pseudo-Color Processing:

• Assigning colors to monochrome images

Page 2: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

2

Digital Image Processing

Color Image Processing

2

• Color Importance:

– Color is an excellent Descriptor:

• Suitable for object Identification and Extraction

– Discrimination:

• Humans can distinguish thousands of color shades and intensities But few shades of gray levels.

Page 3: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

3

Digital Image Processing

Color Image Processing

3

• Color and Light:

– Light is fundamental of color vision • Achromatic light (BW Television): Intensity!

• Chromatic light (Color TV): Radiance, luminance, and Brightness

– Light is an Electromagnetic waves: • If wavelength (pure) is between ≈400nm and ≈700nm, the wave is

detectable by human eye and called a monochromatic (Not gray level!) light.

– λ<400nm: Ultraviolet

– λ >700nm: Infrared

Page 4: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

4

Digital Image Processing

Color Image Processing

4

• What is Color:

– An Attribute of objects.

– Color Depends on:

• Spectral characterizations of light source (sun!) which illuminates the objects, PSD (Power Spectral Density)

• Spectral characteristics of objects (Reflectance)

• Spectral characteristics of sensors of imaging systems (ex. Eye)

Page 5: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

5

Digital Image Processing

Color Image Processing

5

• Color Fundamentals:

– Physiopsychological phenomenon:

• How human brain perceive and interpret color? – Not yet fully understood

– Physical Phenomenon:

• Physical Nature of color is clear.

Page 6: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

6

Digital Image Processing

Color Image Processing

6

• Newton Experiments (Spectral Analyzer)

– Emerging light is not longer white but a

continuous spectrum of color from violet to red

– Six broad region: violet, blue, green, yellow, orange, and red

Page 7: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

7

Digital Image Processing

Color Image Processing

7

• Chromatic Light:

– Span the electromagnetic spectrum from 400 to 700 nm

Page 8: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

8

Digital Image Processing

Color Image Processing

8

• Chromatic Light:

– Radiance:

• Total amount of energy that flows from light source (W)

– Luminance:

• The amount of energy that an observer perceives from light source. (IR case: R may be high while L is zero )

– Brightness:

• Subjective description, practically impossible to measure.

Page 9: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

9

Digital Image Processing

Color Image Processing

9

• Radiance for Black-Body radiator (Plank’s law)

• For other sources similar curves exist.

1

5 2 0

( ) ( ) , Watts

exp 1

CC R C d

C

T

Page 10: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

10

Digital Image Processing

Color Image Processing

10

• Luminance of objects:

Illumination source Object

reflection

C(λ)

R(λ)

S(λ)

Imaging Device

Page 11: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

11

Digital Image Processing

Color Image Processing

11

• Luminance of objects:

visible region

L= ( ) , LumensC R S d

Page 12: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

12

Digital Image Processing

Color Image Processing

12

• Brightness of objects:

– Subject dependent

– Human perception of brightness is related to c()

– The contributions that c(1) and c(2) make to human

perception of brightness are in general quite different for

1≠ 2 even though c(1) may be the same as c(2).

Page 13: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

13

Digital Image Processing

Color Image Processing

13

• The relative luminous efficiency of a

monochromatic light is defined as c(r) / c (t)

when c(r) and c’(t) are matched in brightness.

– c(r) is the reference monochromatic light.

– r is 555 nm (yellow-green light) at which a typical

observer has maximum brightness sensitivity.

– c’(t) is a test monochromatic light.

• For this reference, the relative luminous efficiency

is always less than or equal to 1.

Page 14: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

14

Digital Image Processing

Color Image Processing

14

• The relative luminous efficiency as a function of

is called the relative luminous efficiency function

and is denoted by v().

• Two monochromatic lights with c1(1) and c2(2)

appear equally bright to an observer when

– c1(1)v(1) = c2(2)v(2).

Page 15: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

15

Digital Image Processing

Color Image Processing

15

• Eye as light sensor:

– (6-7) millions cons cell categorized in 3 group sensors: • Red (67%)

• Green (33%)

• Blue (2%)

– Blue is most sensitive

– Standard Definition of R-G-B (CIE): • Red: 700nm

• Green: 546.1 nm

• Blue: 435.8nm

– No single color may be called R,G, or B.

Page 16: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

16

Digital Image Processing

Color Image Processing

16

• Relative Absorption of R/G/B cones:

Page 17: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

17

Digital Image Processing

Color Image Processing

17

• Absorption characteristic of eye and Primary colors:

– Curves are experimental

– Colors are seen as variable combination of primary colors (R-G-B)

– With three specific primary colors (fixed wavelength) it is NOT possible to generate all spectrum colors.

Page 18: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

18

Digital Image Processing

Color Image Processing

18

• Secondary Colors:

– Addition of primary colors:

• Magenta = Red + Blue

• Cyan = Green + Blue

• Yellow = Red + Green

– Mixing three primary and secondary with its opposite primary produce white color.

Page 19: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

19

Digital Image Processing

Color Image Processing

19

• Primary Colors of light and primary colors of pigments (colorant):

– Primary color of pigments:

• Subtract or absorbs a primary color of light and reflect the other two!

– Primary colors of light are: R-G-B

– Primary color of pigments are: C-M-Y.

– Secondary color of light are: C-M-Y.

– Secondary color of pigments are: R-G-B

Page 20: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

20

Digital Image Processing

Color Image Processing

20

• Primary Colors of light and primary colors of pigments (colorant):

– Problem is application dependent:

• R-G-B: Primary for Color TV

• C-M-Y: Primary for Color Printer.

Color of light: R G B

Color of pigments: absorb R absorb G absorb B Cyan Magenta Yellow

Page 21: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

21

Digital Image Processing

Color Image Processing

21

• Color TV:

Page 22: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

22

Digital Image Processing

Color Image Processing

22

Light

Pigments

Page 23: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

23

Digital Image Processing

Color Image Processing

23

• Characteristics of color

– To distinguish a color from another

– Hue, Saturation, and Brightness

• Hue: Dominant color (wavelength) perceived by an observer. (Red, Orange, Yellow, ant etc.)

• Saturation: relative purity of color or the amount of white light mixed with a hue.

– Pure colors (δ(λ-λ0)) are fully saturated.

– Pink is less saturated.

• Brightness: chromatic notion of intensity.

Page 24: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

24

Digital Image Processing

Color Image Processing

24

• Characteristics of color:

– Chromaticity:

• Hue+Saturation.

– Tri-stimulus:

• The amounts of R/G/B needed to form any particular color (X,Y, and Z)

BGR

Rr

BGR

Gg

BGR

Bb

1r g b r, g, b wavelength of light for that color

Page 25: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

25

Digital Image Processing

Color Image Processing

25

• Chromaticity Diagram:

– Color composition as a function of red (x-axis) and green (y-axis).

– Blue = 1-Red-Green

Page 26: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

26

Digital Image Processing

Color Image Processing

26

• Real and Imaginary Color – Negative Color

Page 27: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

27

Digital Image Processing

Color Image Processing

27

1. Boundary are full saturated (Pure Color)

1b r g

2. Mixed Color

3. CIR White (1/3,1/3,1/3) -zero saturation

5. Color Mixing With various Value of 2 color

4. All shade Of Pure color

6. Color Mixing With various Value of 3 color

Page 28: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

28

Digital Image Processing

Color Image Processing

28

• Chromaticity Diagram:

– Color composition as a function of red (x-axis) and green (y-axis).

– Blue = 1-Red-Green

Page 29: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

29

Digital Image Processing

Color Image Processing

29

• Chromaticity Diagram:

– Not all color in chromaticity diagram are enclosed by a triangle!

• With three single primary color we can NOT have all possible color!

Page 30: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

30

Digital Image Processing

Color Image Processing

30

Chromaticity Diagram

Monitor colors

Printers Inks

Page 31: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

31

Digital Image Processing

Color Image Processing

31

• Color Model (Color Space, Color System)

– Specify colors in a standard way

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

• Most used models:

– RGB model (Monitor/TV)

– CMY model (3-color Printers)

– CMYK model (4-color Printers)

– HSI model (Color Image Processing and Description)

Page 32: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

32

Digital Image Processing

Color Image Processing

32

• RGB Color Model:

– Three Primary colors

Page 33: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

33

Digital Image Processing

Color Image Processing

33

• RGB Color Model

– 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)

• Number of colors: 3

82 16,777,216

Page 34: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

34

Digital Image Processing

Color Image Processing

34

Color Image Generation

Color Image Acquisition

Filter-Sensor

Page 35: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

35

Digital Image Processing

Color Image Processing

35

• Safe RGB Colors: – Subset of colors is enough for some application

– Safe RGB colors (safe Web colors, safe browser colors)

– Only 6 levels of each primary colors are used.

– 63=216

– 000000=Black

– 111111=White!

– 110000=Purest Red

Page 36: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

36

Digital Image Processing

Color Image Processing

36

• Safe RGB Model

Page 37: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

37

Digital Image Processing

Color Image Processing

37

• Safe RGB Colors

Safe RGB Full Color RGB

Page 38: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

38

Digital Image Processing

Color Image Processing

38

• CMY and CMYK models: – CMY: Secondary colors of light, or primary colors

of pigments are used.

– Used to generate hardcopy output (Printer and Copier).

– Some facts: • Printer papers are white (reflect all colors)

• Printers use ink (Transparent)

• Cyan-Magenta-Yellow Pigments (ink) absorb Red-Green-Blue

Page 39: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

39

Digital Image Processing

Color Image Processing

39

• CMY and CMYK models:

– Printers: Overlapping layers of varying percentages of transparent cyan, magenta, and yellow inks.

– Light is transmitted through the inks and reflects off the surface below them.

– The percentages of CMY ink subtract inverse percentages of RGB from the reflected light so that we see a particular color

Page 40: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

40

Digital Image Processing

Color Image Processing

40

• CMY and CMYK models:

– White Paper reflect 100% of incoming light.

– K (Black) is practical problem of C+M+Y≠Black (Muddy Brown). Add a fraction of Black color

Page 41: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

41

Digital Image Processing

Color Image Processing

41

• CMY and CMYK models:

Page 42: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

42

Digital Image Processing

Color Image Processing

42

• CMY to RGB:

• RGB to CMYK:

1 1

1 1

1 1

C R R C

M G G M

Y B B Y

255255 2551. 255

255255 255

2. min , , 255255

C KCC R K

M G M KM

Y B K

Y KK C M Y YK

Page 43: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

43

Digital Image Processing

Color Image Processing

43

• HSI model:

– Human description of color is not RGB or CMYK

– Human description of color is Hue, Saturation and Brightness:

• Hue: color attribute

• Saturation: purity of color

• Brightness: achromatic notion of intensity

Page 44: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

44

Digital Image Processing

Color Image Processing

44

• RGB to HIS conversion Intensity Line (Equal RGB value)

Iso-Hue Triangle

Saturation (Distance)

Intensity

Page 45: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

45

Digital Image Processing

Color Image Processing

45

120º and 60º Distance (Pri. & Sec.)

Different Geometrical

Model is possible

Page 46: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

46

Digital Image Processing

Color Image Processing

46

Page 47: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

47

Digital Image Processing

Color Image Processing

47

• Single Hue

Page 48: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

48

Digital Image Processing

Color Image Processing

48

• Split Channel

Hue Saturation Intensity

Page 49: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

49

Digital Image Processing

Color Image Processing

49

RGB Hue

Saturation Intensity

• Channel Split

Page 50: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

50

Digital Image Processing

Color Image Processing

50

Hue saturation

intensity Reconstructed

• Modifying Channel

Page 51: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

51

Digital Image Processing

Color Image Processing

51

• Split Channel (RGB Model)

RGB R G B

Page 52: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

52

Digital Image Processing

Color Image Processing

52

• Split Channel (CMYK Model)

CMYK C M Y K

Page 53: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

53

Digital Image Processing

Color Image Processing

53

• Pseudo-color image processing

– Assign colors to gray values based on a specified criterion

– For human visualization and interpretation of gray-scale events

• Methods:

– Intensity slicing

– Gray level to color transformations

Page 54: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

54

Digital Image Processing

Color Image Processing

54

• Gray Level Slicing

1, , ,k k kf x y c f x y G G

Color 2

Color 1

Page 55: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

55

Digital Image Processing

Color Image Processing

55

• Gray Level Slicing (Two Levels)

Page 56: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

56

Digital Image Processing

Color Image Processing

56

• Gray Level Slicing (More Levels)

Page 57: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

57

Digital Image Processing

Color Image Processing

57

• Example (Nuclear Imaging) with 8 levels

Page 58: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

58

Digital Image Processing

Color Image Processing

58

• Industrial Application

– Welding

Page 59: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

59

Digital Image Processing

Color Image Processing

59

• Example:

Page 60: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

60

Digital Image Processing

Color Image Processing

60

• Gray Level to Color Transform

Page 61: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

61

Digital Image Processing

Color Image Processing

61

• Example

Page 62: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

62

Digital Image Processing

Color Image Processing

62

• Example:

Page 63: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

63

Digital Image Processing

Color Image Processing

63

• Combine several monochrome images:

– multi-spectral images (Remote Sensing/Medical)

Page 64: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

64

Digital Image Processing

Color Image Processing

64

R G

B Near IR

R-G-B IR-G-B

Page 65: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

65

Digital Image Processing

Color Image Processing

65

• Using Knowledge

Page 66: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

66

Digital Image Processing

Color Image Processing

66

• Full-Color Image Processing

– Process each color components individually

– Process color vector directly

,

, ,

,

R x y

x y G x y

B x y

c

Page 67: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

67

Digital Image Processing

Color Image Processing

67

• Color Transform

– Gray Level Transform:

– Color Image Transform:

• n=3 for RGB/HSI/CMY

• n=4 for CMYK

, ,g x y T f x y

1 2, , , , 1,2, ,i i ns T r r r i n

Page 68: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

68

Digital Image Processing

Color Image Processing

68

• Intensity Magnification: • HSI:

• RGB:

• CMY:

, ,g x y T f x y

3 3 2 2 1 1, ,s kr s r s r

i is kr

1i is kr k

Page 69: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

69

Digital Image Processing

Color Image Processing

69

• Sample Image:

– CMYK

– RGB

– HSI

Page 70: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

70

Digital Image Processing

Color Image Processing

70

• Intensity Adjustment (k=0.7)

Page 71: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

71

Digital Image Processing

Color Image Processing

71

• Color Complements:

– Analogy of Gray-Level Negative

– Color Complement: Hue directly opposite one another on color circle.

Page 72: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

72

Digital Image Processing

Color Image Processing

72

Two different

approaches!

Page 73: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

73

Digital Image Processing

Color Image Processing

73

• Color Slicing:

– Highlight a specific range of colors.

• Set non desired color to gray level.

0.5 2

O.W.

i i

i

i

r a Ws

r

2 2

0

1

0.5

O.W.

n

i i

ji

i

r a Rs

r

Page 74: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

74

Digital Image Processing

Color Image Processing

74

W=0.2549 R0=0.1765

• Examples:

Page 75: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

75

Digital Image Processing

Color Image Processing

75

Light

Flat

Dark

• Tonal Correction

Page 76: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

76

Digital Image Processing

Color Image Processing

76

• Color Balancing:

Page 77: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

77

Digital Image Processing

Color Image Processing

77

• Histogram Processing:

– Histogram Equalization may NOT apply independently!

– Logical approach:

• Uniform Intensity

• Hue unchanged

• Saturation may be changed or not!

Page 78: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

78

Digital Image Processing

Color Image Processing

78

original

Intensity Equlization

Saturation Increasing

Page 79: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

79

Digital Image Processing

Color Image Processing

79

• Color Image Smoothing:

– Like as Gray Level Images!

,

,

,

,

1ˆ , ,

,

xy

xy

xy

x y S

x y S

x y S

R x y

x y G x yMN

B x y

C

Page 80: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

80

Digital Image Processing

Color Image Processing

80

Co

lor

Imag

e

R-C

han

ne

l

G-C

han

nel

B-C

han

nel

• RGB Components

Page 81: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

81

Digital Image Processing

Color Image Processing

81

• HSI Components

H-Channel S-Channel I-Channel

Page 82: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

82

Digital Image Processing

Color Image Processing

82

RGB Smoothing I- Smoothing Difference

• Two approached for smoothing:

Page 83: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

83

Digital Image Processing

Color Image Processing

83

• Color Image Sharpening:

2

2 2

2

,

, ,

,

R x y

x y G x y

B x y

c

Page 84: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

84

Digital Image Processing

Color Image Processing

84

RGB Sharpening I- Sharpening Difference

• Two approached for Sharpening:

Page 85: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

85

Digital Image Processing

Color Image Processing

85

• Color Image Segmentation:

Will be discuss later!

Page 86: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

86

Digital Image Processing

Color Image Processing

86

• Segmentation in Vector Space

Page 87: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

87

Digital Image Processing

Color Image Processing

87

• Example:

Page 88: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

88

Digital Image Processing

Color Image Processing

88

• Color Image Edge Detection:

– Previous Operator is not defined for vector space!

– Problem is more complicated!

Page 89: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

89

Digital Image Processing

Color Image Processing

89

One change result two changes

Page 90: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

90

Digital Image Processing

Color Image Processing

90

– New Gradients vectors:

2 2 2

2 2 2

, , and :unit vectors in R, G, and B axes.

,

xx

yy

T

xy

R G B R G B

x x x y y y

R G Bg

x x x

R G Bg

y y y

R R G G B Bg

x y x y x y

T

T

r g b

u = r g b v = r g b

u u

v v

u v

Page 91: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

91

Digital Image Processing

Color Image Processing

91

Direction of maximum rate of changes of c(x,y) is:

1

0.5

21tan

2

Rate of change:

1cos 2 2 sin 2

2

xy

xx yy

xx yy xx yy xy

g

g g

F g g g g g

Page 92: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

92

Digital Image Processing

Color Image Processing

92

new

Sum of previous gradients for RGB channel

Diff.

• Example:

Page 93: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

93

Digital Image Processing

Color Image Processing

93

R-Grad G-Grad B-Grad

• R-G-B Gradients:

Page 94: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

94

Digital Image Processing

Color Image Processing

94

• Noise

– Model are same as before

Page 95: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

95

Digital Image Processing

Color Image Processing

95

• R-G-B Channels Corruptions

Page 96: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

96

Digital Image Processing

Color Image Processing

96

H-Channel S-Channel I-Channel

Noisy

Original

• HSI

Page 97: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

97

Digital Image Processing

Color Image Processing

97

• G- Channel Corruption

– Effect on all

Channels of

HSI

Page 98: Color Image Processing - Sharif University of Technologyee.sharif.edu/~dip/Files/ColorImageForView.pdfee.sharif.edu/~dip E. Fatemizadeh, Sharif University of Technology, 2011 2 Digital

ee.sharif.edu/~dip

E. Fatemizadeh, Sharif University of Technology, 2011

98

Digital Image Processing

Color Image Processing

98

• Color Image Compression:

– Will be discuss later