introduction to image processing

93
Digital Image Processing, 2nd ed. www.imageprocessingbook.com 002 R. C. Gonzalez & R. E. Woods Introduction to Image Processing

Upload: fedora

Post on 05-Jan-2016

26 views

Category:

Documents


5 download

DESCRIPTION

Introduction to Image Processing. Image Processing. Imaging in the Visible and Infrared Bands. Other Examples. (甲狀腺). Image Sampling and Quantization. Image Sampling and Quantization. S ampling : d igitizing the 2-dimensional spatial coordinate values - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Introduction toImage ProcessingIntroduction toImage Processing

Page 2: Introduction to Image Processing

Image ProcessingImage Processing

Page 3: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Imaging in the Visible and Infrared BandsImaging in the Visible and Infrared Bands

Page 4: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Page 5: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Other Examples Other Examples

(甲狀腺)

Page 6: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Image Sampling and

Quantization

Image Sampling and

Quantization

Page 7: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Image Sampling and QuantizationImage Sampling and Quantization

Page 8: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Image Sampling and QuantizationImage Sampling and Quantization

• Sampling: digitizing the 2-dimensional spatial coordinate values

• Quantization: digitizing the amplitude values (brightness level)

Page 9: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Representing Digital ImagesRepresenting Digital Images

Page 10: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Representing Digital Images--ExamplesRepresenting Digital Images--Examples

P2320 240255200 215 25 …55 25 25…25 55 255 …

• PGM file • PPM file

P3# Created by Paint Shop Pro 5320 240255200 215 25 200 215 25 …55 25 25 55 25 25 …25 55 255 25 55 255 …

Page 11: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Spatial and Gray-Level ResolutionSpatial and Gray-Level Resolution

Spatial ResolutionSpatial Resolution

Page 12: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Spatial Resolution by Re-samplingSpatial Resolution by Re-sampling

Page 13: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Gray-Level ResolutionGray-Level Resolution

24

816128

3264

256

Page 14: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

• PixelA pixel has a location (the spatial coordinate) and a value.

• Connected component of S: The set of all pixels in S that are connected to a given pixel in S.

• Region of an image• Contour of a region• Edge:

Edge is a path of one or more pixels that separate two regions of significantly different gray levels.

Page 15: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Image Enhancementin the Spatial DomainImage Enhancementin the Spatial Domain

Page 16: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

BackgroundBackground

• A mathematical representation of spatial domain enhancement:

where f(x, y): the input image

g(x, y): the processed image

