| java.lang.Object javax.media.jai.Interpolation javax.media.jai.InterpolationTable javax.media.jai.InterpolationBicubic
InterpolationBicubic | final public class InterpolationBicubic extends InterpolationTable (Code) | | A class representing bicubic interpolation.
InterpolationBicubic is a subclass of Interpolation that
performs interpolation using the piecewise cubic polynomial:
r(x) = (a + 2)|x|^3 - (a + 3)|x|^2 + 1 , 0 <= |x| < 1
r(x) = a|x|^3 - 5a|x|^2 + 8a|x| - 4a , 1 <= |x| < 2
r(x) = 0 , otherwise
with 'a' set to -0.5.
This definition is also sometimes known as "cubic convolution",
using the parameter 'a' recommended by Rifman.
(Reference: Digital Image Warping, George Wolberg, 1990, pp 129-131,
IEEE Computer Society Press, ISBN 0-8186-8944-7)
A neighborhood extending one sample to the left of and above the
central sample, and two samples to the right of and below the central
sample is required to perform bicubic interpolation.
This implementation creates an InterpolationTable
whose integer coefficients have eight bits of precision to the
right of the binary point.
The diagrams below illustrate the pixels involved in one-dimensional
interpolation. Point s0 is the interpolation kernel key position.
xfrac and yfrac, indicated by the dots, represent the point of interpolation
between two pixels. This value lies between 0.0 and 1.0 exclusive for
floating point and 0 and 2subsampleBits exclusive for integer
interpolations.
Horizontal Vertical
s_ s0 . s1 s2 s_
^
xfrac s0
.< yfrac
s1
s2
The diagram below illustrates the pixels involved in
two-dimensional interpolation.
s__ s_0 s_1 s_2
s0_ s00 s01 s02
. < yfrac
s1_ s10 s11 s12
s2_ s20 s21 s22
^
xfrac
The class is marked 'final' so that it may be more easily inlined.
See Also: Interpolation |
Constructor Summary | |
public | InterpolationBicubic(int subsampleBits) Constructs an InterpolationBicubic with a given subsample
precision, in bits. |
InterpolationBicubic | public InterpolationBicubic(int subsampleBits)(Code) | | Constructs an InterpolationBicubic with a given subsample
precision, in bits. This precision is applied to both axes.
This implementation creates an InterpolationTable
whose integer coefficients have eight bits of precision to the
right of the binary point.
Parameters: subsampleBits - the subsample precision. |
Methods inherited from javax.media.jai.InterpolationTable | public int[] getHorizontalTableData()(Code)(Java Doc) public double[] getHorizontalTableDataDouble()(Code)(Java Doc) public float[] getHorizontalTableDataFloat()(Code)(Java Doc) public int getPrecisionBits()(Code)(Java Doc) public int[] getVerticalTableData()(Code)(Java Doc) public double[] getVerticalTableDataDouble()(Code)(Java Doc) public float[] getVerticalTableDataFloat()(Code)(Java Doc) public int interpolate(int s00, int s01, int s10, int s11, int xfrac, int yfrac)(Code)(Java Doc) public int interpolate(int s__, int s_0, int s_1, int s_2, int s0_, int s00, int s01, int s02, int s1_, int s10, int s11, int s12, int s2_, int s20, int s21, int s22, int xfrac, int yfrac)(Code)(Java Doc) public float interpolate(float s00, float s01, float s10, float s11, float xfrac, float yfrac)(Code)(Java Doc) public float interpolate(float s__, float s_0, float s_1, float s_2, float s0_, float s00, float s01, float s02, float s1_, float s10, float s11, float s12, float s2_, float s20, float s21, float s22, float xfrac, float yfrac)(Code)(Java Doc) public double interpolate(double s00, double s01, double s10, double s11, float xfrac, float yfrac)(Code)(Java Doc) public double interpolate(double s__, double s_0, double s_1, double s_2, double s0_, double s00, double s01, double s02, double s1_, double s10, double s11, double s12, double s2_, double s20, double s21, double s22, float xfrac, float yfrac)(Code)(Java Doc) public int interpolateF(int s__, int s_0, int s_1, int s_2, int s0_, int s00, int s01, int s02, int s1_, int s10, int s11, int s12, int s2_, int s20, int s21, int s22, int xfrac, int yfrac)(Code)(Java Doc) public int interpolateH(int[] samples, int xfrac)(Code)(Java Doc) public int interpolateH(int s0, int s1, int xfrac)(Code)(Java Doc) public int interpolateH(int s_, int s0, int s1, int s2, int xfrac)(Code)(Java Doc) public float interpolateH(float[] samples, float xfrac)(Code)(Java Doc) public float interpolateH(float s0, float s1, float xfrac)(Code)(Java Doc) public float interpolateH(float s_, float s0, float s1, float s2, float xfrac)(Code)(Java Doc) public double interpolateH(double[] samples, float xfrac)(Code)(Java Doc) public double interpolateH(double s0, double s1, float xfrac)(Code)(Java Doc) public double interpolateH(double s_, double s0, double s1, double s2, float xfrac)(Code)(Java Doc) public int interpolateV(int[] samples, int yfrac)(Code)(Java Doc) public int interpolateV(int s0, int s1, int yfrac)(Code)(Java Doc) public int interpolateV(int s_, int s0, int s1, int s2, int yfrac)(Code)(Java Doc) public float interpolateV(float[] samples, float yfrac)(Code)(Java Doc) public float interpolateV(float s0, float s1, float yfrac)(Code)(Java Doc) public float interpolateV(float s_, float s0, float s1, float s2, float yfrac)(Code)(Java Doc) public double interpolateV(double[] samples, float yfrac)(Code)(Java Doc) public double interpolateV(double s0, double s1, float yfrac)(Code)(Java Doc) public double interpolateV(double s_, double s0, double s1, double s2, float yfrac)(Code)(Java Doc)
|
Methods inherited from javax.media.jai.Interpolation | public int getBottomPadding()(Code)(Java Doc) public int getHeight()(Code)(Java Doc) public static synchronized Interpolation getInstance(int type)(Code)(Java Doc) public int getLeftPadding()(Code)(Java Doc) public int getRightPadding()(Code)(Java Doc) public int getSubsampleBitsH()(Code)(Java Doc) public int getSubsampleBitsV()(Code)(Java Doc) public int getTopPadding()(Code)(Java Doc) public int getWidth()(Code)(Java Doc) public int interpolate(int[][] samples, int xfrac, int yfrac)(Code)(Java Doc) public int interpolate(int s00, int s01, int s10, int s11, int xfrac, int yfrac)(Code)(Java Doc) public int interpolate(int s__, int s_0, int s_1, int s_2, int s0_, int s00, int s01, int s02, int s1_, int s10, int s11, int s12, int s2_, int s20, int s21, int s22, int xfrac, int yfrac)(Code)(Java Doc) public float interpolate(float[][] samples, float xfrac, float yfrac)(Code)(Java Doc) public float interpolate(float s00, float s01, float s10, float s11, float xfrac, float yfrac)(Code)(Java Doc) public float interpolate(float s__, float s_0, float s_1, float s_2, float s0_, float s00, float s01, float s02, float s1_, float s10, float s11, float s12, float s2_, float s20, float s21, float s22, float xfrac, float yfrac)(Code)(Java Doc) public double interpolate(double[][] samples, float xfrac, float yfrac)(Code)(Java Doc) public double interpolate(double s00, double s01, double s10, double s11, float xfrac, float yfrac)(Code)(Java Doc) public double interpolate(double s__, double s_0, double s_1, double s_2, double s0_, double s00, double s01, double s02, double s1_, double s10, double s11, double s12, double s2_, double s20, double s21, double s22, float xfrac, float yfrac)(Code)(Java Doc) abstract public int interpolateH(int[] samples, int xfrac)(Code)(Java Doc) public int interpolateH(int s0, int s1, int xfrac)(Code)(Java Doc) public int interpolateH(int s_, int s0, int s1, int s2, int xfrac)(Code)(Java Doc) abstract public float interpolateH(float[] samples, float xfrac)(Code)(Java Doc) public float interpolateH(float s0, float s1, float xfrac)(Code)(Java Doc) public float interpolateH(float s_, float s0, float s1, float s2, float xfrac)(Code)(Java Doc) abstract public double interpolateH(double[] samples, float xfrac)(Code)(Java Doc) public double interpolateH(double s0, double s1, float xfrac)(Code)(Java Doc) public double interpolateH(double s_, double s0, double s1, double s2, float xfrac)(Code)(Java Doc) public int interpolateV(int[] samples, int yfrac)(Code)(Java Doc) public int interpolateV(int s0, int s1, int yfrac)(Code)(Java Doc) public int interpolateV(int s_, int s0, int s1, int s2, int yfrac)(Code)(Java Doc) public float interpolateV(float[] samples, float yfrac)(Code)(Java Doc) public float interpolateV(float s0, float s1, float yfrac)(Code)(Java Doc) public float interpolateV(float s_, float s0, float s1, float s2, float yfrac)(Code)(Java Doc) public double interpolateV(double[] samples, float yfrac)(Code)(Java Doc) public double interpolateV(double s0, double s1, float yfrac)(Code)(Java Doc) public double interpolateV(double s_, double s0, double s1, double s2, float yfrac)(Code)(Java Doc) public boolean isSeparable()(Code)(Java Doc)
|
|
|