USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ReseauDistortionMap Class Reference

Distort/undistort focal plane coordinates. More...

#include <ReseauDistortionMap.h>

Inheritance diagram for Isis::ReseauDistortionMap:
Inheritance graph
Collaboration diagram for Isis::ReseauDistortionMap:
Collaboration graph

Public Member Functions

 ReseauDistortionMap (Camera *parent, Pvl &labels, const QString &fname)
 Creates a ReseauDistortionMap object.
 
virtual bool SetFocalPlane (const double dx, const double dy)
 Finds the undistorted x/y position of the given distorted point.
 
virtual bool SetUndistortedFocalPlane (const double ux, const double uy)
 Finds the distorted x/y position of the given undistorted point.
 
void SetDistortion (int naifIkCode)
 Load distortion coefficients.
 
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

Camerap_camera
 
double p_focalPlaneX
 
double p_focalPlaneY
 
double p_undistortedFocalPlaneX
 
double p_undistortedFocalPlaneY
 
double p_zDirection
 
std::vector< double > p_odk
 

Private Attributes

std::vector< double > p_rlines
 
std::vector< double > p_rsamps
 Refined Reseau Locations.
 
std::vector< double > p_mlines
 
std::vector< double > p_msamps
 Master Reseau Locations.
 
double p_distortedLines
 
double p_distortedSamps
 
     Dimensions of distorted

cube

 
double p_undistortedLines
 
double p_undistortedSamps
 
 Dimensions of

undistorted cube

 
int p_numRes
 Number of Reseaus.
 
double p_pixelPitch
 
                            Pixel Pitch of parent

Camera

 

Detailed Description

Distort/undistort focal plane coordinates.

Creates a map for adding/removing optical distortions from the focal plane of the camera.

Author
2005-06-08 Elizabeth Ribelin
History:
2005-12-07 Elizabeth Miller - Added check for colinearity in closest reseaus to fix a bug

Definition at line 43 of file ReseauDistortionMap.h.

Constructor & Destructor Documentation

Isis::ReseauDistortionMap::ReseauDistortionMap ( Camera parent,
Pvl labels,
const QString &  fname 
)

Creates a ReseauDistortionMap object.

Parameters
parentThe parent camera model
labelsThe pvl labels to get the Reference Reseau location from
fnameThe filename containing master reseau location for the particular camera
Exceptions
Isis::IException::User- There are not the same amount of master and refined reseaus

Definition at line 44 of file ReseauDistortionMap.cpp.

References _FILEINFO_, Isis::PvlObject::findGroup(), Isis::PvlContainer::findKeyword(), p_distortedSamps, p_msamps, p_numRes, p_pixelPitch, p_rsamps, p_undistortedSamps, Isis::Camera::PixelPitch(), Isis::PvlKeyword::size(), Isis::toDouble(), Isis::PvlObject::Traverse, and Isis::IException::User.

Member Function Documentation

double Isis::CameraDistortionMap::FocalPlaneX ( ) const
inlineinherited
double Isis::CameraDistortionMap::FocalPlaneY ( ) const
inlineinherited
std::vector< double > Isis::CameraDistortionMap::OpticalDistortionCoefficients ( ) const
inherited

Return optical distortion polynomial coefficients.

Definition at line 195 of file CameraDistortionMap.cpp.

void Isis::CameraDistortionMap::SetDistortion ( int  naifIkCode)
inherited

Load distortion coefficients.

This method loads the distortion coefficients from the instrument kernel. The coefficients in the NAIF instrument kernel are expected to be in the form of:

INSxxxxx_OD_K = ( coef1, coef2, ..., coefN)
where xxxxx is the instrument code (always a negative number)

These coefficient will be used to convert from focal plane x,y to undistorted x,y as follows (add equation here)

Parameters
naifIkCodeCode to search for in instrument kernel
Todo:

Generalize to read variable number of coefficients

