Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

3 problems:

  1. it wants a Mat (with each descriptor on a row), not a vector<Mat>
  2. your reshape does not anything
  3. for some reason, the BFMatcher only accepts uchar or float features, not double.


so,

Mat descriptors1, descriptors2; // initially empty

descriptors1.push_back(Mat({
    // either put an f to the end of the numbers, or you'll have to convert it later
    174.483f, 19.170f, 12.503f, 10.454f, -81.230f, 0.003765f  
}).reshape(1,1)); // <-- omitting the 2nd arg will leave the shape unchanged !