1
词袋我试图创建一个包使用ORB
作为我detector
和extractor
与BruteForce
为matcher
字的程序。C++成簇阵列大小问题
一切正常。
但我担心的是,当我尝试群集我的描述符的阵列,它
[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,所以我很抱歉,如果这是正常的。
谢谢你的链接,非常有帮助。 – MLMLTL 2014-10-30 14:39:24