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?