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