@Namespace(value="cv::optflow") @Properties(inherit=opencv_optflow.class) public class DualTVL1OpticalFlow extends DenseOpticalFlow
The class implements the "Dual TV L1" optical flow algorithm described in \cite Zach2007 and \cite Javier2012 . Here are important members of the class that control the algorithm, which you can set after constructing the class instance:
- member double tau Time step of the numerical scheme.
- member double lambda Weight parameter for the data term, attachment parameter. This is the most relevant parameter, which determines the smoothness of the output. The smaller this parameter is, the smoother the solutions we obtain. It depends on the range of motions of the images, so its value should be adapted to each image sequence.
- member double theta Weight parameter for (u - v)\^2, tightness parameter. It serves as a link between the attachment and the regularization terms. In theory, it should have a small value in order to maintain both parts in correspondence. The method is stable for a large range of values of this parameter.
- member int nscales Number of scales used to create the pyramid of images.
- member int warps Number of warpings per scale. Represents the number of times that I1(x+u0) and grad( I1(x+u0) ) are computed per scale. This is a parameter that assures the stability of the method. It also affects the running time, so it is a compromise between speed and accuracy.
- member double epsilon Stopping criterion threshold used in the numerical scheme, which is a trade-off between precision and running time. A small value will yield more accurate solutions at the expense of a slower convergence.
- member int iterations Stopping criterion iterations number used in the numerical scheme.
C. Zach, T. Pock and H. Bischof, "A Duality Based Approach for Realtime TV-L1 Optical Flow". Javier Sanchez, Enric Meinhardt-Llopis and Gabriele Facciolo. "TV-L1 Optical Flow Estimation".
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
DualTVL1OpticalFlow(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
static DualTVL1OpticalFlow |
create() |
static DualTVL1OpticalFlow |
create(double tau,
double lambda,
double theta,
int nscales,
int warps,
double epsilon,
int innnerIterations,
int outerIterations,
double scaleStep,
double gamma,
int medianFiltering,
boolean useInitialFlow)
\brief Creates instance of cv::DualTVL1OpticalFlow
|
double |
getEpsilon()
\brief Stopping criterion threshold used in the numerical scheme, which is a trade-off between precision and running time
/** @see setEpsilon
|
double |
getGamma()
\brief coefficient for additional illumination variation term
/** @see setGamma
|
int |
getInnerIterations()
\brief Inner iterations (between outlier filtering) used in the numerical scheme
/** @see setInnerIterations
|
double |
getLambda()
\brief Weight parameter for the data term, attachment parameter
/** @see setLambda
|
int |
getMedianFiltering()
\brief Median filter kernel size (1 = no filter) (3 or 5)
/** @see setMedianFiltering
|
int |
getOuterIterations()
\brief Outer iterations (number of inner loops) used in the numerical scheme
/** @see setOuterIterations
|
int |
getScalesNumber()
\brief Number of scales used to create the pyramid of images
/** @see setScalesNumber
|
double |
getScaleStep()
\brief Step between scales (<1)
/** @see setScaleStep
|
double |
getTau()
\brief Time step of the numerical scheme
/** @see setTau
|
double |
getTheta()
\brief Weight parameter for (u - v)^2, tightness parameter
/** @see setTheta
|
boolean |
getUseInitialFlow()
\brief Use initial flow
/** @see setUseInitialFlow
|
int |
getWarpingsNumber()
\brief Number of warpings per scale
/** @see setWarpingsNumber
|
void |
setEpsilon(double val)
\copybrief getEpsilon @see getEpsilon
|
void |
setGamma(double val)
\copybrief getGamma @see getGamma
|
void |
setInnerIterations(int val)
\copybrief getInnerIterations @see getInnerIterations
|
void |
setLambda(double val)
\copybrief getLambda @see getLambda
|
void |
setMedianFiltering(int val)
\copybrief getMedianFiltering @see getMedianFiltering
|
void |
setOuterIterations(int val)
\copybrief getOuterIterations @see getOuterIterations
|
void |
setScalesNumber(int val)
\copybrief getScalesNumber @see getScalesNumber
|
void |
setScaleStep(double val)
\copybrief getScaleStep @see getScaleStep
|
void |
setTau(double val)
\copybrief getTau @see getTau
|
void |
setTheta(double val)
\copybrief getTheta @see getTheta
|
void |
setUseInitialFlow(boolean val)
\copybrief getUseInitialFlow @see getUseInitialFlow
|
void |
setWarpingsNumber(int val)
\copybrief getWarpingsNumber @see getWarpingsNumber
|
calc, calc, calc, collectGarbage
clear, empty, getDefaultName, position, read, save, save, write, write, write
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public DualTVL1OpticalFlow(Pointer p)
Pointer.Pointer(Pointer)
.public double getTau()
public void setTau(double val)
public double getLambda()
public void setLambda(double val)
public double getTheta()
public void setTheta(double val)
public double getGamma()
public void setGamma(double val)
public int getScalesNumber()
public void setScalesNumber(int val)
public int getWarpingsNumber()
public void setWarpingsNumber(int val)
public double getEpsilon()
public void setEpsilon(double val)
public int getInnerIterations()
public void setInnerIterations(int val)
public int getOuterIterations()
public void setOuterIterations(int val)
@Cast(value="bool") public boolean getUseInitialFlow()
public void setUseInitialFlow(@Cast(value="bool") boolean val)
public double getScaleStep()
public void setScaleStep(double val)
public int getMedianFiltering()
public void setMedianFiltering(int val)
@opencv_core.Ptr public static DualTVL1OpticalFlow create(double tau, double lambda, double theta, int nscales, int warps, double epsilon, int innnerIterations, int outerIterations, double scaleStep, double gamma, int medianFiltering, @Cast(value="bool") boolean useInitialFlow)
@opencv_core.Ptr public static DualTVL1OpticalFlow create()
Copyright © 2020. All rights reserved.