Can I read the Datagram Video Buffer from CUDA?

Hi everyone. I’m thinking about to make a project for processing the image that is currently been displayed on to the screen, so the point is, can I have access to these image from CUDA? If so, any clues? Thanks in advice.

It seem i have to be more explicit :thumbsdown: As we know, the nvidia video card contains in its internal memory the image that Windows (or more general the operative system) display in every moment. This image can be read through several libraries in a general programming language, wich include transfering the image from the video card buffer to the main RAM. The point is that i need to make some processing with this image using CUDA fascilities, so i must transfer back the image from the RAM to the CUDA memory space, wasting a lot of time in the data transfers, and posibly dealing with a bottleneck. The main cuestion is, since the video buffer and the CUDA memory space lies both in the internal video card memory (separately of course), is there a way to transfer de image to the CUDA memory without taking it first to the RAM? It’s very important because i need to process as many images per second as possibly.

I will appreciative any suggestions…

As far as I know, this is not possible. (I may be wrong …) :/

My guess is that this is because the different operating systems work so differently with the normal graphics part of the video card, and CUDA is run in a kind of isolated space on its own.

I also anticipate that this feature will arrive in a future version of CUDA, it would be Really useful to have.

However, you can do what you need to do with quite OK speed if you have a double buffer in CUDA and asynchronously push the image to the device. You’ll get OK speed AFAIK.

Thanks for your reply! I can’t wait for the version of CUDA that support this functionality, so I’ll have to consider the choice you gave me.

If the image is coming from an OpenGL application, you might also take a look at the OpenGL interoperability section of the programming guide (3.2.7). These features allow CUDA to read and write data to OpenGL buffers which can be used for display as well. (The SDK also has examples of this.)