VariationalRefinement
import { VariationalRefinement } 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. Inherits 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 [Brox2004]
Constructors and members
static create
Creates an instance of VariationalRefinement
create(): VariationalRefinement | null;The VariationalRefinement | 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.
calcUV
calc function overload to handle separate horizontal (u) and vertical (v) flow components
(to avoid extra splits/merges)
calcUV(I0: Mat, I1: Mat, flow_u: Mat, flow_v: Mat): void;I0i0 argument (Mat).
I1i1 argument (Mat).
flow_uInput/output value, modified by the native operation. flow u argument (Mat).
flow_vInput/output value, modified by the native operation. flow v argument (Mat).
getFixedPointIterations
Number of outer (fixed-point) iterations in the minimization procedure. See: setFixedPointIterations
getFixedPointIterations(): number;The number result.
setFixedPointIterations
Number of outer (fixed-point) iterations in the minimization procedure. See: setFixedPointIterations See: getFixedPointIterations
setFixedPointIterations(val: number): void;valval argument (number).
getSorIterations
Number of inner successive over-relaxation (SOR) iterations in the minimization procedure to solve the respective linear system. See: setSorIterations
getSorIterations(): number;The number result.
setSorIterations
Number of inner successive over-relaxation (SOR) iterations in the minimization procedure to solve the respective linear system. See: setSorIterations See: getSorIterations
setSorIterations(val: number): void;valval argument (number).
getOmega
Relaxation factor in SOR See: setOmega
getOmega(): number;The number result.
setOmega
Relaxation factor in SOR See: setOmega See: getOmega
setOmega(val: number): void;valval argument (number).
getAlpha
Weight of the smoothness term See: setAlpha
getAlpha(): number;The number result.
setAlpha
Weight of the smoothness term See: setAlpha See: getAlpha
setAlpha(val: number): void;valval argument (number).
getDelta
Weight of the color constancy term See: setDelta
getDelta(): number;The number result.
setDelta
Weight of the color constancy term See: setDelta See: getDelta
setDelta(val: number): void;valval argument (number).
getGamma
Weight of the gradient constancy term See: setGamma
getGamma(): number;The number result.
setGamma
Weight of the gradient constancy term See: setGamma See: getGamma
setGamma(val: number): void;valval argument (number).
getEpsilon
Norm value shift for robust penalizer See: setEpsilon
getEpsilon(): number;The number result.
setEpsilon
Norm value shift for robust penalizer See: setEpsilon See: getEpsilon
setEpsilon(val: number): void;valval argument (number).
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.