1 #include "RadialDistortionMap.h" 7 RadialDistortionMap::RadialDistortionMap(Camera *parent,
double k1,
double zDirection) : CameraDistortionMap(parent, zDirection) {
18 offsetSqrd = dx * dx + dy * dy;
42 offsetSqrd = uy * uy + ux * ux;
43 double guess_dx, guess_dy;
44 double guess_ux, guess_uy;
51 guess_dx = ux / (1.0 + p_k1 * offsetSqrd);
52 guess_dy = uy / (1.0 + p_k1 * offsetSqrd);
55 offsetSqrd = guess_dy * guess_dy + guess_dx * guess_dx;
57 guess_ux = guess_dx * (1.0 + p_k1 * offsetSqrd);
58 guess_uy = guess_dy * (1.0 + p_k1 * offsetSqrd);
62 if(abs(guess_uy - uy) > delta) {
66 if(abs(guess_ux - ux) > delta) {
72 if(numAttempts > 20) {
double p_focalPlaneX
Distorted focal plane x.
Namespace for the standard library.
bool SetUndistortedFocalPlane(const double ux, const double uy)
Compute distorted focal plane x/y.
double p_undistortedFocalPlaneX
Undistorted focal plane x.
bool SetFocalPlane(const double dx, const double dy)
Compute undistorted focal plane x/y.
double p_focalPlaneY
Distorted focal plane y.
double p_undistortedFocalPlaneY
Undistorted focal plane y.
Namespace for ISIS/Bullet specific routines.