Image Segmentation & Template Matching
description
Transcript of Image Segmentation & Template Matching
![Page 1: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/1.jpg)
Image Segmentation&
Template Matching
Multimedia Signal Processing
lecture on 6.3.2007
Petri Hirvonen
![Page 2: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/2.jpg)
Image Segmentation
![Page 3: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/3.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/4.jpg)
Image segmentation problem is basically one of psychophysical perception, and therefore
not susceptible to a purely analytical solution.
![Page 5: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/5.jpg)
![Page 6: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/6.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/7.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/8.jpg)
![Page 9: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/9.jpg)
Image information
![Page 10: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/10.jpg)
![Page 11: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/11.jpg)
Segmenting SEM-images
![Page 12: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/12.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/13.jpg)
max
min
)(&minargi
ikr
kbest pIpIkIDk
![Page 14: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/14.jpg)
Information & colour
![Page 15: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/15.jpg)
![Page 16: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/16.jpg)
![Page 17: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/17.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/18.jpg)
kk
kkimagegroupbetween
1
2
_2
Probability of intensity k
Mean of group @ k
![Page 19: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/19.jpg)
Hough transform Region Of Interest Histogram
![Page 20: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/20.jpg)
![Page 21: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/21.jpg)
)( 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](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/22.jpg)
Template Matching
![Page 23: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/23.jpg)
![Page 24: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/24.jpg)
f
h
![Page 25: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/25.jpg)
),(),(),(),( * vuHvuFyxhyxf
)( *1 HFFc
![Page 26: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/26.jpg)
![Page 27: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/27.jpg)
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](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/28.jpg)
![Page 29: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/29.jpg)
Object perimeter
![Page 30: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/30.jpg)
Object perimeter
![Page 31: Image Segmentation & Template Matching](https://reader036.fdocuments.net/reader036/viewer/2022062803/5681471b550346895db451aa/html5/thumbnails/31.jpg)