A .NET library for Camera easy use via DirectShow
Switch branches/tags
Latest commit 07abec8 Sep 24, 2016 @free5lot free5lot Update README.russian.md



A .NET library for camera easy use via DirectShow

NOTE: There is an article on CodeProject.com about Camera Net library and some additional information. Take a look.

Features of the library:

  1. Select camera
  2. Select resolution
  3. Show camera's output
  4. Overlay image on the frame
  5. Take snapshots of the frame
  6. Change TV mode (PAL, NTSC, etc.)
  7. Display dialog windows of the camera (from drivers)
  8. Get a list of available cameras and resolutions
  9. Support WinForms and WPF applications

Complicated sample of Camera_Net library use. Stranger on television.

About the library

The library was created because I've failed to find a library among dozens of open source solutions that would support what I wanted: easy use of camera as a component, ability to change the camera resolution, take frame snapshots, show overlay images over the frame.

The main classes in the library are CameraControl and Camera. CameraControl is a UserControl-wrapper for Camera class, easy to use out of box. This approach is recommended. The library includes two samples of use in WinForms, in particular an example of a simple implementation of the component in your application, and more complicated example that shows almost all features of the library. Camera is an object for interaction with cameras.

Additionally there are several public classes: Resolution, VideoInput, camera selection class and etc. The library uses DirectShowLib (license LGPL 2.1 or later), which is a very thin wrapper of DirectX COM-interfaces, so that the losses of productivity from the use of managed code instead of the native one are minimal.

DirectShow is MS Windows only, so the library is also available only for Windows.


Camera_NET license

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Samples license

While the Camera_Net library is covered by LGPL, the samples are released as PUBLIC DOMAIN. So, you can use code from these samples in your free or proprietary project without any limitations.

Simple sample of Camera_Net library use.

Links to related open source projects: