VariationalRefinement

Objective-C

@interface VariationalRefinement : DenseOpticalFlow

Swift

class VariationalRefinement : 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

Member of Video

Methods

  • Creates an instance of VariationalRefinement

    Declaration

    Objective-C

    + (nonnull VariationalRefinement *)create;

    Swift

    class func create() -> VariationalRefinement
  • Weight of the smoothness term

    Declaration

    Objective-C

    - (float)getAlpha;

    Swift

    func getAlpha() -> Float
  • Weight of the color constancy term

    Declaration

    Objective-C

    - (float)getDelta;

    Swift

    func getDelta() -> Float
  • Weight of the gradient constancy term

    Declaration

    Objective-C

    - (float)getGamma;

    Swift

    func getGamma() -> Float
  • Relaxation factor in SOR

    Declaration

    Objective-C

    - (float)getOmega;

    Swift

    func getOmega() -> Float
  • Number of outer (fixed-point) iterations in the minimization procedure.

    Declaration

    Objective-C

    - (int)getFixedPointIterations;

    Swift

    func getFixedPointIterations() -> Int32
  • Number of inner successive over-relaxation (SOR) iterations in the minimization procedure to solve the respective linear system.

    Declaration

    Objective-C

    - (int)getSorIterations;

    Swift

    func getSorIterations() -> Int32
  • REF: calc function overload to handle separate horizontal (u) and vertical (v) flow components (to avoid extra splits/merges)

    Declaration

    Objective-C

    - (void)calcUV:(nonnull Mat *)I0
                I1:(nonnull Mat *)I1
            flow_u:(nonnull Mat *)flow_u
            flow_v:(nonnull Mat *)flow_v;

    Swift

    func calcUV(I0: Mat, I1: Mat, flow_u: Mat, flow_v: Mat)
  • getAlpha - see: -getAlpha:

    Declaration

    Objective-C

    - (void)setAlpha:(float)val;

    Swift

    func setAlpha(val: Float)
  • getDelta - see: -getDelta:

    Declaration

    Objective-C

    - (void)setDelta:(float)val;

    Swift

    func setDelta(val: Float)
  • getFixedPointIterations - see: -getFixedPointIterations:

    Declaration

    Objective-C

    - (void)setFixedPointIterations:(int)val;

    Swift

    func setFixedPointIterations(val: Int32)
  • getGamma - see: -getGamma:

    Declaration

    Objective-C

    - (void)setGamma:(float)val;

    Swift

    func setGamma(val: Float)
  • getOmega - see: -getOmega:

    Declaration

    Objective-C

    - (void)setOmega:(float)val;

    Swift

    func setOmega(val: Float)
  • getSorIterations - see: -getSorIterations:

    Declaration

    Objective-C

    - (void)setSorIterations:(int)val;

    Swift

    func setSorIterations(val: Int32)