Add latex equation to the documentation

Definition at line 65 of file CameraDistortionMap.cpp.

References Isis::toString().

Referenced by Isis::AmicaCamera::AmicaCamera(), Isis::CTXCamera::CTXCamera(), Isis::HiriseCamera::HiriseCamera(), Isis::LroWideAngleCameraDistortionMap::LroWideAngleCameraDistortionMap(), Isis::LoHighDistortionMap::SetDistortion(), and Isis::LoMediumDistortionMap::SetDistortion().

bool Isis::ReseauDistortionMap::SetFocalPlane ( const double  dx,
const double  dy 
)
virtual

Finds the undistorted x/y position of the given distorted point.

Parameters
dxThe distorted x position of the point
dyThe distorted y position of the point
Returns
bool Returns true if the undistortion was completed successful, and false if it was not

Reimplemented from Isis::CameraDistortionMap.

Definition at line 96 of file ReseauDistortionMap.cpp.

References Isis::Statistics::AddData(), Isis::LeastSquares::AddKnown(), Isis::CameraFocalPlaneMap::DetectorLineOrigin(), Isis::CameraFocalPlaneMap::DetectorSampleOrigin(), Isis::LeastSquares::Evaluate(), Isis::Camera::FocalPlaneMap(), p_msamps, p_numRes, p_pixelPitch, p_rsamps, p_undistortedSamps, Isis::LeastSquares::Solve(), and Isis::Statistics::StandardDeviation().

bool Isis::ReseauDistortionMap::SetUndistortedFocalPlane ( const double  ux,
const double  uy 
)
virtual

Finds the distorted x/y position of the given undistorted point.

Parameters
uxThe undistorted x position of the point
uyThe undistorted y position of the point
Returns
bool Returns true if the distortion was completed successful, and false if it was not

Reimplemented from Isis::CameraDistortionMap.

Definition at line 208 of file ReseauDistortionMap.cpp.

References Isis::Statistics::AddData(), Isis::LeastSquares::AddKnown(), Isis::CameraFocalPlaneMap::DetectorLineOrigin(), Isis::CameraFocalPlaneMap::DetectorSampleOrigin(), Isis::LeastSquares::Evaluate(), Isis::Camera::FocalPlaneMap(), p_msamps, p_numRes, p_pixelPitch, p_rsamps, p_undistortedSamps, Isis::LeastSquares::Solve(), and Isis::Statistics::StandardDeviation().

double Isis::CameraDistortionMap::UndistortedFocalPlaneX ( ) const
inlineinherited
double Isis::CameraDistortionMap::UndistortedFocalPlaneY ( ) const
inlineinherited
double Isis::CameraDistortionMap::UndistortedFocalPlaneZ ( ) const
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().

double Isis::CameraDistortionMap::ZDirection ( ) const
inherited

Return the direction of the focal plane Z-axis.

Definition at line 201 of file CameraDistortionMap.cpp.

Member Data Documentation

double Isis::ReseauDistortionMap::p_distortedSamps
private

     Dimensions of distorted

cube

Definition at line 54 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap().

std::vector<double> Isis::ReseauDistortionMap::p_msamps
private

Master Reseau Locations.

Definition at line 53 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().

int Isis::ReseauDistortionMap::p_numRes
private

Number of Reseaus.

Definition at line 58 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().

double Isis::ReseauDistortionMap::p_pixelPitch
private

                            Pixel Pitch of parent

Camera

Definition at line 59 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().

std::vector<double> Isis::ReseauDistortionMap::p_rsamps
private

Refined Reseau Locations.

Definition at line 52 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().

double Isis::ReseauDistortionMap::p_undistortedSamps
private

 Dimensions of

undistorted cube

Definition at line 56 of file ReseauDistortionMap.h.

Referenced by ReseauDistortionMap(), SetFocalPlane(), and SetUndistortedFocalPlane().


The documentation for this class was generated from the following files: