You are on page 1of 16

COL783: Digital Image Processing

Prem Kalra
pkalra@cse.iitd.ac.in
h4p://www.cse.iitd.ac.in/~pkalra/col783

Department of Computer Science and Engineering
Indian InsEtute of Technology Delhi
Image Segmentation
Image segmentaEon is the process of parEEoning a digital
image into mulEple segments (regions)

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783


Image Segmentation
Edge Detec)on

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783


Image Segmentation
Hough Transform

DetecEon
of simple
geometric
shapes:
Lines
Circles
Ellipses

Source: h4ps://web.cs.wpi.edu/~emmanuel/courses/cs545/S14/slides/lecture06.pdf
Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783
Image Segmentation
Hough Transform

Lines

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783


Image Segmentation
Hough Transform

Lines

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783


Image Segmentation
Hough Transform

Lines

ρ = x cosθ + y sinθ

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783


Image Segmentation
Hough Transform
Apply edge operator to image f(x,y), and compute gradient magnitude
Lines M(x,y) at each pixel.
Build the accumulator array A:
for each edge pixel M(x,y)
if ( M(x,y) > threshold )
for each quanEzed value of θ
compute: ρ = x cosθ + y sinθ

increment: A[ρ][θ]++

Search accumulator array for maxima, corresponding to lines in the
image.
Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783
Image Segmentation
Hough Transform

Lines

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783


Image Segmentation
Hough Transform

Lines

Source: h4ps://web.cs.wpi.edu/~emmanuel/courses/cs545/S14/slides/lecture06.pdf
Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783
Image Segmentation
Hough Transform

Circles

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783


Image Segmentation
Hough Transform
Apply edge operator to image f(x,y), and compute gradient magnitude
Circles M(x,y) at each pixel.
Build the accumulator array A:
for each edge pixel M(x,y)
if ( M(x,y) > threshold )
for each quanEzed value of θ
compute: xc = x – R * cosθ
yc = y – R * sinθ
increment: A[xc][yc]++

Search accumulator array for maxima, corresponding to circle centers
in the image.
Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783
Image Segmentation
Hough Transform

Circles

Source: h4ps://web.cs.wpi.edu/~emmanuel/courses/cs545/S14/slides/lecture06.pdf
Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783
Image Segmentation
Hough Transform

Circles

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783


Image Segmentation
Hough Transform

Ellipses

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783


Image Segmentation
Generalized Hough Transform
(GHT)

Digital Image Processing http://www.cse.iitd.ac.in/~pkalra/col783

You might also like