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

pub struct VideoCapture { /* fields omitted */ }

Video capturing from video files, image sequences or cameras.

Methods

impl VideoCapture[src]

pub fn new(index: i32) -> 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 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 Send for VideoCapture[src]

impl Drop for VideoCapture[src]

impl Debug for VideoCapture[src]

Auto Trait Implementations

impl !Sync for VideoCapture

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.