0% found this document useful (0 votes)
12 views37 pages

Ch-3 Image Segmentation

Uploaded by

komal.sali23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views37 pages

Ch-3 Image Segmentation

Uploaded by

komal.sali23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 37

Image

Segmentation

Dr. Kiran Tulshiram Vasumati Talele


 99870 30 881 [email protected]

Dr. Kiran TALELE


@ Bharatiya Vidya Bhavans’ Sardar Patel Institute of
Technology Andheri(w) Mumbai

• Associate Professor, Electronics Engineering Department (1997)


• Dean, Students, Alumni & External Relations (2022)

@ Sardar Patel Technology Business Incubator(SP-TBI),


Funded by Department of Science & Technology(DST),
Govt. of India

• Coordinator (2015)

@ IEEE Bombay Section

• Treasurer (2020)
• Executive Committee Member (2015)

Kiran TALELE. [email protected] 9987030881 2


2

1
Segmentation :

(i) Segmentation subdivides an image into its


constituent parts or objects.
(ii) Segmentation is based on two basic
properties of gray level values: Discontinuity
and Similarity

☆ Image Segmentation 3
3

[ I ] Segmentation using Discontinuity Property:


• In this category, image is partitioned into
different parts or objects based on abrupt
changes in gray level.

• This involves detection of isolated


POINTs and LINEs and EDGEs in the
image.

☆ Image Segmentation 4
4

2
(1) POINT Detection
Consider a digital subimage F and point detector mask w

F= z1 z2 z3 Point A=
z4 z5 z6 Detector R
z7 z8 z9
w= -1 -1 -1
where,
-1 8 -1
R = z1 w1 + z2 w2 +
-1 -1 -1
z3 w3 + …… + z9 w9
For any point P at (x,y) position,

If |R| > Threshold


Then
POINT is said to be detected at (x,y) position

(2) LINE Detection


Consider a digital subimage F and point detector mask w

F= z1 z2 z3 Line A=
z4 z5 z6 Detector R
z7 z8 z9

Detection of a line can be done using the mask given below

-1 -1 -1 -1 2 -1 2 -1 -1 -1 -1 2
2 2 2 -1 2 -1 -1 2 -1 -1 2 -1
-1 -1 -1 -1 2 -1 -1 -1 2 2 -1 -1

Horizontal Vertical 450 Direction -450 Direction


Line Line Line Line

☆ Image Segmentation 6
6

3
A= 0 0 0
F= 10 10 10 -1Horizontal
-1 -1
100 100 100 2 Line
2 2 540 540 540
Detector W1
10 10 10 -1 -1 -1 0 0 0

F= 10 10 10 -1 2 -1 A= 0 0 0
Vertical Line
100 100 100 -1 2 W-1 0 0 0
Detector 2
10 10 10 -1 2 -1 0 0 0

F= 10 10 10 2 -1 -1 A= 0 0 0
450 Line
100 100 100 -1 2 W-1 0 0 0
Detector 3
10 10 10 -1 -1 2 0 0 0

F= 10 10 10 -1 -1 2 A= 0 0 0
-1 -45 2Line -1
0
100 100 100 0 0 0
Detector W4
10 10 10 2 -1 -1 0 0 0

(3) EDGE Detection


• Edges are abrupt discontinuities in the Gray Levels
• Edge is defined as rate of change of continuity

.
Edge

Dark White

☆ Image Segmentation 8
8

4
[A] Step Edge Detection
(i) Consider a Digital Image
Robert Mask :
F =  0 0 200 200 200 200 0 0
 0 0 200 200 200 200 0 0 Gy= -1
-1 11
  0 0
 0 0 200 200 200 200 0 0

Robert Filter
( 1st Order Derivative Sharpening filter )

-1 0 -1 1
1 0 0 0

☆ Image Segmentation 9
9

[A] Step Edge Detection


(i) Consider a Digital Image
Robert Mask :
F =  0 0 200 200 200 200 0 0
 0 0 200 200 200 200 0 0 Gy= -1 1
 
 0 0 200 200 200 200 0 0

(ii) Pixel Values of Row -1 with repeated border values :


