Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

feature 2d: Feature Matching fails with assert (stat.cpp)

Hello,

I have tried to use all combinations of feature detectors, extractors and matchers. I have found that certain combinations are not allowed. These are detected and an exception thrown during runt-time. However certain combinations generate this error:

OpenCV Error: Assertion failed ((type == CV_8U && dtype == CV_32S) || dtype == CV_32F) in batchDistance, file /home/hugof/projects/recommender/opencv2.4/opencv-2.4.4/modules/core/src/stat.cpp, line 1810 terminate called after throwing an instance of 'cv::Exception' what(): /home/hugof/projects/recommender/opencv2.4/opencv-2.4.4/modules/core/src/stat.cpp:1810: error: (-215) (type == CV_8U && dtype == CV_32S) || dtype == CV_32F in function batchDistance

Of the total 1650 combinations, 169 fail with this exception (other exceptions occur in with other combinations also). My question is: is this solvable? If so, how may I solve it? (Images are loaded and converted to grey scale 8UC3).

I can make the source code available (test images are in the examples, matching_to_many_images/query.png and train*.png) but basically I copied an example in the tutorials. As an example I show some combinations that fail (see end of message, -d descriptor type, -e extractor, -m for the matcher). I can also send a text file with all 169 combinations.

Appreciate any help.

TIA, Hugo F.

option -d : GridSURF option -e : SURF option -m : BruteForce-Hamming(2)

option -d : GridSURF option -e : SURF option -m : BruteForce-Hamming

option -d : GridSURF option -e : OpponentSURF option -m : BruteForce-Hamming(2)