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

Post on 21-Dec-2015

256 Views

Category:

Documents

7 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

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

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

2006.6

Lixu Gu @ 2005 copyright reserved

Grayscale Operations

Lixu Gu @ 2005 copyright reserved

Grayscale Operations

Source

Eroded by a 7X7 boxDilated by a 7X7 box

Lixu Gu @ 2005 copyright reserved

Grayscale Operations

Source Closed by a disk 3Opened by a disk 3

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 $

Lixu Gu @ 2005 copyright reserved

Edge Detection

F

K

F K

F K

( )SEdge F

( )IEdge F

( )EEdge F

Lixu Gu @ 2005 copyright reserved

Edge Detection

( )IEdge X

Lixu Gu @ 2005 copyright reserved

Edge Detection

F

( )EEdge F

( )IEdge F

Lixu Gu @ 2005 copyright reserved

Edge Detection

( )SEdge F ( )EEdge F

( )IEdge F

F

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

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 $

Lixu Gu @ 2005 copyright reserved

Morphological Gradient

Gradient(F)S

DG(F)

EG(F)

Lixu Gu @ 2005 copyright reserved

Morphological Gradient

Standard External Internal

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

Lixu Gu @ 2005 copyright reserved

Morphological Smoothing

Source

ResultCG(F)

OG(F)

Lixu Gu @ 2005 copyright reserved

Morphological Smoothing

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

$

Lixu Gu @ 2005 copyright reserved

Morphological Smoothing

Source

Result

DG(F)

EG(F)

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

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

tophat + opened = original tophat: original - opening

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

Lixu Gu @ 2005 copyright reserved

Top-hat

Transform

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

BTT

WTT

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

Inspection of a maximal thermometer capillary

Lixu Gu @ 2005 copyright reserved

Top-hat Transform

BTT

WTT

Lixu Gu @ 2005 copyright reserved

Application 1Detecting runways in satellite airport imagery

Source WTT Threshold

Detect long feature

Reconstruction Final result

Lixu Gu @ 2005 copyright reserved

Application 2Detect Filarial Worms

Source BTT Remove Noises Threshold

Skeleton Eliminate short structures

Reconstruction Final result

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

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.

Lixu Gu @ 2005 copyright reserved

DTT: A Model Testing

Source testing image and its cross section view

TT result DTT result

Lixu Gu @ 2005 copyright reserved

DTT: A Real Image Testing

Lixu Gu @ 2005 copyright reserved

Application

Character Extraction From Cover Image

Lixu Gu @ 2005 copyright reserved

Application

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”.

Lixu Gu @ 2005 copyright reserved

Ultimate Erosion

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”.

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.

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

Lixu Gu @ 2005 copyright reserved

Discussion

top related