T: an operator on f, defined over some neighborhood of (x, y)

)],([),( yxfTyxg

Page 17: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Gray-level TransformationGray-level Transformation

Page 18: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Piecewise-Linear Transformation FunctionsCase 1: Contrast Stretching

Piecewise-Linear Transformation FunctionsCase 1: Contrast Stretching

Page 19: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Piecewise-Linear Transformation FunctionsCase 2:Gray-level Slicing

Piecewise-Linear Transformation FunctionsCase 2:Gray-level Slicing

An image Result of using the transformation in (a)

Page 20: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Histogram ProcessingHistogram Processing

Page 21: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Histogram ProcessingHistogram Processing

Page 22: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Histogram EqualizationHistogram Equalization

• Histogram equalization:– To improve the contrast of an image

– To transform an image in such a way that the transformed image has a nearly uniform distribution of pixel values

• Transformation function T(r) (continuous case)

Page 23: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Histogram EqualizationHistogram Equalization

• In discrete version:– The probability of occurrence of gray level rk in an image is

n : the total number of pixels in the image

nk : the number of pixels that have gray level rk

L : the total number of possible gray levels in the image– The transformation function is

– Thus, an output image is obtained by mapping each pixel with level rk in the input image into a corresponding pixel with level sk.

1,...,2,1,0 )()(0 0

Lkn

nrprTs

k

j

k

j

jjrkk

1,...,2,1,0 )( Lkn

nrp k

kr

Page 24: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Histogram EqualizationHistogram Equalization

Page 25: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Histogram EqualizationHistogram Equalization

• Transformation functions (1) through (4) were obtained form the histograms of the images in Fig 3.17(1), using Eq. (3.3-8).

Page 26: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Basics of Spatial FilteringBasics of Spatial Filtering

• In spatial filtering (vs. frequency domain filtering), the output image is computed directly by simple calculations on the pixels of the input image.

• Spatial filtering can be either linear or non-linear.

• For each output pixel, some neighborhood of input pixels is used in the computation.

• In general, linear filtering of an image f of size MXN with a filter mask of size mxn is given by

where a=(m-1)/2 and b=(n-1)/2

• This concept called convolution. Filter masks are sometimes called convolution masks or convolution kernels.

a

as

b

bt

tysxftswyxg ),(),(),(

Page 27: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Basics of Spatial FilteringBasics of Spatial Filtering

Page 28: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Smoothing Spatial FiltersSmoothing Spatial Filters

• Smoothing linear filters– Averaging filters

• Box filter

• Weighted average filter

Box filter Weighted average

Page 29: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Smoothing Spatial FiltersSmoothing Spatial Filters

• The general implementation for filtering an MXN image with a weighted averaging filter of size mxn is given by

where a=(m-1)/2 and b=(n-1)/2

a

as

b

bt

a

as

b

bt

tsw

tysxftswyxg

),(

),(),(),(

Page 30: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Smoothing Spatial FiltersImage smoothing with masks of various sizes

Smoothing Spatial FiltersImage smoothing with masks of various sizes

Page 31: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Smoothing Spatial FiltersAnother Example

Smoothing Spatial FiltersAnother Example

Page 32: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Order-Statistic FiltersOrder-Statistic Filters

• Order-statistic filters– Median filter: to reduce impulse noise (salt-and-

pepper noise)

Page 33: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Image Enhancement in theFrequency Domain

Image Enhancement in theFrequency Domain

Page 34: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

BackgroundBackground

• The frequency domain refers to the plane of the two dimensional discrete Fourier transform of an image.

• The purpose of the Fourier transform is to represent a signal as a linear combination of sinusoidal signals of various frequencies.

Page 35: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Introduction to the Fourier Transform and the Frequency Domain

Introduction to the Fourier Transform and the Frequency Domain

• The one-dimensional Fourier transform and its inverse– Fourier transform (continuous case)

– Inverse Fourier transform:

• The two-dimensional Fourier transform and its inverse– Fourier transform (continuous case)

– Inverse Fourier transform:

dueuFxf uxj 2)()(

dydxeyxfvuF vyuxj )(2),(),(

1 where)()( 2

jdxexfuF uxj

dvduevuFyxf vyuxj )(2),(),(

sincos je j

Page 36: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Introduction to the Fourier Transform and the Frequency Domain

Introduction to the Fourier Transform and the Frequency Domain

• The one-dimensional Fourier transform and its inverse– Fourier transform (discrete case) DTC

– Inverse Fourier transform:

1,...,2,1,0for )(1

)(1

0

/2

MuexfM

uFM

x

Muxj

1,...,2,1,0for )()(1

0

/2

MxeuFxfM

u

Muxj

Page 37: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Introduction to the Fourier Transform and the Frequency Domain

Introduction to the Fourier Transform and the Frequency Domain

• Since and the fact

then discrete Fourier transform can be redefined

– Frequency (time) domain: the domain (values of u) over which the values of F(u) range; because u determines the frequency of the components of the transform.

– Frequency (time) component: each of the M terms of F(u).

1,...,2,1,0for Mu

1

0

]/2sin/2)[cos(1

)(M

x

MuxjMuxxfM

uF

sincos je j cos)cos(

Page 38: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

The One-Dimensional Fourier Transform Example

The One-Dimensional Fourier Transform Example

Page 39: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Introduction to the Fourier Transform and the Frequency Domain

Introduction to the Fourier Transform and the Frequency Domain

• The two-dimensional Fourier transform and its inverse– Fourier transform (discrete case) DTC

– Inverse Fourier transform:

• u, v : the transform or frequency variables

• x, y : the spatial or image variables

1,...,2,1,0,1,...,2,1,0for

),(1

),(1

0

1

0

)//(2

NvMu

eyxfMN

vuFM

x

N

y

NvyMuxj

1,...,2,1,0,1,...,2,1,0for

),(),(1

0

1

0

)//(2

