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

    - ### Fields inherited from class org.opencv.core.Algorithm

      `nativeObj`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `VariationalRefinement​(long addr)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static VariationalRefinement` | `__fromPtr__​(long addr)` |
    `void` | `calcUV​(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 VariationalRefinement` | `create()` | Creates an instance of VariationalRefinement
    `protected void` | `finalize()` |
    `float` | `getAlpha()` | Weight of the smoothness term SEE: setAlpha
    `float` | `getDelta()` | Weight of the color constancy term SEE: setDelta
    `float` | `getEpsilon()` | Norm value shift for robust penalizer SEE: setEpsilon
    `int` | `getFixedPointIterations()` | Number of outer (fixed-point) iterations in the minimization procedure.
    `float` | `getGamma()` | Weight of the gradient constancy term SEE: setGamma
    `float` | `getOmega()` | Relaxation factor in SOR SEE: setOmega
    `int` | `getSorIterations()` | Number of inner successive over-relaxation (SOR) iterations in the minimization procedure to solve the respective linear system.
    `void` | `setAlpha​(float val)` | getAlpha SEE: getAlpha
    `void` | `setDelta​(float val)` | getDelta SEE: getDelta
    `void` | `setEpsilon​(float val)` | getEpsilon SEE: getEpsilon
    `void` | `setFixedPointIterations​(int val)` | getFixedPointIterations SEE: getFixedPointIterations
    `void` | `setGamma​(float val)` | getGamma SEE: getGamma
    `void` | `setOmega​(float val)` | getOmega SEE: getOmega
    `void` | `setSorIterations​(int val)` | getSorIterations SEE: getSorIterations

    - ### Methods inherited from class org.opencv.video.DenseOpticalFlow

      `calc, collectGarbage`

    - ### Methods inherited from class org.opencv.core.Algorithm

      `clear, empty, getDefaultName, getNativeObjAddr, save`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### VariationalRefinement

          protected VariationalRefinement​(long addr)

  - ### Method Detail

    - #### __fromPtr__

          public static VariationalRefinement __fromPtr__​(long addr)

    - #### calcUV

          public void calcUV​(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)
      Parameters:
        `I0` - automatically generated
        `I1` - automatically generated
        `flow_u` - automatically generated
        `flow_v` - automatically generated

    - #### getFixedPointIterations

          public int getFixedPointIterations()

      Number of outer (fixed-point) iterations in the minimization procedure. SEE: setFixedPointIterations
      Returns:
        automatically generated

    - #### setFixedPointIterations

          public void setFixedPointIterations​(int val)

      getFixedPointIterations SEE: getFixedPointIterations
      Parameters:
        `val` - automatically generated

    - #### getSorIterations

          public int 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

          public void setSorIterations​(int val)

      getSorIterations SEE: getSorIterations
      Parameters:
        `val` - automatically generated

    - #### getOmega

          public float getOmega()

      Relaxation factor in SOR SEE: setOmega
      Returns:
        automatically generated

    - #### setOmega

          public void setOmega​(float val)

      getOmega SEE: getOmega
      Parameters:
        `val` - automatically generated

    - #### getAlpha

          public float getAlpha()

      Weight of the smoothness term SEE: setAlpha
      Returns:
        automatically generated

    - #### setAlpha

          public void setAlpha​(float val)

      getAlpha SEE: getAlpha
      Parameters:
        `val` - automatically generated

    - #### getDelta

          public float getDelta()

      Weight of the color constancy term SEE: setDelta
      Returns:
        automatically generated

    - #### setDelta

          public void setDelta​(float val)

      getDelta SEE: getDelta
      Parameters:
        `val` - automatically generated

    - #### getGamma

          public float getGamma()

      Weight of the gradient constancy term SEE: setGamma
      Returns:
        automatically generated

    - #### setGamma

          public void setGamma​(float val)

      getGamma SEE: getGamma
      Parameters:
        `val` - automatically generated

    - #### getEpsilon

          public float getEpsilon()

      Norm value shift for robust penalizer SEE: setEpsilon
      Returns:
        automatically generated

    - #### setEpsilon

          public void setEpsilon​(float val)

      getEpsilon SEE: getEpsilon
      Parameters:
        `val` - automatically generated

    - #### create

          public static VariationalRefinement create()

      Creates an instance of VariationalRefinement
      Returns:
        automatically generated

    - #### finalize

          protected void finalize()
                           throws java.lang.Throwable

      Overrides:
        `finalize` in class `DenseOpticalFlow`
      Throws:
        `java.lang.Throwable`