java.lang.Object
imagingbook.common.corners.SubpixelMaxInterpolator
imagingbook.common.corners.SubpixelMaxInterpolator.Quartic
- Enclosing class:
- SubpixelMaxInterpolator
2D interpolator based on fitting a 'quartic' (i.e., 4th-order) polynomial
f(x,y) = c_0 + c_1 x + c_2 y + c_3 x^2 + c_4 y^2 + c_5 x y + c_6 x^2 y + c_7 x y^2 + c_8 x^2 y^2
to the supplied sample values. The interpolation function passes through all sample values. The local maximum cannot be found in closed form but is found iteratively, which is not guaranteed to succeed. See Appendix E.2.4 (Alg. E.3, 'FindMaxQuartic') 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
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
static final int
static final double
-
Method Summary
Modifier and TypeMethodDescriptiongetInstance
(int maxIterations, double maxDelta, double maxRad) 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:
-
Field Details
-
DefaultMaxIterations
- See Also:
-
DefaulMaxDelta
- See Also:
-
DefaultMaxRad
- See Also:
-
-
Method Details
-
getInstance
-
getInstance
public static SubpixelMaxInterpolator.Quartic getInstance(int maxIterations, double maxDelta, double maxRad) -
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.
-