Very similar pictures, but descriptors vary greatly [closed]

asked 2020-01-24 22:58:18 -0500

HelloWorld gravatar image

updated 2020-01-25 03:31:26 -0500

Image: https://drive.google.com/open?id=1NAf...

Code :

   int numberOfFeatures = 500;
   float scaleFactor = 1.2F;
   int nLevels = 8;
   int edgeThreshold = 31;
   Mat Q = imread("2.png", IMREAD_GRAYSCALE);
   scaleImage(Q);
   GaussianFilter(Q);
   Ptr<ORB> detector = ORB::create(numberOfFeatures, scaleFactor, nLevels,
        edgeThreshold);
   std::vector<cv::KeyPoint> keypoints;
   cv::Mat queryDescriptors;
   detector->detectAndCompute(Q, noArray(), keypoints, queryDescriptors);
  // search 
   Mat trainImage = imread("1.jpg",IMREAD_GRAYSCALE);
   detector->detectAndCompute(samples_32f, noArray(), keypoints,
            descriptor);
samples_32f = samples_32f.reshape(1, 1);
   index = makePtr<cv::flann::Index>(samples_32f,
        cv::flann::LshIndexParams(10, 10, 10), cvflann::FLANN_DIST_HAMMING);
   int K = 1;
cv::flann::SearchParams params;
cv::Mat dists;
cv::Mat indices;
index->knnSearch(queryDescriptors, indices, dists, K, params);
    cerr << "indices" << indices << endl;
cerr << "dists" << dists << endl;
    /**
    *indices[0]
    *dists[61124]
    */

descriptors: https://drive.google.com/open?id=1Elm...

-----update-----

image :

image description

image description

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by HelloWorld
close date 2020-02-02 10:45:17.347468

Comments

can you put your images here, please, not on an external dropbox ?

berak gravatar imageberak ( 2020-01-25 03:00:01 -0500 )edit
1

i added it

HelloWorld gravatar imageHelloWorld ( 2020-01-25 03:38:34 -0500 )edit