Cuda with image processing

I have a question about cuda with image processing
As most cuda example,i transfer the image data to GPU memory deivce and do my computing.
Then transfer them back to host to display.
But it’s slow for data communication.
I just have a idea that i transfer the computing result from graphic card to host,
and them transfer them to graphic card again for display.
It’s something strange.
Can I show my image directly in graphic card without sending back to host?
Is there any advice for me? Please.


3.2.11 Graphics Interoperability
NVIDIA CUDA C Programming Guide

Best regards

in a word, yes. With OpenGL (or DirectX as well) you can display directly from the GPU using mapped buffer objects. Just be forewarned, not all the graphics interoperability code in the cuda 4.0 programming guide is correct

Could you please point out which sections are incorrect, and why? This is completely outside my area of expertise, but I would be happy to forward your comments to the documentation team so any errors can be fixed (provided you have not already filed a bug, which would make this redundant). Thanks!

Thanks to alrikai and ARom_nsk,i will try it

Sorry I should have been more specific. The given code for the Driver API version of the CUDA <–> OpenGL interoperability in the cuda 4.0 programming guide won’t work - it tries to create the CUDA context prior to creating the OpenGL context. Unfortunatly, there has to be an OpenGL context active prior to creating a CUDA context (via cuGLCtxCreate) to exploit the interoperability.

See [post=‘this thread’][/post]

Thanks for the clarification, I’ll follow up with the documentation team.

Hi abc00864 and others,

I am also trying to do a work on image on GPU but using CUDA C as programming language. Can you please guide me how i can enter the pixel value of my image in the GPU? I have to do Encryption. The input image will be transferred to the GPU, it’s processing will be done there and then then the output will be transferred to the Host and will be displayed here. For the first part i have to enter the pixel value of my image. Please guide me for this.