[ 0 0 0 200 200 200 200 0 0 0 ]

(iii) First Order Derivative i.e. Gradient : Gy= -1 1

[ 0 0 200 0 0 0 -200 0 0 0 ]

☆ Image Segmentation 10
10

5
(iv) The Magnitude of First Order Derivative :

[ 0 0 200 0 0 0 200 0 0 0 ]

(v) The Edge detected image :

F= 0 0 200 0 0 0 200 0 0
0 0 200 0 0 0 200 0 0
0 0 200 0 0 0 200 0 0

Sharp edge Sharp edge

• Magnitude of First order derivative produces desirable


effect. i.e. Sharp Edges.
Therefore, first derivative mask such as Robert, Prewitt,
Sobel and Fri-chen are suitable to detect Step Edges.

☆ Dr. Kiran TALELE 11


11

(iii)First Order Derivative i.e. Gradient :


[ 0 0 200 0 0 0 -200 0 0 0 ]
(iv) Second Order Derivative i.e. Laplacian :
[ 0 200 -200 0 0 -200 200 0 0 0 ]
(v) Magnitude of Second Order Derivative

[ 0 200 200 0 0 200 200 0 0 0 ]


(vi) The Edge detected image :
F= 0 0 200 200 0 0 200 200 0 0
0 0 200 200 0 0 200 200 0 0
0 0 200 200 0 0 200 200 0 0

Double edges Double edges


☆ Image Segmentation 12
12

6
• Magnitude of second order derivative produces double edges
which is NOT desirable.
Therefore, Second order derivative mask such as Laplacian
mask is NOT suitable to detect Step Edges.

☆ Dr. Kiran TALELE 13


13

[B] Ramp Edge Detection


(i) Consider a Digital Image
F =  0 0 80 160 240 240 240 240 Robert Mask :
 0 0 80 160 240 240 240 240
  Gy= -1 1
 0 0 80 160 240 240 240 240

(ii) Pixel Values of Row -1 with repeated border Values :


[ 0 0 0 80 160 240 240 240 240 240 ]

(iii) First Order Derivative i.e. Gradient :

[ 0 0 80 80 80 0 0 0 0 ]

☆ Image Segmentation 14
14

7
(iv) The Magnitude of First Order Derivative :
[ 0 0 80 80 80 0 0 0 0 ]

(v) The Edge detected image :


F= 0 0 80 80 80 0 0 0
0 0 80 80 80 0 0 0
0 0 80 80 80 0 0 0

Thick edge

• Magnitude of First order derivative produces Thick Edge


which is Not desirable
• Therefore, first derivative mask such as Robert, Prewitt,
Sobel and Fri-chen are NOT suitable to detect Ramp Edges

☆ Dr. Kiran TALELE 15


15

(iii)First Order Derivative i.e. Gradient :


[ 0 0 80 80 80 0 0 0 0 ]

(iv) Second Order Derivative i.e. Laplacian :

[ 0 80 0 0 -80 0 0 0 0 ]

(v) Magnitude of Second Order Derivative

[ 0 80 0 0 80 0 0 0 0 ]

☆ Image Segmentation 16
16

8
(v) The Magnitude of Second Order Derivative :
[ 0 80 0 0 80 0 0 0 0 ]

(vi) The Edge detected image :

F=

Sharp edge Sharp edge

• Second order derivative produces desirable results..i.e.


Sharp Edges.
Therefore, Second order derivative mask such as Lapacian
mask is the most suitable to detect Ramp Edges.

☆ Dr. Kiran TALELE 17


17

Edge Linking and Boundary Detection


▪ Edge Detection Algorithm is followed by Linking
procedures to assemble edge pixels into
meaningful edges.
▪ Edge Linking Methods :
(1) Edge Linking using Local Processing
(2) Edge Linking using Global Processing Hough
Transform Method
(3) Edge Linking using Global Processing Graph
Theoretic Method

☆ Image Segmentation 18
18

9
• Edge Linking using Local Processing
(i) Consider two edge points A( x1, y1) and B( x2, y2)
as shown in figure below

(ii) Select a small


neighbourhood say
3x3.

☆ Dr. Kiran TALELE 19


