Struct cv::videoio::VideoCapture[][src]

pub struct VideoCapture { /* fields omitted */ }

Video capturing from video files, image sequences or cameras.

Implementations

impl VideoCapture[src]

pub fn new(index: c_int) -> Self[src]

Creates a capture device with specified camera id. If there is a single camera connected, just pass 0.

pub fn from_path(path: &str) -> Self[src]

Creates a capture device with the path of a video file (eg. video.avi). This also supports image sequence, eg. img_%02d.jpg, which will read samples like img_00.jpg, img_01.jpg, img_02.jpg, …).

pub fn from_pipeline(pipeline: &str) -> Self[src]

Create a capture device from a gstreamer pipeline (eg. gst-launch-1.0 v4l2src ! videoconvert ! appsink).

pub fn is_open(&self) -> bool[src]

Returns true if video capturing has been initialized already.

pub fn read(&self) -> Option<Mat>[src]

Grabs, decodes and returns the next video frame. read combines VideoCapture::grab and VideoCapture::retrieve in one call. This is the most convenient method for reading video files or capturing data from decode and return the just grabbed frame.

If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the methods return None.

pub fn set(&self, property: CapProp, value: f64) -> bool[src]

Sets a property in the VideoCapture.

pub fn get(&self, property: CapProp) -> Option<f64>[src]

Gets a property in the VideoCapture.

Trait Implementations

impl Debug for VideoCapture[src]

impl Drop for VideoCapture[src]

impl Send for VideoCapture[src]

Auto Trait Implementations

impl RefUnwindSafe for VideoCapture

impl !Sync for VideoCapture

impl Unpin for VideoCapture

impl UnwindSafe for VideoCapture

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.