Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
LMSOpticFlowC::LMSOpticFlowC(BooleanT)
LMSOpticFlowC::SetRegionSize(IntT)
LMSOpticFlowC::SetNoiseLevel(RealT)
LMSOpticFlowC::SetGradientOrder(IntT)
LMSOpticFlowC::SetFilterErode(BooleanT)
LMSOpticFlowC::Estimate(const NumImageC &,const NumImageC &)
LMSOpticFlowC::Estimate(const PairC> &)
LMSOpticFlowC::Motion(void) const
LMSOpticFlowC::MotionCov(void) const
LMSOpticFlowC::ErrorVar(void) const
LMSOpticFlowC::Eigenvalues(void) const
LMSOpticFlowC::PrintPS(const FilenameC &,const NumImageC &,RealT,IntT,RealT) const
LMSOpticFlowC::PrintPpm(const FilenameC &,const NumImageC &) const
LMSOpticFlowC
 
Least-mean-squared gradient method for optical flow
 
include "amma/Motion/LMSOpticFlow.hh"
User Level:Default
Library:LMSMotion
Example:exLMSOptic.cc
Section:Image.Motion.Estimation.Optical Flow
In Scope:std

Comments:
Computes optical flow field from spatial and temporal gradient images using simple least-mean-squared gradient method

The method finds, for each pixel, the least mean squared solution to the motion constraint equation over an image patch (as described here). It also generates a field of covariances of the motion vectors, and a field of variances of the motion constraint equation error. The default parameters are:

 noise (1.0),
 region (9)

Variables:
RealT noise;
to help bad matrices invert nicely

IntT region;
regression is done over region of this size

BooleanT erode;
if true, fitering operations erode motion field

BooleanT verbose;

IntT grad_order;
order of spatial gradient (1..3)

NumImageC motion;
results of motion estimation

NumImageC cov;
covariance of motion vector estimation

NumImageC var;
variance of motion estimation errors

NumImageC lambda;
eigenvalues of gradient outer product

Methods:
LMSOpticFlowC(BooleanT Verbose = false)
Constructor

LMSOpticFlowC & SetRegionSize(IntT Size)
Set size of patch over which motion error is minimised

LMSOpticFlowC & SetNoiseLevel(RealT Noise)
Set noise level for matrix inversion

LMSOpticFlowC & SetGradientOrder(IntT Order)
Set order of spatial gradient estimator

LMSOpticFlowC & SetFilterErode(BooleanT Erode)
:Set filter resize to erode (Erode==true) or no erosion (Erode==false) N.B.: even if filters are set for no erosion, there will still be a small amount of erosion of the motion field due to spatial gradient operators

NumImageC<Vector2dC> Estimate(const NumImageC<Vector2dC> & grad,const NumImageC<RealT> & dt)
LMS engine for method; operates on spatial and temporal gradient images

NumImageC<Vector2dC> Estimate(const PairC<NumImageC<RealT>> & im)
Applies method to pair of (filtered) images using first-order differences

NumImageC<Vector2dC> Motion() const
Return field of motion vectors

NumImageC<Matrix2d2C> MotionCov() const
Return field of matrices of motion estimate covariance

NumImageC<RealT> ErrorVar() const
Return field of motion constraint equation error variance

NumImageC<Vector2dC> Eigenvalues() const
Return field of eigenvalues of spatial gradient outer product

void PrintPS(const FilenameC & name = "motion.ps",const NumImageC<RealT> & im = NumImageC<RealT>(),RealT size = 200,IntT subsample = 5,RealT scale = 1) const
Print results in PostScript, using optional image for background

void PrintPpm(const FilenameC & name,const NumImageC<RealT> & im) const
Print results as ppm file: motion vectors are plotted as U/V components of colour image, with 1st original image as Y component


Programmer:Bill Christmas, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001