Table of Contents

Class VideoWriter

Namespace
Bonsai.Vision
Assembly
Bonsai.Vision.dll

Represents an operator that writes a sequence of images into a compressed AVI file.

[WorkflowElementIcon("Bonsai:ElementIcon.Video")]
public class VideoWriter : FileSink<IplImage, VideoWriterDisposable>
Inheritance
VideoWriter
Inherited Members

Properties

FourCC

Gets or sets a value specifying the four-character code of the codec used to compress video frames.

public string FourCC { get; set; }

Property Value

string

FrameRate

Gets or sets a value specifying the playback frame rate of the image sequence.

public double FrameRate { get; set; }

Property Value

double

FrameSize

Gets or sets the optional size of video frames.

public Size FrameSize { get; set; }

Property Value

Size

ResizeInterpolation

Gets or sets a value specifying the optional interpolation method used to resize video frames.

public SubPixelInterpolation ResizeInterpolation { get; set; }

Property Value

SubPixelInterpolation

Methods

CreateWriter(string, IplImage)

When overridden in a derived class, creates the writer over the specified fileName that will be responsible for handling the input elements.

protected override VideoWriterDisposable CreateWriter(string fileName, IplImage input)

Parameters

fileName string

The name of the file on which the elements should be written.

input IplImage

The first input element that needs to be pushed into the file.

Returns

VideoWriterDisposable

The writer that will be used to push elements into the file.

Write(VideoWriterDisposable, IplImage)

Writes an image into the compressed AVI file.

protected override void Write(VideoWriterDisposable writer, IplImage input)

Parameters

writer VideoWriterDisposable

The VideoWriterDisposable object used to write data into the AVI file.

input IplImage

An IplImage object containing the video data to write into the file.