opencv - How to pass data to Mat using pointer of image data -
in code, don't want read data rout of images,such as
cv::mat img_1 = imread("f:\1.tif");
instead wanna read data pointer:
float* srcimage;//pointer image data cv::mat img_1(height, width, cv_32fc1, srcimage);
however, found that, way, when used img_1 in following orb function, didn't work
cv::orb orb; vector<cv::keypoint> keypoints_1; cv::mat descriptors_1; orb(img_1, cv::mat(), keypoints_1, descriptors_1);
how can pass data mat pointer? there difference between imread() function , pass data pointer? or, there special request in cv::orb function ?
thanks much! i'm not familiar opencv, start using few weeks, need solve problem , rest part of code depends on results of part.
orb wants 8bit grayscale image input, not cv_32fc1
Comments
Post a Comment