Isis 3.0 Object Programmers' Reference |
Home |
Distort/undistort focal plane coordinates. More...
#include <LoMediumDistortionMap.h>
Public Member Functions | |
LoMediumDistortionMap (Camera *parent) | |
Constructor for LunarOrbiterMediumDistortionMap class. | |
void | SetDistortion (const int naifIkCode) |
Load LO Medium Resolution Camera perspective & distortion coefficients. | |
virtual bool | SetFocalPlane (const double dx, const double dy) |
Compute undistorted focal plane x/y for Lo Medium Resolution Camera. | |
virtual bool | SetUndistortedFocalPlane (const double ux, const double uy) |
Compute distorted focal plane x/y for Lo Medium Resolution Camera. | |
std::vector< double > | OpticalDistortionCoefficients () const |
Return optical distortion polynomial coefficients. | |
double | ZDirection () const |
Return the direction of the focal plane Z-axis. | |
double | FocalPlaneX () const |
Return distorted focal plane x. | |
double | FocalPlaneY () const |
Return distorted focal plane y. | |
double | UndistortedFocalPlaneX () const |
Return undistorted focal plane x. | |
double | UndistortedFocalPlaneY () const |
Return undistorted focal plane y. | |
double | UndistortedFocalPlaneZ () const |
Return undistorted focal plane z. |
Protected Attributes | |
Camera * | p_camera |
double | p_focalPlaneX |
double | p_focalPlaneY |
double | p_undistortedFocalPlaneX |
double | p_undistortedFocalPlaneY |
double | p_zDirection |
std::vector< double > | p_odk |
Private Attributes | |
double | p_sample0 |
Center of distortion on sample axis. | |
double | p_line0 |
Center of distortion on line axis. | |
std::vector< double > | p_coefs |
Distortion coeficients. | |
std::vector< double > | p_icoefs |
Distortion coeficients. |
Distort/undistort focal plane coordinates.
Creates a map for adding/removing optical distortions from the focal plane of the Lunar Orbiter medium resolution camera.
Definition at line 73 of file LoMediumDistortionMap.h.
Isis::LoMediumDistortionMap::LoMediumDistortionMap | ( | Camera * | parent | ) |
Constructor for LunarOrbiterMediumDistortionMap class.
Define the distortion model coefficients for a Lunar Orbiter Medium Resolution camera.
parent | A pointer to the parent camera object |
Definition at line 47 of file LoMediumDistortionMap.cpp.
|
inlineinherited |
Return distorted focal plane x.
Definition at line 72 of file CameraDistortionMap.h.
Referenced by Isis::ControlPoint::ComputeResiduals(), Isis::PushFrameCameraGroundMap::FindDistance(), Isis::Camera::RawFocalPlanetoImage(), Isis::Camera::SetRightAscensionDeclination(), and Isis::LineScanCameraSkyMap::SetSky().
|
inlineinherited |
Return distorted focal plane y.
Definition at line 77 of file CameraDistortionMap.h.
Referenced by Isis::ControlPoint::ComputeResiduals(), Isis::PushFrameCameraGroundMap::FindDistance(), Isis::Camera::RawFocalPlanetoImage(), Isis::Camera::SetRightAscensionDeclination(), and Isis::LineScanCameraSkyMap::SetSky().
|
inherited |
Return optical distortion polynomial coefficients.
Definition at line 195 of file CameraDistortionMap.cpp.
void Isis::LoMediumDistortionMap::SetDistortion | ( | const int | naifIkCode | ) |
Load LO Medium Resolution Camera perspective & distortion coefficients.
This method loads the distortion centers, and coefficients from the instrument kernel. * The distortion center coordinates (in mm) are expected to be in the form of:
The center, (x0,y0), will be used to calculate the radius of distortion, r, in the equations below.
distX = x - x0 distY = y - y0, where (x,y) are the distorted focal plane coordinates. r^2 = (DistX^2 + DistY^2)/sref^2
The distortion coefficients in the NAIF instrument kernel are expected to be in the form of:
These coefficient will be used to convert from focal plane x,y to to undistorted x,y as follows:
dr/r = (k0 + k1*r^2 + k2*r^4)/sref ux = x - DistX*dr/r, similarly for uy
naifIkCode | Code to search for in instrument kernel |
Reimplemented from Isis::CameraDistortionMap.
Definition at line 89 of file LoMediumDistortionMap.cpp.
References Isis::CameraFocalPlaneMap::DetectorLine(), Isis::CameraFocalPlaneMap::DetectorSample(), Isis::Camera::FocalPlaneMap(), p_line0, p_sample0, Isis::CameraFocalPlaneMap::SetFocalPlane(), and Isis::toString().
Referenced by Isis::LoMediumCamera::LoMediumCamera().
|
virtual |
Compute undistorted focal plane x/y for Lo Medium Resolution Camera.
Compute undistorted focal plane x/y given a distorted focal plane x/y for the Lunar Orbiter Medium Resolution Camera. The polynomial used is described in the SetDistortion documentation. After calling this method, the undistorted x/y can be obtained via the UndistortedFocalPlaneX and UndistortedFocalPlaneY methods of the parent class.
dx | Distorted focal plane x in millimeters |
dy | Distorted focal plane y in millimeters |
Reimplemented from Isis::CameraDistortionMap.
Definition at line 117 of file LoMediumDistortionMap.cpp.
References Isis::CameraFocalPlaneMap::DetectorLine(), Isis::CameraFocalPlaneMap::DetectorSample(), Isis::Camera::FocalPlaneMap(), Isis::CameraFocalPlaneMap::FocalPlaneX(), Isis::CameraFocalPlaneMap::FocalPlaneY(), p_line0, p_sample0, Isis::CameraFocalPlaneMap::SetDetector(), and Isis::CameraFocalPlaneMap::SetFocalPlane().
|
virtual |
Compute distorted focal plane x/y for Lo Medium Resolution Camera.
Compute distorted focal plane x/y given an undistorted focal plane x/y for the Lunar Orbiter Medium Resolution Camera. This method applies a distortion error based on a polynomial defined in the SetDistortion method. After calling this method the distorted x/y can be obtained via the FocalPlaneX and FocalPlaneY methods.
ux | Undistorted focal plane x in millimeters |
uy | Undistorted focal plane y in millimeters |
Reimplemented from Isis::CameraDistortionMap.
Definition at line 208 of file LoMediumDistortionMap.cpp.
References Isis::CameraFocalPlaneMap::DetectorLine(), Isis::CameraFocalPlaneMap::DetectorSample(), Isis::E(), Isis::Camera::FocalPlaneMap(), Isis::CameraFocalPlaneMap::FocalPlaneX(), Isis::CameraFocalPlaneMap::FocalPlaneY(), p_line0, p_sample0, Isis::CameraFocalPlaneMap::SetDetector(), and Isis::CameraFocalPlaneMap::SetFocalPlane().
|
inlineinherited |
Return undistorted focal plane x.
Definition at line 82 of file CameraDistortionMap.h.
Referenced by Isis::BundleAdjust::ApproximatePoint_ClosestApproach(), Isis::ControlPoint::ComputeApriori(), Isis::Camera::SetImage(), and Isis::AdvancedTrackTool::updateRow().
|
inlineinherited |
Return undistorted focal plane y.
Definition at line 87 of file CameraDistortionMap.h.
Referenced by Isis::BundleAdjust::ApproximatePoint_ClosestApproach(), Isis::ControlPoint::ComputeApriori(), Isis::Camera::SetImage(), and Isis::AdvancedTrackTool::updateRow().
|
inlineinherited |
Return undistorted focal plane z.
Definition at line 92 of file CameraDistortionMap.h.
References Isis::Camera::FocalLength().
Referenced by Isis::BundleAdjust::ApproximatePoint_ClosestApproach(), Isis::Camera::SetImage(), and Isis::AdvancedTrackTool::updateRow().
|
inherited |
Return the direction of the focal plane Z-axis.
Definition at line 201 of file CameraDistortionMap.cpp.
|
private |
Distortion coeficients.
Definition at line 85 of file LoMediumDistortionMap.h.
|
private |
Distortion coeficients.
Definition at line 86 of file LoMediumDistortionMap.h.
|
private |
Center of distortion on line axis.
Definition at line 84 of file LoMediumDistortionMap.h.
Referenced by SetDistortion(), SetFocalPlane(), and SetUndistortedFocalPlane().
|
private |
Center of distortion on sample axis.
Definition at line 83 of file LoMediumDistortionMap.h.
Referenced by SetDistortion(), SetFocalPlane(), and SetUndistortedFocalPlane().