Based on a public domain frame grabbing library called VideoInput I modified the NVIDIA box filter SDK sample to process live video.
VideoInput is compatible with Windows only at this time. This will compile on Visual Studio 2005 using the CUDA SDK 2.0. Unfortunately the VideoInput library shipped as .LIB file and not as a DLL so I have to provide quite some extra .lib files to satisfy linker dependencies - blowing up the download to 3.8 MB.
Any blurriness is caused by the box filter kernel - this is intentional.
Use the +,- keys to adjust box filter width.
Use the keys to adjust the number of filter iterations.
Replace or modify the kernel as you like. The input data format is RGBA, also bound to a 2D texture. The kernel’s output format currently seems to be float (it appears to be necessary to use a pixel shader for displaying this).
If you have a premium web cam, say a Logitech 9000 model you can capture at up to 2 megapixel resolution by specifying capture resolutions higher than 640x480 in the source code. This is where CUDA will really shine, because a CPU couldn’t really do the same filtering in real time.
One more thing. With this kernel the image width and height should be a multiple of nthreads - so if you capture at 320 x 240, set nthreads to 16 or you will get some garbage at the right or bottom border.
BTW the home page for VideoInput is here http://muonics.net/school/spring05/videoInput/
EDIT: large file downloads from the forum are currently not working, so I’ve removed the attachment entirely.