ORB::detectAndCompute Debug Assertion Failed (5 code lines)
Hi All,
I am trying to implement a simple keypoint detector. When calling detectAndCompute it gives me Debug assertion fail error. I am on windows 10 + Opencv 3.0. Same code works in Android + Opencv 3.0
Pls help. Following is my code.
cv::Ptr<cv::Feature2D> keypointDetector = cv::ORB::create(750);
cv::Mat cvImage = cv::imread("a.jpg", CV_LOAD_IMAGE_GRAYSCALE);
std::vector<cv::KeyPoint> keypoints;
cv::Mat descriptors;
keypointDetector->detectAndCompute(cvImage, cv::noArray(), keypoints, descriptors); // fail here
please add exact error msg.
also, check
cvImage.empty()
after imread() (that's probably the cause)Thanks berak, I have checked. Image is ok.
Another thing is I am using Visual studio 2015 but using OpenCV3.0 precomplied libs of VC12. (OpenCV3.0\opencv\build\x86\vc12\lib) can it be the issue? Because AKAZE and ORB planar tracking opencv example gives me the same error http://docs.opencv.org/3.1.0/dc/d16/t...
.. you forgot the error msg ..
It's _BLOCK_TYPE_IS_VALID(pHead->nBlockUse) screen shot added to original message
ok. buffer overflow, UB.unfortunately, noone cares about 3.0 anymore, so the proper thing would be: update to 3.2 (or github master branch, even), try to replicate the situation, if it still crashes, file official bugreport.Thanks Berek, seems i should do this. NEW: When I run the exe outside visual studio no problem, do not know why
ohhh, missed it - ofc. you cannot use vs2015 with vc12 libs !
please use the vc14 ones (if they are there)