Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

void approxPolyDP(const Mat& curve, vector<point>& approxCurve, double epsilon, bool closed) function closes after 1st iteration.

I am trying to find out shapes using contours, by using the above mentioned function. I am running the simple example given in the OpnCv Documentation - Create Bounding rectangle example

I tried running this code with OpenCv 2.4.4 build for C++. Strangely, for approximation of polygons. This code crashes after 1st iteration itself.

But, when i use the C implementation of the same - CvSeq* cvApproxPoly(const void* src_seq, int header_size, CvMemStorage* storage, int method, double eps, int recursive=0 ). The code works absolutely fine. Please guide me.