Dip Unit 4
Dip Unit 4
Dip Unit 4
PROCESSING
UNIT-4
IMAGE SEGMENTATION AND
REPRESENTATION
Introduction
What is image segmentation?
Technically speaking, image segmentation refers
to the decomposition of a scene into different
components (thus to facilitate the task at higher
levels such as object detection and recognition)
Scientifically speaking, segmentation is a
hypothetical middle-level vision task performed by
neurons between low-level and high-level cortical
areas
There is no ground truth to a segmentation
task (an example is given in the next slide)
Biometric images
Disparity-based
Texture images
Motion-based
Problems: 81 82 26 24
82 33 25 25
• neighborhood size 81 82 26 24
7
Differential Operators
Differential operators
8
Example: Sobel Operator
-1 0 1 1 2 1
Sx = -2 0 2 Sy = 0 0 0
-1 0 1 -1 -2 -1
2 2 1/2
Then g = (gx + gy ) is the gradient magnitude.
step edge
smoothed
1st derivative
zero crossing
2nd derivative
11
Canny Edge Detector
13
Best Canny on Kidney from Hw1
14
Best Canny on Blocks from Hw1
15
Hough Transform
image accumulator
b
m
y = mx + b
16
Thresholding
non-contextual approach
0 f ( x, y ) T
g ( x, y )
1 f ( x, y ) T
Due to the severe illumination gradient across the scene, the peaks
corresponding to foreground and background have run together and so
simple thresholding does not give good results. Following images show
the resulting bad segmentations for single threshold values of 80 and 120
respectively (reasonable results can be achieved by using adaptive
thresholding on this image).
Global Thresholding - Guidelines for Use
d ( x , y ) f R ( x , y ) R0 f G ( x , y ) G 0 f B ( x , y ) B0
2 2 2
Adaptive Thresholding
The result of using the median instead of the mean can be seen in
The neighborhood
size for this
example is 7×7
and C = 4). The
result shows that,
in this application,
the median is a
less suitable
statistic than the
mean.
Adaptive thresholding -Guidelines for Use
Analog
TV
Digital
TV(MPEG)
43
Subproblem II: Finding the centers
from known clustering
44
Toy Example of Kmeans
Clustering
1.Initialization 2.NN-Clustering
http://home.dei.polimi.it/matteucc/Clustering/tutorial_html/AppletKM.html
K-means Clustering: Step 1
Algorithm: k-means, Distance Metric: Euclidean Distance
5
4
k1
k2
2
k3
0
0 1 2 3 4 5
K-means Clustering: Step 2
Algorithm: k-means, Distance Metric: Euclidean Distance
5
4
k1
k2
2
k3
0
0 1 2 3 4 5
K-means Clustering: Step 3
Algorithm: k-means, Distance Metric: Euclidean Distance
5
4
k1
2
k3
k2
1
0
0 1 2 3 4 5
K-means Clustering: Step 4
Algorithm: k-means, Distance Metric: Euclidean Distance
5
4
k1
2
k3
k2
1
0
0 1 2 3 4 5
K-means Clustering: Step 5
Algorithm: k-means, Distance Metric: Euclidean Distance
expression in condition 2 5
4
k1
2
k2
k3
1
0
0 1 2 3 4 5
expression in condition 1
Data Clustering via Kmeans
What is Texture?