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 void getBoundingBoxUndistort(
double xa_in,
double ya_in,
double xb_in,
double yb_in,
double& xa_out,
double& ya_out,
double& xb_out,
double& yb_out,
int nx,
int ny)
27 void getBoundingBoxDistort(
double xa_in,
double ya_in,
double xb_in,
double yb_in,
double& xa_out,
double& ya_out,
double& xb_out,
double& yb_out,
int nx,
int ny)
34 bool remap_fe2plain(
double r_ed_dn,
double& r_plain_dn)
38 double arg = r_ed_dn / (2.0 * _fl_dn);
40 if((arg >= 1) || (arg <= -1))
42 double theta = 2.0 * ::asin(arg);
44 if(theta >= M_PI / 2.0)
47 r_plain_dn = _fl_dn * tan(theta);
49 if(r_plain_dn > _r_clip_factor)
50 { r_plain_dn = _r_clip_factor; }
53 bool remap_plain2fe(
double r_plain_dn,
double& r_ed_dn)
57 double theta = atan2(r_plain_dn,_fl_dn);
59 r_ed_dn = 2.0 * _fl_dn * ::sin(theta * (1.0/2.0));
64 #ifdef LDPK_COMPILE_AS_PLUGIN_SDV 65 strcpy(name,
"3DE4 Radial - Fisheye, Equisolid, Degree 8 [Plugin]");
67 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
void getBoundingBoxUndistort(double xa_in, double ya_in, double xb_in, double yb_in, double &xa_out, double &ya_out, double &xb_out, double &yb_out, int nx, int ny)
Bounding box.
Definition: tde4_ldp_radial_fisheye_equisolid_deg_8.experimental.h:20
bool getModelName(char *name)
returns a name for the model as to show up in the GUI (maximum length of "name": 100 bytes)...
Definition: tde4_ldp_radial_fisheye_equisolid_deg_8.experimental.h:62
Plugin class for radial distortion. Does not compensate for decentering.
Definition: tde4_ldp_radial_fisheye_equisolid_deg_8.experimental.h:11
void getBoundingBoxDistort(double xa_in, double ya_in, double xb_in, double yb_in, double &xa_out, double &ya_out, double &xb_out, double &yb_out, int nx, int ny)
Iterate around the specified box, distort the points and compute the bounding box.
Definition: tde4_ldp_radial_fisheye_equisolid_deg_8.experimental.h:27