Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi,

I had same problem and when I change type of dictionary float to unsigned char it works.

cv::Mat floatdictonary; // floatDictionary = bowTrainer.cluster(floatFeaturesUnclustered);//you have convert features //unsigned char to float cv::Mat udictionary; floatdictionary.convertTo(udictonary,CV_8UC1); // bowDE->setVocabulary(udictonary); Mat bowDescriptor; std::vector<std::vector<int> > pointIdxOfClusters; bowDE.compute(img, keypoints, bowDescriptor,&pointIdxOfClusters);