A
A
AlexVedmak2014-05-31 19:36:30
C++ / C#
AlexVedmak, 2014-05-31 19:36:30

OpenCV: how to draw borders of flat objects?

Hello. In general, there is a task: imposing lines on the video stream that define the boundaries of flat surfaces. I think that first you need to select the boundaries of all objects using the cvCanny () function, then find the contours with cvFindContours (), and then perform some kind of post-processing. My variant: present the contours as a tree of their nesting. If I find many internal ones inside the outer contour, then this is not a flat object, and we do nothing with this contour. Otherwise, we draw on the picture. Any better ideas? And if not, how can I implement mine?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2014-06-01
Protko @Fesor

What you describe is already in cvFindContours (I don't remember exactly what it's called). That is, it will build a hierarchy of contours for you.
In general, for the sake of completeness, it would be nice to see an example image.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question