Click here to Skip to main content
Click here to Skip to main content

Tagged as

Controlling Your Web Camera Using C#

, 3 May 2013
Rate this:
Please Sign up or sign in to vote.
Controlling your web camera using C#.

I have recently been looking for a C# project to control my web cam or an attached video camera.  Apparently, this is a tall order since most video camera controllers are written in very low level C or C++ and not easily wrapped in C# without using P/Invoke and many Dllimport statements (i.e. un-managed and possibly unsafe code).

I did stumble across the Versatile C# Webcam Library on Code Project.  However, after downloading the project’s source code, it took me quite a while to get it to compile in Visual Studio 2010.  Apparently, one of the C++ libraries used (qedit.h)  is no longer included with Windows 7.  After reading countless comments, adding a custom header file for qedit.h, and tinkering, I was able to get this project to compile in Visual Studio 2010.

For anyone who is interested, you can find the working code below!

Edit

A copy of the source code compiled in release mode can be found here HERE (version 2).

A “Published” version of the code can be found HERE.

Additional Resources:

Here is a link to the DirectShow.Net project on Sourceforge.  If you still have found what you are looking for, I believe this DirectShow.dll contains the most comprehensive set of features for controlling video.  I have not really tested this .NET wrapper, but it looks like it covers just about everything in DirectShow, and it comes with tons of example projects!

Here is a link to a very simple .NET wrapper for Microsoft’s latest video controller WIA.

Here are a few Video links from StackOverflow as well:

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

Jake Drew
Student
United States United States
If you would like to know more about me, please feel free to visit my website at http://www.jakemdrew.com/
 
Thanks!
 
Jake Drew

Comments and Discussions

 
Questionwebcam campture Pinmemberrakdosss2-Apr-14 5:49 
AnswerRe: webcam campture PinmemberJake Drew2-Apr-14 6:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140827.1 | Last Updated 3 May 2013
Article Copyright 2013 by Jake Drew
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid