40 #include <visp3/tt/vpTemplateTrackerWarpSRT.h> 60 p_down[2] = p[2] / 2.;
61 p_down[3] = p[3] / 2.;
88 dIdW[0] = u * du + v * dv;
89 dIdW[1] = -v * du + u * dv;
129 double c = cos(p[1]);
130 double s = sin(p[1]);
131 double scale = 1.0 + p[0];
133 u2 = scale * (c * u1 - s * v1) + p[2];
134 v2 = scale * (s * u1 + c * v1) + p[3];
146 double c = cos(p[1]);
147 double s = sin(p[1]);
148 double scale = 1.0 + p[0];
150 X2[0] = scale * (c * X1[0] - s * X1[1]) + p[2];
151 X2[1] = scale * (s * X1[0] + c * X1[1]) + p[3];
169 double c = cos(p[1]);
170 double s = sin(p[1]);
171 double scale = 1.0 + p[0];
172 double c_u_s_v = c * u - s * v;
173 double s_u_c_v = s * u + c * v;
176 dM[0][1] = - scale * s_u_c_v;
181 dM[1][1] = scale * c_u_s_v;
196 double c = cos(p[1]);
197 double s = sin(p[1]);
198 double scale = 1.0 + p[0];
200 for (
unsigned int i = 0; i <
nbParam; i++) {
201 dM[0][i] = scale * (c * dwdp0[i] - s * dwdp0[i +
nbParam]);
202 dM[1][i] = scale * (s * dwdp0[i] + c * dwdp0[i +
nbParam]);
215 double c = cos(p[1]);
216 double s = sin(p[1]);
217 double scale = 1.0 + p[0];
219 X2[0] = scale * (c * X1[0] - s * X1[1]) + p[2];
220 X2[1] = scale * (s * X1[0] + c * X1[1]) + p[3];
231 double c = cos(p[1]);
232 double s = sin(p[1]);
233 double scale = 1.0 + p[0];
237 p_inv[0] = 1.0 / scale - 1.0;
238 p_inv[1] = atan2(-s, c);
239 p_inv[2] = -(c * u + s * v) / scale;
240 p_inv[3] = (s * u - c * v) / scale;
253 double c1 = cos(p1[1]);
254 double s1 = sin(p1[1]);
255 double c2 = cos(p2[1]);
256 double s2 = sin(p2[1]);
257 double scale1 = 1.0 + p1[0];
258 double scale2 = 1.0 + p2[0];
264 p12[0] = scale1 * scale2 - 1.0;
265 p12[1] = atan2(s1 * c2 + c1 * s2, c1 * c2 - s1 * s2);
266 p12[2] = scale1 * (c1 * u2 - s1 * v2) + u1;
267 p12[3] = scale1 * (s1 * u2 + c1 * v2) + v1;
Implementation of a matrix and operations on matrices.
void getdWdp0(const int &v, const int &u, double *dIdW)
void getParamPyramidDown(const vpColVector &p, vpColVector &p_down)
void pRondp(const vpColVector &p1, const vpColVector &p2, vpColVector &p12) const
void warpX(const vpColVector &X1, vpColVector &X2, const vpColVector &p)
void getdW0(const int &v, const int &u, const double &dv, const double &du, double *dIdW)
void dWarp(const vpColVector &X, const vpColVector &, const vpColVector &p, vpMatrix &dM)
vpTemplateTrackerWarpSRT()
void warpXInv(const vpColVector &X1, vpColVector &X2, const vpColVector &p)
void dWarpCompo(const vpColVector &, const vpColVector &, const vpColVector &p, const double *dwdp0, vpMatrix &dM)
Implementation of column vector and the associated operations.
void getParamInverse(const vpColVector &p, vpColVector &p_inv) const
void getParamPyramidUp(const vpColVector &p, vpColVector &p_up)
unsigned int nbParam
Number of parameters used to model warp transformation.