Ask Your Question
0

OpenCV 2.4.8.2 Assertion failed when cv::Mat::convertTo() but not in 2.4.8

asked 2014-08-04 04:38:19 -0500

thdrksdfthmn gravatar image

updated 2014-08-04 05:16:50 -0500

I have changed the tag of OpenCV from 2.4.8 to 2.4.8.2 and I have met a problem:

OpenCV Error: Assertion failed (m1.dims <= 2 && m1.size() == m2.size()) in getContinuousSize, file /home/me/opencv/build248/modules/core/precomp.hpp, line 139

This is happening when trying to convert a contour from cv::Point to cv::Point2f:

// contoursRet is a std::vector< std::vector< cv::Point > >
// and ptsVec1 is a std::vector< cv::Point2f >
cv::Mat(contoursRet[i]).convertTo(ptsVec1, cv::Mat(ptsVec1).type());

I had not the same problem in 2.4.8. I have changed back to 2.4.8 tag and tested the program again. The problem does not exist anymore...

I want to build 2.4.9 too for verification, it is long, I will update the question after, but is there the possibility to be a problem of 2.4.8.2?


EDIT:

I have tested 2.4.9 but it seems to work. No Assertion failure... What is the latest *.2? Why does it have that problem?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-08-04 11:31:27 -0500

boaz001 gravatar image
edit flag offensive delete link more

Comments

And it was removed for 2.4.9? 2.4.9 does not give me the assertion failed. Why have they added the lines of assertions and not used after? 2.4.8.2 is not a stable version?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2014-08-05 02:49:35 -0500 )edit
1

Here's why: bug 3319.

boaz001 gravatar imageboaz001 ( 2014-08-05 03:44:13 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-08-04 04:38:19 -0500

Seen: 130 times

Last updated: Aug 04 '14