将 uint64_t 转换为 cv::mat
Convert uint64_t to cv::mat
我有:
std::vector<cv::KeyPoint> keypoints;
uint64_t* desc = new uint64_t[8 * keypoints.size()];
cv::Mat test = (keypoints.size(), 8, CV_8UC1, desc);
那是行不通的。我错过了什么?
错误信息是:
不存在合适的构造函数来将 "uint64_t *" 转换为 "cv::Mat" 和 "Cannot initialize local variable test of type cv::Mat with lvalue of type unsigned long long"
谢谢
您调用 cv::Mat
构造函数的语法不正确,请尝试:
cv::Mat test(keypoints.size(), 8, CV_8UC1, desc);
我有:
std::vector<cv::KeyPoint> keypoints;
uint64_t* desc = new uint64_t[8 * keypoints.size()];
cv::Mat test = (keypoints.size(), 8, CV_8UC1, desc);
那是行不通的。我错过了什么?
错误信息是: 不存在合适的构造函数来将 "uint64_t *" 转换为 "cv::Mat" 和 "Cannot initialize local variable test of type cv::Mat with lvalue of type unsigned long long" 谢谢
您调用 cv::Mat
构造函数的语法不正确,请尝试:
cv::Mat test(keypoints.size(), 8, CV_8UC1, desc);