R
R
ruboss2015-09-09 22:04:01
Haskell
ruboss, 2015-09-09 22:04:01

How to get lsh with ORB descriptors?

Hello! I will be very grateful for comments and answers
. Opencv started to learn recently. Sorry if this is a noob question:
How can I get a list of hashes from matchera that I've thrown ORB descriptors into?
Here is the code, I'm interested in the lines:
//matcher_->getListOfLsh();
//Can I somehow get the 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);  // по идее тут уже должны появиться индексы в виде хешей
  
  //matcher_->getListOfLsh();   что-то на подобие
  //Могу я как-то получить список хешей "qgdlfospahsy24sa6nhss65s7hns7" для ORB дескрипторов?

   
    cv::waitKey(0);

    return 0;
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Skusnov, 2019-04-05
@dsherbakov

it is possible like this:

simplifyExpr (Not (Not p)) = simplifyExpr p -- рекурсивный вызов
-- другие шаблоны

-- конец рекурсии
simplifyExpr p = p

-- проверка
>simplifyExpr (Not (Not (Var "abc")))
Var "abc"

V
Vladimir, 2015-09-10
@noonv

use case - Feature Matching with FLANN
Performing a comparison between two sets of points:
And the "hashes" will have to be received by the DescriptorExtractor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question