19

Edge Linking using Local Processing . . . .

(iii) Analyse the characteristics of edge pixels in a


small neighbourhood say 3x3.

(iv) Link all the points that are similar according to a


set of predefined criteria

(v) Two basic properties of pixels are :

a) Strength of Gradient
b) Direction of Gradient

☆ Image Segmentation 20
20

10
Edge Linking using Local Processing . . . .

(v) An edge pixels with co-ordinates (x’, y’) is similar in


magnitude to the pixel at (x,y) if the following
condition is satisfied

If ≤ Magnitude
Threshold
Where

☆ Dr. Kiran TALELE 21


21

Edge Linking using Local Processing . . . .

(vi) An edge pixels with co-ordinates (x’, y’) is similar in


direction to the pixel at (x,y) if the following condition
is satisfied

If ≤ Angle Threshold

Where

☆ Image Segmentation 22
22

11
Edge Linking using Local Processing . . . .

That means,

If ≤ Magnitude
Threshold
AND
≤ Angle Threshold

Then
Two pixels at (x,y) and (x’,y’) can be linked.

☆ Dr. Kiran TALELE 23


23

• Edge Linking using Global Processing Hough Transform


Method
(1) Hough Transform :
Consider two points A( x1, y1) and B( x2, y2) in xy
plane
The equation of the line passing through AB is then
given by,
y=mx+c

Let y = a x + b

where a is slope value and


b=-ax+y b is. y-intercept value
☆ Image Segmentation 24
24

12
At A( x1 , y1 ), b = - a x1 + y1
b = -a x + y
At B( x2 , y2 ), b = - a x2 + y2
Y-intercept
(a’,b’) Value
yy b

A(x1 , y1) (B) (A)


Hough
Transform
B(x2 , y2)

x Image Space a Parametric Space


Slope Value

☆ Dr. Kiran TALELE 25


25

(i) Hough Transformation is POINT to LINE and


LINE to POINT Transformation from xy plane
(Image Space) to ab plane (Parametric Space)

(ii) At each intersecting point in ab-plane, we


get slope value (a’) and y-constant value (b’)
of line that exist in xy-plane.
(iii) The equation of line is given by,

Y = a’ x + b’ ➔ THIS IS LINE AB

☆ Image Segmentation 26
26

13
(2) Edge Linking using Hough Transform
(I) Map all the input points from xy plane to ab plane
using Hough Transform
e.g. Consider 4 input points A, B, C and D as shown in figure.

yy b
A(x1 , y1)

B(x2 , y2) Hough


Transform

C(x3 y3) D(x4 , y4)

x a
☆ Dr. Kiran TALELE 27
27

(2) Edge Linking using Hough Transform


(I) Map all the input points from xy plane to ab plane
using Hough Transform
e.g. Consider 4 input points A, B, C and D as shown in figure.

yy b
(D) (A)
A(x1 , y1)
Hough
B(x2 , y2) Transform (C)
(B)

C(x3 y3) D(x4 , y4)

x a
☆ Image Segmentation 28
28

14
(2) Edge Linking using Hough Transform
(I) Map all the input points from xy plane to ab plane
using Hough Transform
e.g. Consider 4 input points A, B, C and D as shown in figure.

b’
yy b
A(x1 , y1) (D) (A)

B(x2 , y2) Hough


Transform 2 (C)
(B)
2
C(x3 y3) D(x4 , y4) a’ 3
2

x a
☆ Image Segmentation 29
29

Edge Linking using Hough Transform . . . .

(II) Count the number of intersecting lines at each


point in ab plane.
(III) Select the point with maximum value of count.
E.g. Max value of count is 3 at point (a’,b’)
(III) Define line with Slope Value = a’ and
Y- Constant Value = b’.
The equation of line is y = a’ x + b’
(IV) Determine co-linear points
E.g. Point A, B and C are co-linear points.

☆ Dr. Kiran TALELE 30


30

15
(V) Link all co-linear points

y yy
A A

B B

C C

x x

☆ Dr. Kiran TALELE 31


31

(3) Limitation of Hough Transform :


