0% found this document useful (0 votes)
8 views24 pages

Lect 35

Uploaded by

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

Lect 35

Uploaded by

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

Digital Imag

e
Processing
Lecture 35
01/20/2025 2
01/20/2025 3
Edge-linking Based on the Hough Transform

1. Obtain a binary edge image

2. Specify subdivisions in   plane

3. Examine the counts of the accumulator cells for


high pixel concentrations

4. Examine the relationship between pixels in chosen


cell

01/20/2025 4
01/20/2025 5
01/20/2025 6
Thresholding

1 if f ( x, y)  T (object point)
g ( x, y ) 
0 if f ( x, y ) T (background point)
T : global thresholding

Multiple thresholding
a if f ( x, y )  T2

g ( x, y ) b if T1  f ( x, y ) T2
c if f ( x, y ) T1

01/20/2025 7
01/20/2025 8
The Role of Noise in Image Thresholding

01/20/2025 9
The Role of Illumination and Reflectance

01/20/2025 10
Basic Global Thresholding

1. Select an initial estimate for the global threshold, T.


2. Segment the image using T. It will produce two groups of pixels: G1
consisting of all pixels with intensity values > T and G2 consisting
of pixels with values T. 
3. Compute the average intensity values m1 and m2 for the pixels in
G1 and G2, respectively.
4. Compute a new threshold value.
1
T m1  m2 
2
5. Repeat Steps 2 through 4 until the difference between values of T
in successive iterations is smaller than a predefined parameter
. T

01/20/2025 11
01/20/2025 12
Optimum Global Thresholding Using Otsu’s
Method
0 Principle: maximizing the between-class variance
Let {0, 1, 2, ..., L -1} denote the L distinct intensity levels
in a digital image of size M N pixels, and let ni denote the
number of pixels with intensity i.
L 1
pi ni / MN and p
i 0
i 1

k is a threshold value, C1  [0, k ], C2  [ k 1, L -1]


k L 1
P1 (k )  pi and P2 ( k )   pi 1  P1 (k )
i 0 i k 1
01/20/2025 13
Optimum Global Thresholding Using Otsu’s
Method
The mean intensity value of the pixels assigned to class
C1 is
k
1 k
m1 (k )  iP(i / C1 )   ipi
i 0 P1 (k ) i 0
The mean intensity value of the pixels assigned to class
C 2 is
L 1
1 L 1
m2 ( k )   iP(i / C2 )   ipi
i k 1 P2 (k ) i k 1

1 1  P2 m2 mG (Global mean value)


Pm
01/20/2025 14
Optimum Global Thresholding Using Otsu’s
Method
Between-class variance,  B is defined as
2

 B2 P1 (m1  mG )2  P2 (m2  mG )2


= P1 P2 (m1  m2 ) 2
 mG P1  m1 P1 
2

=
P1 (1  P1 )
 mG P1  m
2

=
P1 (1  P1 )

01/20/2025 15
Optimum Global Thresholding Using Otsu’s
Method
The optimum threshold is the value, k*, that maximizes
 B2 (k *),  B2 ( k *)  max  B2 ( k )
0 k L  1

1 if f ( x, y)  k *
g ( x, y ) 
0 if f ( x, y) k *

 B2
Separability measure   2
G

01/20/2025 16
Otsu’s Algorithm: Summary

1. Compute the normalized histogram of the input


image. Denote the components of the histogram by
pi, i=0, 1, …, L-1.
2. Compute the cumulative sums, P1(k), for k = 0, 1, …,
L-1.
3. Compute the cumulative means, m(k), for k = 0, 1, …,
L-1.
4. Compute the global intensity mean, mG.
5. Compute the between-class variance, for k = 0, 1, …,
L-1.
01/20/2025 17
Otsu’s Algorithm: Summary

6. Obtain the Otsu’s threshold, k*.

7. Obtain the separability measure.

01/20/2025 18
01/20/2025 19
Using Image Smoothing to Improve Global Thresholding

01/20/2025 20
Using Edges to Improve Global Thresholding

01/20/2025 21
Using Edges to Improve Global Thresholding

1. Compute an edge image as either the magnitude of the


gradient, or absolute value of the Laplacian of f(x,y)
2. Specify a threshold value T
3. Threshold the image and produce a binary image,
which is used as a mask image; and select pixels from
f(x,y) corresponding to “strong” edge pixels
4. Compute a histogram using only the chosen pixels in
f(x,y)
5. Use the histogram from step 4 to segment f(x,y)
globally

01/20/2025 22
01/20/2025 23
01/20/2025 24

You might also like