Class HornSchunk

All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class HornSchunk extends AlgorithmBase
  • Field Details

  • Constructor Details

  • Method Details

    • runAlgorithm

      public void runAlgorithm()
      Description copied from class: AlgorithmBase
      Actually runs the algorithm. Implemented by inheriting algorithms.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • hypot

      private double hypot(double x, double y)
    • horn_schunck_pyramidal

      void horn_schunck_pyramidal(double[] I1, double[] I2, double[] u, double[] v, int nx, int ny, double alpha, int nscales, double zfactor, int warps, double TOL, int maxiter, boolean verbose)
      Procedure to handle the pyramidal approach. This procedure relies on the previous functions to calculate large optical flow fields using a pyramidal scheme.
    • horn_schunck_optical_flow

      void horn_schunck_optical_flow(double[] I1, double[] I2, double[] u, double[] v, int nx, int ny, double alpha, int warps, double TOL, int maxiter, boolean verbose)
      Horn invalid input: '&' Schunck method for optical flow estimation at a single scale
    • gradient

      void gradient(double[] input, double[] dx, double[] dy, int nx, int ny)
      Compute the gradient of an image using centered differences
    • sor_iteration

      public double sor_iteration(double[] Au, double[] Av, double[] Du, double[] Dv, double[] D, double[] u, double[] v, double al, int p, int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8)
      Function to compute the SOR iteration at a given position (SOR = Successive Over-Relaxation)
    • p

      public double p(double[] x, int w, int h, int i, int j)
    • compute_input_derivatives

      public void compute_input_derivatives(double[] Ex, double[] Ey, double[] Et, double[] a, double[] b, int w, int h)
    • compute_bar

      public void compute_bar(double[] ubar, double[] u, int w, int h)
    • hs_iteration

      public void hs_iteration(double[] u, double[] v, double[] Ex, double[] Ey, double[] Et, int w, int h, double alpha)
    • hs

      public void hs(double[] u, double[] v, double[] a, double[] b, int w, int h, int n, double alpha)