(i) Hough Transform method is not suitable for vertical
edges
(ii) For vertical line, slope value is ∞

☆ Image Segmentation 32
32

16
Paul V. C. Hough
The Hough transform was first proposed
by Paul Hough in 1962 as a method for
detecting lines in images.

It was made popular by Duda and Hart: Duda, R. O. and P. E. Hart,


"Use of the Hough Transformation to Detect Lines and Curves in
Pictures", 1972.
Ref.
The Hough transform was patented as U.S. Patent 3,069,654 in 1962
and assigned to the U.S. Atomic Energy Commission with the name
"Method and Means for Recognizing Complex Patterns". This patent
uses a slope-intercept parametrization for straight lines

☆ Image Segmentation 33
33

Overview of Hough Transform :


▪ The Hough transform is a mathematical technique used in
computer vision and image analysis to detect simple geometric
shapes like lines, circles, and ellipses.

▪ The basic idea behind the Hough transform is to represent lines or


curves in an image as points in a parameter space.

▪ The Hough transform is a powerful tool for line and curve


detection in images, particularly when traditional edge detection
techniques fail.

▪ Its ability to handle broken and incomplete lines makes it a


valuable addition to any image processing toolkit

☆ Image Segmentation 34
34

17
Q1. What is Hough Transform?

• The Hough transform in image processing is a technique


used to detect simple geometric shapes in images.
• It works by transforming the image space into a parameter
space, where the geometric shapes can be detected through
the identification of patterns in the parameter space.

Q2. Why is Hough Transform Needed?

•The Hough transform is needed because traditional image


processing techniques like edge detection and thresholding are not
always effective at detecting simple geometric shapes in images.
These techniques can be particularly ineffective when the shapes are
distorted, incomplete, or partially obscured.
•The Hough transform can detect these shapes by transforming the
image space into a parameter space where the shapes can be more
easily identified.

35

▪ Edge Linking using Graph Theoretic Method

(i) In this Method, edge is represented in the form of Graph


(ii) Edge is also called as Path and Low cost path
corresponds to the most significant edge in the image
(iii) Consider Two pixels A and B
(iv) The Cost between A and B is given by,
Cost (A,B) = H - | F(A)-F(B) | A BB
Where H is the max gray value in the image
F(A) and F(B) are pixel values at point A and at Cost (A,B)
point B respectively

☆ Dr. Kiran TALELE 36


36

18
e.g. Cost (A,B) = H - | F(A)-F(B) |
A BB
Assume H = 255

Cost (A,B) Cost (A,B) = 255 - | F(A)-F(B) |

Case-1 : Case-2 : Case-3 :

80 80
70 B80

B
Cost = 255-| 70-80| 70 70
70
Cost = 245
Cost = 255-| 70-80| Cost = 255-| 80-70|
Cost = 245 Cost = 245

☆ Image Segmentation 37
37

Example :
Assume that the edge starts in the first Row and ends in the
last row for the following Gray Image.

F= 5 6 1 Sketch all possible paths and


determine the edge
6 7 0 corresponding to minimum cost
path
7 1 3
Solution :
The Cost between tow pixels A and B is given by,
Cost (A,B) = H - | F(A)-F(B) |
Where H = 7 is the max gray value in the image
F(A) and F(B) are pixel values at point A and at point B

☆ Dr. Kiran TALELE 38


38

19
Edge-1 : Edge-2 : Edge-3 : Edge-4 :

5 6 1 5 6 1 5 6 1 5 6 1
6 7 0 6 7 0 6 7 0 6 7 0
7 1 3 7 1 3 7 1 3 7 1 3

Edge-5 : Edge-6 : Edge-7 : Edge-8 :

5 6 1 5 6 1 5 6 1 5 6 1
6 7 0 6 7 0 6 7 0 6 7 0
7 1 3 7 1 3 7 1 3 7 1 3

☆ Image Segmentation 39
39

(1) For Edge-1 :

Cost (A,B) = H - | F(A)-F(B) |


5 6 1
Cost (A,B) = 7 - | F(A)-F(B) |
6 7 0

7 1 3

☆ Dr. Kiran TALELE 40


40

