Does .NET have a native support for getting input from webcam?
If not, what is the best/recommended way to get input from webcam using C#/.NET?

- 14,773
- 20
- 48
- 64
-
I believe Silverlight 3.0 and beyond has an API for webcams. Is there a particular thing you are trying to do with the webcam? – Tomas McGuinness May 04 '11 at 15:08
-
Similar question http://stackoverflow.com/questions/5108554/c-net-web-camera-image-capture – Ash Burlaczenko May 04 '11 at 15:09
-
@tomasmcguinness: Silverlight 4 introduced webcam API. – Neil Knight May 04 '11 at 15:15
-
My mistake @Neil. I forget we're on the verge of Silverlight 5. – Tomas McGuinness May 04 '11 at 15:17
4 Answers
.NET does not have a native support for webcams. You can use OpenCV library. Also a .NET wrapper exists for OpenCV - Emgu CV.

- 3,892
- 2
- 25
- 31
-
1Just tried this. Seems to work except that it seems to require 1gb of additional files which is a non-solution for me. – teynon Apr 07 '14 at 19:09
This was also asked in How to get web cam images in C#? and you might find the following useful:
I've just released the complete sourcecode of my Windows app CamTimer (written in .NET/C#). Download/view the complete code (with working Webcam examples) at https://github.com/johanssonrobotics/CamTimer
Happy coding!

- 1
- 1

- 3,477
- 23
- 37
There is also an SDK called MetriCam. It is supposed for Kinect and Time-of-Flight cameras, but also supports webcams. You can download it for free at http://www.metricam.net
It includes samples and tutorials how to integrate a DirectShow webcam into C#/.NET The webcam tutorial can be watched here: http://www.youtube.com/watch?v=BvnRpby8mSE

- 21
- 1
You might like to look at the easywebcam codeplex project:
http://easywebcam.codeplex.com/
On the other hand, the "native" option is to develop this using DirectShow. However, there is no (as far as I know), official managed interface for DirectShow, so it can have a steep learning curve to develop with.

- 2,714
- 17
- 23