Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

approxPolyDP force number of vertice and get heuristic

Hi,

I would like to use approxPolyDP to recognition rectangle. I use normal documentation (see DOC ) for input parameter, here : my input is a contours of my shape. In easy cases that works fine and I have my 4 points of my rectangle.

But I would like set epsilon parameter in order to have alway 4 points (Infact I don't understand how to set epsilon for my case of rectangle recognition). For exemple if epsilon is too minimal there are more than 4 points, but is not clear if that depend of number of contour or others thing.

In addition I would like to know if they have a method to get a heuristic of probability to dertermine if my contour of shape is a rectangle.

Thx, Christophe