20
Cost (A,B) = 7 - | F(A)-F(B) |
(1) For Edge-1 (E1) :
(i) To find C1
5 C1 6 1 C1 = 7 - | F(A)-F(B) |
C1 = 7 - | 5-6 |
6 7 0 C1 = 6
C2
(ii) To find C2
7 C3 1 3 C2 = 7 - | F(A)-F(B) |
C2 = 6

(ii) To find C3
Cost (E1) = C1 + C2 + C3 C3 = 7 - | F(A)-F(B) |
= 6+6+1 C3 = 7 - | 7-1 |
= 13 C3 = 1

☆ Image Segmentation 41
41

(1) For Edge-1 (E1) : (2) For Edge-2 (E2) :

5 C1
C1 6 1 5 C1 6 1
C2

6 C2 7 0 6 7 C3 0

7 C3 1 3 7 1 C4 3

Cost (E1) = C1+ C2 +C3 Cost (E2) = C1 + C2 + C3 + C4


Cost (E1) = 6 + 6 + 1 Cost (E2) = 6 + 6 + 0 + 5
Cost (E1) == 13 Cost (E2) == 13

☆ Dr. Kiran TALELE 42


42

21
(3) For Edge-3 (E3) : (4) For Edge-4 (E4) :

5 C1
C1 6 1 5 C1 6 1
C2

6 C2 7 0 6 7 C3 0
C3 C4

7 1 C4 3 7 C5 1 3

Cost (E3) = C1+C2+C3+C4 Cost (E4) = C1+C2+C3+C4+C5


Cost (E3) = 6 + 6 + 1 + 5 Cost (E4) = 6 + 6 + 0 + 1 + 1

Cost (E3) == 18 Cost (E4) == 14

☆ Image Segmentation 43
43

(5) For Edge-5 (E5) : (6) For Edge-6 (E6) :

5 6 C1 1 5 6 C1 1
C2

6 7 C2 0 6 C3 7 0

7 1 C3 3 7 C4 1 3

Cost (E5) = C1+ C2 +C3 Cost (E6) = C1 + C2 + C3 + C4


Cost (E5) = 2 + 0 + 5 Cost (E6) = 2 + 6 + 6 + 1
Cost (E5) == 7 Cost (E6) == 15

☆ Dr. Kiran TALELE 44


44

22
(7) For Edge-7 (E7) : (8) For Edge-8 (E8) :

5 6 C1 1 5 6 C1 1
C2

6 7 C2 0 6 C3 7 0
C3 C4

7 C4 1 3 7 1 C5 3

Cost (E7) = C1+C2+C3+C4 Cost (E8) = C1+C2+C3+C4+C5


Cost (E7) = 2 + 0 + 1 + 1 Cost (E8) = 2 + 6 + 6 + 1 + 5
Cost (E7) == 4 Cost (E8) == 20

☆ Image Segmentation 45
45

Edge-7 has the minimum value of Cost.


Therefore, Edge-7 is the most significant edge in the
image

For Edge-7 :

5 6 C1 1 5 6 1

6 7 C2 0 6 7 0
C3

7 C4 1 3 7 1 3

Input Image Output Image

☆ Dr. Kiran TALELE 46


46

23
Edge-7 has the minimum value of Cost.
Therefore, Edge-7 is the most significant edge in the
image

For Edge-7 :

5 6 C1 1 5 6 1

6 7 C2 0 6 7 0
C3

7 C4 1 3 7 1 3

Input Image Output Image

☆ Image Segmentation 47
47

Edge-7 has the minimum value of Cost.


Therefore, Edge-7 is the most significant edge in the
image

For Edge-7, Let F(A) = 7 and F(B) = 0 and F(other) = 0

5 6 C1 1 5 7 0

6 7 C2 0 6 7 0
C3

7 C4 1 3 7 1 3

Input Image Output Image

☆ Dr. Kiran TALELE 48


48

24
Edge-7 has the minimum value of Cost.
Therefore, Edge-7 is the most significant edge in the
image

For Edge-7, Let F(A) = 7 and F(B) = 0 and F(other) = 0

5 6 C1 1 0 7 0

6 7 C2 0 0 7 0
C3

