C++/OpenCV - How to index pictures for image retrieval? (and find the best image) -
i use bow flann in order index pictures inside database.(for cbir project)
what did :
- loop on ma database in order compute descriptors of each pictures.
- clustering descriptors using k-mean
- extraction of bowdescriptors (visual words) in order have big histogram features
- use flann index compute index in each pictures
code:
// create flann lsh index cv::flann::index flannindex(this->descdescriptorbow, cv::flann::lshindexparams(12, 20, 2), cvflann::flann_dist_hamming); cv::mat results, dists; int k=2; // find 2 nearest neighbors // search (nearest neighbor) flannindex.knnsearch(responsehist, results, dists, k, cv::flann::searchparams() );
descriptorbow contains bowfeatures of database. responsehist constains bowfeature of picture want eval.
now, have in order see best matching picture ?
can me ?
Comments
Post a Comment