1 / 8

Hough Transform

Hough Transform. Given marked edge pixels, find examples of specific shapes Line segments Circles Generalized shapes (GHT) Basic idea - Patented 1962 Every edge pixel is a point that votes for all shapes that pass through it. Votes are collected in “parameter space” - look for peaks

caesar
Download Presentation

Hough Transform

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 • Given marked edge pixels, find examples of specific shapes • Line segments • Circles • Generalized shapes (GHT) • Basic idea - Patented 1962 • Every edge pixel is a point that votes for all shapes that pass through it. • Votes are collected in “parameter space” - look for peaks • “Parameter space” is a k-dimensional histogram!

  2. Hough Transform for Lines • Parameter space: • Ax+By+C = 0 (But A,B, C aren’t unique!) • Divide by sqrt(A*A+B*B); first two terms are sin,cos of the angle • Angle, distance from 0 • Angle = arctan(A/B), distance = C/(A*A+B*B) • Given a point (x0,y0), find all theta, distance pairs • cos(theta)*x0 + sin(theta)*y0 + distance = 0 • If theta is known (e.g. from Sobel detector), only 1 distance needs to be calculated, otherwise calculate a distance for each theta

  3. Hough Transform for Lines (cont.) • Increment all “cells” in p-space through which curve passes

  4. Hough Transform Example: Line Detecton Image (enlarged) Hough P-Space

  5. Alternative Parametrization for Lines • Number border pixels of the image • For each line segment, store the two border pixels where the (extended) line enters / exits the image • Why? • Values are integers in a fixed range • No trigonometry is needed to find all lines passing through a point

  6. Hough Transform for Circles • Parameter space is (centerx, centery, radius) • Update: • For every point, computer center, radius of all circles passing through the point • Mark each center, radius pair • Alternative computation: for each cell, compute distance from that cell to point - increment if close enough.

  7. GHT: Generalized Hough Transform • Parameters are translation, rotation & scale of a fixed 2D shape,represented as a point set • Given a point and a location in the transform space, if the point is in (or close enough to a point in) the transformed point set, then record a vote.

  8. Hough Transform Issues • Space usage • Need large arrays for accurate results! • More complex objects need more parameters (fast!) • Peak detection • Large spaces take long to search - threshold unreliable • “Accidental peaks” are not unusual • Noise causes “cluster” rather than “peak” - may need to use cluster detection (remember K-means?) • Easily parallelizable!!

More Related