ldpk
|
A polynomial model with N coefficients for radially symmetric lenses. This class contains the model for normalized coordinates with diagonal radius = 1. Lens center is at (0,0), because we take it into account in the plugin class. More...
#include <ldpk_generic_radial_distortion.h>
Public Types | |
typedef generic_distortion_base< VEC2, MAT2, N > | base_type |
typedef VEC2 | vec2_type |
typedef MAT2 | mat2_type |
Public Member Functions | |
double | get_coeff (int i) const |
Get coefficient c[i], 0 <= i < N (i.e. coefficient power r^(2i)) | |
void | set_coeff (int i, double q) |
Set coefficient c[i], 0 <= i < N. | |
vec2_type | operator() (const vec2_type &p_dn) const |
Remove distortion. p_dn is a point in diagonally normalized coordinates. | |
mat2_type | jacobi (const vec2_type &p_dn) const |
Analytic version of the Jacobi-matrix, about 2.5 times faster than the base class version which uses difference quotients. | |
void | derive (double *dg, int n_parameters, const vec2_type &p_dn) const |
Derivative with respect to distortion coefficients. dg points to an array with 2 * N Elements. | |
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. | |
![]() | |
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.. | |
void | reset_k_max_iter () |
Reset k_max_iter for debugging purposes. | |
int | get_k_iter () const |
Number of iterations until epsilon was reached. This value is reset at the beginning of each iterative calculation. | |
int | get_k_max_iter () const |
By this value you can check how much iterations per pixel were required to warp an entire image or sequence. Use reset_k_max_iter() to reset to 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). | |
double | get_diff () const |
Difference between is-value and should-be-value in map_inverse(). Inverse mapping is implemented as fixed-point problem. map_inverse() terminates, when diff is smaller than epsilon or the number of iterations exceeds n_max_iter. | |
vec2_type | eval (const vec2_type &p) const |
Same as method instead of operator. | |
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. | |
Additional Inherited Members | |
![]() | |
void | check_range (int i) const |
A derived class may check if the index is valid. | |
A polynomial model with N coefficients for radially symmetric lenses. This class contains the model for normalized coordinates with diagonal radius = 1. Lens center is at (0,0), because we take it into account in the plugin class.