NyMx

evuFyxfM

u

N

v

NvyMuxj

Page 40: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Introduction to the Fourier Transform and the Frequency Domain

Introduction to the Fourier Transform and the Frequency Domain

• Some properties of Fourier transform:

)(symmetric ),(),(

(average) ),(1

)0,0(

(shift) )2

,2

()1)(,(

1

0

1

0

vuFvuF

yxfMN

F

Nv

MuFyxf

M

x

N

y

yx

Page 41: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

The Two-Dimensional DFT and Its InverseThe Two-Dimensional DFT and Its Inverse

(a) f(x,y) (b) F(u,y) (c) F(u,v)

The 2D DFT F(u,v) can be obtained by 1. taking the 1D DFT of every row of image f(x,y), F(u,y), 2. taking the 1D DFT of every column of F(u,y)

Page 42: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

The Two-Dimensional DFT and Its InverseThe Two-Dimensional DFT and Its Inverse

shift

Page 43: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

The Two-Dimensional DFT and Its InverseThe Two-Dimensional DFT and Its Inverse

Page 44: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

The Property of Two-Dimensional DFT Rotation

The Property of Two-Dimensional DFT Rotation

DFT

DFT

Page 45: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

The Property of Two-Dimensional DFT Linear Combination

The Property of Two-Dimensional DFT Linear Combination

DFT

DFT

DFT

A

B

0.25 * A + 0.75 * B

Page 46: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

The Property of Two-Dimensional DFT Expansion

The Property of Two-Dimensional DFT Expansion

DFT

DFT

A

Expanding the original image by a factor of n (n=2), filling the empty new values with zeros, results in the same DFT.

B

Page 47: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Two-Dimensional DFT with Different FunctionsTwo-Dimensional DFT with Different Functions

Sine wave

Rectangle

Its DFT

Its DFT

Page 48: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Two-Dimensional DFT with Different FunctionsTwo-Dimensional DFT with Different Functions

2D Gaussianfunction

Impulses

Its DFT

Its DFT

Page 49: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Filtering in the Frequency DomainFiltering in the Frequency Domain

Page 50: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Basics of Filtering in the Frequency DomainBasics of Filtering in the Frequency Domain

Page 51: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Some Basic Filters and Their FunctionsSome Basic Filters and Their Functions

• Multiply all values of F(u,v) by the filter function (notch filter):

– All this filter would do is set F(0,0) to zero (force the average value of an image to zero) and leave all frequency components of the Fourier transform untouched.

otherwise. 1

)2/,2/(),( if 0),(

NMvuvuH

Page 52: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Some Basic Filters and Their FunctionsSome Basic Filters and Their Functions

Lowpass filter

Highpass filter

Page 53: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Some Basic Filters and Their FunctionsSome Basic Filters and Their Functions

Page 54: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Ideal Lowpass Filters (ILPFs)Ideal Lowpass Filters (ILPFs)

Page 55: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Ideal Lowpass Filters (ILPFs)Ideal Lowpass Filters (ILPFs)

Page 56: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Ideal Lowpass FiltersIdeal Lowpass Filters

Page 57: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Additional Examples of Lowpass FilteringAdditional Examples of Lowpass Filtering

Page 58: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Ideal Highpass FiltersIdeal Highpass Filters

),( if 1

),( if 0),(

0

0

DvuD

DvuDvuH

Page 59: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Image ProcessingColor Image Processing

Page 60: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color FundamentalsColor Fundamentals

Page 61: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color FundamentalsColor Fundamentals

• Secondary colors: magenta (red + blue), cyan (green + blue), and yellow (red + green)

Page 62: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- RGB ModelColor Models -- RGB Model

Page 63: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- RGB ModelColor Models -- RGB Model

Page 64: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- RGB ModelColor Models -- RGB Model

• For most graphics images used for Internet applications, a set of 216 colors has been selected to represent “safe colors” which should be reliably displayed on computer

monitors.

Page 65: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- RGB ModelColor Models -- RGB Model

Page 66: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- CMY and CMYK ModelsColor Models -- CMY and CMYK Models

• An RGB to CMY conversion

B

G

R

Y

M

C

1

1

1

Page 67: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- HSI ModelColor Models -- HSI Model

Page 68: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- HSI ModelColor Models -- HSI Model

Page 69: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- HSI ModelColor Models -- HSI Model

Page 70: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- HSI ModelColor Models -- HSI Model

Page 71: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- HSI ModelColor Models -- HSI Model

• Converting colors from RGB to HSI

21

))(()(

)()(cos

2

21

1

BGBRGR

BRGR

)(3

1BGRI

GB

GBH

if 360

if

),,min()(

31 BGR

BGRS

Page 72: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- HSI ModelColor Models -- HSI Model

• Converting colors from HSI to RGB– RG sector ( )

– GB sector ( )

– BR sector ( )

oo H 1200

)60cos(

cos1

H

HSIR

o

)(3 BRIG

)1( SIB

oo H 360240

oo H 240120

Page 73: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- HSI ModelColor Models -- HSI Model

Page 74: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- HSI ModelColor Models -- HSI Model

Page 75: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Models -- HSI ModelColor Models -- HSI Model

Page 76: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Full Color Image ProcessingFull Color Image Processing

• Two processing methods: – (1) process each channel (or color component)

separately, as if the color image were three gray scale images;

– (2) process all channels with each pixel represented as a vector.

Page 77: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color TransformationsRGB<->HSI<->CMYKColor TransformationsRGB<->HSI<->CMYK

Page 78: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color TransformationsExample

Color TransformationsExample

Page 79: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Complement TransformationsColor Complement Transformations

• To the human visual system, colors have complements.

• Complements are basically given by subtracting one color from white, or by changing a hue by 180 degrees.

Page 80: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Complement TransformationsExample

Color Complement TransformationsExample

Page 81: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Tone and Color CorrectionsTone Corrections

Tone and Color CorrectionsTone Corrections

Page 82: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Tone and Color CorrectionsTone Corrections

Tone and Color CorrectionsTone Corrections

Page 83: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Tone and Color CorrectionsTone Corrections

Tone and Color CorrectionsTone Corrections

Page 84: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Tone and Color CorrectionsColor Corrections

Tone and Color CorrectionsColor Corrections

Page 85: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Tone and Color CorrectionsColor Corrections

Tone and Color CorrectionsColor Corrections

Page 86: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Smoothing and SharpeningColor Image Smoothing

Smoothing and SharpeningColor Image Smoothing

Page 87: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Smoothing and SharpeningColor Image Smoothing

Smoothing and SharpeningColor Image Smoothing

Page 88: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Edge DetectionColor Edge Detection

Page 89: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Edge DetectionColor Edge Detection

Page 90: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Color Edge DetectionColor Edge Detection

Page 91: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Noise in Color ImagesNoise in Color Images

Page 92: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods

Noise in Color ImagesNoise in Color Images

Fig. 6.48(d)

Page 93: Introduction to Image Processing

Digital Image Processing, 2nd ed.Digital Image Processing, 2nd ed.www.imageprocessingbook.com

© 2002 R. C. Gonzalez & R. E. Woods