optflow_RLOFOpticalFlowParameter
import { optflow_RLOFOpticalFlowParameter } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods.
This is used store and set up the parameters of the robust local optical flow (RLOF) algoritm.
The RLOF is a fast local optical flow approach described in [Senst2012] [Senst2013] [Senst2014] and [Senst2016] similar to the pyramidal iterative Lucas-Kanade method as proposed by [Bouguet00]. More details and experiments can be found in the following thesis [Senst2019]. The implementation is derived from optflow::calcOpticalFlowPyrLK(). This RLOF implementation can be seen as an improved pyramidal iterative Lucas-Kanade and includes a set of improving modules. The main improvements in respect to the pyramidal iterative Lucas-Kanade are:
- A more robust redecending M-estimator framework (see [Senst2012]) to improve the accuracy at motion boundaries and appearing and disappearing pixels.
- an adaptive support region strategies to improve the accuracy at motion boundaries to reduce the corona effect, i.e oversmoothing of the PLK at motion/object boundaries. The cross-based segementation strategy (SR_CROSS) proposed in [Senst2014] uses a simple segmenation approach to obtain the optimal shape of the support region.
- To deal with illumination changes (outdoor sequences and shadow) the intensity constancy assumption based optical flow equation has been adopt with the Gennert and Negahdaripour illumination model (see [Senst2016]). This model can be switched on/off with the useIlluminationModel variable.
- By using a global motion prior initialization (see [Senst2016]) of the iterative refinement the accuracy could be significantly improved for large displacements. This initialization can be switched on and of with useGlobalMotionPrior variable.
The RLOF can be computed with the SparseOpticalFlow class or function interface to track a set of features or with the DenseOpticalFlow class or function interface to compute dense optical flow.
See: optflow::DenseRLOFOpticalFlow, optflow::calcOpticalFlowDenseRLOF(), optflow::SparseRLOFOpticalFlow, optflow::calcOpticalFlowSparseRLOF()
Constructors and members
static create
Creates instance of optflow::RLOFOpticalFlowParameter
create(): optflow_RLOFOpticalFlowParameter | null;The optflow_RLOFOpticalFlowParameter | null result.
clone
Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.
clone(): this;The this result.
setUseMEstimator
To apply the global motion prior motion vectors will be computed on a regulary sampled which are the basis for Homography estimation using RANSAC. The reprojection threshold is based on n-th percentil (given by this value [0 ... 100]) of the motion vectors magnitude. See [Senst2016] for more details. Enable M-estimator or disable and use least-square estimator. Enables M-estimator by setting sigma parameters to (3.2, 7.0). Disabling M-estimator can reduce runtime, while enabling can improve the accuracy.
See: setNormSigma0, setNormSigma1
setUseMEstimator(val: boolean): void;valIf true M-estimator is used. If false least-square estimator is used.
setSolverType
Set the solver type used by this optflow_RLOFOpticalFlowParameter object.
setSolverType(val: number): void;valval argument (number).
getSolverType
Return the solver type configured on this optflow_RLOFOpticalFlowParameter object.
getSolverType(): number;The number result.
setSupportRegionType
Set the support region type used by this optflow_RLOFOpticalFlowParameter object.
setSupportRegionType(val: number): void;valval argument (number).
getSupportRegionType
Return the support region type configured on this optflow_RLOFOpticalFlowParameter object.
getSupportRegionType(): number;The number result.
setNormSigma0
Set the norm sigma0 used by this optflow_RLOFOpticalFlowParameter object.
setNormSigma0(val: number): void;valval argument (number).
getNormSigma0
Return the norm sigma0 configured on this optflow_RLOFOpticalFlowParameter object.
getNormSigma0(): number;The number result.
setNormSigma1
Set the norm sigma1 used by this optflow_RLOFOpticalFlowParameter object.
setNormSigma1(val: number): void;valval argument (number).
getNormSigma1
Return the norm sigma1 configured on this optflow_RLOFOpticalFlowParameter object.
getNormSigma1(): number;The number result.
setSmallWinSize
Set the small win size used by this optflow_RLOFOpticalFlowParameter object.
setSmallWinSize(val: number): void;valval argument (number).
getSmallWinSize
Return the small win size configured on this optflow_RLOFOpticalFlowParameter object.
getSmallWinSize(): number;The number result.
setLargeWinSize
Set the large win size used by this optflow_RLOFOpticalFlowParameter object.
setLargeWinSize(val: number): void;valval argument (number).
getLargeWinSize
Return the large win size configured on this optflow_RLOFOpticalFlowParameter object.
getLargeWinSize(): number;The number result.
setCrossSegmentationThreshold
Set the cross segmentation threshold used by this optflow_RLOFOpticalFlowParameter object.
setCrossSegmentationThreshold(val: number): void;valval argument (number).
getCrossSegmentationThreshold
Return the cross segmentation threshold configured on this optflow_RLOFOpticalFlowParameter object.
getCrossSegmentationThreshold(): number;The number result.
setMaxLevel
Set the max level used by this optflow_RLOFOpticalFlowParameter object.
setMaxLevel(val: number): void;valval argument (number).
getMaxLevel
Return the max level configured on this optflow_RLOFOpticalFlowParameter object.
getMaxLevel(): number;The number result.
setUseInitialFlow
Set the use initial flow used by this optflow_RLOFOpticalFlowParameter object.
setUseInitialFlow(val: boolean): void;valval argument (boolean).
getUseInitialFlow
Return the use initial flow configured on this optflow_RLOFOpticalFlowParameter object.
getUseInitialFlow(): boolean;The boolean result.
setUseIlluminationModel
Set the use illumination model used by this optflow_RLOFOpticalFlowParameter object.
setUseIlluminationModel(val: boolean): void;valval argument (boolean).
getUseIlluminationModel
Return the use illumination model configured on this optflow_RLOFOpticalFlowParameter object.
getUseIlluminationModel(): boolean;The boolean result.
setUseGlobalMotionPrior
Set the use global motion prior used by this optflow_RLOFOpticalFlowParameter object.
setUseGlobalMotionPrior(val: boolean): void;valval argument (boolean).
getUseGlobalMotionPrior
Return the use global motion prior configured on this optflow_RLOFOpticalFlowParameter object.
getUseGlobalMotionPrior(): boolean;The boolean result.
setMaxIteration
Set the max iteration used by this optflow_RLOFOpticalFlowParameter object.
setMaxIteration(val: number): void;valval argument (number).
getMaxIteration
Return the max iteration configured on this optflow_RLOFOpticalFlowParameter object.
getMaxIteration(): number;The number result.
setMinEigenValue
Set the min eigen value used by this optflow_RLOFOpticalFlowParameter object.
setMinEigenValue(val: number): void;valval argument (number).
getMinEigenValue
Return the min eigen value configured on this optflow_RLOFOpticalFlowParameter object.
getMinEigenValue(): number;The number result.
setGlobalMotionRansacThreshold
Set the global motion ransac threshold used by this optflow_RLOFOpticalFlowParameter object.
setGlobalMotionRansacThreshold(val: number): void;valval argument (number).
getGlobalMotionRansacThreshold
Return the global motion ransac threshold configured on this optflow_RLOFOpticalFlowParameter object.
getGlobalMotionRansacThreshold(): number;The number result.
These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.