ldpk
Public Member Functions | Protected Member Functions | List of all members
ldpk::generic_distortion_base< VEC2, MAT2, N > Class Template Referenceabstract

Base class for a distortion model with N parameters. You may find it useful to derive your own distortion model class from this one. It contains methods for inverting the distortion model function. We derive this class from the standard unary function class in order to get a well-defined function object. More...

#include <ldpk_generic_distortion_base.h>

Inheritance diagram for ldpk::generic_distortion_base< VEC2, MAT2, N >:
Inheritance graph
[legend]
Collaboration diagram for ldpk::generic_distortion_base< VEC2, MAT2, N >:
Collaboration graph
[legend]

Public Member Functions

int get_num_parameters () const
 Number of parameters, that is N.
 
void setup_map_inverse (int n_max_iter, int n_post_iter, double epsilon)
 Configure iterative procedure for map_inverse(). Call this, if you don't agree with the default values.
 
virtual void done ()
 After changing one or more coefficients of the model, call this (future use). The derived class may prepare some data structure for fast/precise evalutation..
 
virtual double get_coeff (int i) const =0
 There must be methods to address coefficients by one single index i in [0,N[.
 
virtual void set_coeff (int i, double)=0
 
int get_n_max_iter () const
 User-defined maximum number of iterations applied in map_inverse in order to fulfill the termination condition.
 
int get_n_post_iter () const
 User-defined number of additional iterations to be applied when the termination condition is fulfilled (which we call post-iterations).
 
virtual vec2_type operator() (const vec2_type &p) const =0
 Remove distortion. This method is non-iterative.
 
vec2_type eval (const vec2_type &p) const
 Same as method instead of operator.
 
virtual mat2_type jacobi (const vec2_type &p_dn) const
 Jacobi-Matrix. The result is a matrix g_{ij} = d/dp_j f(p)_i, where f represents the undistort-function. We compute this by means of difference quotients. This requires four evaluations. For better performance, you can implement the analytic form in your derived distortion class.
 
virtual void derive (double *dg, int n_parameters, const vec2_type &p_dn) const
 Not all distortion functions will support this.
 
virtual vec2_type map_inverse (const vec2_type &q) const
 Inverse mapping by solving the fixed point equation without providing initial values. Virtual, because the derived class might use some smart data structure for calculating an initial value.
 
vec2_type map_inverse (const vec2_type &q, const vec2_type &p_start) const
 For given q, we are looking for p so that f(p) = q. p_start is near to p.
 
virtual std::ostream & out (std::ostream &cout) const
 The derived class implements a method for printing values inside 3DE4's matrix tool dialog. This functionality is currently not supported by tde4_ld_plugin.
 

Protected Member Functions

void check_range (int i) const
 A derived class may check if the index is valid.
 

Detailed Description

template<class VEC2, class MAT2, int N>
class ldpk::generic_distortion_base< VEC2, MAT2, N >

Base class for a distortion model with N parameters. You may find it useful to derive your own distortion model class from this one. It contains methods for inverting the distortion model function. We derive this class from the standard unary function class in order to get a well-defined function object.


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