You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Create new ```Webcam``` instance with api preference and camera index.
21
-
///
21
+
///
22
22
/// **If you want to use the default api_preference you should use ```new_def(i32)``` instead**
23
-
///
23
+
///
24
24
/// # Behavior
25
25
/// Creates a new webcam instance with a set index and an [api_preference](https://docs.rs/opencv/0.93.4/opencv/videoio/enum.VideoCaptureAPIs.html).
26
-
///
26
+
///
27
27
/// # Error
28
28
/// Returns an error if the inpt device could not be found based on the camera_idx, or if the api preference was invalid.
29
-
///
29
+
///
30
30
/// # Information
31
31
/// API preference consts are available at the [opencv documentation](https://docs.rs/opencv/latest/opencv/index.html). Some exmaples for this const are: ```CAP_MSMF```, ```CAP_V4L```.
/// Requests a frame from the [`Webcam`] instance.
84
-
///
82
+
///
83
+
/// Requests a frame from the [`Webcam`] instance.
84
+
///
85
85
/// # Behavior
86
86
/// Reads an image out of the ```VideoCapture``` buffer, this removes the bytes of the image from the buffer.
87
87
/// Returns a tuple of the raw image bytes and the size of the image.
88
-
///
88
+
///
89
89
/// # Information
90
90
/// Please note the image's bytes returned by this function are automaticly converted from [BRG8](https://learn.microsoft.com/en-us/windows/win32/wic/-wic-codec-native-pixel-formats#rgbbgr-color-model) (Which is returned by opencv by default) to RGB8
91
91
///
@@ -95,7 +95,7 @@ impl Webcam {
95
95
/// * the color format conversion failed.
96
96
/// * there was some kind of error when getting the image bytes / the size of the image from the [`Mat`].
97
97
/// * the Webcam instance was invalid. (It got released before requesting this frame)
0 commit comments