Module imagingbook.common
Package imagingbook.common.corners
Class SubpixelMaxInterpolator.QuadraticLeastSquares
java.lang.Object
imagingbook.common.corners.SubpixelMaxInterpolator
imagingbook.common.corners.SubpixelMaxInterpolator.QuadraticLeastSquares
- Enclosing class:
- SubpixelMaxInterpolator
2D interpolator based on least-squares fitting a quadratic polynomial
f(x,y) = c_0 + c_1 x + c_2 y + c_3 x^2 + c_4 y^2 + c_5 xy
to the supplied sample values. See Sec. E.2.3 (Alg. E2, 'FindMaxQuadraticLeastSquares') of [1] for additional details.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
-
Nested Class Summary
Nested classes/interfaces inherited from class imagingbook.common.corners.SubpixelMaxInterpolator
SubpixelMaxInterpolator.Method, SubpixelMaxInterpolator.QuadraticLeastSquares, SubpixelMaxInterpolator.QuadraticTaylor, SubpixelMaxInterpolator.Quartic
-
Method Summary
Modifier and TypeMethodDescriptionfloat[]
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:
-
Method Details
-
getInstance
-
getMax
Description copied from class:SubpixelMaxInterpolator
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).- Specified by:
getMax
in classSubpixelMaxInterpolator
- 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.
-