【发布时间】:2014-10-30 16:46:14
【问题描述】:
我正在尝试使用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,所以如果这是正常的,我深表歉意。
【问题讨论】: