Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
28 views

CSC566-Tutorial Thresholding

This document summarizes the steps to perform thresholding segmentation on an image. It provides the pixel values of the original image. The steps calculate the threshold value T using the mean pixel intensity. It then calculates the mean intensities μ1 and μ2 of the two regions separated by T. A new threshold T1+1 is calculated as the average of μ1 and μ2. This process is repeated until the difference between successive threshold values is less than 5, resulting in a binary segmented image.

Uploaded by

Siti Nur Ariffa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

CSC566-Tutorial Thresholding

This document summarizes the steps to perform thresholding segmentation on an image. It provides the pixel values of the original image. The steps calculate the threshold value T using the mean pixel intensity. It then calculates the mean intensities μ1 and μ2 of the two regions separated by T. A new threshold T1+1 is calculated as the average of μ1 and μ2. This process is repeated until the difference between successive threshold values is less than 5, resulting in a binary segmented image.

Uploaded by

Siti Nur Ariffa
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CSC566 Image Processing

Week 9
Chapter 6 (Segmentation using Thresholding)

Name : SITI NUR ARIFFA BINTI MUHAMMAD


Student Id : 2020926105

QUESTION

180 143 25 109 131 130


150 145 12 64 131 130
180 149 11 24 81 117
180 144 21 24 15 48
150 143 11 7 7 9
180 170 108 111 113 111
180 149 149 149 149 180
177 160 149 160 149 180

Figure 1

Figure 1 shows the original image. Perform segmentation on the image using thresholding.
Given the steps as follow:

1. Select initial estimate for T and T0. Let T0 = 5 and T is the mean of the pixels.

2. Segment image using T, producing two groups of pixels, G1 and G2.

3. Compute average gray levels μ1 and μ2 for the two regions, G1 and G2.

4. Get new threshold value, Ti + 1.

5. Repeat Steps 2 – 4 until difference between two successive thresholds, (Ti + 1 - T) < T0

6. Binarize the image using the value Ti + 1:

If (f(x,y) > Ti + 1)
then f(x,y) = 1 //region G1
else f(x,y) = 0 //region G2

CSC566/Image Processing
Prepared by: Nur Nabilah Abu Mangshor
Nov 2020
ANSWER

Pixels Frequency Total


7 2 14
9 1 9
11 2 22
12 1 12
15 1 15
21 1 21
24 2 48
25 1 25
48 1 48
64 1 64
81 1 81
108 1 108
109 1 109
111 2 222
113 1 113
117 1 117
130 2 260
131 2 262
143 2 286
144 1 144
145 1 145
149 7 1043
150 2 300
160 2 320
170 1 170
177 1 177
180 7 1260
48 5395

T = average intensity = 5395/48 = 112.40

T0 =5

CSC566/Image Processing
Prepared by: Nur Nabilah Abu Mangshor
Nov 2020
1.T = 112.40

µ1

=(7*2)+(9*1)+(11*2)+(12*1)+(15*1)+(21*1)+(24*2)+(25*1)+(48*1)+(64+*1)+(81*1)+(160*1)+(109*1)+(1
11*2)/18

= 798/18

=44.33

µ2

=(113*1)+(117*2)+(130*2)+(131*2)+(143*2)+(144*1)+(145*1)+(149*7)+(150*1)+(160*1)+(170*1)+(177
*1)+(177*1)+(180*1)/14

=4597/30

=153.23

T1+1 = (44.33 + 153.23) /2

= 197.57/2

= 98.79

(T1+1 -T) = |95.79 – 112.40 | =13.62

If(T1+1 -T) < 5

Stop

Else

T = T1+1 = 95.79

Repeat Step 2-4

CSC566/Image Processing
Prepared by: Nur Nabilah Abu Mangshor
Nov 2020
2.T = 98.79

µ1

=(7*2)+(9*1)+(11*2)+(12*1)+(15*1)+(21*1)+(24*2)+(25*1)+(48*1)+(64*1)+(81*1)+(108*1)+(109*1)+(11
1*2)+(81*1)

= 359/14

=25.64

µ2

=
(108*1)+(109*1)+(111*2)+(113*1)+(117*2)+(130*2)+(131*2)+(143*2)+(144*1)+(145*1)+(149*7)+(150*
1)+(160*1)+(170*1)+(177*1)+(180*1)/42

=5036/34

=148.12

T1+1 = (25.64 + 148.12)/2

= 173.76/2

= 86.88

T1+1-T = |86.88-98.79| = 11.91

11.91 > 5, thus continue step 2-4

CSC566/Image Processing
Prepared by: Nur Nabilah Abu Mangshor
Nov 2020
3.T = 86.88

µ1

=(7*2)+(9*1)+(11*2)+(12*1)+(15*1)+(21*1)+(24*2)+(25*1)+(48*1)+(64*1)+(81*1)+(108*1)+(109*1)+(11
1*2)+(81*1)

= 359/14

=25.64

µ2

=
(108*1)+(109*1)+(111*2)+(113*1)+(117*2)+(130*2)+(131*2)+(143*2)+(144*1)+(145*1)+(149*7)+(150*
1)+(160*1)+(170*1)+(177*1)+(180*1)/42

=5036/34

=148.12

T1+1 = (25.64 + 148.12)/2

= 173.76/2

= 86.88

T1+1 -T = |86.88 – 86.88| = 0.0

0.0 < 5, stop

CSC566/Image Processing
Prepared by: Nur Nabilah Abu Mangshor
Nov 2020
If(f(x,y) > T1 +1 )

thenf(x,y) = 1 //region G1

Else

f(x,y)=0 //region G2

T1+1 = 86.88

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

CSC566/Image Processing
Prepared by: Nur Nabilah Abu Mangshor
Nov 2020

You might also like