I want to connect to a USB Webcam in .NET, specifically using C#. Being new to .NET I don't know what kind of support there is in the standard libraries for doing so. I found one example on the web that copies bitmaps through the clipboard, but that seems very hacky (and probably slow). Is there a better way?
Here is nice example of doing this. It's using DirectShow.Net (http://directshownet.sourceforge.net/), which is propably better than using "clipboard" :D.
http://www.codeproject.com/KB/audio-video/WebcamUsingDirectShowNET.aspx
On my computer, WIA was painstakingly sloooow... so i decided to give the Windows Multimedia Video Capture a try.
You can find a demo here.
It really depends on what you want to do. WIA is primarily for capturing stills from imaging devices, and DirectShow (used either through directshow.net or managed DirectX) is for access to fuller video features.
The other option is to create a WPF application. It has a huge amount of built in support for video (to the extent that having a looping video clip as a button is pretty trivial), and should be quick and easy to develop.
Interesting side note, WIA isn't supported by Vista for doing Captures from Webcams anymore. They mainly targeted it towards Scanners and pulling stills from cameras.
Also, larger manufacturers like logitech have abandoned WIA is favor of DirectShow.
Theres a package with functions with a lot of things to do with computer vision systems called AForge. And they have an easy way to get webcam images from a USB camera if you're still looking.
Just check out the sample code for computer vision motion sensor example code. I'm sure you can pull out the function calls you need from it as I did.
[sorry to necro, but this could be of use to someone in the future]