7 C4 1 3 7 0 0

Input Image Output Image

☆ Image Segmentation 49
49

Edge-7 has the minimum value of Cost.


Therefore, Edge-7 is the most significant edge in the
image

For Edge-7, Let F(A) = 7 and F(B) = 0 and F(other) = 0

5 6 C1 1 0 7 0

6 7 C2 0 0 7 0
C3

7 C4 1 3 7 0 0

Input Image Output Image

☆ Image Segmentation 50
50

25
Edge-7 has the minimum value of Cost.
Therefore, Edge-7 is the most significant edge in the
image

For Edge-7, Let F(A) = 7 and F(B) = 0 and F(other) = 0

5 6 1 0 7 0

6 7 0 0 7 0

7 1 3 7 0 0

Input Image Output Image

☆ Dr. Kiran TALELE 51


51

[II] Segmentation using Similarity property:


• In this category, Image is partitioned into
regions based on Similarity in gray level.
• This involves detection of region.
• Let R represents the entire image and
R1, R2,--------RN are segmented regions such that,
(i)

(ii) Ri is a connected Region


(iii) Ri Rj = Null for all i and j
(iv) Predicate ( Ri ) = TRUE for all i

☆ Image Segmentation 52
52

26
(A) Region Growing by Pixel Aggregation :-

(i) Region growing is a procedure that groups


pixels into larger regions.
(ii) Pixel aggregation procedure starts with a seed
point AND Neighbouring pixels that have
similar values are appended

☆ Dr. Kiran TALELE 53


53

Example-1 : F= 0
1 2 3

0 1 2 3
F= 0 1 2 3
0 4 5 6
0 1 2 3
4 5 6 7
0 4 5 6

4 5 6 7
1 2 3
F= 0
0 1 2 3
Predicate :
If F(x,y) = { 0, 1, 2, 3 } 0 4 5 6
Then F(x,y) = Red 4 5 6 7
Else F(x,y) = Yellow

☆ Image Segmentation 54
54

27
Ex-2: Segment the following given image using
Region Growing by Pixel Aggregation.
Assume Threshold=2.

Predicate :
7
Let Seed Point be S(x’,y’)
If | F(x,y) –S(x’,y’) | ≤ T 5
Then F(x,y) = Intensity of
Segmented
Region

☆ Dr. Kiran TALELE 55


55

Step-1 : Let Seed Point S1(4,1) = 5 and T = 2


0 1 2 3 4 5 6 7
Predicate : 0 3 3 2 3 2 1 4
A 3
A
If | F(x,y) – S1 (4,1) | ≤ T 1 1 5 3 2 7
A A
5 6
A A
4
i.e. | F(x,y) – 5 | ≤ 2 2 2 1 2 A
6 A
4 A
7 3
A A
5
3 4
A 5
A 6
A 7
A A
7 6
A 2 0
i.e. F(x,y) = { 3, 4, 5, 6, 7 } 4 A
4 5
A A
6 A
7 A
4 0 3 2
5 A
7 A
7 6
A 5
A 2 3 3 1
Then F(x,y) = A
6 1 1 0 0 3 1 2 1
7 2 3 4 3 3 4 3 2
Segmented Region : R1 = { A }

☆ Image Segmentation 56
56

28
Step-2 : Let Seed Point S2(0,0) = 3 and T = 2
0 1 2 3 4 5 6 7
Predicate : 0 3
B 3B 2B 4B 2B 1B 4
A 3
A
If | F(x,y) – S2 (0,0) | ≤ T 1 B
1 5B 3
B B
2 7
A A
5 6
A A
4
i.e. | F(x,y) – 3 | ≤ 2 2 B
2 B
1 B
2 A
6 A
4 A
7 3
A A
5
i.e. F(x,y) = { 1, 2, 3, 4, 5 } 3 4
A 5
A 6
A 7
A A
7 6
A 2 0
4 A
4 5
A A
6 A
7 A
4 0 3 2
5 A
7 A
7 6
A 5
A 2 3 3 1
Then F(x,y) = B 6 1 1 0 0 3 1 2 1
7 2 3 4 3 3 4 3 2
Segmented Region : R2 = { B }

