Ask Your Question

cmakthat's profile - activity

2016-06-03 22:51:29 -0500 asked a question 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?