我正在尝试创建一个单词包程序,使用ORB作为我的detector和extractor与BruteForce的matcher。
一切都很好。
但我担心的是,当我试图将我的描述符数组聚在一起时,它会从
[32 x several thousand odd]
至
[32 x 1]
我也不太明白32是从哪里来的,这些程序目前只读取14张图片。
代码:
cout << " -- All Other Images Features Array Size: " << allImgFeaturesUnclustered.size();
BOWKMeansTrainer allImgBowTrainer(dictionarySize, termCrit, retries, flags);
Mat allImgDictionary = allImgBowTrainer.cluster(allImgFeaturesUnclustered);
BOWImgDescriptorExtractor allImgBowImgDesExtr(extractor,matcher);
allImgBowImgDesExtr.setVocabulary(allImgDictionary);
cout << " -- All Images Dictionary Size: " << allImgDictionary.size();在最上面的一行中,当将数组保留到它们的全部原始大小时,数组将作为所有图像中所有描述符的[32 x 6969]。
在底线上,在它们被聚集后,数组将以[32 x 1]的形式出现
我做了,这只是一张图片,它仍然从[32 x 458]到[32 x 1]
是这样的吗?在过去的2-3周里,我一直在教自己c++和OpenCV,所以如果这是正常的话,我很抱歉。
发布于 2014-10-30 08:46:14
在您的例子中,32似乎都是ORB和dictionary size的特性大小。因此,如果您的功能大小为64,字典大小为16,那么您将看到[64 x 458]到[16 x 1]。
请看一下this。
https://stackoverflow.com/questions/26634488
复制相似问题