chapter 2 digital image fundamentals - nhu.edu.tcsie/ycliaw/dip/02_fundation.pdf · 2.4.1 basic...

29
Digital Image Processing, 2nd ed. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods Chapter 2 Digital Image fundamentals Chapter 2 Digital Image fundamentals 2.1 Elements of visual perception 2.2 Light and the electromagnetic spectrum 2.3 Image sensing and acquisition 2.4 Image sampling and quantization 2.5 Some basic relationships between pixels 2.6 Linear and Nonlinear Operations Digital Image Processing, 2nd ed. Digital Image Processing, 2nd ed. www.imageprocessingbook.com © 2002 R. C. Gonzalez & R. E. Woods 2.1 Elements of visual perception 2.1 Elements of visual perception 2.1.1 Structure of the Human Eye 2.1.1 Structure of the Human Eye (角膜) (虹膜 ,光圈) (睫狀肌) (睫狀纖維) (視軸) (玻璃狀液體) (視網膜中央窩) (盲點) (視網膜, 底片) (脈絡膜) (鞏膜) (水晶體) (前室) (睫狀體 , 變焦) 20mm (視神經及護套) Conjunctiva(節膜) Pupil(瞳孔) 曲率不同

Upload: ngoanh

Post on 28-Mar-2018

246 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

1

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

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

Chapter 2 Digital Image fundamentalsChapter 2 Digital Image fundamentals

2.1 Elements of visual perception2.2 Light and the electromagnetic spectrum2.3 Image sensing and acquisition2.4 Image sampling and quantization2.5 Some basic relationships between pixels2.6 Linear and Nonlinear Operations

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

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

2.1 Elements of visual perception2.1 Elements of visual perception2.1.1 Structure of the Human Eye2.1.1 Structure of the Human Eye

(角膜)(虹膜,光圈)

(睫狀肌)

(睫狀纖維)

(視軸)

(玻璃狀液體)

(視網膜中央窩)(盲點)

(視網膜,底片)

(脈絡膜)

(鞏膜)

(水晶體)

(前室)(睫狀體,變焦)

≈20mm

(視神經及護套)

Conjunctiva(節膜)Pupil(瞳孔)

曲率不同

Page 2: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

2

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

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

Light ReceptionLight ReceptionCones (椎狀細胞)

6-7millionssensitive to ColorPhotopic or Bright-light vision

Rods (桿狀細胞)75-150millionsScotopic or Dim-light vision

2.1 Elements of visual perception2.1 Elements of visual perception2.1.1 Structure of the Human Eye2.1.1 Structure of the Human Eye

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

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

2.1 Elements of visual perception2.1 Elements of visual perception2.1.1 Structure of the Human Eye2.1.1 Structure of the Human Eye

Page 3: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

3

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

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

2.1 Elements of visual perception2.1 Elements of visual perception2.1.1 Structure of the Human Eye2.1.1 Structure of the Human Eye

≈1.5 mm≈337000 cones

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

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

盲點實驗

2.1 Elements of visual perception2.1 Elements of visual perception2.1.1 Structure of the Human Eye2.1.1 Structure of the Human Eye

Page 4: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

4

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

2.1.2 2.1.2 Image formation in the EyeImage formation in the Eye– 睫狀體調整Len半徑– 影像距焦至Fovea附近– 光感細胞感受各自位置強度– 腦部成像及識別

14mm ~ 17mm

2.55mm

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

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

2.1.3 2.1.3 Brightness adaptation and discriminationBrightness adaptation and discrimination– Subjective Brightness is a logarithm function

• on the order of 1010

– The total range of distinct intensity levels it candiscriminate simultaneously is rather small

milliLambert:亮度單位

2.1 Elements of visual perception2.1 Elements of visual perception

Page 5: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

5

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

A classic experiment for brightness discriminationA classic experiment for brightness discrimination– Weber Ratio : ∆Ic / I

• a small value means Good brightness discrimination• a large value means Poor brightness discrimination

