Tek
Tek

Reputation: 17

How to detect many very dense long lines with opencv python

I am trying to detect all the very long lines in an image, which also lie very close and dense to each other, as depicted in the attached image.

I tried HoughLinesP and HoughLines with simple lines of code of Python OpenCV, but I can not find a good solution.

Thanks.

enter image description here

I tried HoughLinesP and HoughLines with several lines of code of Python OpenCV.

I was expecting detected lines, but they don't really work for me, I found parts of the lines but not the whole lines.

Upvotes: 0

Views: 223

Answers (1)

Tek
Tek

Reputation: 17

solved.

get a column at beginning, find contours, get mid points of contours get a column at end, find contours, get mid points of contours

connect each pair of points.

enter image description here

Upvotes: 0

Related Questions