Reputation: 15009
I'm looking at optimising some code with NVidia's OpenVX, and from previous experience with the CUDA API, GPU memory allocation is always a significant overhead.
So, I have a series of cv::Mat from video that I want to copy into an image; the naive code is of course:
vxImage = nvx_cv::createVXImageFromCVMat(context, cvMat);
The optimisation would be to allocate a single image, then just copy the bits on top. Looking at the header files (documentation is rather scant) I find:
nvx_cv::copyCVMatToVXMatrix(vxImage, cvMat);
However, the name is VXMatrix
, so the compiler complains about a mismatch between the vx_matrix
and vx_image
types, of course. As far as I can tell, there is no copyCVMatToVXImage
API; am I missing something, or is there another way to do this?
Upvotes: 0
Views: 564