hough transform - carleton...
TRANSCRIPT
![Page 1: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/1.jpg)
Hough Transform
COMP 4900D
Winter 2006
![Page 2: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/2.jpg)
Lines
![Page 3: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/3.jpg)
Lines
Rafael, The School of Athens (1518)
![Page 4: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/4.jpg)
Line Detection
The problem:
•How many lines?
•Find the lines.
![Page 5: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/5.jpg)
Equations for Lines
baxy +=
ρ
What happens when the line is vertical? The slope a goes
to infinity.
The slope-intercept equation of line
A better representation – the polar representation
θθρ sincos yx +=
![Page 6: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/6.jpg)
Hough Transform: line-parameter mapping
ρ
θθρ sincos yx +=
A line in the plane maps to a point in the θ-ρ space.
ρ
ρ (θ,ρ)
All lines passing through a point map to a sinusoidal curve in the
θ-ρ (parameter) space.
![Page 7: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/7.jpg)
Mapping of points on a line
ρ
Points on the same line define curves in the parameter space
that pass through a single point.
Main idea: transform edge points in x-y plane to curves in the
parameter space. Then find the points in the parameter space
that has many curves passing through.
![Page 8: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/8.jpg)
Quantize Parameter Space
m
ρ
θm
Detecting Lines by finding maxima / clustering in parameter space.
![Page 9: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/9.jpg)
Parameter space – 3D view
![Page 10: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/10.jpg)
A Voting Scheme
![Page 11: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/11.jpg)
Examples
Hough TransformImage Edge detection
![Page 12: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/12.jpg)
Examples
input image Hough space lines detected
![Page 13: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/13.jpg)
Examples
Image credit: NASA Dryden Research Aircraft Photo Archive
input image Hough space lines detected
![Page 14: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/14.jpg)
Algorithm
1. Quantize the parameter space
int P[0, ρmax][0, θmax]; // accumulators
2. For each edge point (x, y) {
For (θ = 0; θ <= θmax; θ = θ+∆θ) {
// round off to integer
(P[ρ][θ])++;
}
}
3. Find the peaks in P[ρ][θ].
θθρ sincos yx +=
![Page 15: Hough Transform - Carleton Universitypeople.scs.carleton.ca/.../comp4900d/notes/lect10_hough.pdfHough Transform: line-parameter mapping ρ ρ= xcos θ+ ysin θ A line in the plane](https://reader033.vdocuments.site/reader033/viewer/2022060923/60aee8562628e0253434b7ef/html5/thumbnails/15.jpg)
Cell Size
Choose the parameter cell size such that the algorithm is robust
to noise.