jjzjj

BOWImgDescriptorExtractor

全部标签

C++/OpenCV : How to use BOWImgDescriptorExtractor to determine which clusters relate to which images in the vocabulary?

我的目标是将图像作为查询并在图像库中找到最匹配的图像。我在openCV3.0.0中使用SURF功能和BagofWords方法来查找匹配项。我需要一种方法来确定查询图像是否在库中有匹配项。如果是,我想知道最接近匹配的图像的索引。这是我读取所有图像(图像库中总共300张)并提取和聚类特征的代码:Mattraining_descriptors(1,extractor->descriptorSize(),extractor->descriptorType());//readinallimagesandsettobinarycharfilepath[1000];for(inti=1;idetec