40 #include <visp3/tt/vpTemplateTrackerWarpSRT.h> 67 dIdW[0] = j * dx + i * dy;
68 dIdW[1] = -i * dx + j * dy;
89 j2 = ((1.0 + ParamM[0]) * cos(ParamM[1]) * j) - ((1.0 + ParamM[0]) * sin(ParamM[1]) * i) + ParamM[2];
90 i2 = ((1.0 + ParamM[0]) * sin(ParamM[1]) * j) + ((1.0 + ParamM[0]) * cos(ParamM[1]) * i) + ParamM[3];
95 vXres[0] = ((1.0 + ParamM[0]) * cos(ParamM[1]) * vX[0]) - ((1.0 + ParamM[0]) * sin(ParamM[1]) * vX[1]) + ParamM[2];
96 vXres[1] = ((1.0 + ParamM[0]) * sin(ParamM[1]) * vX[0]) + ((1.0 + ParamM[0]) * cos(ParamM[1]) * vX[1]) + ParamM[3];
105 dW_[0][0] = cos(ParamM[1]) * j - sin(ParamM[1]) * i;
106 dW_[0][1] = (-(1.0 + ParamM[0]) * sin(ParamM[1]) * j) - ((1.0 + ParamM[0]) * cos(ParamM[1]) * i);
109 dW_[1][0] = sin(ParamM[1]) * j + cos(ParamM[1]) * i;
110 dW_[1][1] = (1.0 + ParamM[0]) * cos(ParamM[1]) * j - (1.0 + ParamM[0]) * sin(ParamM[1]) * i;
119 for (
unsigned int i = 0; i <
nbParam; i++) {
121 ((1. + ParamM[0]) * cos(ParamM[1]) * dwdp0[i]) - ((1.0 + ParamM[0]) * sin(ParamM[1]) * dwdp0[i +
nbParam]);
123 ((1. + ParamM[0]) * sin(ParamM[1]) * dwdp0[i]) + ((1.0 + ParamM[0]) * cos(ParamM[1]) * dwdp0[i +
nbParam]);
130 vXres[0] = ((1.0 + ParamM[0]) * cos(ParamM[1]) * vX[0]) - ((1.0 + ParamM[0]) * sin(ParamM[1]) * vX[1]) + ParamM[2];
131 vXres[1] = ((1.0 + ParamM[0]) * sin(ParamM[1]) * vX[0]) + ((1.0 + ParamM[0]) * cos(ParamM[1]) * vX[1]) + ParamM[3];
138 Trans[0] = ParamM[2];
139 Trans[1] = ParamM[3];
140 MWrap[0][0] = cos(ParamM[1]);
141 MWrap[0][1] = -sin(ParamM[1]);
142 MWrap[1][0] = sin(ParamM[1]);
143 MWrap[1][1] = cos(ParamM[1]);
148 TransInv = (-1.0 / (1.0 + ParamM[0])) * MWrapInv * Trans;
150 ParamMinv[0] = 1.0 / (1.0 + ParamM[0]) - 1.0;
151 ParamMinv[1] = atan2(MWrapInv[1][0], MWrapInv[1][1]);
152 ParamMinv[2] = TransInv[0];
153 ParamMinv[3] = TransInv[1];
163 MWrap1[0][0] = cos(p1[1]);
164 MWrap1[0][1] = -sin(p1[1]);
165 MWrap1[1][0] = sin(p1[1]);
166 MWrap1[1][1] = cos(p1[1]);
173 MWrap2[0][0] = cos(p2[1]);
174 MWrap2[0][1] = -sin(p2[1]);
175 MWrap2[1][0] = sin(p2[1]);
176 MWrap2[1][1] = cos(p2[1]);
180 TransRes = (1.0 + p1[0]) * MWrap1 * Trans2 + Trans1;
181 MWrapRes = MWrap1 * MWrap2;
183 pres[0] = (1.0 + p1[0]) * (1.0 + p2[0]) - 1.0;
184 pres[1] = atan2(MWrapRes[1][0], MWrapRes[1][1]);
186 pres[2] = TransRes[0];
187 pres[3] = TransRes[1];
Implementation of a matrix and operations on matrices.
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
void warpXInv(const vpColVector &vX, vpColVector &vXres, const vpColVector &ParamM)
vpTemplateTrackerWarpSRT()
void dWarp(const vpColVector &X1, const vpColVector &X2, const vpColVector &ParamM, vpMatrix &dW)
void dWarpCompo(const vpColVector &X1, const vpColVector &X2, const vpColVector &ParamM, const double *dwdp0, vpMatrix &dW)
void getdWdp0(const int &i, const int &j, double *dIdW)
void getParamPyramidUp(const vpColVector &p, vpColVector &pup)
vpMatrix transpose() const
void warpX(const vpColVector &vX, vpColVector &vXres, const vpColVector &ParamM)
void getParamPyramidDown(const vpColVector &p, vpColVector &pdown)
void pRondp(const vpColVector &p1, const vpColVector &p2, vpColVector &pres) const
void getdW0(const int &i, const int &j, const double &dy, const double &dx, double *dIdW)
Implementation of column vector and the associated operations.
void getParamInverse(const vpColVector &ParamM, vpColVector &ParamMinv) const