– the typical observer can discern 1~2 dozen differentintensity changes

Scotopic

Photopic

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

Two examplesTwo examplesto demonstrate the perceived brightness is not a simplefunction of intensityMach Bands - 1865, Ernst Mach

Page 6: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

6

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

Simultaneous contrast

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

Optical Illusion(Optical Illusion(視覺錯覺視覺錯覺))is not fully understood

Page 7: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

7

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

Page 8: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

8

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

Page 9: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

9

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

Page 10: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

10

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

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

2.1 Elements of visual perception2.1 Elements of visual perception

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

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

2.2 Light and the Electromagnetic Spectrum2.2 Light and the Electromagnetic Spectrum

Electromagnetic Spectrum(Electromagnetic Spectrum(電磁頻譜電磁頻譜))

能量能量

頻率頻率

波長波長

Page 11: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

11

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

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

Wavelength λ

波長與頻率關係式

− (2.2-1)

能量與頻率關係式

− (2.2-2)

Jsh 3410626068.6 −×= JeV 19106.1 1 −×=

2.2 Light and the Electromagnetic Spectrum2.2 Light and the Electromagnetic Spectrum

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

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

2.2 Light and the Electromagnetic Spectrum2.2 Light and the Electromagnetic Spectrum

Visible Band430um~790nmIlluminant (光源)reflected light from objects (物體反射光)Achromatic or Monochromatic (Gray Level)Chromatic - ColorLight Source

Radiance (光度) - measured in WattsLuminance (明度) - measured in lumensBrightness (亮度) - subjective descriptor

Page 12: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

12

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

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

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

Image SensingImage SensingScene (場景)

MoleculesHuman Brain...

Illumination(照明)RadarInfraredX-raySun...

Reflection(反射)

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

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

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

Page 13: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

13

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

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

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

2.3.1 2.3.1 Image acquisition using a single sensorImage acquisition using a single sensorPhotodiode(光二極體)

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

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

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

2.3.2 2.3.2 Image acquisition using sensor stripsImage acquisition using sensor strips

Scanning Direction

CAT電腦斷層掃描MRI磁共振造影PET正子放射斷層掃描

Flatbed Scanner

Page 14: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

14

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

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

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

2.3.3 2.3.3 Image acquisition using sensor arraysImage acquisition using sensor arraysCharged Couple Diode (CCD)

Digital CameraIrisLens

SunLampFlash

CCDCMOS

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

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

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

Page 15: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

15

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

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

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

Color Filter Array (CFA)Color Filter Array (CFA)

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

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

2.3.4 A simple image formation model2.3.4 A simple image formation modelImage− 2D Intensity function

(2.3-1)

(2.3-2)

− Illumination (2.3-3)

−Reflectance

(2.3-4)

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

Page 16: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

16

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

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

Typical values of i(x,y)晴天的太陽 i = 90000 lm/m2

陰天的太陽 i = 10000 lm/m2

晴天的滿月 i = 0.1 lm/m2

辦公室照明 i = 1000 lm/m2

Typical values of r(x,y)黑天鵝絨 r = 0.01不銹鋼 r = 0.65上漆白牆 r = 0.8銀盤 r = 0.9雪 r = 0.93

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

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

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

Intensity at (x0, y0)

[Lmin, Lmax] is called gray scaleShift this interval to [0, L - 1]

l = 0 is black l = L - 1 is whiteAll intermediate values are shades of gray

