|
Isis 3 Programmer Reference
|
9 #include "ApolloMetricDistortionMap.h"
10 #include "CameraFocalPlaneMap.h"
32 ApolloMetricDistortionMap::ApolloMetricDistortionMap(
Camera *parent,
36 double j2,
double t0) :
69 double rr = x * x + y * y;
70 double rrrr = rr * rr;
75 double dr = 1 +
p_k1 * rr +
p_k2 * rrrr +
p_k3 * rr * rrrr;
106 double xx, yy, rr, rrrr, dr;
107 double xdistortion, ydistortion;
108 double xdistorted, ydistorted;
109 double xprevious, yprevious;
115 xprevious = 1000000.0;
116 yprevious = 1000000.0;
118 double tolerance = 0.000001;
120 bool bConverged =
false;
125 for(
int i = 0; i < 50; i++) {
140 xdistortion = xt * dr - dt * sin(
p_t0);
141 ydistortion = yt * dr + dt * cos(
p_t0);
144 xt = ux - xdistortion;
145 yt = uy - ydistortion;
148 xdistorted = xt +
p_xp;
149 ydistorted = yt +
p_yp;
152 if((fabs(xt - xprevious) <= tolerance) && (fabs(yt - yprevious) <= tolerance)) {
double p_focalPlaneX
Distorted focal plane x.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
double p_t0
Angle between positive x-axis of image and vector to imaged point.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
double p_k3
Third coefficient of radial distortion.
double p_k2
Second coefficient of radial distortion.
bool SetFocalPlane(const double dx, const double dy)
Compute undistorted focal plane x/y.
double p_xp
Principal point x-coordinate.
Distort/undistort focal plane coordinates.
double p_j2
Second coefficient of decentering distortion.
Namespace for the standard library.
double p_k1
First coefficient of radial distortion.
double p_yp
Principal point y-coordinate.
double p_j1
First coefficient of decentering distortion.
bool SetUndistortedFocalPlane(const double ux, const double uy)
Compute distorted focal plane x/y.
double p_focalPlaneY
Distorted focal plane y.
This is free and unencumbered software released into the public domain.