【问题标题】:c++ Bag Of Words Clustered Array Size Issuec++ 词袋聚集数组大小问题
【发布时间】:2014-10-30 16:46:14
【问题描述】:

我正在尝试使用ORB 作为我的detectorextractor 使用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,所以如果这是正常的,我深表歉意。

【问题讨论】:

    标签: c++ arrays opencv


    【解决方案1】:

    在您的情况下,似乎 32 是 ORBdictionary size 的特征大小。因此,如果您的特征大小为 64,字典大小为 16,那么您会看到 [64 x 458][16 x 1]

    请查看this

    【讨论】:

    • 感谢您提供的链接,非常有帮助。
    猜你喜欢
    • 2016-02-16
    • 1970-01-01
    • 2015-02-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-12
    • 1970-01-01
    • 2018-07-26
    相关资源
    最近更新 更多