☆ Dr. Kiran TALELE 57


57

Step-3 : Let Seed Point S3(6,1) = 2 and T = 2


0 1 2 3 4 5 6 7
Predicate : 0 2
B 3B 2B 4B 0B 1B 4
A 3
A
If | F(x,y) – S3 (6,1) | ≤ T 1 B
1 1B 3
B B
2 7
A A
5 6
A A
4
i.e. | F(x,y) – 2 | ≤ 2 2 B
0 B
1 B
2 A
6 A
4 A
7 3
A A
5
i.e. F(x,y) = { 0, 1, 2, 3, 4 } 3 4
A 5
A 6
A 7
A A
7 6
A C
2 C
0
4 A
4 5
A A
6 A
7 A
4 C
0 C
3 C
2
5 A
7 A
7 6
A 5
A 2
C 3C 3
C 1
C
Then F(x,y) = C 6 2
C C
1 0C 0C C
3 1C C
2 C
1
7 C
2 C
3 C
4 C
3 C
3 C
4 C
3 C
2
Segmented Region : R3 = { C }

No of Segmented Regions : 3
R = R 1 U R2 U R3

☆ Image Segmentation 58
58

29
(B) Region Splitting & Merging :-

In this method,
• First an image is subdivided into a set of
regions and
• Then subdivided adjacent regions are
merged to form a new region.

☆ Dr. Kiran TALELE 59


59

Ex-1 : 10 10 80 80 Predicate : All the pixels in the


10 10 80 80 image must have same
50 50 80 80 intensity value.
50 50 80 80

By Splitting : By Merging :
10 10 80 80 10 10 80 80

10 10 80 80
10 10 80 80
50 50 80 80
50 50 80 80
50 50 80 80
50 50 80 80

☆ Image Segmentation 60
60

30
Ex-2 : Segment the following given image such that the
difference between the Maximum intensity value and
the minimum intensity value in the segmented region
is less than 8 using Region Splitting & Merging
Technique
10 9 30 4
7 6 33 37
50 52 54 53
55 52 56 58
Predicate for Splitting:
For Any Region R ;
IF | Max Intensity Value – Min Intensity Value | ≥ 8
Then Split the region into 4 parts

☆ Dr. Kiran TALELE 61


61

Step-1 : Region Splitting


Predicate for Splitting:
For Any Region R ;
IF | Max Intensity Value – Min Intensity Value | ≥ 8
Then Split the region into 4 parts

R1 R2 R
R R3 R4

R1 R2 R3 R4

☆ Image Segmentation 62
62

31
(1) For Input Image R 10 9 30 4
7 6 33 37
Imax = 58 Imin = 4
Imax – Imin = 54 ≥ 8 50 52 54 53
55 52 56 58
Predicate (R) = TRUE
So, Split the region R into 4 parts

R1 R2 10 9 30 4
R R3 R4 7 6 33 37

50 52 54 56
R 55 52 56 58

R1 R2 R3 R4 .

☆ Dr. Kiran TALELE 63


63

(2) For Region R1


R1 R2
10 9 30 4
Imax = 10 Imin = 6 7 6 33 37
Imax – Imax = 4 R3 R4
50 52 54 56
Predicate (R) = FALSE 55 52 56 58

(3) For Region R2


10 9 30 4
Imax = 37 Imin = 4 R1 R2
Imax – Imax = 33 7 6 33 37
R3 R4
Predicate (R) = TRUE 50 52 54 56

So, Split the region R2 into 4 parts 55 52 56 58

R2 = R21 R22 30 4
R23 R24 33 37

☆ Image Segmentation 64
64

32
(4) For Region R3 R1 R2 10 9 30 4

7 6 33 37
Imax = 55 Imin = 50 R3 R4
Imax – Imax = 5 50 52 54 56

55 52 56 58
Predicate (R) = FALSE

(5) For Region R4 10 9 30 4


R1 R2
Imax = 58 Imin = 54 R3 R4
7 6 33 37

Imax – Imax = 4 50 52 54 56

Predicate (R) = FALSE 55 52 56 58

☆ Dr. Kiran TALELE 65


