9 #include "MocWideAngleDistortionMap.h"
29 MocWideAngleDistortionMap::MocWideAngleDistortionMap(
Camera *parent,
bool red) :
33 p_coefs.push_back(0.9993258);
34 p_coefs.push_back(0.4655529);
35 p_coefs.push_back(-0.1548756);
36 p_coefs.push_back(1.827967);
37 p_coefs.push_back(-3.057435);
38 p_coefs.push_back(2.226331);
40 p_icoefs.push_back(0.9995458);
41 p_icoefs.push_back(-0.4237090);
42 p_icoefs.push_back(0.2810857);
43 p_icoefs.push_back(-0.1697522);
44 p_icoefs.push_back(0.068131536);
45 p_icoefs.push_back(-0.012665644);
48 p_coefs.push_back(1.000246);
49 p_coefs.push_back(0.4612695);
50 p_coefs.push_back(0.2352545);
51 p_coefs.push_back(0.3535922);
52 p_coefs.push_back(-0.2853861);
53 p_coefs.push_back(0.5574971);
55 p_icoefs.push_back(0.9994557);
56 p_icoefs.push_back(-0.4515307);
57 p_icoefs.push_back(0.3152195);
58 p_icoefs.push_back(-0.1993053);
59 p_icoefs.push_back(0.081707217);
60 p_icoefs.push_back(-0.014814299);
71 double sdy = dy / p_scale;
74 double s2 = dx * dx + sdy * sdy;
84 double ang2 = ang * ang;
85 double angp = p_coefs[p_numCoefs-1];
86 for(
int i = p_numCoefs - 2; i >= 0; i--) {
87 angp = angp * ang2 + p_coefs[i];
102 double sp2 = ux * ux + uy * uy;
110 double sp = sqrt(sp2);
112 double angp2 = angp * angp;
113 double ang = p_icoefs[p_numCoefs-1];
114 for(
int i = p_numCoefs - 2; i >= 0; i--) {
115 ang = ang * angp2 + p_icoefs[i];