Skip to content

Instantly share code, notes, and snippets.

@ravishchawla
Created October 7, 2015 12:23
Show Gist options
  • Save ravishchawla/6560c5b339cb9d237f61 to your computer and use it in GitHub Desktop.
Save ravishchawla/6560c5b339cb9d237f61 to your computer and use it in GitHub Desktop.

Hough Transform

  1. Create a grid of parameter values
  2. Each point votes for a set of parameters, incrementing those values in grid
  3. Find maximum or local maxima in grid

Good

  • Robust to outliers: each point votes separately
  • Fairly efficient (much faster than trying all sets of parameters)
  • Provides multiple good fits

Bad

  • Same sensitivity to noise
  • Bin size trades off between noise tolerance, precision, and speed/memory
    • Can be hard to find sweet spot
  • Not suitable for more than a few parameters
    • grid size grows exponentially

Common applications

  • Line fitting (also circles, ellipses, etc.)
  • Object instance recognition (parameters are affine transform)
  • Object category recognition (parameters are position/scale)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment