0% found this document useful (0 votes)
48 views

Session 7

This document discusses image segmentation techniques including the Hough transform. The Hough transform can be used to detect simple geometric shapes like lines, circles, and ellipses in images. It works by transforming each point in the image space to a curve in a parameter space and finding accumulations of intersections in the parameter space that correspond to the shapes. The generalized Hough transform extends this idea to detect arbitrary shapes.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Session 7

This document discusses image segmentation techniques including the Hough transform. The Hough transform can be used to detect simple geometric shapes like lines, circles, and ellipses in images. It works by transforming each point in the image space to a curve in a parameter space and finding accumulations of intersections in the parameter space that correspond to the shapes. The generalized Hough transform extends this idea to detect arbitrary shapes.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

COL783: Digital Image Processing

Prem Kalra
[email protected]
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