Click or drag to resize

VideoCaptureFromCamera Method

Opens a camera for video capturing

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static VideoCapture FromCamera(
	int index,
	VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY
)

Parameters

index
Type: SystemInt32
id of the video capturing device to open. To open default camera using default backend just pass 0. (to backward compatibility usage of camera_id + domain_offset (CAP_*) is valid when apiPreference is CAP_ANY)
apiPreference (Optional)
Type: OpenCvSharpVideoCaptureAPIs
preferred Capture API backends to use. Can be used to enforce a specific reader implementation if multiple are available: e.g. cv::CAP_DSHOW or cv::CAP_MSMF or cv::CAP_V4L.

Return Value

Type: VideoCapture

[Missing <returns> documentation for "M:OpenCvSharp.VideoCapture.FromCamera(System.Int32,OpenCvSharp.VideoCaptureAPIs)"]

See Also