[][src]Trait opencv::videoio::VideoWriterTrait

pub trait VideoWriterTrait {
    pub fn as_raw_VideoWriter(&self) -> *const c_void;
pub fn as_raw_mut_VideoWriter(&mut self) -> *mut c_void; pub fn open(
        &mut self,
        filename: &str,
        fourcc: i32,
        fps: f64,
        frame_size: Size,
        is_color: bool
    ) -> Result<bool> { ... }
pub fn open_with_backend(
        &mut self,
        filename: &str,
        api_preference: i32,
        fourcc: i32,
        fps: f64,
        frame_size: Size,
        is_color: bool
    ) -> Result<bool> { ... }
pub fn open_1(
        &mut self,
        filename: &str,
        fourcc: i32,
        fps: f64,
        frame_size: Size,
        params: &Vector<i32>
    ) -> Result<bool> { ... }
pub fn open_2(
        &mut self,
        filename: &str,
        api_preference: i32,
        fourcc: i32,
        fps: f64,
        frame_size: Size,
        params: &Vector<i32>
    ) -> Result<bool> { ... }
pub fn is_opened(&self) -> Result<bool> { ... }
pub fn release(&mut self) -> Result<()> { ... }
pub fn write(&mut self, image: &dyn ToInputArray) -> Result<()> { ... }
pub fn set(&mut self, prop_id: i32, value: f64) -> Result<bool> { ... }
pub fn get(&self, prop_id: i32) -> Result<f64> { ... }
pub fn get_backend_name(&self) -> Result<String> { ... } }

Video writer class.

The class provides C++ API for writing video files or image sequences.

Required methods

Loading content...

Provided methods

pub fn open(
    &mut self,
    filename: &str,
    fourcc: i32,
    fps: f64,
    frame_size: Size,
    is_color: bool
) -> Result<bool>
[src]

Initializes or reinitializes video writer.

The method opens video writer. Parameters are the same as in the constructor VideoWriter::VideoWriter.

Returns

true if video writer has been successfully initialized

The method first calls VideoWriter::release to close the already opened file.

C++ default parameters

  • is_color: true

pub fn open_with_backend(
    &mut self,
    filename: &str,
    api_preference: i32,
    fourcc: i32,
    fps: f64,
    frame_size: Size,
    is_color: bool
) -> Result<bool>
[src]

Initializes or reinitializes video writer.

The method opens video writer. Parameters are the same as in the constructor VideoWriter::VideoWriter.

Returns

true if video writer has been successfully initialized

The method first calls VideoWriter::release to close the already opened file.

Overloaded parameters

C++ default parameters

  • is_color: true

pub fn open_1(
    &mut self,
    filename: &str,
    fourcc: i32,
    fps: f64,
    frame_size: Size,
    params: &Vector<i32>
) -> Result<bool>
[src]

Initializes or reinitializes video writer.

The method opens video writer. Parameters are the same as in the constructor VideoWriter::VideoWriter.

Returns

true if video writer has been successfully initialized

The method first calls VideoWriter::release to close the already opened file.

Overloaded parameters

pub fn open_2(
    &mut self,
    filename: &str,
    api_preference: i32,
    fourcc: i32,
    fps: f64,
    frame_size: Size,
    params: &Vector<i32>
) -> Result<bool>
[src]

Initializes or reinitializes video writer.

The method opens video writer. Parameters are the same as in the constructor VideoWriter::VideoWriter.

Returns

true if video writer has been successfully initialized

The method first calls VideoWriter::release to close the already opened file.

Overloaded parameters

pub fn is_opened(&self) -> Result<bool>[src]

Returns true if video writer has been successfully initialized.

pub fn release(&mut self) -> Result<()>[src]

Closes the video writer.

The method is automatically called by subsequent VideoWriter::open and by the VideoWriter destructor.

pub fn write(&mut self, image: &dyn ToInputArray) -> Result<()>[src]

Writes the next video frame

Parameters

  • image: The written frame. In general, color images are expected in BGR format.

The function/method writes the specified image to video file. It must have the same size as has been specified when opening the video writer.

pub fn set(&mut self, prop_id: i32, value: f64) -> Result<bool>[src]

Sets a property in the VideoWriter.

Parameters

  • propId: Property identifier from cv::VideoWriterProperties (eg. cv::VIDEOWRITER_PROP_QUALITY) or one of @ref videoio_flags_others

  • value: Value of the property.

Returns

true if the property is supported by the backend used by the VideoWriter instance.

pub fn get(&self, prop_id: i32) -> Result<f64>[src]

Returns the specified VideoWriter property

Parameters

  • propId: Property identifier from cv::VideoWriterProperties (eg. cv::VIDEOWRITER_PROP_QUALITY) or one of @ref videoio_flags_others

Returns

Value for the specified property. Value 0 is returned when querying a property that is not supported by the backend used by the VideoWriter instance.

pub fn get_backend_name(&self) -> Result<String>[src]

Returns used backend API name

Note: Stream should be opened.

Loading content...

Implementors

impl VideoWriterTrait for VideoWriter[src]

Loading content...