Table of Contents

Class FileCapture

Namespace
Bonsai.Vision
Assembly
Bonsai.Vision.dll

Represents an operator that generates a sequence of images from the specified movie file.

[WorkflowElementIcon("Bonsai:ElementIcon.Video")]
public class FileCapture : Source<IplImage>
Inheritance
FileCapture
Inherited Members

Properties

Capture

Gets the last active video capture stream. This property is reserved to be used only by the file capture visualizer.

[Browsable(false)]
public Capture Capture { get; }

Property Value

Capture

FileName

Gets or sets the name of the movie file.

public string FileName { get; set; }

Property Value

string

Loop

Gets or sets a value indicating whether the video sequence should loop when the end of the file is reached.

public bool Loop { get; set; }

Property Value

bool

PlaybackRate

Gets or sets the rate at which to read images from the file. A value of zero means the recorded video frame rate will be used.

[Range(0, 2147483647)]
public double PlaybackRate { get; set; }

Property Value

double

Playing

Gets or sets a value specifying whether the video sequence is playing. If the video is paused, the current frame will be repeated at the specified playback rate.

public bool Playing { get; set; }

Property Value

bool

PositionUnits

Gets or sets a value specifying the units of the start position.

public CapturePosition PositionUnits { get; set; }

Property Value

CapturePosition

StartPosition

Gets or sets the position at which to start playback of the file.

public double StartPosition { get; set; }

Property Value

double

Methods

Generate()

Generates an observable sequence of images from the specified movie file.

public override IObservable<IplImage> Generate()

Returns

IObservable<IplImage>

A sequence of IplImage objects representing each of the frames in the specified movie file.

Generate<TSource>(IObservable<TSource>)

Generates a sequence of images from the specified movie file, where each new image is emitted only when an observable sequence emits a notification.

public IObservable<IplImage> Generate<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence containing the notifications used for reading new images from the movie file.

Returns

IObservable<IplImage>

A sequence of IplImage objects representing each of the frames in the specified movie file.

Type Parameters

TSource

The type of the elements in the source sequence.

Seek(int)

Moves the current video player to the specified frame. This method is reserved to be called by the file capture visualizer.

public void Seek(int frameNumber)

Parameters

frameNumber int

The zero-based index of the frame the player should move to.