[英]c++ Bag Of Words Clustered Array Size Issue
我正在嘗試使用ORB
作為detector
和與BruteForce
matcher
extractor
來創建一個BruteForce
Of Bag程序。
一切運行正常。
但是我擔心的是,當我嘗試對描述符數組進行聚類時,
[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();
最上面一行,當保留其原始大小時,所有圖像的所有描述符的Array均為[32 x 6969]
。
在最底行,將它們聚簇后,陣列顯示為[32 x 1]
我完成的只是一張圖片,它仍然從[32 x 458]
變為[32 x 1]
這是正確的嗎? 在過去的2-3周中,我幾乎一直在自學c ++和OpenCV,所以如果這很正常,我深表歉意。
在您的情況下,似乎32既是ORB
特征尺寸又是dictionary size
。 因此,如果您的特征尺寸為64,字典尺寸為16,則您會看到[64 x 458]
至[16 x 1]
。
請看看這個 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.