1 #ifndef ldpk_squeeze_xy_extender_sdv
2 #define ldpk_squeeze_xy_extender_sdv
4 #include <ldpk/ldpk_extender_base.h>
10 template <
class VEC2,
class MAT2>
14 typedef VEC2 vec2_type;
15 typedef MAT2 mat2_type;
18 mat2_type _m_sq,_inv_m_sq;
24 _m_sq = mat2_type(1.0);
25 _inv_m_sq = mat2_type(1.0);
28 void set_sq(
double sq)
31 _m_sq = mat2_type(_sq,0.0,0.0,1.0);
32 _inv_m_sq = mat2_type(1.0 / _sq,0.0,0.0,1.0);
38 vec2_type
eval(
const vec2_type& p)
const
42 {
return _inv_m_sq * q; }
44 vec2_type
eval_inv(
const vec2_type& q,
const vec2_type& p_start)
const
45 {
return _inv_m_sq * q; }
53 template <
class VEC2,
class MAT2>
57 typedef VEC2 vec2_type;
58 typedef MAT2 mat2_type;
61 mat2_type _m_sq,_inv_m_sq;
67 _m_sq = mat2_type(1.0);
68 _inv_m_sq = mat2_type(1.0);
71 void set_sq(
double sq)
74 _m_sq = mat2_type(1.0,0.0,0.0,_sq);
75 _inv_m_sq = mat2_type(1.0,0.0,0.0,1.0 / _sq);
81 vec2_type
eval(
const vec2_type& p)
const
85 {
return _inv_m_sq * q; }
87 vec2_type
eval_inv(
const vec2_type& q,
const vec2_type& p_start)
const
88 {
return _inv_m_sq * q; }
const mat2_type & get_mat() const
The matrix for this extender.
Definition: ldpk_squeeze_extender.h:90
vec2_type eval_inv(const vec2_type &q) const
eval_inv() is applying lens distortion (distort)
Definition: ldpk_squeeze_extender.h:41
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
const mat2_type & get_mat() const
The matrix for this extender.
Definition: ldpk_squeeze_extender.h:47
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_squeeze_extender.h:44
The squeeze-x/y-extender scales the optical-axis-perpendicular coordinates of the incident ray toward...
Definition: ldpk_squeeze_extender.h:11
Definition: ldpk_squeeze_extender.h:54
vec2_type eval_inv(const vec2_type &q) const
eval_inv() is applying lens distortion (distort)
Definition: ldpk_squeeze_extender.h:84
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_squeeze_extender.h:87
vec2_type eval(const vec2_type &p) const
eval() is per definition removal of lens distortion (undistort).
Definition: ldpk_squeeze_extender.h:38
const mat2_type & get_mat_inv() const
The inverse matrix for this extender.
Definition: ldpk_squeeze_extender.h:93
vec2_type eval(const vec2_type &p) const
eval() is per definition removal of lens distortion (undistort).
Definition: ldpk_squeeze_extender.h:81
const mat2_type & get_mat_inv() const
The inverse matrix for this extender.
Definition: ldpk_squeeze_extender.h:50