3 #include <ldpk/tde4_ldp_radial_fisheye_base_deg_8.experimental.h> 10 template <
class VEC2,
class MAT2>
14 typedef VEC2 vec2_type;
15 typedef MAT2 mat2_type;
17 using base_type::_fl_dn;
18 using base_type::_r_clip_factor;
20 bool remap_fe2plain(
double r_ed_dn,
double& r_plain_dn)
25 double arg = r_ed_dn / (2.0 * _fl_dn);
27 if((arg >= 1) || (arg <= -1))
29 double theta = 2.0 * ::asin(arg);
31 if(theta >= M_PI / 2.0)
34 r_plain_dn = _fl_dn * tan(theta);
36 if(r_plain_dn > _r_clip_factor)
37 { r_plain_dn = _r_clip_factor; }
40 bool remap_plain2fe(
double r_plain_dn,
double& r_ed_dn)
44 double theta = atan2(r_plain_dn,_fl_dn);
46 r_ed_dn = 2.0 * _fl_dn * ::sin(theta * (1.0/2.0));
49 bool getModelName(
char *name)
51 #ifdef LDPK_COMPILE_AS_PLUGIN_SDV 52 strcpy(name,
"3DE4 Radial - Fisheye, Equisolid, Degree 8 [Plugin]");
54 strcpy(name,
"3DE4 Radial - Fisheye, Equisolid, Degree 8");
Plugin class for radial distortion. Does not compensate for decentering.
Definition: tde4_ldp_radial_fisheye_base_deg_8.experimental.h:14
Plugin class for radial distortion. Does not compensate for decentering.
Definition: tde4_ldp_radial_fisheye_equisolid_deg_8.experimental.h:11