| VideoCapture Constructor (Int32, VideoCaptureAPIs) |
Opens a camera for video capturing
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public VideoCapture(
int index,
VideoCaptureAPIs apiPreference = VideoCaptureAPIs.ANY
)
Public Sub New (
index As Integer,
Optional apiPreference As VideoCaptureAPIs = VideoCaptureAPIs.ANY
)
public:
VideoCapture(
int index,
VideoCaptureAPIs apiPreference = VideoCaptureAPIs::ANY
)
new :
index : int *
?apiPreference : VideoCaptureAPIs
(* Defaults:
let _apiPreference = defaultArg apiPreference VideoCaptureAPIs.ANY
*)
-> VideoCapture
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:
See Also