Grayscale Image Display

We are using a GTX260 card to do image processing with MATLAB using mex files. We can currently display our final images in MATLAB, but transferring the images from the GPU back to the host is expensive. We have looked at DirectX and openGL to try to display directly from the GPU, but all the information we can find is concerned with graphics rendering. What is the easiest way to display a grayscale image directly from the GPU? We are looking for something simple. Any help would be greatly appreciated.

The boxFilter SDK sample from the SDK 1.1 version uses a simple fragment shader to render from a float cudaArray that is bound to an openGL texture. This might be a good sample how achieve what you need.

The 2.0 and later SDK versions use 8 bit RGBA textures instead of grayscale floating point.


I looked at the BoxFilter SDK, and it is somewhat overwhelming. I don’t know anything about binding images, and the filters and textures looked to be fairly embedded in the code. All I want to do is display an image to the screen from the graphics card. It seems like such a simple task, but all the help I can find has to do with various forms of rendering. Can anyone show me some simpler code that will just display an image? I would really appreciate the help.