Ask Your Question

troubles with Ellipse2Poly

asked 2017-08-23 11:52:09 -0500

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!

edit retag flag offensive close merge delete



your code runs normally. check configuration of your compiler

sturkmen gravatar imagesturkmen ( 2017-08-23 12:16:20 -0500 )edit

please check, if you're accidentally mixing opencv debug libs with release build (or the other way)

(problem might not be your code, but your project)

berak gravatar imageberak ( 2017-08-23 12:25:38 -0500 )edit

@hamburgeraubacon did you solved your problem?

sturkmen gravatar imagesturkmen ( 2017-08-24 07:27:45 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-09-04 02:45:49 -0500

Hi there! Yes, that was the solution, I was running a debug mode with the release build of OpenCV. Thanks!

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-08-23 11:52:09 -0500

Seen: 96 times

Last updated: Aug 23 '17