OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ossimSmacCallibrationSystem Class Reference


Proecedure for compensation of aerial camera lens distortion as computed by the Simultaneous Multiframe Analytical Calibration (SMAC) System: More...

#include <ossimSmacCallibrationSystem.h>

Inheritance diagram for ossimSmacCallibrationSystem:
ossimLensDistortion ossim2dTo2dTransform ossimObject ossimReferenced

Public Member Functions

 ossimSmacCallibrationSystem (const ossimDpt &callibratedCenter=ossimDpt(0.0, 0.0))
 
 ossimSmacCallibrationSystem (double k0, double k1, double k2, double k3, double k4, double p1, double p2, double p3, double p4, const ossimDpt &callibratedCenter=ossimDpt(0.0, 0.0))
 
 ossimSmacCallibrationSystem (const ossimSmacCallibrationSystem &src)
 
virtual ossimObjectdup () const
 
const double * symmetricRadialDistortionCoefficients () const
 
void setSymmetricRadialDistortionCoefficients (double k0, double k1, double k2, double k3, double k4)
 
const double * decenteringDistortionCoefficients () const
 
void setDecenteringDistortionCoefficients (double p1, double p2, double p3, double p4)
 
const double * radialDistortionCoefficients () const
 
virtual void undistort (const ossimDpt &input, ossimDpt &output) const
 
- Public Member Functions inherited from ossimLensDistortion
 ossimLensDistortion (const ossimDpt &callibratedCenter=ossimDpt(0, 0))
 
void setCenter (const ossimDpt &center)
 
const ossimDptgetCenter () const
 
virtual void forward (const ossimDpt &input, ossimDpt &output) const
 
virtual void inverse (const ossimDpt &input, ossimDpt &output)
 
virtual void distort (const ossimDpt &input, ossimDpt &output) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
- Public Member Functions inherited from ossim2dTo2dTransform
virtual void forward (ossimDpt &modify_this) const
 
virtual void inverse (const ossimDpt &input, ossimDpt &output) const
 
virtual void inverse (ossimDpt &modify_this) const
 
virtual const ossim2dTo2dTransformoperator= (const ossim2dTo2dTransform &rhs)
 
virtual ossimDpt getOrigin () const
 
virtual std::ostream & print (std::ostream &out) const
 Generic print method. More...
 
void setConvergenceThreshold (const double &new_threshold)
 
void setMaxIterations (int new_max_iters)
 
void setDxDy (const ossimDpt &dxdy)
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () const
 
virtual ossimString getDescription () const
 
virtual ossimString getClassName () const
 
virtual RTTItypeid getType () const
 
virtual bool canCastTo (ossimObject *obj) const
 
virtual bool canCastTo (const RTTItypeid &id) const
 
virtual bool canCastTo (const ossimString &parentClassName) const
 
virtual bool isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
 
virtual void accept (ossimVisitor &visitor)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (const ossimReferenced &)
 
void ref () const
 increment the reference count by one, indicating that this object has another pointer which is referencing it. More...
 
void unref () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
void unref_nodelete () const
 decrement the reference count by one, indicating that a pointer to this object is referencing it. More...
 
int referenceCount () const
 

Static Public Member Functions

static void test ()
 

Protected Attributes

double _symmetricRadialDistortionCoefficients [5]
 The coeeficients are arranged index 0..N-1 where 0 refers to K'0 ... More...
 
double _decenteringDistortionCoefficients [4]
 The coeeficients are arranged index 0..N-1 where 0 refers to P1 ... More...
 
- Protected Attributes inherited from ossimLensDistortion
ossimDpt theCenter
 
- Protected Attributes inherited from ossim2dTo2dTransform
double theConvergenceThreshold
 
int theMaxIterations
 
ossimDpt theDxDy
 

Additional Inherited Members

- Protected Member Functions inherited from ossim2dTo2dTransform
 ossim2dTo2dTransform ()
 
virtual ~ossim2dTo2dTransform ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Detailed Description


Proecedure for compensation of aerial camera lens distortion as computed by the Simultaneous Multiframe Analytical Calibration (SMAC) System:

  TRANSLATION TO POINT OF SYMMETRY:
  All measured points (x0, y0) requiring a distortion correction must be first referenced to the principal point of
  autocollimation (PPA) at (0,0) as are the calibrated fiducials. Once the measured points are in the PPA reference frame, they
  then must be translated to the calibrated point of symmetry (POS), (Xp, Yp).
X = X0 - Xp
Y = Y0 - Yp
  Once X and Y are found we need to obtain the radial distance R:
      R = sqrt(X^2 + Y^2)
  SYMMETRIC RADIAL DISTORTION: 
  To compute the correction for the symmetric radial distortion (DXr, DYr)
