Using CUDA to develop 3D vision

I have a 2D to 3D conversion algorithm that generates a right image from a left image. So given an input video, I can generate a stereo pair. Playing this stereo pair in the Nvidia 3D vision video player results in nice 3D viewing using Nvidia’s 3D vision glasses. However, this process is not real-time since I have to record the video and then manually input it into the 3D player. I want to make this entire setup real-time. I have a GTX 480 GPU and am familiar with CUDA. Does anyone have any suggestions please. For instance, vsync seems to me to be one issue. I’ll have to alternate the left and right image displays at a certain speed. Inputs, suggestions would be highly appreciated.


Page 36ff explains how to render stereoscopic content on a DirectX surface. There is a special method

to do full screen blits in 3D and the driver handles the frame sync for you!

You can use DirectX interoperability to have CUDA generate the data that goes into this surface before

you blit it to the screen.

You will find more sample code on the internet by looking for that particular “magic marker” hex code.

But it won’t work in windows, it requires a full screen display. Apparently they did not want to cut into

their nVidia quadro professional windowed Quad Buffered 3D market.

Thanks for your reply. I got the stereo part working with images, thanks to:

The code implements pages 36-40 of GDC09-3DVision-The_In_and_Out.pdf alongwith extra stuff needed to run the application.

For the benefit of anyone else reading this thread, check out this thread:;p=46723#p46723

Now, next goal is to create the stereo images using CUDA. Right now, I’m just giving a couple of images residing on my computer.

I have an application that can cycle through images and display them in stereo. My next goal is to manipulate them using CUDA.

Having gone through Nvidia’s provided examples, I have only been able to see examples in which image/texture display is done using OpenGL + CUDA or DirectX + CUDA driver API. Is there any example which uses DirectX + CUDA runtime API to read in images/video, manipulate them, and then display them. Thanks.