ldpk
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tde4_ldp_radial_fisheye_base_deg_8< VEC2, MAT2 > Class Template Referenceabstract

Plugin class for radial distortion. Does not compensate for decentering. More...

#include <tde4_ldp_radial_fisheye_base_deg_8.experimental.h>

Inheritance diagram for tde4_ldp_radial_fisheye_base_deg_8< VEC2, MAT2 >:
Inheritance graph
[legend]
Collaboration diagram for tde4_ldp_radial_fisheye_base_deg_8< VEC2, MAT2 >:
Collaboration graph
[legend]

Public Member Functions

double r_clip_factor () const
 
void r_clip_factor (double f)
 
virtual bool getModelName (char *name)=0
 returns a name for the model as to show up in the GUI (maximum length of "name": 100 bytes)...
 
bool getParameterType (const char *identifier, tde4_ldp_ptype &ptype)
 returns type of given parameter... The method should return false, if the parameter addressed by identifier does not exist.
 
bool getParameterDefaultValue (const char *identifier, double &v)
 returns default value for given parameter (maximum length of "char *v": 1000 bytes)......
 
bool getParameterRange (const char *identifier, double &a, double &b)
 returns range for adjustable double parameters...
 
- Public Member Functions inherited from ldpk::ldp_builtin< VEC2, MAT2 >
double w_fb_cm () const
 
double h_fb_cm () const
 
double x_lco_cm () const
 
double y_lco_cm () const
 
double fl_cm () const
 
double pa () const
 
double fd_cm () const
 
double r_fb_cm () const
 
virtual bool undistort_gnomonic (double x0, double y0, double &x1, double &y1)
 Model function Our base class presents the model functions along with the projection. Internally, we have to carefully keep apart the model function and the projection. For most distortion models, this is no problem, yet for fisheye models it is, so all non-gnomonic distortion classes will have to overwrite these.
 
virtual bool distort_gnomonic (double x0, double y0, double &x1, double &y1)
 
virtual bool distort_gnomonic (double x0, double y0, double x1_start, double y1_start, double &x1, double &y1)
 
- Public Member Functions inherited from tde4_ld_plugin
const char * getVersionString () const
 
virtual bool getParameterDefaultValue (const char *identifier, char *v)
 
virtual bool getParameterDefaultValue (const char *identifier, int &v)
 
virtual bool getParameterDefaultValue (const char *identifier, bool &v)
 
virtual bool setParameterValue (const char *identifier, const char *v)
 
virtual bool setParameterValue (const char *identifier, int v)
 
virtual bool setParameterValue (const char *identifier, bool v)
 
virtual bool distort (double x0, double y0, double x1_start, double y1_start, double &x1, double &y1)
 potentially more efficient function which uses initial values...
 
virtual bool providesParameterDerivatives ()
 parameter derivatives to be used for distortion grid controls' matrix calculation routine...
 
virtual bool calcParameterDerivatives (double x, double y, int num_parameters, double *dx_dy)
 dx_dy is an array with 2 * num_parameters elements (x- and y- component for each of n derivatives)
 
virtual bool getJacobianMatrixDQ (double x0, double y0, double &m00, double &m01, double &m10, double &m11)
 calculate the Jacobian matrix of the undistort()-Method by means of difference quotients. This is the default implementation. Also use it for testing your own implementation of getJacobianMatrix(). The model function is evaluated at four points forming a little cross. If any of these evaluations fail (e.g. domain error), the method returns false, else true.
 
virtual bool getJacobianMatrix (double x0, double y0, double &m00, double &m01, double &m10, double &m11)
 calculate the Jacobian matrix of the undistort()-Method. Overwrite this, if you know the Jacobian for your own lens distortion model.
 
virtual bool getTwistVectorDQ (double x0, double y0, double &t0, double &t1)
 calculate the mixed derivatives ("twist vector") of the undistort()-Method. Overwrite this, if you know the twist vector for your own lens distortion model. The model function is evaluated at four points forming a little rectangle. If any of these evaluations fail (e.g. domain error), the method returns false, else true.
 
virtual bool getTwistVector (double x0, double y0, double &t0, double &t1)
 

Protected Member Functions

bool decypher (const char *name, int &i)
 
bool initializeParameters ()
 prepare the current set of parameters...
 
bool getNumParameters (int &n)
 returns the number of plugin parameters...
 
bool getParameterName (int i, char *identifier)
 returns "identifier" name of parameter "i" (maximum length of "identifier": 100 bytes)...
 
bool setParameterValue (const char *identifier, double v)
 set parameter values... parameters predefined by 3DE4: "tde4_focal_length_cm", "tde4_filmback_width_cm", "tde4_filmback_height_cm", "tde4_lens_center_offset_x_cm", "tde4_lens_center_offset_y_cm", "tde4_pixel_aspect", "tde4_custom_focus_distance_cm"
 
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.
 
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.
 
virtual bool remap_fe2plain (double r_ed_dn, double &r_plain_dn)=0
 
virtual bool remap_plain2fe (double r_plain_dn, double &r_ed_dn)=0
 
bool undistort (double x0, double y0, double &x1, double &y1)
 warp/unwarp 2D points...
 
bool distort (double x0, double y0, double &x1, double &y1)
 
- Protected Member Functions inherited from ldpk::ldp_builtin< VEC2, MAT2 >
vec2_type map_unit_to_dn (const vec2_type &p_unit) const
 
vec2_type map_dn_to_unit (const vec2_type &p_dn) const
 
void lock ()
 
void unlock ()
 
bool is_uptodate_lut () const
 The derived class uses this in order to check if the lookup table needs an update.
 
void no_longer_uptodate_lut ()
 This class and the derived class mark the lookup table as obsolete when some parameter was changed.
 
void set_uptodate_lut (bool u)
 If a derived class computes the LUT, it must have write-access to this flag.
 
virtual void update_lut ()
 Update the lookup table. The derived class will do this, if necessary, when distort() without initial value is invoked.
 
const ldpk::lookup_table< vec2_type > & get_lut () const
 The derived class has constant access, since it needs to consult it.
 
int get_num_builtin_parameters () const
 There are seven built-in parameters.
 
bool set_builtin_parameter_value (const char *identifier, double v)
 The return values indicates, if 'identifier' refers to a built-in parameter.
 
bool get_builtin_parameter_type (const char *identifier, tde4_ldp_ptype &ptype) const
 The return values indicates, if 'identifier' refers to a built-in parameter. Currently, all built-in parameters are double-valued.
 
void check_builtin_parameters ()
 This method should be invoked by the derived classes in initializeParameters(). It write error messages to stderr if parameters are not initialized properly. We check filmback width, filmback height, focal length and pixel aspect. Focus distance is not checked currently.
 

Protected Attributes

double _r_clip_factor
 
double _r_ed_dn_domain
 
double _r_plain_dn_domain
 
double _fl_dn
 
- Protected Attributes inherited from ldpk::ldp_builtin< VEC2, MAT2 >
CRITICAL_SECTION _critsec
 The Mutex, used in derived classes, initialized in constructor.
 
pthread_mutex_t _mutex
 

Detailed Description

template<class VEC2, class MAT2>
class tde4_ldp_radial_fisheye_base_deg_8< VEC2, MAT2 >

Plugin class for radial distortion. Does not compensate for decentering.


The documentation for this class was generated from the following file: