Bad contours detection

asked 2019-09-03 10:10:32 -0500

dev4all12358 gravatar image

Hello I use findContour to detect the contour of my shape. My shape is a simple square . The problem is the contour some times come from a corner then stop in the middle then go back the the previous corner and finally goes to the next corner. Is it a normal behavior of the function?

How can I avoid that ?

image description

On the left you can see the findContour function detect well the corner and the pixel between. On the right the behavior I previously explain.

edit retag flag offensive close merge delete

Comments

I have trouble understanding these images and the problem. Please add your input image and code

Witek gravatar imageWitek ( 2019-09-04 04:17:07 -0500 )edit