Class OpticalFlow
Represents an operator that computes dense optical flow using Gunnar Farneback’s algorithm across all images in the sequence.
public class OpticalFlow : Transform<Tuple<IplImage, IplImage>, IplImage>
- Inheritance
-
OpticalFlow
- Inherited Members
Properties
Flags
Gets or sets a value specifying the operation flags for the optical flow algorithm.
public FarnebackFlowFlags Flags { get; set; }
Property Value
Iterations
Gets or sets the number of iterations of the algorithm at each pyramid level.
[Range(0, 2147483647)]
public int Iterations { get; set; }
Property Value
Levels
Gets or sets the number of pyramid layers, including the initial image.
[Range(1, 2147483647)]
public int Levels { get; set; }
Property Value
PolyN
Gets or sets the size of the pixel neighborhood used to find polynomial expansion in each pixel.
[Range(0, 2147483647)]
public int PolyN { get; set; }
Property Value
PolySigma
Gets or sets the standard deviation of the Gaussian used to smooth the derivatives used as a basis for the polynomial expansion.
[Precision(2, 0.01)]
public double PolySigma { get; set; }
Property Value
PyramidScale
Gets or sets a value specifying the image scale (less than 1) used to build the pyramids for each image.
[Range(0, 1)]
public double PyramidScale { get; set; }
Property Value
WindowSize
Gets or sets the averaging window size. Larger values increase robustness to noise and fast motion, but yield a blurred motion field.
[Range(0, 2147483647)]
public int WindowSize { get; set; }
Property Value
Methods
Process(IObservable<IplImage>)
Computes dense optical flow using Gunnar Farneback’s algorithm across all images in an observable sequence.
public IObservable<IplImage> Process(IObservable<IplImage> source)
Parameters
source
IObservable<IplImage>The sequence of images across which to compute dense optical flow.
Returns
- IObservable<IplImage>
A sequence of IplImage objects representing the flow field between the current and the previous image in the
source
sequence.
Process(IObservable<Tuple<IplImage, IplImage>>)
Computes dense optical flow using Gunnar Farneback’s algorithm across all image pairs in an observable sequence.
public override IObservable<IplImage> Process(IObservable<Tuple<IplImage, IplImage>> source)
Parameters
source
IObservable<Tuple<IplImage, IplImage>>The sequence of image pairs across which to compute the dense optical flow. The optical flow is computed from the first to the second image in the pair.
Returns
- IObservable<IplImage>
A sequence of IplImage objects representing the flow field between the first and the second image of each pair in the
source
sequence.