Class FileCapture
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
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
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
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
PositionUnits
Gets or sets a value specifying the units of the start position.
public CapturePosition PositionUnits { get; set; }
Property Value
StartPosition
Gets or sets the position at which to start playback of the file.
public double StartPosition { get; set; }
Property Value
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
intThe zero-based index of the frame the player should move to.