Professional Documents
Culture Documents
Hough Transform
1 of 40
Partial shape matching can also be viewed as detecting arbitrary shapes Hough transform is a method for estimating the parameters of a shape from its boundary points The idea can be generalized to estimate parameters of arbitrary shapes
Hough Transform
2 of 40
Outline
Hough Transform for Analytical Shapes Voting in Parameter Space Using Directional Information Error Compensation: Smoothing
Hough Transform
3 of 40
Outline
Hough Transform for Analytical Shapes Voting in Parameter Space Using Directional Information Error Compensation: Smoothing
Hough Transform
4 of 40
Straight line
Normal parameterization: x cos + y sin = Points in picture sinusoids in parameter space Points in parameter space lines in picture Sinusoids corresponding to co-linear points intersect at an unique point
[2]
Example Line: 0.6x + 0.4y = 2.4 Sinusoids intersect at: = 2.4, = 0.9273
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 5 of 40
Straight line
Normal parameterization: x cos + y sin = Points in picture sinusoids in parameter space Points in parameter space lines in picture Sinusoids corresponding to co-linear points intersect at an unique point
[2]
Example Line: 0.6x + 0.4y = 2.4 Sinusoids intersect at: = 2.4, = 0.9273
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 6 of 40
Straight line
Normal parameterization: x cos + y sin = Points in picture sinusoids in parameter space Points in parameter space lines in picture Sinusoids corresponding to co-linear points intersect at an unique point
[2]
Example Line: 0.6x + 0.4y = 2.4 Sinusoids intersect at: = 2.4, = 0.9273
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 7 of 40
Straight line
Normal parameterization: x cos + y sin = Points in picture sinusoids in parameter space Points in parameter space lines in picture Sinusoids corresponding to co-linear points intersect at an unique point Example Line: 0.6x + 0.4y = 2.4 Sinusoids intersect at: = 2.4, = 0.9273
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 8 of 40
Outline
Hough Transform for Analytical Shapes Voting in Parameter Space Using Directional Information Error Compensation: Smoothing
Hough Transform
9 of 40
Same general idea applies to other analytical shapes O(nd1 ) computation, instead of O(n2 ) Can we do better?
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 13 of 40
Same general idea applies to other analytical shapes O(nd1 ) computation, instead of O(n2 ) Can we do better?
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 14 of 40
Same general idea applies to other analytical shapes O(nd1 ) computation, instead of O(n2 ) Can we do better?
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 15 of 40
Same general idea applies to other analytical shapes O(nd1 ) computation, instead of O(n2 ) Can we do better?
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 16 of 40
Same general idea applies to other analytical shapes O(nd1 ) computation, instead of O(n2 ) Can we do better?
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 17 of 40
Same general idea applies to other analytical shapes O(nd1 ) computation, instead of O(n2 ) Can we do better?
CS658: Seminar on Shape Analysis and Retrieval Hough Transform 18 of 40
Outline
Hough Transform for Analytical Shapes Voting in Parameter Space Using Directional Information Error Compensation: Smoothing
Hough Transform
19 of 40
p = (a, b, r ),
=0
= tan (x)
Hough Transform
20 of 40
p = (a, b, r ),
=0
= tan (x)
Hough Transform
21 of 40
p = (a, b, r ),
=0
= tan (x)
Hough Transform
22 of 40
p = (a, b, r ),
=0
= tan (x)
Hough Transform
23 of 40
p = (a, b, r ),
=0
= tan (x)
Hough Transform
24 of 40
Outline
Hough Transform for Analytical Shapes Voting in Parameter Space Using Directional Information Error Compensation: Smoothing
Hough Transform
25 of 40
Errors can cause A(p ) to be incremented, where p is close to the actual parameter p Compensate for the uncertainty of measurement in parameter space Smooth the accumulator by incrementing counts of nearby cells accroding to some point-spread function h Equivalent to convolving A h
Hough Transform
26 of 40
Errors can cause A(p ) to be incremented, where p is close to the actual parameter p Compensate for the uncertainty of measurement in parameter space Smooth the accumulator by incrementing counts of nearby cells accroding to some point-spread function h Equivalent to convolving A h
[1]
Hough Transform
27 of 40
Errors can cause A(p ) to be incremented, where p is close to the actual parameter p Compensate for the uncertainty of measurement in parameter space Smooth the accumulator by incrementing counts of nearby cells accroding to some point-spread function h Equivalent to convolving A h
[1]
Hough Transform
28 of 40
Errors can cause A(p ) to be incremented, where p is close to the actual parameter p Compensate for the uncertainty of measurement in parameter space Smooth the accumulator by incrementing counts of nearby cells accroding to some point-spread function h Equivalent to convolving A h
[1]
Hough Transform
29 of 40
Outline
Hough Transform for Analytical Shapes Voting in Parameter Space Using Directional Information Error Compensation: Smoothing
Hough Transform
30 of 40
The R-table
Any shape is specied by the set of boundary points B = {xB } For a shape, dene p as: p = {x0 , s, } For each xB , compute r = x0 xB , and store as function of For each edge pixel x (with gradient direction (x)) in an image, obtain r from the table and update A(x + r)
i 0 1 2 ... i 0 2 ... Ri {r|x0 r = xB , xB B, (xB ) = 0} {r|x0 r = xB , xB B, (xB ) = } {r|x0 r = xB , xB B, (xB ) = 2} ...
Hough Transform
31 of 40
The R-table
Any shape is specied by the set of boundary points B = {xB } For a shape, dene p as: p = {x0 , s, } For each xB , compute r = x0 xB , and store as function of For each edge pixel x (with gradient direction (x)) in an image, obtain r from the table and update A(x + r)
i 0 1 2 ... i 0 2 ... Ri {r|x0 r = xB , xB B, (xB ) = 0} {r|x0 r = xB , xB B, (xB ) = } {r|x0 r = xB , xB B, (xB ) = 2} ...
Hough Transform
32 of 40
The R-table
Any shape is specied by the set of boundary points B = {xB } For a shape, dene p as: p = {x0 , s, } For each xB , compute r = x0 xB , and store as function of For each edge pixel x (with gradient direction (x)) in an image, obtain r from the table and update A(x + r)
i 0 1 2 ... i 0 2 ... Ri {r|x0 r = xB , xB B, (xB ) = 0} {r|x0 r = xB , xB B, (xB ) = } {r|x0 r = xB , xB B, (xB ) = 2} ...
Hough Transform
33 of 40
The R-table
Any shape is specied by the set of boundary points B = {xB } For a shape, dene p as: p = {x0 , s, } For each xB , compute r = x0 xB , and store as function of For each edge pixel x (with gradient direction (x)) in an image, obtain r from the table and update A(x + r)
i 0 1 2 ... i 0 2 ... Ri {r|x0 r = xB , xB B, (xB ) = 0} {r|x0 r = xB , xB B, (xB ) = } {r|x0 r = xB , xB B, (xB ) = 2} ...
Hough Transform
34 of 40
Hough Transform
35 of 40
Let a shape S have two subparts S1 and S2 with respective reference points x0 , x0 , and x0 1 2 Compute r1 = x0 x0 and r2 = x0 x0 1 2 R-table for composite shape: Rs () = [Rs1 () + r1 ][Rs2 () + r2 ]
Hough Transform
36 of 40
Let a shape S have two subparts S1 and S2 with respective reference points x0 , x0 , and x0 1 2 Compute r1 = x0 x0 and r2 = x0 x0 1 2 R-table for composite shape: Rs () = [Rs1 () + r1 ][Rs2 () + r2 ]
Hough Transform
37 of 40
Let a shape S have two subparts S1 and S2 with respective reference points x0 , x0 , and x0 1 2 Compute r1 = x0 x0 and r2 = x0 x0 1 2 R-table for composite shape: Rs () = [Rs1 () + r1 ][Rs2 () + r2 ]
Hough Transform
38 of 40
Incrementation Strategies
Increment the accumulator by a value depending on the gradient: A(p) = A(p) + g ( x) Increment by larger values if neighbouring points are incrementing the same reference point Try to nd progressively longer connected segments using dynamic programming Weigh dierent parts of a composite object dierently
Hough Transform
39 of 40
References
D. H. Ballard Generalizing the Hough Transform to Detect Arbitrary Shapes Pattern Recognition, 13(2):111-122, 1981. R. O. Duda and P. E. Hart Use of the Hough Transformation to Detect Lines and Curves in Pictures Communications of Association for Computing Machinery, 15(1):11-15, 1972.
Hough Transform
40 of 40