[−][src]Struct cv::videoio::VideoCapture
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
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]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,