0

I've got a script that uses the Canny method and probabilistic Hough transform to identify line segments in an image.

I need to be able to filter out all line segments that are NOT connected to a specific pixel. How would one tackle this problem?

tpubbsGIS
  • 367
  • 2
  • 4
  • 11
  • One basic approach would be to draw each line on a blank image as white and in each line image check to see if that pixel location is white---if it's not, then discard. A better method would depend on the specifics. Is this an intersection point of multiple lines? – alkasm Jul 18 '17 at 01:37

1 Answers1

0

The result of Hough Line transform is an array of (rho,theta) parameter pairs. The equation of the line represented by the pair is

y + x/tan(theta) + rho/sin(theta) = 0

You can check whether the (x, y) coordinates of the point satisfy this condition, to find lines that pass throught the point (practically, use a small value instead of 0).

Totoro
  • 3,398
  • 1
  • 24
  • 39