extractor.compute clears keypoints
If I run any one of the descriptor extractors, it clears the keypoints and returns no descriptors.
Even this simple test case:
cv::Mat descriptorsTest;
std:vector<cv::KeyPoint> tester;
cv::KeyPoint test;
test.pt.x = 232;
test.pt.y = 132;
tester.push_back(test);
OrbDescriptorExtractor extractor; //tester.size = 1;
extractor.compute(img1, tester, descriptorsTest); //tester.size = 0;
As I step through, tester fills up so that its size is 1. As soon as the extractor.compute runs, the size goes to 0.
Why is this happening?
Ah i see. What i am trying to do is detect keypoints, TRACK those keypoints using optical flow, then calculate descriptors of the new, tracked positions of the points. Is this possible?
or, would the descriptors be the same, no matter the position of the point?
For example if you have corners in your image you are not fixed position. You have to detect it. In your second image you have to look for corners and try to match with corners detected in previous image. Of course you can detect many feature like orb kaze akaze .. All mean that around keypoint pixels properties are particular and sometimes invariant by rotation translation ...