videoinputsharp

.NET wrapper to the videoInput library

UNLICENSE License

Stars
21
Committers
1

VideoInputSharp

Description

VideoInputSharp is a wrapper to the videoInput library for .NET Framework. videoInput is a free windows video capture library. You can easily capture image from your devices using VideoInputSharp without additional software.

VideoInputSharpは、 videoInputの.NET Framework向けラッパーです。videoInputとは、DirectShowによるWindows向けのビデオキャプチャを容易に行えるライブラリです。VideoInputSharpにより、その他にライブラリを用意することなく簡単にカメラ等のデバイスからキャプチャが行えます。

Downloads

Get the VideoInputSharp DLL file from the release page.

Example

using VideoInputSharp;

class Program
{
    static void Main(string[] args)
    {
        const int DeviceID = 0;

        using (VideoInput vi = new VideoInput())
        {
            vi.SetIdealFramerate(DeviceID, 30);
            vi.SetupDevice(DeviceID, 640, 480);

            byte[] buffer = new byte[vi.GetSize(DeviceID)];

            while (true)
            {
                vi.GetPixels(DeviceID, buffer);
                // do something....
            }

            vi.StopDevice(DeviceID);
        }
    }
}

Requirements

  • Windows
  • .NET Framework 2.0 or later