3 #include <ldpk/ldpk_extender_base.h> 8 template <
class VEC2,
class MAT2>
12 typedef VEC2 vec2_type;
13 typedef MAT2 mat2_type;
21 _inv_m = mat2_type(1.0);
24 void set(
const mat2_type& m)
31 void set(
const E0& e0)
37 template <
class E0,
class E1>
38 void set(
const E0& e0,
const E1& e1)
40 _m = e0.get_mat() * e1.get_mat();
44 template <
class E0,
class E1,
class E2>
45 void set(
const E0& e0,
const E1& e1,
const E2& e2)
47 _m = e0.get_mat() * e1.get_mat() * e2.get_mat();
51 template <
class E0,
class E1,
class E2,
class E3>
52 void set(
const E0& e0,
const E1& e1,
const E2& e2,
const E3& e3)
54 _m = e0.get_mat() * e1.get_mat() * e2.get_mat() * e3.get_mat();
58 template <
class E0,
class E1,
class E2,
class E3,
class E4>
59 void set(
const E0& e0,
const E1& e1,
const E2& e2,
const E3& e3,
const E4& e4)
61 _m = e0.get_mat() * e1.get_mat() * e2.get_mat() * e3.get_mat() * e4.get_mat();
65 vec2_type
eval(
const vec2_type& p)
const 69 {
return _inv_m * q; }
71 vec2_type
eval_inv(
const vec2_type& q,
const vec2_type& p_start)
const 72 {
return _inv_m * q; }
Base class of all extenders The concept of extenders as turned out to be useful in the new-style dist...
Definition: ldpk_extender_base.h:16
vec2_type eval(const vec2_type &p) const
eval() is per definition removal of lens distortion (undistort).
Definition: ldpk_linear_extender.h:65
The namespace of (most of the) things related to the Lens Distortion Plugin Kit.
Definition: ldpk.h:169
const mat2_type & get_mat_inv() const
The inverse matrix for this extender.
Definition: ldpk_linear_extender.h:77
const mat2_type & get_mat() const
The matrix for this extender.
Definition: ldpk_linear_extender.h:74
vec2_type eval_inv(const vec2_type &q, const vec2_type &p_start) const
Generally (but not here), an initial value is needed for calculating the inverse. ...
Definition: ldpk_linear_extender.h:71
vec2_type eval_inv(const vec2_type &q) const
eval_inv() is applying lens distortion (distort)
Definition: ldpk_linear_extender.h:68
A general linear extender, based on a 2x2-matrix.
Definition: ldpk_linear_extender.h:9
linear_extender()
Default: unit matrix.
Definition: ldpk_linear_extender.h:18