| java.lang.Object javax.media.jai.Warp javax.media.jai.WarpPolynomial javax.media.jai.WarpGeneralPolynomial
WarpGeneralPolynomial | final public class WarpGeneralPolynomial extends WarpPolynomial (Code) | | A general polynomial-based description of an image warp.
The mapping is defined by two bivariate polynomial functions
X(x, y) and Y(x, y) that define the source X and Y positions
that map to a given destination (x, y) pixel coordinate.
The functions X(x, y) and Y(x, y) have the form:
SUM{i = 0 to n} {SUM{j = 0 to i}{a_ij*x^(i - j)*y^j}}
See Also: WarpPolynomial |
Constructor Summary | |
public | WarpGeneralPolynomial(float[] xCoeffs, float[] yCoeffs, float preScaleX, float preScaleY, float postScaleX, float postScaleY) Constructs a WarpGeneralPolynomial with a given transform mapping
destination pixels into source space. | public | WarpGeneralPolynomial(float[] xCoeffs, float[] yCoeffs) Constructs a WarpGeneralPolynomial with pre- and post-scale
factors of 1. |
Method Summary | |
public float[] | warpSparseRect(int x, int y, int width, int height, int periodX, int periodY, float[] destRect) Computes the source subpixel positions for a given rectangular
destination region, subsampled with an integral period.
Parameters: x - The minimum X coordinate of the destination region. Parameters: y - The minimum Y coordinate of the destination region. Parameters: width - The width of the destination region. Parameters: height - The height of the destination region. Parameters: periodX - The horizontal sampling period. Parameters: periodY - The vertical sampling period. Parameters: destRect - An int array containing at least2*((width+periodX-1)/periodX)*((height+periodY-1)/periodY)elements, or null . |
WarpGeneralPolynomial | public WarpGeneralPolynomial(float[] xCoeffs, float[] yCoeffs, float preScaleX, float preScaleY, float postScaleX, float postScaleY)(Code) | | Constructs a WarpGeneralPolynomial with a given transform mapping
destination pixels into source space. Note that this is
a backward mapping as opposed to the forward mapping used in
AffineOpImage.
The xCoeffs and yCoeffs parameters
must contain the same number of coefficients,
(n + 1)(n + 2)/2 , for some n , where
n is the non-negative degree power of the polynomial.
The coefficients, in order, are associated with the terms:
1, x, y, x^2, x*y, y^2, ..., x^n, x^(n - 1)*y, ..., x*y^(n - 1), y^n
and coefficients of value 0 cannot be omitted.
The destination pixel coordinates (the arguments to the X()
and Y() functions) are given in normal integral pixel
coordinates, while the output of the functions is given in
fixed-point, subpixel coordinates with a number of fractional
bits specified by the subsampleBitsH and subsampleBitsV
parameters.
Parameters: xCoeffs - The destination to source transform coefficients forthe X coordinate. Parameters: yCoeffs - The destination to source transform coefficients forthe Y coordinate. Parameters: preScaleX - The scale factor to apply to input (dst) X positions. Parameters: preScaleY - The scale factor to apply to input (dst) Y positions. Parameters: postScaleX - The scale factor to apply to output (src) X positions. Parameters: postScaleY - The scale factor to apply to output (src) Y positions. throws: IllegalArgumentException - if arrays xCoeffs and yCoeffs do nothave the correct number of entries. |
WarpGeneralPolynomial | public WarpGeneralPolynomial(float[] xCoeffs, float[] yCoeffs)(Code) | | Constructs a WarpGeneralPolynomial with pre- and post-scale
factors of 1.
Parameters: xCoeffs - The destination to source transform coefficients forthe X coordinate. Parameters: yCoeffs - The destination to source transform coefficients forthe Y coordinate. throws: IllegalArgumentException - if arrays xCoeffs and yCoeffs do nothave the correct number of entries. |
warpSparseRect | public float[] warpSparseRect(int x, int y, int width, int height, int periodX, int periodY, float[] destRect)(Code) | | Computes the source subpixel positions for a given rectangular
destination region, subsampled with an integral period.
Parameters: x - The minimum X coordinate of the destination region. Parameters: y - The minimum Y coordinate of the destination region. Parameters: width - The width of the destination region. Parameters: height - The height of the destination region. Parameters: periodX - The horizontal sampling period. Parameters: periodY - The vertical sampling period. Parameters: destRect - An int array containing at least2*((width+periodX-1)/periodX)*((height+periodY-1)/periodY)elements, or null . If null , anew array will be constructed. a reference to the destRect parameter if it isnon-null , or a new int array of length2*width*height otherwise. throws: ArrayBoundsException - if destRect array is too small |
Methods inherited from javax.media.jai.Warp | public Point2D mapDestPoint(Point2D destPt)(Code)(Java Doc) public Rectangle mapDestRect(Rectangle destRect)(Code)(Java Doc) public Point2D mapSourcePoint(Point2D sourcePt)(Code)(Java Doc) public Rectangle mapSourceRect(Rectangle sourceRect)(Code)(Java Doc) public int[] warpPoint(int x, int y, int subsampleBitsH, int subsampleBitsV, int[] destRect)(Code)(Java Doc) public float[] warpPoint(int x, int y, float[] destRect)(Code)(Java Doc) public int[] warpRect(int x, int y, int width, int height, int subsampleBitsH, int subsampleBitsV, int[] destRect)(Code)(Java Doc) public float[] warpRect(int x, int y, int width, int height, float[] destRect)(Code)(Java Doc) public int[] warpSparseRect(int x, int y, int width, int height, int periodX, int periodY, int subsampleBitsH, int subsampleBitsV, int[] destRect)(Code)(Java Doc) abstract public float[] warpSparseRect(int x, int y, int width, int height, int periodX, int periodY, float[] destRect)(Code)(Java Doc)
|
|
|