OpenCV 3.1: cvflann::anyimpl::bad_any_cast
Hi there,
I have an iOS project running OpenCV 3.1. I have this bit of code that crashes ONLY in debug mode. If I run this exact same code but change Xcode to run the project in release mode, the crash does not occur and it works as expected.
vector< vector< cv::DMatch >> matches;
cv::FlannBasedMatcher matcher(new cv::flann::LshIndexParams(10, 10, 2));
matcher.knnMatch(descriptors, movingImage.descriptors, matches, 2);
The error that prints is: "libc++abi.dylib: terminating with uncaught exception of type cvflann::anyimpl::bad_any_cast"
My problem is very similar to these other issues mentioned here: http://answers.opencv.org/question/10... http://answers.opencv.org/question/50...
But neither of those solve my issue. Also, these issues were brought up almost 3 years ago and it seems like they should be fixed by now.
Any ideas?
I am moving from OpenCV 2.4 to OpenCV 3 and facing the same problem. I tried versions 3.1.0, 3.2.0, 3.3.0 with no luck. I tried ORB and AKAZE as features.
Does anyone know a solution?
Did you find a solution for this?