39 #include <visp3/tt/vpTemplateTrackerWarpSRT.h>
57 p_down[2] = p[2] / 2.;
58 p_down[3] = p[3] / 2.;
85 dIdW[0] = u * du + v * dv;
86 dIdW[1] = -v * du + u * dv;
126 double c = cos(p[1]);
127 double s = sin(p[1]);
128 double scale = 1.0 + p[0];
130 u2 = scale * (c * u1 - s * v1) + p[2];
131 v2 = scale * (s * u1 + c * v1) + p[3];
143 double c = cos(p[1]);
144 double s = sin(p[1]);
145 double scale = 1.0 + p[0];
147 X2[0] = scale * (c * X1[0] - s * X1[1]) + p[2];
148 X2[1] = scale * (s * X1[0] + c * X1[1]) + p[3];
165 double c = cos(p[1]);
166 double s = sin(p[1]);
167 double scale = 1.0 + p[0];
168 double c_u_s_v = c * u - s * v;
169 double s_u_c_v = s * u + c * v;
172 dM[0][1] = -scale * s_u_c_v;
177 dM[1][1] = scale * c_u_s_v;
192 double c = cos(p[1]);
193 double s = sin(p[1]);
194 double scale = 1.0 + p[0];
196 for (
unsigned int i = 0; i <
nbParam; i++) {
197 dM[0][i] = scale * (c * dwdp0[i] - s * dwdp0[i +
nbParam]);
198 dM[1][i] = scale * (s * dwdp0[i] + c * dwdp0[i +
nbParam]);
211 double c = cos(p[1]);
212 double s = sin(p[1]);
213 double scale = 1.0 + p[0];
215 X2[0] = scale * (c * X1[0] - s * X1[1]) + p[2];
216 X2[1] = scale * (s * X1[0] + c * X1[1]) + p[3];
227 double c = cos(p[1]);
228 double s = sin(p[1]);
229 double scale = 1.0 + p[0];
233 p_inv[0] = 1.0 / scale - 1.0;
234 p_inv[1] = atan2(-s, c);
235 p_inv[2] = -(c * u + s * v) / scale;
236 p_inv[3] = (s * u - c * v) / scale;
249 double c1 = cos(p1[1]);
250 double s1 = sin(p1[1]);
251 double c2 = cos(p2[1]);
252 double s2 = sin(p2[1]);
253 double scale1 = 1.0 + p1[0];
254 double scale2 = 1.0 + p2[0];
260 p12[0] = scale1 * scale2 - 1.0;
261 p12[1] = atan2(s1 * c2 + c1 * s2, c1 * c2 - s1 * s2);
262 p12[2] = scale1 * (c1 * u2 - s1 * v2) + u1;
263 p12[3] = scale1 * (s1 * u2 + c1 * v2) + v1;
Implementation of column vector and the associated operations.
Implementation of a matrix and operations on matrices.
vpTemplateTrackerWarpSRT()
void warpXInv(const vpColVector &X1, vpColVector &X2, const vpColVector &p)
void dWarp(const vpColVector &X, const vpColVector &, const vpColVector &p, vpMatrix &dM)
void getdW0(const int &v, const int &u, const double &dv, const double &du, double *dIdW)
void getParamPyramidUp(const vpColVector &p, vpColVector &p_up)
void getParamPyramidDown(const vpColVector &p, vpColVector &p_down)
void dWarpCompo(const vpColVector &, const vpColVector &, const vpColVector &p, const double *dwdp0, vpMatrix &dM)
void getParamInverse(const vpColVector &p, vpColVector &p_inv) const
void getdWdp0(const int &v, const int &u, double *dIdW)
void warpX(const vpColVector &X1, vpColVector &X2, const vpColVector &p)
void pRondp(const vpColVector &p1, const vpColVector &p2, vpColVector &p12) const
unsigned int nbParam
Number of parameters used to model warp transformation.