C++ ORB Feature Matching with FLANN Lsh Error
I am trying to match Orb features using FLANN matcher and LSH, and it gives me this error:
OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(4.1.0) Error: Unsupported format or combination of formats (> type=5 > ) in buildIndex_, file C:\opencv\source\opencv-4.1.0\modules\flann\src\miniflann.cpp, line 315
What is the reason for this?
Descriptors are already converted to CV_32F.
cv::FlannBasedMatcher matcher = cv::FlannBasedMatcher(cv::makePtr<cv::flann::LshIndexParams>(12, 20, 2));
std::vector< std::vector<cv::DMatch> > matches;
matcher.knnMatch(descriptors1, descriptors2, matches, 2 );
cv::FlannBasedMatcher matcher = cv::FlannBasedMatcher(cv::makePtr(12, 20, 2));
template args for
makePtr
are missing, can you take a look ?I accidentally deleted them when I copied the code. Now I added that here.
that looks wrong
When I delete that conversion, it works. But then it returns this: Process returned -1073741819 (0xC0000005)
at the ratio test.