Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Get quadrilateral from sparse segments

I have a set of segments (each segment is in a std::vector of 2 cv::Point) and if I print them in a image they're arranged in this way:

image description

Most of them are in the two pseudo-parallel lines, other segments are noise. What I want to do is detect the two main lines and build the matching quadrilateral like this:

image description

What is the best approach to solve this problem?

Thanks!

Get quadrilateral from sparse segments

I have a set of segments (each segment is in a std::vector of 2 cv::Point) and if I print them in a image they're arranged in this way:

image description

Most of them are in the two pseudo-parallel lines, other segments are noise. What I want to do is detect the two main lines and build the matching quadrilateral like this:

image description

What is the best approach to solve this problem?

Thanks!