Class FitQuadratic3by3

java.lang.Object
org.ddogleg.solver.FitQuadratic3by3

public class FitQuadratic3by3
extends Object

Fit observations to a 2D quadratic around a 3x3 region. Observations are specified in a local coordinate system with indexes from -1 to 1. Typically the maximum value is at the local center, (0,0) coordinate.

Even if the center pixel is the max value, it is still possible for peak to be found outside the 3x3 region. In that situation what happened is that it fit the points inside 3x3 region to one side of the curve. In many applications the estimate should then be ignored. If the minimum number of points was being considered then it would be impossible to go outside since it must pass through each sample point.

  • Constructor Details

    • FitQuadratic3by3

      public FitQuadratic3by3()
  • Method Details

    • setValue

      public void setValue​(int index, double value)
      Sets the value by index. A row-major matrix is used. index = (y+1)*3+x+1
      Parameters:
      index - Array index from 0 to 8
      value - value at index
    • setValue

      public void setValue​(int x, int y, double value)
      Sets the observed value by coordinate point.
      Parameters:
      x - x-coordinate.-1 to 1
      y - y-coordinate -1 to 1
      value - Observed value at that coordinate
    • process

      public void process()
      Computes the maximum.
    • getDeltaX

      public double getDeltaX()
    • getDeltaY

      public double getDeltaY()