Ask Your Question

Revision history [back]

troubles with Ellipse2Poly

Hi everybody!

I'm new to OpenCV and I'm encountering a strange trouble with the ellipse2Poly function.

Let's take this sample of code:

std::vector<cv::Point2d>allPoints ;

cv::ellipse(mat, cv::Point2d(150,150), cv::Size2d(15,15), 0, 0, 360, cv::Scalar(0,255,0), 1);
cv::ellipse2Poly(cv::Point2d(150,150), cv::Size2d(15,15), 0, 0, 360, 1, allPoints);

cv::ellipse will draw the ellipse without any problem, but cv::ellipse2Poly crashes the app. The vector allPoints has a size of 18446744073685462794 after executing the function.

It's the same behaviour with the 2 overloaded functions.

Do you have any idea of the problem? I run OpenCV 3.2 on Windows7 64bits, in a Qt5 application.

Thanks in advance!