53 else m_numDistCoef = 4;
56 QString naifXKey =
"INS" +
toString(naifIkCode) +
"_DISTORTION_COEF_X";
57 QString naifYKey =
"INS" +
toString(naifIkCode) +
"_DISTORTION_COEF_Y";
58 for (
int i=0; i < m_numDistCoef; i++) {
64 naifXKey =
"INS" +
toString(naifIkCode) +
"_BORESIGHT";
95 if (m_numDistCoef == 3) {
97 m_boreX + m_distCoefX[0] + dy*(m_distCoefX[1] + dy*m_distCoefX[2]) + dx;
99 m_boreY + m_distCoefY[0] + dy*(m_distCoefY[1] + dy*m_distCoefY[2]) + dy;
103 m_distCoefX[0] + dy*(m_distCoefX[1] + dy*(m_distCoefX[2] + dy*m_distCoefX[3])) + dx;
105 m_distCoefY[0] + dy*(m_distCoefY[1] + dy*(m_distCoefY[2] + dy*m_distCoefY[3])) + dy;
128 if (m_numDistCoef == 3) {
133 B = 1.0 + m_distCoefY[1];
134 C = m_distCoefY[0] +m_boreY - uy;
138 if (roots.size() == 0)
return false;
139 else if (roots.size() == 1)
142 p_focalPlaneY = fabs(uy - roots[0]) < fabs(uy - roots[1]) ? roots[0] : roots[1];
154 a = m_distCoefY[2] / m_distCoefY[3];
155 b = (1.0 + m_distCoefY[1]) / m_distCoefY[3];
156 c = (m_distCoefY[0] + m_boreY - uy) / m_distCoefY[3];
160 if (roots.size() == 1) {
167 for (
int i=0;i<roots.size();i++)
168 delta << fabs(roots[i]-uy);
170 if ( roots.size() == 3)
172 (delta[0] < delta[2] ? roots[0]:roots[2]) :
173 (delta[1] < delta[2] ? roots[1]:roots[2]) ;
double p_focalPlaneX
Distorted focal plane x.
virtual bool SetUndistortedFocalPlane(const double ux, const double uy)
Compute distorted focal plane x/y.
Namespace for the standard library.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
Camera * p_camera
The camera to distort/undistort.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Distort/undistort focal plane coordinates.
double PixelPitch() const
Returns the pixel pitch.
virtual bool SetFocalPlane(const double dx, const double dy)
Compute undistorted focal plane x/y.
void SetDistortion(const int naifIkCode)
double p_focalPlaneY
Distorted focal plane y.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
Namespace for ISIS/Bullet specific routines.
SpiceDouble getDouble(const QString &key, int index=0)
This returns a value from the NAIF text pool.