+ All Categories
Home > Documents > Presented By : Dr. J. Shanbezadeh Email : [email protected].

Presented By : Dr. J. Shanbezadeh Email : [email protected].

Date post: 19-Jan-2016
Category:
Upload: clarence-jacobs
View: 222 times
Download: 0 times
Share this document with a friend
Popular Tags:
67
DIGITAL IMAGE PROCESSING Presented By : Dr. J. Shanbezadeh Email : [email protected] m Chapter 6 – Color Image Processing
Transcript
Page 1: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

DIGITAL IMAGE PROCESSING

Presented By:

Dr. J. ShanbezadehEmail :

[email protected]

Chapter 6 – Color Image Processing

Page 2: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

TABLE OF CONTENTS

6.1 Color Fundamentals 6.2 Color Models 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processin

g 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

2

Page 3: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.1 COLOR FUNDAMENTALS

3

Page 4: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

4

LIGHT

صوا

ل رنگ

تجزیه نور سفید توسط منشور•

Page 5: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

5

LIGHT

صوا

ل رنگ

طیف نور قابل رویت•

Page 6: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6

ABSORPTION OF LIGHT IN EYE

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

radiance : total amount of energy that flows from the light source.

luminance : measure of the amount of energy an observer perceives from a

light source.

brightness : a subjective descriptor that is practically impossible to measure.

It embodies the achromatic notion of intensity .

Page 7: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

7

ABSORPTION OF LIGHT IN EYE

Page 8: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

8

PRIMARY & SECONDARY COLORS OF LIGHT

Additive primary colors: RGBuse in the case of light sourcessuch as color monitors.

RGB add together to get white

Subtractive primary colors: CMYuse in the case of pigments inprinting devices

White subtracted by CMY to get Black

Page 9: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

9

CHARACTERISTICS OF COLORS

The characteristics generally used to distinguish one color from another are:

Brightness

saturation

Hue

Page 10: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

10

BRIGHTNESS(INTENSITY) Brightness embody the achromatic notion of

intensity.

Page 11: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

11

HUE

dominant color corresponding to a dominant wavelength of mixture light wave

Page 12: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

12

SATURATION

Relative purity or amount of white light mixed with a hue.

inversely proportional to amount of white .

Page 13: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

13

RADIANCE, LUMINANCE, BRIGHTNESS

Three basic properties used to describe the quality of chromatic light source: Luminance Radiance Brightness

Page 14: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

14

CHROMATICITY SATURATION + HUE = CHROMATICITYo amount of red (X), green (Y) and blue (Z) to form any

particular color is called tristimulus.Trichromatic coefficients:

ZYX

Xx

ZYX

Yy

ZYX

Zz

1 zyx

x

y

Points on the boundary arefully saturated colors

CIE Chromaticity Diagram

Page 15: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

15

CHROMATICITY

CIE chromaticity diagram

• Has superior performance over other color transforms especially in clustering of color distribution and estimate of color difference.

• Shows color as a function of x (red) and y (green)

• Useful for color mixing

• Boundary of the diagram shows fully saturated . As a point leaves the boundary and approaches the point of equal energy, more white light is added to the color and it becomes less saturated .

CIE color models include CIE XYZ, CIE x,yY, CILE La*b*, and CIE Lu’v’. Derivatives of the CIE XYZ space include CIELUV, CIEUVW, and CIELAB.

Page 16: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

16

COLOR GAMUT OF COLOR MONITORS AND PRINTING DEVICES

A triangle with vertices at any three fixed colors cannot enclose the entire color region

it shows that not all colors can be obtained with three single, fixed primaries.

Color Monitors

Printing devices

Page 17: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

TABLE OF CONTENTS

6.1 Color Fundamentals 6.2 Color Models 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processin

g 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

17

Page 18: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.2 COLOR MODELS

6.2.1 The RGB Color Model 6.2.2 The CMY and CMYK Color M

odel 6.2.3 The HSI Color Model

18

Foreword

Page 19: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

19

