Ask Your Question
1

Detect crossing lines at a single point

asked 2018-02-13 21:31:40 -0500

I am currently stuck trying to detect where lines intersect on a grid containing non-straight lines.

My goal is to determine a single point or pixel at the intersection of two lines, for all lines on the "grid", which could then be related to a distance. An example of a grid:

image description

I work in Python... Any help or ideas in the right direction would be greatly appreciated.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2018-02-14 04:44:09 -0500

My guess

  • OTSU thresholding for pure BW image
  • Binary inversion to have white pixels for your edges
  • Then a small dilation to connect everything followed by thinning to find single pixel edges
  • Finally a harris corner detection

My guess is the corner detector will have a much higher result at the intersections than along the lines.

edit flag offensive delete link more
0

answered 2018-02-14 05:07:06 -0500

VxW gravatar image

Hi,

try out different filters for preprocessing.

result of median filter image description

or result of variance filter: image description

based on these images you should be able to detect the peak points (maybe apply first a distance map)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-02-13 21:31:40 -0500

Seen: 1,556 times

Last updated: Feb 14 '18