Isis 3.0 Object Programmers' Reference |
Home |
Distort/undistort focal plane coordinates. More...
#include <LoHighDistortionMap.h>
Public Member Functions | |
LoHighDistortionMap (Camera *parent) | |
Constructor for LunarOrbiterHighDistortionMap class. | |
void | SetDistortion (const int naifIkCode) |
Load LO High Resolution Camera perspective & distortion coefficients. | |
virtual bool | SetFocalPlane (const double dx, const double dy) |
Compute undistorted focal plane x/y for Lo High Resolution Camera. | |
virtual bool | SetUndistortedFocalPlane (const double ux, const double uy) |
Compute distorted focal plane x/y for Lo High 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_xPerspective |
Perspective correction factor in x. | |
double | p_yPerspective |
Perspective correction factor in y. | |
double | p_x0 |
Center of distortion on x axis. | |
double | p_y0 |
Center of distortion on y axis. | |
std::vector< double > | p_coefs |
Distortion coefficients. | |
std::vector< double > | p_icoefs |
Distortion coefficients. | |
Distort/undistort focal plane coordinates.
Creates a map for adding/removing optical distortions from the focal plane of the Lunar Orbiter high resolution camera.
2007-06-29 Debbie A. Cook - Original version
2008-02-04 Jeff Anderson - Made change to allow for variable focal length in THEMIS IR
2008-07-25 Steven Lambright - Fixed constructor; CameraDistortionMap is responsible both for setting the p_camera protected member and calling Camera::SetDistortionMap. When the parent called Camera::SetDistortionMap the Camera took ownership of the instance of this object. By calling this twice, and with Camera only supporting having one distortion map, this object was deleted before the constructor was finished.
2011-05-03 Jeannie Walldren - Updated documentation. Removed Lo namespace wrap.
2012-07-06 Debbie A. Cook - Updated Spice members to be more compliant with Isis coding standards. References #972.
2013-02-22 Debbie A. Cook - Updated SetUndistortedFocalPlane method to reflect correction made to LookCtoFocalPlaneXY in CameraGroundMap. The adjustment for the z direction occurs in CameraGroundMap and is no needed here. Fixes Mantis ticket #1524
Definition at line 63 of file LoHighDistortionMap.h.
Isis::LoHighDistortionMap::LoHighDistortionMap | ( | Camera * | parent | ) |
Constructor for LunarOrbiterHighDistortionMap class.
Define the distortion model coefficients for a Lunar Orbiter High Resolution camera.
parent | A pointer to the parent camera object |
Definition at line 38 of file LoHighDistortionMap.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::LoHighDistortionMap::SetDistortion | ( | const int | naifIkCode | ) |
Load LO High Resolution Camera perspective & distortion coefficients.
This method loads the perspective correction factors, distortion centers, and coefficients from the instrument kernel. The perspective correction factors in the NAIF instrument kernel are expected to be in the form of:
These factors will be used to convert from focal plane x,y to perspective-corrected x,y as follows.
pcx = FocalPlaneX * ( 1. + xpers*FocalPlaneX + ypers*FocalPlaneY); pcy = FocalPlaneY * ( 1. + xpers*FocalPlaneX + ypers*FocalPlaneY);
The distortion center coordinates (in mm) are expected to be in the form of:
The center will be used to calculate the radius of distortion in the equations below.
distX = PersCorrectedX - x0 distY = PersCorrectedY - y0
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 (add equation here)
r^2 = DistX^2 + DistY^2 dr/r = k0 + k1*r^2 ux = PersCorrectedX - DistX*dr/r, similarly for uy
naifIkCode | Code to search for in instrument kernel |
Definition at line 95 of file LoHighDistortionMap.cpp.
References p_x0, p_xPerspective, p_y0, p_yPerspective, Isis::CameraDistortionMap::SetDistortion(), and Isis::toString().
Referenced by Isis::LoHighCamera::LoHighCamera().
|
virtual |
Compute undistorted focal plane x/y for Lo High Resolution Camera.
Compute undistorted focal plane x/y given a distorted focal plane x/y for the Lunar Orbiter High 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 124 of file LoHighDistortionMap.cpp.
References Isis::E(), p_x0, p_xPerspective, p_y0, and p_yPerspective.
|
virtual |
Compute distorted focal plane x/y for Lo High Resolution Camera.
Compute distorted focal plane x/y given an undistorted focal plane x/y for the Lunar Orbiter High Resolution Camera. This method applies both a perspective error and 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 174 of file LoHighDistortionMap.cpp.
References Isis::E(), p_x0, p_xPerspective, p_y0, and p_yPerspective.
|
inlineinherited |
Return undistorted focal plane x.
Definition at line 82 of file CameraDistortionMap.h.
Referenced by Isis::BundleAdjust::ApproximatePoint_ClosestApproach(), Isis::ControlPoint::ComputeApriori(), and Isis::Camera::SetImage().
|
inlineinherited |
Return undistorted focal plane y.
Definition at line 87 of file CameraDistortionMap.h.
Referenced by Isis::BundleAdjust::ApproximatePoint_ClosestApproach(), Isis::ControlPoint::ComputeApriori(), and Isis::Camera::SetImage().
|
inlineinherited |
Return undistorted focal plane z.
Definition at line 92 of file CameraDistortionMap.h.
References Isis::Camera::FocalLength().
Referenced by Isis::BundleAdjust::ApproximatePoint_ClosestApproach(), and Isis::Camera::SetImage().
|
inherited |
Return the direction of the focal plane Z-axis.
Definition at line 201 of file CameraDistortionMap.cpp.
|
private |
Distortion coefficients.
Definition at line 77 of file LoHighDistortionMap.h.
|
private |
Distortion coefficients.
Definition at line 78 of file LoHighDistortionMap.h.
|
private |
Center of distortion on x axis.
Definition at line 75 of file LoHighDistortionMap.h.
Referenced by SetDistortion(), SetFocalPlane(), and SetUndistortedFocalPlane().
|
private |
Perspective correction factor in x.
Definition at line 73 of file LoHighDistortionMap.h.
Referenced by SetDistortion(), SetFocalPlane(), and SetUndistortedFocalPlane().
|
private |
Center of distortion on y axis.
Definition at line 76 of file LoHighDistortionMap.h.
Referenced by SetDistortion(), SetFocalPlane(), and SetUndistortedFocalPlane().
|
private |
Perspective correction factor in y.
Definition at line 74 of file LoHighDistortionMap.h.
Referenced by SetDistortion(), SetFocalPlane(), and SetUndistortedFocalPlane().