1 / 23

Hough Transform (Section 10.2)

Hough Transform (Section 10.2). CS474/67. Edge Linking and Boundary Detection. Edge detection does not yield connected boundaries. Edge linking and boundary following must be applied after edge detection. thresholded gradient magnitude. gradient magnitude. Local Processing Methods.

gzifa
Download Presentation

Hough Transform (Section 10.2)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hough Transform (Section 10.2) CS474/67

  2. Edge Linking and Boundary Detection • Edge detection does not yield connected boundaries. • Edge linking and boundary following must be applied after edge detection. thresholded gradient magnitude gradient magnitude

  3. Local Processing Methods • At each pixel, a neighborhood (e.g., 3x3) is examined. • Pixels which are similar in this neighborhood are linked. • How do we define similarity ?

  4. Local Processing Methods (cont’d) Gx - Sobel Gy - Sobel linking results T=25, A=15

  5. Global Processing Methods • If gaps are very large, local processing methods are not effective. • Model-based approaches can be used in this case! • Hough Transform can be used to determine whether points lie on a curve of a specified shape.

  6. Hough Transform – Line Detection • Consider the slope-intercept equation of line • Rewrite the equation as follows (a, b are constants, x is a variable, y is a function of x) (now, x, y are constants, a is a variable, b is a function of a)

  7. Hough Transform – Line Detection (cont’d) x-y space slope-intercept space

  8. Properties in slope-intercept space • Each point (xi, yi) defines a line in the a − b space (parameter space). • Points lying on the same line in the x − y space, define lines in the parameter space which all intersect at the same point. • The coordinates of the point of intersection define the parameters of the line in the x − y space.

  9. Algorithm 1. Quantize parameter space (a,b): P[amin, . . . , amax][bmin, . . . , bmax] (accumulator array) amax

  10. Algorithm (cont’d) 2. For each edge point (x, y) For(a = amin; a ≤ amax; a++) { b = − xa + y; /* round off if needed * (P[a][b])++; /* voting */ } 3. Find local maxima in P[a][b] if P[a j][bk]=M, then M points lie on the line y = a j x + bk

  11. Effects of Quantization • The parameters of a line can be estimated more accurately using a finer quantization of the parameter space. • Finer quantization increases space and time requirements. • For noise tolerance, however, a coarser quantization is better. amax

  12. Effects of Quantization (cont’d)

  13. Problems with slope-intercept equation • The slope can become very large or even infinity! • e.g., for vertical or close to vertical lines • Suppose (x1,y1) and (x2,y2) lie on the line: • It will be impossible to quantize such a large space! slope:

  14. Polar Representation of Lines (no problem with vertical lines, i.e., θ =90) ρ−θ space

  15. Properties in ρ−θ space • Each point (xi, yi) defines a sinusoidal curve in the ρ −θ space (parameter space). • Points lying on the same line in the x − y space, define lines in the parameter space which all intersect at the same point. • The coordinates of the point of intersection define the parameters of the line in the x − y space.

  16. Properties in ρ−θ space (cont’d) D: max distance ρ=√2D -ρ=-√2D

  17. Example long vertical lines

  18. Algorithm 1. Quantize the parameter space (ρ,θ) P[ρmin, . . . , ρmax][θmin, . . . ,θmax] (accumulator array)

  19. Algorithm (cont’d) 2. For each edge point (x, y) For(θ = θmin;θ ≤ θmax;θ ++) { ρ = xcos(θ) + ysin(θ) ; /* round off if needed * (P[ρ][θ])++; /* voting */ } 3. Find local maxima in P[ρ][θ]

  20. Example Richard Duda and Peter Hart “Use of the Hough Transformation to Detect Lines and Curves in Pictures” Communications of the ACM Volume 15 ,  Issue 1  (January 1972) Pages: 11 – 15

  21. Example (cont’d)

  22. Extending Hough Transform • Hough transform can also be used for detecting circles, ellipses, etc. • For example, the equation of circle is: • In this case, there are three parameters: (x0, y0), r

  23. Extending Hough Transform (cont’d) • In general, we can use hough transform to detect any curve which can be described analytically by an equation of the form: • Detecting arbitrary shapes, with no analytical description, is also possible (i.e., Generalized Hough Transform)

More Related