Class SubpixelMaxInterpolator

java.lang.Object
imagingbook.common.corners.SubpixelMaxInterpolator
Direct Known Subclasses:
SubpixelMaxInterpolator.QuadraticLeastSquares, SubpixelMaxInterpolator.QuadraticTaylor, SubpixelMaxInterpolator.Quartic

public abstract class SubpixelMaxInterpolator extends Object

Common interface for all sub-pixel maximum locator implementations. A sub-pixel maximum locator tries to interpolate the continuous position and value of a local maximum for a discrete 3x3 neighborhood. The center value in the discrete neighborhood is assumed to be a local maximum. See Sec. 6.5 and Appendix E of [1] for additional details.

[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

Version:
2022/09/11 revised instance creation
See Also:
  • Method Details

    • getMax

      public abstract float[] getMax(float[] s)
      Tries to locate the sub-pixel maximum from the 9 discrete sample values (s0,...,s8) taken from a 3x3 neighborhood, arranged in the following order:
       s4 s3 s2
       s5 s0 s1
       s6 s7 s8
       
      The center value (s0) is associated with position (0,0).
      Parameters:
      s - a vector containing 9 sample values in the order described above
      Returns:
      a 3-element array [x,y,z], with the estimated maximum position (x,y) and the associated max. value (z). This position is relative to the center coordinate (0,0). null is returned if the maximum position could not be located.