65

Result of Splitting

R21 R22 10 9 30 4
R R1
R23 R24 7 6 33 37

50 52 54 56
R3 R4 55 52 56 58
R

R1 R2 R3 R4 .

R21 R22 R23 R24

☆ Image Segmentation 66
66

33
Step-1 : Region Merging
Predicate for Merging

For adjacent Regions RA and RB

IF | Max Intensity Value – Min Intensity Value | < 8

Then Merge the regions :

Let MAB = RA U RB

☆ Dr. Kiran TALELE 67


67

(I) For adjacent Regions


R21 R22 R23 and R24 R21 R22 10 9 30 4
R1
1. For { R21 U R23 } R23 R24 7 6 33 37

50 52 54 56
Imax = 33 Imin = 30 R3 R4 55 52 56 58
Imax – Imax = 3 < 8
Predicate = TRUE
Merge the regions R22 10 9 30 4
R1 M1
R24 7 6 33 37
Let M1 = { R21 U R23 } 50 52 54 56
R3 R4
55 52 56 58

☆ Image Segmentation 68
68

34
2. For { M1 U R24 } R22 10 9 30 4
R1 M1
R24 7 6 33 37
Imax = 37 Imin = 30
Imax – Imax = 7 < 8 R3 R4
50 52 54 56

55 52 56 58
Predicate = TRUE
Merge the regions
R22 10 9 30 4
Let M2 = { M1 U R24 } R1 M2
7 6 33 37

50 52 54 56
R3 R4
55 52 56 58

☆ Dr. Kiran TALELE 69


69

3. For { R3 U R4 } R22 10 9 30 4
R1 M2
7 6 33 37
Imax = 56 Imin = 50
Imax – Imax = 6 < 8 50 52 54 56
R3 R4
Predicate = TRUE 55 52 56 55

Merge the regions


R22 10 9 30 4
Let M3 = {R3 U R4 } R1 M2
7 6 33 37

50 52 54 56
M3
55 52 56 55

☆ Image Segmentation 70
70

35
Result of Segmentation :
1) No of Segmented Regions = 4
Such that R = R1 U R22 U M2 U M3

2) Let R1 = { A }, R22 = { B }, M2 = { C } and M3 = { D }

10 9 30 4 R2 A A C B
R1
7 6 33 37 M2 A A C C

50 52 54 53 D D D D
M3
55 52 56 55 D D D D

Input IMAGE Segmented IMAGE

☆ Dr. Kiran TALELE 71


71

Dr. Kiran TALELE


➢ Academic : PhD
➢ Professional :
▪ Dean-Students, Alumni & External Relations
@ Bharatiya Vidya Bhavans’ Sardar Patel
Institute of Technology (SP-IT), Mumbai
▪ Co-ordinator @ Sardar Patel Technology
Business Incubator (SP-TBI), Mumbai
▪ Treasurer-IEEE Bombay Section
091-9987030881
[email protected] / [email protected]
https://www.linkedin.com/in/k-t-v-talele/
www.facebook.com/Kiran-Talele-1711929555720263

Stay Connected
72
72

36
• Dr. Kiran TALELE is an Associate Professor in Electronics &
Telecommunication Engineering Department of Bharatiya Vidya Bhavans’
Sardar Patel Institute of Technology, Mumbai with 33+ years experience in
Academics.

• He is a Dean of Students, Alumni and External Relations at Sardar Patel


Institute of Technology, Andheri Mumbai. He is also a Co-ordinator of Sardar
Patel Technology Business Incubator, Mumbai.

• His area of research is Digital Signal & Image Processing, Computer Vision,
Machine Learning and Multimedia System Design.

• He has published 85+ research papers at various national & international


refereed conferences and journals. He has published 22 patents at Indian
Patent Office. One patent is granted in 2021.

• He is a Treasurer of IEEE Bombay Section and Mentor for Startup Incubation &
Intellectual Asset Creation.

• He received incentives for excellent performance in academics


and research from Management of S.P.I.T. in 2008-09. He is a recipient of
P.R. Bapat IEEE Bombay Section Outstanding Volunteer Award 2019.

73

37

You might also like