DXr = X(K'0 + K'1*R^2 + K'2*R^4 + K'3*R^6 + K'4*R^8);
DXr = Y(K'0 + K'1*R^2 + K'2*R^4 + K'3*R^6 + K'4*R^8);
  DECENTERING DISTORTION:
  To compute the correction for decentering distortion (DXd, DYd) of the measured point use
  the coefficients of the decentering distortion (P1, .. P4) in the following formula
DXd = (1 + P3*R^2 + P4R^4)*(P1*(R^2 + 2*X^2) + 2*P2*X*Y)
DYd = (1 + P3*R^2 + P4R^4)*(2P1*X*Y + P2*(R^2 + 2*Y^2))
  FINAL CORRECTED COORDINATES: 
  Adding the symmetric radial and decentering distortion corrections to the 
  translation of the measured point results in a corrected final x and y-coordinate 
  for the measured point (Xc, Yc).
Xc = X + DXr + DXd
Yc = Y + DYr + DYd 
*

Definition at line 59 of file ossimSmacCallibrationSystem.h.

Constructor & Destructor Documentation

◆ ossimSmacCallibrationSystem() [1/3]

ossimSmacCallibrationSystem::ossimSmacCallibrationSystem ( const ossimDpt callibratedCenter = ossimDpt(0.0, 0.0))
inline

Definition at line 62 of file ossimSmacCallibrationSystem.h.

63  :ossimLensDistortion(callibratedCenter)
64  {
74  }
double _decenteringDistortionCoefficients[4]
The coeeficients are arranged index 0..N-1 where 0 refers to P1 ...
double _symmetricRadialDistortionCoefficients[5]
The coeeficients are arranged index 0..N-1 where 0 refers to K&#39;0 ...
ossimLensDistortion(const ossimDpt &callibratedCenter=ossimDpt(0, 0))

◆ ossimSmacCallibrationSystem() [2/3]

ossimSmacCallibrationSystem::ossimSmacCallibrationSystem ( double  k0,
double  k1,
double  k2,
double  k3,
double  k4,
double  p1,
double  p2,
double  p3,
double  p4,
const ossimDpt callibratedCenter = ossimDpt(0.0,0.0) 
)
inline

Definition at line 75 of file ossimSmacCallibrationSystem.h.

78  :ossimLensDistortion(callibratedCenter)
79  {
80  setSymmetricRadialDistortionCoefficients(k0, k1, k2, k3, k4);
85  }
double _decenteringDistortionCoefficients[4]
The coeeficients are arranged index 0..N-1 where 0 refers to P1 ...
void setSymmetricRadialDistortionCoefficients(double k0, double k1, double k2, double k3, double k4)
ossimLensDistortion(const ossimDpt &callibratedCenter=ossimDpt(0, 0))

◆ ossimSmacCallibrationSystem() [3/3]

ossimSmacCallibrationSystem::ossimSmacCallibrationSystem ( const ossimSmacCallibrationSystem src)
inline

Definition at line 86 of file ossimSmacCallibrationSystem.h.

References _decenteringDistortionCoefficients, and _symmetricRadialDistortionCoefficients.

87  {
94  }
double _decenteringDistortionCoefficients[4]
The coeeficients are arranged index 0..N-1 where 0 refers to P1 ...
double _symmetricRadialDistortionCoefficients[5]
The coeeficients are arranged index 0..N-1 where 0 refers to K&#39;0 ...

Member Function Documentation

◆ decenteringDistortionCoefficients()

const double* ossimSmacCallibrationSystem::decenteringDistortionCoefficients ( ) const
inline

Definition at line 111 of file ossimSmacCallibrationSystem.h.

112  {
114  }
double _decenteringDistortionCoefficients[4]
The coeeficients are arranged index 0..N-1 where 0 refers to P1 ...

◆ dup()

virtual ossimObject* ossimSmacCallibrationSystem::dup ( ) const
inlinevirtual

Reimplemented from ossimObject.

Definition at line 95 of file ossimSmacCallibrationSystem.h.

96  {
97  return new ossimSmacCallibrationSystem(*this);
98  }
ossimSmacCallibrationSystem(const ossimDpt &callibratedCenter=ossimDpt(0.0, 0.0))

◆ radialDistortionCoefficients()

const double* ossimSmacCallibrationSystem::radialDistortionCoefficients ( ) const
inline

Definition at line 122 of file ossimSmacCallibrationSystem.h.

123  {
125  }
double _symmetricRadialDistortionCoefficients[5]
The coeeficients are arranged index 0..N-1 where 0 refers to K&#39;0 ...

◆ setDecenteringDistortionCoefficients()

void ossimSmacCallibrationSystem::setDecenteringDistortionCoefficients ( double  p1,
double  p2,
double  p3,
double  p4 
)
inline

Definition at line 115 of file ossimSmacCallibrationSystem.h.

116  {
121  }
double _decenteringDistortionCoefficients[4]
The coeeficients are arranged index 0..N-1 where 0 refers to P1 ...

◆ setSymmetricRadialDistortionCoefficients()

void ossimSmacCallibrationSystem::setSymmetricRadialDistortionCoefficients ( double  k0,
double  k1,
double  k2,
double  k3,
double  k4 
)
inline

Definition at line 103 of file ossimSmacCallibrationSystem.h.

104  {
110  }
double _symmetricRadialDistortionCoefficients[5]
The coeeficients are arranged index 0..N-1 where 0 refers to K&#39;0 ...

◆ symmetricRadialDistortionCoefficients()

const double* ossimSmacCallibrationSystem::symmetricRadialDistortionCoefficients ( ) const
inline

Definition at line 99 of file ossimSmacCallibrationSystem.h.

100  {
102  }
double _symmetricRadialDistortionCoefficients[5]
The coeeficients are arranged index 0..N-1 where 0 refers to K&#39;0 ...

◆ test()

void ossimSmacCallibrationSystem::test ( )
static

Definition at line 46 of file ossimSmacCallibrationSystem.cpp.

References ossimLensDistortion::distort(), and undistort().

47 {
48  // this example was grabbed from a sample callibration report;
49  double k0 = -.2165e-3;
50  double k1 = .4230e-7;
51  double k2 = -.1652e-11;
52  double k3 = .2860e-19;
53  double k4 = .5690e-26;
54  double p1 = -.1483e-6;
55  double p2 = .1558e-6;
56  double p3 = -.1464e-18;
57  double p4 = .1233e-38;
58 
59  ossimSmacCallibrationSystem smac(k0, k1, k2, k3, k4,
60  p1, p2, p3, p4,
61  ossimDpt(.003, -.001));
62  ossimDpt output;
63  smac.undistort(ossimDpt(62.142, -62.336), output);
64  std::cout << "Input: " << ossimDpt(62.142, -62.336) << std::endl;
65  std::cout << "Output should be close to x = 62.136 and y = -62.332 <====> " << output << std::endl;
66  ossimDpt input = output;
67  std::cout << "Now test the inverse!" << std::endl;
68  smac.distort(input, output);
69 
70  std::cout << "Inverse should be close to " << ossimDpt(62.142, -62.336) << " <=====> " << output << std::endl;
71 }
Proecedure for compensation of aerial camera lens distortion as computed by the Simultaneous Multif...

◆ undistort()

void ossimSmacCallibrationSystem::undistort ( const ossimDpt input,
ossimDpt output 
) const
virtual

Implements ossimLensDistortion.

Definition at line 19 of file ossimSmacCallibrationSystem.cpp.

References _decenteringDistortionCoefficients, _symmetricRadialDistortionCoefficients, ossimLensDistortion::theCenter, ossimDpt::x, x, ossimDpt::y, and y.

Referenced by test().

20 {
21  double x = input.x - theCenter.x;
22  double y = input.y - theCenter.y;
23  double x2 = x*x;
24  double y2 = y*y;
25  double r = std::sqrt(x2 + y2);
26  double r2 = r*r;
27  double r4 = r2*r2;
28  double r6 = r2*r4;
29  double r8 = r4*r4;
35  double DXr = x*(sum);
36  double DYr = y*(sum);
41 
42  output.x = x + DXr + DXd;
43  output.y = y + DYr + DYd;
44 }
ossim_uint32 x
double _decenteringDistortionCoefficients[4]
The coeeficients are arranged index 0..N-1 where 0 refers to P1 ...
ossim_uint32 y
double y
Definition: ossimDpt.h:165
double _symmetricRadialDistortionCoefficients[5]
The coeeficients are arranged index 0..N-1 where 0 refers to K&#39;0 ...
double x
Definition: ossimDpt.h:164

Member Data Documentation

◆ _decenteringDistortionCoefficients

double ossimSmacCallibrationSystem::_decenteringDistortionCoefficients[4]
protected

The coeeficients are arranged index 0..N-1 where 0 refers to P1 ...

PN

Definition at line 140 of file ossimSmacCallibrationSystem.h.

Referenced by ossimSmacCallibrationSystem(), and undistort().

◆ _symmetricRadialDistortionCoefficients

double ossimSmacCallibrationSystem::_symmetricRadialDistortionCoefficients[5]
protected

The coeeficients are arranged index 0..N-1 where 0 refers to K'0 ...

K'(n-1)

Definition at line 134 of file ossimSmacCallibrationSystem.h.

Referenced by ossimSmacCallibrationSystem(), and undistort().


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