( ) 5)-(2.3 , 00 yxfl =

6)-(2.3 maxmin LlL ≤≤

minminmin riL =

maxmaxmax riL =

2.3 Image Sensing and Acquisition2.3 Image Sensing and Acquisition

Page 17: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

17

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantization

2.4.1 Basic concepts in sampling and quantization2.4.1 Basic concepts in sampling and quantization

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantization

Sampling (Sampling (取樣取樣)) QuantizationQuantization ( (量化量化))

Page 18: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

18

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantization

2.4.2 Representing digital images2.4.2 Representing digital imagesCompact Matrix Form(2.4-1)

Traditional Matrix Form(2.4-2)

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

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

Storage space for digital imagesStorage space for digital imagesFor Gray-Level L=2k, k bits required for a pixelFor an M × N image, b= M × N × k bits required for an imageFor an N × N image, b= N2 k bits required for an image

2.4 Image sampling and quantization2.4 Image sampling and quantization

Page 19: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

19

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantization

2.4.3 Spatial and Gray-Level Resolution2.4.3 Spatial and Gray-Level ResolutionSpatial Resolution

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantization

Page 20: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

20

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantizationGray-Level Resolution

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantizationGray-Level Resolution

Page 21: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

21

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantizationSpatial and Gray-Level Resolution

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantizationSpatial and Gray-Level Resolution

similar quality

Page 22: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

22

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantization

2.4.4 Aliasing and Moire Pattern2.4.4 Aliasing and Moire PatternBand-Limited functions

The highest frequency of a function is finite and thefunction is of unlimited duration

Shannon sampling theoremIf a band-limited function is sampled at a rate equalto or greater than twice its highest frequency, it ispossible to recover completely the original functionfrom its samples

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantization

Page 23: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

23

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantization

An example

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

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

2.4 Image sampling and quantization2.4 Image sampling and quantization

2.4.5 Zooming and shrinking digital images2.4.5 Zooming and shrinking digital images

Nearest Neighbor Interpolation

Bilinear Interpolation

Page 24: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

24

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

2.5.1 Neighbors of a pixel2.5.1 Neighbors of a pixel

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

2.5.2 Adjacency, Connectivity, Regions, and Boundries2.5.2 Adjacency, Connectivity, Regions, and Boundries

Page 25: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

25

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

Path− 4-Path− 8-Path− m-Path

Length

(x0, y0), (x1, y1), ... , (xn, yn)

− Length=n,− if (1≤ i ≤ n) and pixels (xi-1, yi-1) and (xi, yi) are adjacent− if (x0, y0)= (xn, yn), the path is a closed path

m-Path8-Path

8-Path

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

Connected− Let S represent a subset of pixels in an image− Pixels p and q in S− If there exists a path between two pixels p and q

Connected components− For any pixel p in S, the set of pixels that are connected to p in S is

called a connected component

connected sets− If there is only one connected component in S, S is called a

connected set

Page 26: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

26

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

Regions– Let R be a subset of pixels in an image.We call R a region of the

image if R is a connected set.

Boundaries– The boundary (also called border or contour) of a region R is the

set of pixels in the region that have one or more neighbors that arenot in R.

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

2.5.3 Distance Measures2.5.3 Distance Measures

Page 27: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

27

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

D4 distance

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

D8 distance

Page 28: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

28

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

Dm distance is defined as the shortest m-path between the pointsdepends on the values of pixels

ppp

pp

21

43

110

10

m-distance=21

1110

m-distance=31

1011

m-distance=31

1111

m-distance=4

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

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

2.5 2.5 Some Basic Relationships Between PixelsSome Basic Relationships Between Pixels

2.5.4 Image operations on a pixel basis2.5.4 Image operations on a pixel basisArithmatic

+, -, *, /

Logic operation not, and, or, xor

Operation is carried out between corresponding pixels inthe two images

Page 29: Chapter 2 Digital Image fundamentals - nhu.edu.tCSIE/ycliaw/DIP/02_Fundation.pdf · 2.4.1 Basic concepts in sampling and quantization Digital Image Processing, 2nd ed.Digital Image

29

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

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

2.6 2.6 Linear and non-linear operationsLinear and non-linear operations

Let Let HH be an operator whose input and output are be an operator whose input and output areimages. images. HH is said to be a is said to be a linear operatorlinear operator if, for any if, for anytwo images two images ff and and gg and any two scalars and any two scalars aa and and bb..

( ) ( ) ( ) 1)-(2.6 gbHfaHbgafH +=+