I’m hoping to integrate my existing project with some OpenCV_GPU code, and I was wondering whether it’s possible to construct a GpuMat data structure from an existing CUdeviceptr. That is, in the usual, CPU-based OpenCV, it’s possible to manually assign the data for a Mat object, i.e.
unsigned char *ucharImgTester; cv::Mat src = cv::Mat (height, width, CV_8UC1); ... src.data = (uchar *)ucharImgTester; cv::imshow(nWindow, src); cv::waitKey(10);
Is there a corollary to this for the GPU? For example if I have a custom-rolled kernel, and I have some output of type CUdeviceptr, can I assign it as a GpuMat’s data parameter? I haven’t found any reference to this on the net yet, and my own feeble attempts have gotten me nowhere.