public class PcdMap extends Mapping
A PcdMap is specified by giving this distortion coefficient and the coordinates of the centre of the radial distortion. The forward transformation of a PcdMap applies the distortion:
RD = R * ( 1 + C * R * R )
where R is the undistorted radial distance from the distortion centre (specified by attribute PcdCen), RD is the radial distance from the same centre in the presence of distortion, and C is the distortion coefficient (given by attribute Disco).
The inverse transformation of a PcdMap removes the distortion produced by the forward transformation. The expression used to derive R from RD is an approximate inverse of the expression above.
This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more details.
You should have received a copy of the GNU General Public Licence along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street,Fifth Floor, Boston, MA 02110-1301, USA
Mapping.Interpolator, Mapping.Spreader
LINEAR_INTERPOLATOR, LINEAR_SPREADER, NEAREST_INTERPOLATOR, NEAREST_SPREADER
AST__BAD, AST__TUNULL, pointer
Constructor and Description |
---|
PcdMap(double disco,
double[] pcdcen)
Creates a PcdMap.
|
Modifier and Type | Method and Description |
---|---|
double |
getDisco()
Get
pcdMap pincushion/barrel distortion coefficient.
|
double |
getPcdCen(int axis)
Get
centre coordinates of pincushion/barrel distortion by axis.
|
void |
setDisco(double disco)
Set
pcdMap pincushion/barrel distortion coefficient.
|
void |
setPcdCen(int axis,
double pcdCen)
Set
centre coordinates of pincushion/barrel distortion by axis.
|
decompose, getInvert, getNin, getNout, getReport, getTranForward, getTranInverse, invert, linearApprox, mapBox, mapSplit, rate, rebin, rebinD, rebinF, rebinI, resample, resampleB, resampleD, resampleF, resampleI, resampleL, resampleS, setInvert, setReport, simplify, tran1, tran2, tranGrid, tranN, tranP
annul, clear, copy, delete, equals, finalize, getAstConstantI, getB, getC, getD, getF, getI, getID, getIdent, getL, getNobject, getObjSize, getRefCount, hashCode, isThreaded, reportVersions, sameObject, set, setB, setC, setD, setF, setI, setID, setIdent, setL, show, test, tune
public PcdMap(double disco, double[] pcdcen)
disco
- The distortion coefficient. Negative values give barrel
distortion, positive values give pincushion distortion, and
zero gives no distortion.pcdcen
- A 2-element array containing the coordinates of the centre of the
distortion.AstException
- if an error occurred in the AST librarypublic double getDisco()
Note that the forward transformation of a PcdMap applies the distortion specified by this attribute and the inverse transformation removes this distortion. If the PcdMap is inverted (e.g. using astInvert), then the forward transformation will remove the distortion and the inverse transformation will apply it. The distortion itself will still be given by the same value of Disco.
public void setDisco(double disco)
Note that the forward transformation of a PcdMap applies the distortion specified by this attribute and the inverse transformation removes this distortion. If the PcdMap is inverted (e.g. using astInvert), then the forward transformation will remove the distortion and the inverse transformation will apply it. The distortion itself will still be given by the same value of Disco.
disco
- the Disco attribute of this objectpublic double getPcdCen(int axis)
axis
- the index of the axis to get the value for (1 or 2)IndexOutOfBoundsException
- if axis
is not in
the range 1..2.public void setPcdCen(int axis, double pcdCen)
axis
- the index of the axis to set the value for (1 or 2)pcdCen
- the PcdCen attribute for the indicated axis of
this mappingIndexOutOfBoundsException
- if axis
is not in
the range 1..2.Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.