Hough Transform on the GPU Presented by Javier
Hough Transform on the GPU Presented by Javier Garcia November 29, 2010
Why Hough transform? �Sound wave problem ◦ Too complex �Image processing ◦ 2 for 1
What is it? �Feature extraction technique �Used to detect lines (or other curves) in images
How does it work? �It finds curves in images using a voting technique �The voting takes place in a parameter space or Hough space �Object (curve) candidates are obtained as local maxima
Original algorithm �Used slope intercept form for lines ◦ y = ax + b ◦ b = -xa + y �Slope of vertical lines could be a problem �Quantize parameter space (a, b): P[amin, . . . , amax][bmin, . . . , bmax] (accumulator array) �For each edge point (x, y) For(a = amin; a ≤ amax; a++) { b = − xa + y; P[a][b]++; }
Original algorithm (cont’d) �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 �Hough transformation in slopeintercept form: http: //www. rob. cs. tu-bs. de/content/04 teaching/06 -interactive/Hough. html
Generalized algorithm �Use polar coordinates for line: ρ = x cos θ + y sin θ �Quantize parameter space (ρ, θ): P[ρmin, . . . , ρmax][θmin, . . . , θmax] (accumulator array) �For each edge point (x, y) For(θ = θmin; θ ≤ θmax; θ ++) { ρ = xcos(θ) + ysin(θ) ; P[ρ][θ]++; }
Generalized algorithm (cont’d) �Find local maxima in P[ρ][θ] �Using generalized algorithm, any curve can be extracted as long as it can be described by an equation analytically ◦ The equation for a circle is: r 2 = (x - x 0)2 + (y - y 0)2 �Accumulator dimensions are equal to the unknown parameters �Hough transformation in normal form: http: //www. rob. cs. tu-bs. de/content/04 teaching/06 -interactive/HNF. html
Quantization
My approach �Implement the generalized Hough transform on the CPU and GPU �Use both versions to extract lines from images �Vary quantization ◦ Finer should give better results but increases space and time requirements ◦ Coarser is better for noise tolerance �Finally, extract curves other than lines (time permitting)
Expected results �I expect the GPU version to perform faster than the CPU version (of course) �Fine quantization should be slower than coarse �I will be presenting the execution times with the varied parameters for the final
Questions?
- Slides: 12