how to use SIFT features for bag of words in opencv?

风格不统一 提交于 2019-12-04 09:45:45

Training a bag of words system goes as follows:

  1. Compute the features for each image of the training set
  2. Cluster those features
  3. Label each cluster with the images that have features in that cluster

At this point the training is done and you can start with the testing as follows:

  1. Compute the features of the test image
  2. For each feature, find the nearest cluster
  3. Add a tick for each training image that belong to this cluster
  4. Repeat for all features of the test image
  5. The image that has the highest number of ticks is the best match and the image with the second highest number of ticks is the second best match and so on

As you can notice, there is no restriction to using SIFT. You can try different feature extractors and descriptors.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!