COLOR SPACE OR COLOR SYSTEM

Purpose of color models: to facilitate the specification of colors in some standard.

A specification of a coordinate system and a subspace within that system where each color is represented a single point

Two applied directions for color models: Hardware Applications where color manipulation(color graphics)

Color Models: RGB models: color monitors CMY (CMYK): color model for color printing YIQ: Color model for color television HIS: a color model for humans to describe and to interpret

color; decouple the color and gray-level information.

Page 20: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.2 COLOR MODELS

6.2.1 The RGB Color Model 6.2.2 The CMY and CMYK Color M

odel 6.2.3 The HSI Color Model

20

Foreword

Page 21: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

21

RGB COLOR MODEL

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

Page 22: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.2 COLOR MODELS

6.2.1 The RGB Color Model 6.2.2 The CMY and CMYK Color M

odel 6.2.3 The HSI Color Model

22

Foreword

Page 23: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

23

CYM & CYMK COLOR MODELS

Color printer and copier

Deposit colored pigment on paper

Relationship with RGB model: C = Cyan

M = MagentaY = YellowK = Black

B

G

R

Y

M

C

1

1

1

Example :surface coated with pure cyan does not contain red (C = 1 — R)

Page 24: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.2 COLOR MODELS

6.2.1 The RGB Color Model6.2.2 The CMY and CMYK Color M

odel 6.2.3 The HSI Color Model

24

Foreword

Page 25: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

25

HSI COLOR MODEL

RGB, CMY models are not good for human interpreting

Hue: Dominant color Saturation: Relative purity (inversely proportional

to amount of white light added) Intensity: Brightness

Color carryinginformation

Page 26: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

26

CONCEPTUAL RELATIONSHIPS BETWEEN RGB & HSI MODELS

extract intensity from an RGB image : the line (intensity axis) joining the black and white vertices is vertical. pass a plane perpendicular to the

intensity axis and containing the color point. The intersection of the plane with the intensity axis give a point with intensity value in the range [0,1]. The boundaries defined by the

intersection of each plane with the faces of the cube have either a triangular or hexagonal shape.

Page 27: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

27

CONCEPTUAL RELATIONSHIPS BETWEEN RGB & HIS MODELS

saturation : increases as a function of distance from the intensity axis .

Hue : all colors generated by three colors lie in the triangle defined by those colors.( black ,white ,color point).

points on the triangle would have the same hue(black and white cannot change the hue ).

By rotating the shaded plane about the vertical intensity axis, we would obtain different hues.

Page 28: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

28

CONCEPTUAL RELATIONSHIPS BETWEEN RGB & HIS MODELS

white yellow

blackblue

greencyan

red

intensity

saturation

The triangle is hue

Page 29: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

29

HSI & SATURATION ON COLOR PLANES

Hue is an angle from a red axis. Origin is defined by the intersection of the color plane with the vertical intensity axis.

Saturation is the length of the vector from the origin to the point.

Page 30: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

30

RELATIONSHIP BETWEEN RGB AND HSI COLOR MODELS

RGB HSI

Page 31: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

31

HSI

HSIنمایش رنگها در سیستم •

Page 32: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

32

CONVERTING COLORS FROM RGB TO HSI

BGRS

31

GB

GBH

if 360

if

2/12

