Ask Your Question

Revision history [back]

The vocabulary that is computed using the cluster() function in BOWKMeansTrainer is of type CV_32FC1. The descriptors of the image against which to match the vocabulary is of type CV_8UC1, when computed using non-sift and non-surf descriptor extractors. One gets this error ""OpenCV Error: Assertion failed (queryDescriptors.type() == trainDescCollection[0].type()) in knnMatchImpl, file /Users/jamescharters/Downloads/opencv-2.4.6.1/modules/features2d/src/matchers.cpp, line 351"" when one tries to match a descriptors of different types .

The vocabulary that is computed using the cluster() function in BOWKMeansTrainer is of type CV_32FC1. The descriptors of the image against which to match the vocabulary is of type CV_8UC1, when computed using non-sift and non-surf descriptor extractors. One gets this error ""OpenCV Error: Assertion failed (queryDescriptors.type() == trainDescCollection[0].type()) in knnMatchImpl, file /Users/jamescharters/Downloads/opencv-2.4.6.1/modules/features2d/src/matchers.cpp, line 351"" when one tries to match a descriptors of different types .