Generalized Hough Transform 16-385 Computer Vision
Hough Circles
Finding Circles by Hough Transform Equation of Circle: 2 2 2 ( x a ) ( y b ) r − + − = i i If radius is known: (2D Hough Space) A ( a , b ) Accumulator Array
parameters parameters ( x − a ) 2 + ( y − b ) 2 = r 2 ( x − a ) 2 + ( y − b ) 2 = r 2 variables variables b 4 4 3 3 ( x, y ) 2 2 1 1 a -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 3 4 -1 -1 -2 -2 -3 -3 -4 -4 Image space Parameter space
parameters parameters ( x − a ) 2 + ( y − b ) 2 = r 2 ( x − a ) 2 + ( y − b ) 2 = r 2 variables variables b 4 4 3 3 ( x, y ) 2 2 1 1 a -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 3 4 -1 -1 -2 -2 -3 -3 -4 -4
parameters parameters ( x − a ) 2 + ( y − b ) 2 = r 2 ( x − a ) 2 + ( y − b ) 2 = r 2 variables variables b 4 4 3 3 2 2 1 1 a -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 3 4 -1 -1 -2 -2 -3 -3 -4 -4
parameters parameters ( x − a ) 2 + ( y − b ) 2 = r 2 ( x − a ) 2 + ( y − b ) 2 = r 2 variables variables b 4 4 3 3 2 2 1 1 a -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 3 4 -1 -1 -2 -2 -3 -3 -4 -4
parameters parameters ( x − a ) 2 + ( y − b ) 2 = r 2 ( x − a ) 2 + ( y − b ) 2 = r 2 variables variables b 4 4 3 3 2 2 1 1 a -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 3 4 -1 -1 -2 -2 -3 -3 -4 -4
Finding Circles by Hough Transform Equation of Circle: 2 2 2 ( x a ) ( y b ) r − + − = i i If radius is not known: 3D Hough Space! A ( a , b , r ) Use Accumulator array What is the surface in the hough space?
Finding Circles by Hough Transform Equation of Circle: 2 2 2 ( x a ) ( y b ) r − + − = i i If radius is not known: 3D Hough Space! A ( a , b , r ) Use Accumulator array What is the surface in the hough space?
Using Gradient Information Gradient information can save lot of computation: ( x i y , ) Edge Location i φ Edge Direction i Assume radius is known: a x r cos = − φ b y r sin = − φ Need to increment only one point in accumulator!!
parameters parameters ( x − a ) 2 + ( y − b ) 2 = r 2 ( x − a ) 2 + ( y − b ) 2 = r 2 variables variables b 4 4 3 3 ( x, y, φ ) 2 2 1 1 a -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 3 4 -1 -1 -2 -2 -3 -3 -4 -4
parameters parameters ( x − a ) 2 + ( y − b ) 2 = r 2 ( x − a ) 2 + ( y − b ) 2 = r 2 variables variables b 4 4 3 3 ( x, y, φ ) 2 2 1 1 a -5 -4 -3 -2 -1 0 1 2 3 4 -5 -4 -3 -2 -1 0 1 2 3 4 -1 -1 -2 -2 -3 -3 -4 -4
Pennie Hough detector Quarter Hough detector
Pennie Hough detector Quarter Hough detector
Can you use Hough Transforms for other objects, beyond lines and circles?
Generalized Hough Transform
Generalized Hough Transform ( x c y , ) ( x i y , , ) φ Find Object Center given edges c i i A ( x c y , ) Create Accumulator Array c A ( x , y ) 0 ( x , y ) = ∀ Initialize: c c c c ( x i y , , ) φ For each edge point i i r i ¯ For each entry in table, compute: k i i x x r cos = + α c i k k i i y y r sin = + α c i k k A ( x , y ) A ( x , y ) 1 = + Increment Accumulator: c c c c A ( x c y , ) Find Local Maxima in c
Do you have to use edge detectors to vote in Hough Space?
A. Train phase: 1.Get features 2.Store all displacements of feature from center B. Test phase: 1. Get features & lookup displacements 2. Vote for center location Template c
A. Train phase: 1.Get features 2.Store all displacements of feature from center B. Test phase: 1. Get features & lookup displacements 2. Vote for center location Template
A. Train phase: 1.Get features 2.Store all displacements of feature from center B. Test phase: 1. Get features & lookup displacements 2. Vote for center location Test image
Application of Hough Transforms
Detecting shape features F. Jurie and C. Schmid, Scale-invariant shape features for recognition of object categories, CVPR 2004
Original images Hough-like circles Laplacian circles Which feature detector is more consistent?
Robustness to scale and clutter
Object detection Index displacements by “visual codeword” visual codeword with displacement vectors training image B. Leibe, A. Leonardis, and B. Schiele, Combined Object Categorization and Segmentation with an Implicit Shape Model, ECCV Workshop on Statistical Learning in Computer Vision 2004
Train phase 1. get features
Train phase 2. store displacements
Test phase
The Hough transform … Deals with occlusion well? Detects multiple instances? Robust to noise? Good computational complexity? Easy to set parameters?
Recommend
More recommend