-4

what I have:

 std::vector<cv::KeyPoint> keypoints;
    uint64_t* desc = new uint64_t[8 * keypoints.size()];    
    cv::Mat test = (keypoints.size(), 8, CV_8UC1, desc);

That does not work. What am I missing?

Error message is: no suitable constructor exists to convert from "uint64_t *" to "cv::Mat" and "Cannot initialize local variable test of type cv::Mat with lvalue of type unsigned long long" Thank you

Jacob
  • 13
  • 1
  • 7
  • Tell us what error you're seeing? Also, the first two arguments are the width and height of the image, unless you have an 8x8 pixel image, that's probably wrong. – ACVM Apr 18 '18 at 21:05
  • Sorry, I have edited my question to reflect the actual code and added error messages. – Jacob Apr 18 '18 at 21:12

1 Answers1

0

Your syntax for calling the cv::Mat constructor is incorrect, try:

cv::Mat test(keypoints.size(), 8, CV_8UC1, desc);
ACVM
  • 1,497
  • 8
  • 14
  • 1
    Haha, you are right. I was looking for something complicated when it was really simple. Thank you. – Jacob Apr 18 '18 at 21:27