image segmentation & template matching multimedia signal processing lecture on 6.3.2007 petri...

31
Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Upload: bartholomew-lyons

Post on 03-Jan-2016

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Image Segmentation&

Template Matching

Multimedia Signal Processing

lecture on 6.3.2007

Petri Hirvonen

Page 2: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Image Segmentation

Page 3: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Terminology

Image processing tools

Examples

Details of the Assignment

Tracking Rolling Leukocytes With Shape and Size Constrained Active Contours

Image segmentation based on maximum-likelihoodestimation and optimum entropy-distribution (MLE–OED)

Page 4: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Image segmentation problem is basically one of psychophysical perception, and therefore

not susceptible to a purely analytical solution.

Page 5: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen
Page 6: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Motivation: Image content representationRequirements: object definition & extraction

Mathematical morphology is very useful

for analyzing shapes in images.

Basic tools: dilation A+B and erosion A–B

Application: boundary detection

Internal boundary: A - (A–B)External boundary: (A+B) - A

Morphological gradient: (A+B) - (A–B)Assignment: object edges

A - (A–B) (A+B) - A (A+B) - (A–B)

Page 7: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Dilation:

Replace every point (x,y) in A with a copy of B centered at B(0,0)

The result D is the union of all translations.

Erosion:

The resulting set of points E consists ofall points for which B is in A.

0 0 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 1 0 0 0 1 1 0 0 0 0 0 0

1 0 1 0 1 0 1 0 1

0 1 0 1 1 1 0 1 0

A AD DE E

B B

Structuring element, kernel = B

Minkowski addition / subtraction

Page 8: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen
Page 9: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Image information

Page 10: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen
Page 11: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Segmenting SEM-images

Page 12: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

max

min

)(&minargi

ikr

kbest pIpIkIDk

• Dilation of the thresholded block contains the thresholded gradient completely at the optimal threshold.

n

I

m

IGGI nm ,,

22nm GGM

(k and p are thresholds, D is dilationwith a structuring element of radius r)

Page 13: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

max

min

)(&minargi

ikr

kbest pIpIkIDk

Page 14: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Information & colour

Page 15: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen
Page 16: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen
Page 17: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

222

211_

2 groupwithin

2222

11_2

imageimagegroupbetween

• Nobuyuki Otsu, A Threshold Selection Method from Gray-Level Histograms, 1979

• For bimodal distributions

minimized

maximized

Histogram-based thresholdingOtsu’s method

Page 18: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

kk

kkimagegroupbetween

1

2

_2

Probability of intensity k

Mean of group @ k

Page 19: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Hough transform Region Of Interest Histogram

Page 20: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen
Page 21: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

)( 00 xxkyy 221

221 )()( yyxxd

Length and width are the perpendicular

distances on the original

(thresholded) target area.

Perimeter is computed by

the Chain Code algorithm.

Page 22: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Template Matching

Page 23: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen
Page 24: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

f

h

Page 25: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

),(),(),(),( * vuHvuFyxhyxf

)( *1 HFFc

Page 26: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen
Page 27: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

We have first created a DATABASEthat contains the elements in the table.

FOR-loop is executed for all templatesFont_images{index}And the result is visualized in colours:

Scale ?Rotation ?

Page 28: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen
Page 29: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Object perimeter

Page 30: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen

Object perimeter

Page 31: Image Segmentation & Template Matching Multimedia Signal Processing lecture on 6.3.2007 Petri Hirvonen