Ask Your Question

Revision history [back]

How can i get LSH from ORB descriptors?

I will very thank for your comments and answers I am newbie in Opencv

Please, tell me, how can i get list of hashes from matcher?

My code and interesting rows:


//Get list of hashes "qgdlfospahs....

int main(int argc, char** argv)

cv::Mat img1 = cv::imread("categories2.jpg", CV_LOAD_IMAGE_GRAYSCALE);//CV_LOAD_IMAGE_GRAYSCALE

cv::Ptr<cv::FeatureDetector> detector = ORB::create();
cv::Ptr<cv::DescriptorExtractor> descriptor = ORB::create();

std::vector<cv::KeyPoint> keypoints1;
detector->detect(img1, keypoints1);
std::cout«"find "«keypoints1.size()«" keypoints in img1"«std::endl;

cv::Mat descriptors1;
descriptor->compute(img1, keypoints1, descriptors1);

cv::Ptr<cv::DescriptorMatcher> matcher_;
matcher_ = new cv::FlannBasedMatcher(new cv::flann::LshIndexParams(5, 24, 2));

matcher_->add(descriptors1); // i think that here matcher generate hash indexes

//matcher_->getListOfLsh(); i need something like this 
//Get list of hashes "qgdlfospahsy24sa6nhss65s7hns7" for ORB descriptors?


return 0;