40 #include <visp3/tt/vpTemplateTrackerWarpRT.h> 67 dIdW[0] = -i * dx + j * dy;
86 j2 = (cos(ParamM[0]) * j) - (sin(ParamM[0]) * i) + ParamM[1];
87 i2 = (sin(ParamM[0]) * j) + (cos(ParamM[0]) * i) + ParamM[2];
92 vXres[0] = (cos(ParamM[0]) * vX[0]) - (sin(ParamM[0]) * vX[1]) + ParamM[1];
93 vXres[1] = (sin(ParamM[0]) * vX[0]) + (cos(ParamM[0]) * vX[1]) + ParamM[2];
102 dW_[0][0] = (-sin(ParamM[0]) * j) - (cos(ParamM[0]) * i);
105 dW_[1][0] = cos(ParamM[0]) * j - sin(ParamM[0]) * i;
114 for (
unsigned int i = 0; i <
nbParam; i++) {
115 dW_[0][i] = (cos(ParamM[0]) * dwdp0[i]) - (sin(ParamM[0]) * dwdp0[i +
nbParam]);
116 dW_[1][i] = (sin(ParamM[0]) * dwdp0[i]) + (cos(ParamM[0]) * dwdp0[i +
nbParam]);
123 vXres[0] = (cos(ParamM[0]) * vX[0]) - (sin(ParamM[0]) * vX[1]) + ParamM[1];
124 vXres[1] = (sin(ParamM[0]) * vX[0]) + (cos(ParamM[0]) * vX[1]) + ParamM[2];
131 Trans[0] = ParamM[1];
132 Trans[1] = ParamM[2];
133 MWrap[0][0] = cos(ParamM[0]);
134 MWrap[0][1] = -sin(ParamM[0]);
135 MWrap[1][0] = sin(ParamM[0]);
136 MWrap[1][1] = cos(ParamM[0]);
141 TransInv = (-1.0) * MWrapInv * Trans;
143 ParamMinv[0] = atan2(MWrapInv[1][0], MWrapInv[1][1]);
144 ParamMinv[1] = TransInv[0];
145 ParamMinv[2] = TransInv[1];
155 MWrap1[0][0] = cos(p1[0]);
156 MWrap1[0][1] = -sin(p1[0]);
157 MWrap1[1][0] = sin(p1[0]);
158 MWrap1[1][1] = cos(p1[0]);
165 MWrap2[0][0] = cos(p2[0]);
166 MWrap2[0][1] = -sin(p2[0]);
167 MWrap2[1][0] = sin(p2[0]);
168 MWrap2[1][1] = cos(p2[0]);
172 TransRes = MWrap1 * Trans2 + Trans1;
173 MWrapRes = MWrap1 * MWrap2;
175 pres[0] = atan2(MWrapRes[1][0], MWrapRes[1][1]);
176 pres[1] = TransRes[0];
177 pres[2] = TransRes[1];
Implementation of a matrix and operations on matrices.
void warpX(const vpColVector &vX, vpColVector &vXres, const vpColVector &ParamM)
void getdWdp0(const int &i, const int &j, double *dIdW)
vpTemplateTrackerWarpRT()
void getdW0(const int &i, const int &j, const double &dy, const double &dx, double *dIdW)
void pRondp(const vpColVector &p1, const vpColVector &p2, vpColVector &pres) const
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true, const bool recopy_=true)
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)
vpMatrix transpose() const
void warpXInv(const vpColVector &vX, vpColVector &vXres, const vpColVector &ParamM)
void getParamPyramidUp(const vpColVector &p, vpColVector &pup)
void getParamPyramidDown(const vpColVector &p, vpColVector &pdown)
Implementation of column vector and the associated operations.
void getParamInverse(const vpColVector &ParamM, vpColVector &ParamMinv) const