1

))(()(

)()(21

cosBGBRGR

BRGR

)(3

1BGRI

RGB

Hue

saturation

Intensity

Page 33: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

33

Converting Colors from HSI to RGB

33

)1( SIB

)60cos(

cos1

H

HSIR

)(1 BRG

RG sector: 1200 H

GB sector:

240120 H

)1( SIR

)60cos(

cos1

H

HSIG

)(1 GRB

)1( SIG

)60cos(

cos1

H

HSIB

)(1 BGR

BR sector: 360240 H

120HH240HH

Page 34: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

34

EXAMPLE: HSI COMPONENTS OF RGB CUBE

Hue Saturation Intensity

RGB Cube

The saturation shows darker values toward the white vertex of the RGB cube, colors become less saturated as they approach white.

every pixel in the intensity is the average of the RGB values at the corresponding pixel in Fig. 6.8.

Page 35: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

35

Hue

Saturation Intensity

RGBImage

EXAMPLE: HSI COMPONENTS OF RGB CUBE

Page 36: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

36

EXAMPLE: MANIPULATING HSI COMPONENTS

HueSaturationIntensityRGBImage

Intensity : reduced by half the intensity of the central white region in the intensity image

Hue : changing to 0 the pixels corresponding to the blue and green regions

Saturation : reduced by half the saturation of the cyan region in component image S

Page 37: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

TABLE OF CONTENTS

6.1 Color Fundamentals 6.2 Color Models 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processin

g 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

37

Page 38: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.4 BASICS OF FULL-COLOR IMAGE PROCESSING

2 Methods: 1. Per-color-component processing: process each component separately. 2. Vector processing: treat each pixel as a vector to be

processed.

38

Example of per-color-component processing: smoothing an image by smoothing each RGB component separately.

Page 39: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

39

we are interested in image processing techniques formulated in spatial domain :

For per-color-component= vector-based processing needs conditions: 1- the process has to be applicable to both vectors and scalars. 2- the operation on each component of a vector must be

independent of the other components

BASICS OF FULL-COLOR IMAGE PROCESSING

Page 40: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

TABLE OF CONTENTS

6.1 Color Fundamentals 6.2 Color Models 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processin

g 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

40

Page 41: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.5 COLOR TRANSFORMATIONS

6.5.1 Formulation 6.5.2 Color Complements 6.5.3 Color Slicing 6.5.4 Tone and Color Corrections 6.5.5 Histogram Processing

41

Page 42: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

42

FORMULATION

Formulation: ),(),( yxfTyxg

f(x,y) = input color image g(x,y) = output color imageT = operation on f over a spatial neighborhood of (x,y)

When only data at one pixel is used in the transformation, we can express the transformation as:

),,,( 21 nii rrrTs i= 1, 2, …, n

Where ri = color component of f(x,y)si = color component of g(x,y)

Use to transform colors to colors.

For RGB images, n = 3

Page 43: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

43

Color image

CMYK components

RGB components

HSI components

EXAMPLE: FULL-COLOR IMAGE AND VARIOUIS COLOR SPACE COMPONENTS

Page 44: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

44

EXAMPLE: COLOR TRANSFORMATION

),(),(

),(),(

),(),(

yxkryxs

yxkryxs

yxkryxs

BB

GG

RR

Formula for RGB:

),(),( yxkryxs II

Formula for CMY:

)1(),(),(

)1(),(),(

)1(),(),(

kyxkryxs

kyxkryxs

kyxkryxs

YY

MM

CC

Formula for HSI:

These 3 transformations give the same results.

k = 0.7

I H,S

Page 45: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.5 COLOR TRANSFORMATIONS

6.5.1 Formulation 6.5.2 Color Complements 6.5.3 Color Slicing 6.5.4 Tone and Color Corrections 6.5.5 Histogram Processing

45

Page 46: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

46

Color complement replaces each color with its opposite color in the color circle of the Hue component. This operation is analogous to image negative in a gray scale image.

Color circle

COLOR COMPLEMENTS

Page 47: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

47

COLOR COMPLEMENT TRANSFORMATION EXAMPLE

Page 48: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.5 COLOR TRANSFORMATIONS

6.5.1 Formulation6.5.2 Color Complements 6.5.3 Color Slicing 6.5.4 Tone and Color Corrections 6.5.5 Histogram Processing

48

Page 49: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

49

otherwise2

if 5.01

i

njanyjj

i

r

War

s

We can perform “slicing” in color space: if the color of each pixel is far from a desired color more than threshold distance, we set that color to some specific color such as gray, otherwise we keep the original color unchanged.

i= 1, 2, …, n

or

otherwise

if 5.01

20

2

i

n

jjj

i

r

Rar s

Set to gray

Keep the originalcolor

Set to gray

Keep the originalcolor

i= 1, 2, …, n

COLOR SLICING TRANSFORMATION

Page 50: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

50

Original image

After color slicing

COLOR SLICING TRANSFORMATION EXAMPLE

0.2549در محدوده مكعبي به عرض 0.1765در محدوده كروي به شعاع

Page 51: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.5 COLOR TRANSFORMATIONS

6.5.1 Formulation6.5.2 Color Complements6.5.3 Color Slicing 6.5.4 Tone and Color Corrections 6.5.5 Histogram Processing

51

Page 52: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

52

In these examples, only brightness and contrast are adjusted while keeping color unchanged. This can be done byusing the same transformationfor all RGB components.

Power law transformations

Contrast enhancement

TONAL CORRECTION EXAMPLES

Page 53: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

53

COLOR BALANCING CORRECTION EXAMPLES

Color imbalance: primary color components in white area are not balance. We can measure these components by

using a color pectrometer.

Color balancing can be performed by adjusting color components separately as seen in this slide.

Page 54: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.5 COLOR TRANSFORMATIONS

6.5.1 Formulation6.5.2 Color Complements6.5.3 Color Slicing6.5.4 Tone and Color Corrections 6.5.5 Histogram Processing

54

Page 55: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

55

HISTOGRAM EQUALIZATION OF A FULL-COLOR IMAGE

Histogram equalization of a color image can be performed by adjusting color intensity uniformly while leaving color unchanged.

The HSI model is suitable for histogram equalization where only Intensity (I) component is equalized.

Page 56: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

56

Ori

gina

l im

age

Aft

er h

isto

gram

eq

uali

zati

on After increasing saturation component

HISTOGRAM EQUALIZATION OF A FULL-COLOR IMAGE

Page 57: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

TABLE OF CONTENTS

6.1 Color Fundamentals 6.2 Color Models 6.3 Pseudocolor Image Processing 6.4 Basics of Full-Color Image Processin

g 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

57

Page 58: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.6 SMOOTHING AND SHARPENING

6.6.1 Color Image Smoothing 6.6.2 Color Image Sharpening

58

Page 59: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

59

2 Methods:

1. Per-color-plane method: for RGB, CMY color models Smooth each color plane using

moving averaging and the combine back to RGB

2. Smooth only Intensity component of a HSI image while leaving H and S unmodified.

xy

xy

xy

xy

Syx

Syx

Syx

Syx

yxBK

yxGK

yxRK

yxK

yx

),(

),(

),(

),(

),(1

),(1

),(1

),(1

),( cc

Note: 2 methods are not equivalent.

COLOR IMAGE SMOOTHING

Page 60: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

60

Color image Red

Green Blue

COLOR IMAGE SMOOTHING EXAMPLE (CONT.)

Page 61: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

61

Hue Saturation Intensity

Color image

HSI Components

COLOR IMAGE SMOOTHING EXAMPLE (CONT.)

Page 62: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

62

Smooth all RGB components Smooth only I component of HSI

COLOR IMAGE SMOOTHING EXAMPLE (CONT.)

Page 63: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

63

Difference between smoothed results from 2 methods in the previous slide.

COLOR IMAGE SMOOTHING EXAMPLE (CONT.)

Page 64: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

6.6 SMOOTHING AND SHARPENING

6.6.1 Color Image Smoothing 6.6.2 Color Image Sharpening

64

Page 65: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

65

We can do in the same manner as color image smoothing:

1. Per-color-plane method for RGB,CMY images

2. Sharpening only I component of a HSI image

Sharpening all RGB components Sharpening only I component of HSI

COLOR IMAGE SHARPENING

Page 66: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

66

Difference between sharpened results from 2 methods in the previous slide.

COLOR IMAGE SHARPENING EXAMPLE (CONT.)

Page 67: Presented By : Dr. J. Shanbezadeh Email : Shanbehzadeh@gmail.com.

67

THE END

کنندگان : تهیهمشرفی مهرآساناطقی الناز


Recommended