java.lang.Object
imagingbook.common.image.interpolation.BicubicInterpolator
- All Implemented Interfaces:
PixelInterpolator
A PixelInterpolator implementing bicubic interpolation in 2D. See Sec. 22.5.3 (Alg. 22.1) of [1] for
additional details.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor using default sharpness factor a = 0.5;.BicubicInterpolator(double a) Constructor accepting a specific sharpness factor a. -
Method Summary
Modifier and TypeMethodDescriptionfloatgetInterpolatedValue(ScalarAccessor ia, double x, double y) Returns the interpolated pixel value for the specified position.doublegetWeight(double x) Returns the value of the one-dimensional weight function w(x), that is the weight given to some pixel at distance x from the current interpolation point.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface imagingbook.common.image.interpolation.PixelInterpolator
getWeight
-
Constructor Details
-
BicubicInterpolator
public BicubicInterpolator()Constructor using default sharpness factor a = 0.5;. -
BicubicInterpolator
Constructor accepting a specific sharpness factor a.- Parameters:
a- sharpness factor
-
-
Method Details
-
getInterpolatedValue
Description copied from interface:PixelInterpolatorReturns the interpolated pixel value for the specified position.- Specified by:
getInterpolatedValuein interfacePixelInterpolator- Parameters:
ia- aScalarAccessorto the interpolated imagex- continuous interpolation position (horiz.)y- continuous interpolation position (vert.)- Returns:
- the interpolated pixel value at position (x,y).
-
getWeight
Description copied from interface:PixelInterpolatorReturns the value of the one-dimensional weight function w(x), that is the weight given to some pixel at distance x from the current interpolation point. This method is primarily used for testing.- Specified by:
getWeightin interfacePixelInterpolator- Parameters:
x- the position relative to the interpolation point- Returns:
- the weight for this position
-