Package org.opencv.video
Class VariationalRefinement
java.lang.Object
org.opencv.core.Algorithm
org.opencv.video.DenseOpticalFlow
org.opencv.video.VariationalRefinement
public class VariationalRefinement extends DenseOpticalFlow
Variational optical flow refinement
This class implements variational refinement of the input flow field, i.e.
it uses input flow to initialize the minimization of the following functional:
\(E(U) = \int_{\Omega} \delta \Psi(E_I) + \gamma \Psi(E_G) + \alpha \Psi(E_S) \),
where \(E_I,E_G,E_S\) are color constancy, gradient constancy and smoothness terms
respectively. \(\Psi(s^2)=\sqrt{s^2+\epsilon^2}\) is a robust penalizer to limit the
influence of outliers. A complete formulation and a description of the minimization
procedure can be found in CITE: Brox2004
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protectedVariationalRefinement(long addr) -
Method Summary
Modifier and Type Method Description static VariationalRefinement__fromPtr__(long addr)voidcalcUV(Mat I0, Mat I1, Mat flow_u, Mat flow_v)REF: calc function overload to handle separate horizontal (u) and vertical (v) flow components (to avoid extra splits/merges)static VariationalRefinementcreate()Creates an instance of VariationalRefinementprotected voidfinalize()floatgetAlpha()Weight of the smoothness term SEE: setAlphafloatgetDelta()Weight of the color constancy term SEE: setDeltaintgetFixedPointIterations()Number of outer (fixed-point) iterations in the minimization procedure.floatgetGamma()Weight of the gradient constancy term SEE: setGammafloatgetOmega()Relaxation factor in SOR SEE: setOmegaintgetSorIterations()Number of inner successive over-relaxation (SOR) iterations in the minimization procedure to solve the respective linear system.voidsetAlpha(float val)getAlpha SEE: getAlphavoidsetDelta(float val)getDelta SEE: getDeltavoidsetFixedPointIterations(int val)getFixedPointIterations SEE: getFixedPointIterationsvoidsetGamma(float val)getGamma SEE: getGammavoidsetOmega(float val)getOmega SEE: getOmegavoidsetSorIterations(int val)getSorIterations SEE: getSorIterationsMethods inherited from class org.opencv.core.Algorithm
clear, empty, getDefaultName, getNativeObjAddr, save
-
Constructor Details
-
Method Details
-
__fromPtr__
-
calcUV
REF: calc function overload to handle separate horizontal (u) and vertical (v) flow components (to avoid extra splits/merges)- Parameters:
I0- automatically generatedI1- automatically generatedflow_u- automatically generatedflow_v- automatically generated
-
getFixedPointIterations
Number of outer (fixed-point) iterations in the minimization procedure. SEE: setFixedPointIterations- Returns:
- automatically generated
-
setFixedPointIterations
getFixedPointIterations SEE: getFixedPointIterations- Parameters:
val- automatically generated
-
getSorIterations
Number of inner successive over-relaxation (SOR) iterations in the minimization procedure to solve the respective linear system. SEE: setSorIterations- Returns:
- automatically generated
-
setSorIterations
getSorIterations SEE: getSorIterations- Parameters:
val- automatically generated
-
getOmega
Relaxation factor in SOR SEE: setOmega- Returns:
- automatically generated
-
setOmega
getOmega SEE: getOmega- Parameters:
val- automatically generated
-
getAlpha
Weight of the smoothness term SEE: setAlpha- Returns:
- automatically generated
-
setAlpha
getAlpha SEE: getAlpha- Parameters:
val- automatically generated
-
getDelta
Weight of the color constancy term SEE: setDelta- Returns:
- automatically generated
-
setDelta
getDelta SEE: getDelta- Parameters:
val- automatically generated
-
getGamma
Weight of the gradient constancy term SEE: setGamma- Returns:
- automatically generated
-
setGamma
getGamma SEE: getGamma- Parameters:
val- automatically generated
-
create
Creates an instance of VariationalRefinement- Returns:
- automatically generated
-
finalize
- Overrides:
finalizein classDenseOpticalFlow- Throws:
Throwable
-