Ask Your Question

opencv oclMat interop with clBuffer or clImage data

asked 2013-04-16 10:22:29 -0500

victusfate gravatar image

updated 2013-04-16 13:28:08 -0500

how can I construct an oclMat from device memory, and also send the contents of oclMat to opencl data types after

for example how can I go from a cl::Buffer or cl::Image2D to an oclMat with the current constructors. The opencv opencl code I'd like to use is part of a processing chain.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-01-10 05:36:00 -0500

decision gravatar image

From top of my head, I don't think there are constructors for it. You might be able to fiddle with a publicly accessible data pointer ("data") in combination with manually manipulating the reference pointer (i.e., "release()" method), but I'm not sure this is a good (or even performant) way to do it.

You can of course go the opposite way and let OpenCV execute your kernels for you, see the *interop methods.

edit flag offensive delete link more

Question Tools


Asked: 2013-04-16 10:22:29 -0500

Seen: 313 times

Last updated: Jan 10 '14