Ask Your Question
0

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

asked 2013-07-19 00:58:15 -0600

utkarshmankad gravatar image

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.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-07-19 05:20:30 -0600

Ok two steps to do.

  1. Move to version 2.4.6 which contains tons of bugfixes already, could be that this was solved.
  2. If the error persists, then try to find out by debugging which line of code generates the error.

Once you know that report back, so we can have a look at it :)

edit flag offensive delete link more

Comments

1

I changed my version to 2.4.6 and the problem was solved . Thanks a lot :)

utkarshmankad gravatar imageutkarshmankad ( 2013-08-19 00:26:07 -0600 )edit

Question Tools

Stats

Asked: 2013-07-19 00:58:15 -0600

Seen: 620 times

Last updated: Jul 19 '13