Hi,
is there are smart way to find and eliminate parallel line segments in opencv. I found some line segments using the LineSegmentDetector (LSD) of opencv. I get some results like this:
Now I want to merge these single segments into one or two segments like e.g. here (marked in red):
I have the angle, start- and endpoint and length of my linesegment. Is there are smart way to do it without iterating through all the line segments and comparing the slope and intercept of?
The linesegments are stored in a vector<Vec4f>
.