图像处理技术讲座( 10 ) digital image processing (10) 灰度的数学形态学 (2)...

39

Click here to load reader

Upload: dorthy-weaver

Post on 21-Dec-2015

256 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

图像处理技术讲座( 10 )Digital Image Processing (10)

灰度的数学形态学 (2) Mathematical morphology in gray scale (2)

顾 力栩顾 力栩上海交通大学 计算机系

2006.6

Page 2: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Grayscale Operations

Page 3: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Grayscale Operations

Source

Eroded by a 7X7 boxDilated by a 7X7 box

Page 4: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Grayscale Operations

Source Closed by a disk 3Opened by a disk 3

Page 5: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Edge Detection

• Morphological Edge Detection is based on Binary Dilation, Binary Erosion and Image Subtraction.

• Morphological Edge Detection Algorithms:

– Standard:

– External:

– Internal:

( ) ( ) ( )SEdge F F K F K $

( ) ( )EEdge F F K F

( ) ( )IEdge F F F K $

Page 6: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Edge Detection

F

K

F K

F K

( )SEdge F

( )IEdge F

( )EEdge F

Page 7: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Edge Detection

( )IEdge X

Page 8: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Edge Detection

F

( )EEdge F

( )IEdge F

Page 9: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Edge Detection

( )SEdge F ( )EEdge F

( )IEdge F

F

Page 10: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Morphological Gradient

Morphological Gradient is calculated by grayscale dilation and grayscale Erosion.

1( ) [( ( , ) ( , )]

21

[( ) ( )]2

S G G

g g

Gradient F D F K E F K

F K F K

g $

It is quite similar to the standard edge detection

We also have external and internal gradient

Page 11: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Morphological Gradient

1 1( ) [( ( , ) ] [( ) ]

2 2E G gGradient F D F K F F K F

• External Gradient:

• Internal Gradient:

1 1( ) [( ( , )] [ ( )]

2 2I G gGradient F F E F K F F K g $

Page 12: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Morphological Gradient

Gradient(F)S

DG(F)

EG(F)

Page 13: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Morphological Gradient

Standard External Internal

Page 14: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Morphological Smoothing

• Morphological Smoothing is based on the observation that a grayscale opening smoothes a grayscale image from above the brightness surface and the grayscale closing smoothes from below. So we could get both smooth like:

( ) ( ( , ), )

(( ) )G G

g g

MSmooth F C O F K K

F K K

Page 15: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Morphological Smoothing

Source

ResultCG(F)

OG(F)

Page 16: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Morphological Smoothing

Page 17: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Morphological Smoothing

• Morphological Smoothing can also based on the average of gray scale dilation and erosion, which is so called dynamic smooth:

1( ) [ ( , ) ( , )]

21

[( ) ( )]2

G G

g g

DSmooth F D F K E F K

F K F K

$

Page 18: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Morphological Smoothing

Source

Result

DG(F)

EG(F)

Page 19: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

• Top-hat Transform (TT): An efficient segmentation tool for extracting bright (respectively dark) objects from uneven background. White Top-hat Transform (WTT):

(ri is the scalar of

SE) Black Top-hat Transform (BTT):

i g iT F F r K

i g iT F r K F

Page 20: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

tophat + opened = original tophat: original - opening

Page 21: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

Page 22: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Top-hat

Transform

Page 23: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

BTT

WTT

Page 24: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

Inspection of a maximal thermometer capillary

Page 25: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

BTT

WTT

Page 26: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Application 1Detecting runways in satellite airport imagery

Source WTT Threshold

Detect long feature

Reconstruction Final result

Page 27: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Application 2Detect Filarial Worms

Source BTT Remove Noises Threshold

Skeleton Eliminate short structures

Reconstruction Final result

Page 28: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Differential TT

• Difficulties of TT:1. Difficult to distinguish ROI for more complicated cases.2. Difficult to define the sizes of SE.

• Differential Top-hat Transformation (DTT): employ a series of SE (same shape, different sizes) into TT application to find out the difference between Ti and Ti-1:

( | T |B stands for a threshold operation)

1 1| | 'i i i B iF T T F

11

, ' ; 'i jj i

where F F F

Page 29: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

DTT: The Principle

• How it works:1. Find a series of TT: Ti

2. Calculate the subtraction between Ti and Ti-1

3. Threshold the results of 2. by same threshold level.

4. Put them together by OR

• What’s better:1. Differentiate the signal

slopes in steepness and only pick up the objects with high gradient

2. Sort the objects by sizes.

Page 30: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

DTT: A Model Testing

Source testing image and its cross section view

TT result DTT result

Page 31: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

DTT: A Real Image Testing

Page 32: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Application

Character Extraction From Cover Image

Page 33: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Application

Page 34: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Ultimate Erosion

• Ultimate Erosion (UE) is based on Recursive Erosion operation.

• “Keep aside each connected components just before it is removed throughout the recursive erosion process”.

Page 35: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Ultimate Erosion

Page 36: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Geodesic Influence

• Geodesic Influence (GI) is based on Recursive Dilation operation with mask which also called conditional dilation.

• Reconstruct the seeds by the restriction of the mask, and distribute the pixels on the interface by means of “first come first serve”.

Page 37: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

UE and GI

• UE: split a connected region (have to be convex) gradually and record the iteration number.

• GI: Reconstruct the split regions and get the segments.

Page 38: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Application

• Segment connected organs:

1. RE: region shrinking to generate all the candidate seeds

2. GI: region reconstruction to recover separated organs

Page 39: 图像处理技术讲座( 10 ) Digital Image Processing (10) 灰度的数学形态学 (2) Mathematical morphology in gray scale (2) 顾 力栩 上海交通大学 计算机系 2006.6

Lixu Gu @ 2005 copyright reserved

Discussion