I am having problems with the cv::BFMatcher when I try to perform the feature matching. I compute the descriptors with the xfeatures2D::SIFT descriptor. When I try to perform the matching the application output shows "Exception at 0x7ff833308b9c, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) at f:\dd\vctools\crt_bld\self_64_amd64\crt\src\xthrow.cpp:13" The code is something like:
matchesltor.clear();
matchesrtol.clear();
cv::BFMatcher matcher(cv::NORM_L2);
ProcessedImageData *imageDataLeft = mImageDataMap.value(mapKeyList.at(m));
std::vector<cv::KeyPoint> tiePointsLeft = imageDataLeft->getTiepoints();
cv::Mat descriptorsLeft= imageDataLeft->getDescriptors();
ProcessedImageData *imageDataRight = mImageDataMap.value(mapKeyList.at(n));
std::vector<cv::KeyPoint> tiePointsRight = imageDataRight->getTiepoints();
cv::Mat descriptorsRight= imageDataRight->getDescriptors();
matcher.knnMatch(descriptorsLeft,descriptorsRight,matchesltor,2)
matcher.knnMatch(descriptorsRight,descriptorsLeft,matchesrtol,2)
The strange thing is that it work in a single qt project that only perform the tie point detection, tie point description and matching but when I try to join it in other project (same code, same compiler and same qt version) it shows that output message and the execution stop (the application does not break).
Thanks for your help.