C# Класс WebcamLib.Webcam

Represents a webcam.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GrabFrame ( ) : Image

Grabs a single frame and returns it as an image.

SetPreviewCallback ( CamPreviewCallback previewCallback ) : void

Sets the preview callback (set to null to disable preview mode).

ShowVideoDisplayDialog ( ) : bool

Shows the video display dialog.

ShowVideoFormatDialog ( ) : bool

Shows the video format dialog.

ShowVideoSourceDialog ( ) : bool

Shows the video source dialog.

Webcam ( IWin32Window owner, CamPreviewCallback previewCallback = null, int previewRate = 66 ) : System

Initializes a new instance of the Webcam class.

Приватные методы

Метод Описание
CreatePreviewWindow ( ) : IntPtr

Creates the preview window.

DestroyPreviewWindow ( ) : void

Destroys the preview window.

FrameCallbackProc ( IntPtr hWnd, System.Win32 &VideoHeader ) : int

Called on each frame update.

In order to draw on the resulting image, it must first be copied. This is because setting the bitmap data pointer directly and rotating the image can lead to random exceptions. This is expensive though. So by design, this doesn't happen automatically. See the following sites for details about this: http://msdn.microsoft.com/en-us/library/system.drawing.image.rotateflip.aspx http://social.msdn.microsoft.com/Forums/en-IE/csharplanguage/thread/affa1855-e1ec-476d-bfb1-d0985971f394

PreviewTick ( object sender, EventArgs e ) : void

Grab the next frame.

SetPreviewWindow ( IntPtr windowHandle ) : void

Sets the preview window.

Описание методов

Dispose() публичный Метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

GrabFrame() публичный Метод

Grabs a single frame and returns it as an image.
public GrabFrame ( ) : Image
Результат Image

SetPreviewCallback() публичный Метод

Sets the preview callback (set to null to disable preview mode).
public SetPreviewCallback ( CamPreviewCallback previewCallback ) : void
previewCallback CamPreviewCallback
Результат void

ShowVideoDisplayDialog() публичный Метод

Shows the video display dialog.
public ShowVideoDisplayDialog ( ) : bool
Результат bool

ShowVideoFormatDialog() публичный Метод

Shows the video format dialog.
public ShowVideoFormatDialog ( ) : bool
Результат bool

ShowVideoSourceDialog() публичный Метод

Shows the video source dialog.
public ShowVideoSourceDialog ( ) : bool
Результат bool

Webcam() публичный Метод

Initializes a new instance of the Webcam class.
public Webcam ( IWin32Window owner, CamPreviewCallback previewCallback = null, int previewRate = 66 ) : System
owner IWin32Window The owner window.
previewCallback CamPreviewCallback The method to call when new frames are taken.
previewRate int The rate at which to call .
Результат System