39 #include <visp3/tt/vpTemplateTrackerWarpRT.h>
86 j2=(cos(ParamM[0])*j) - (sin(ParamM[0])*i) + ParamM[1];
87 i2=(sin(ParamM[0])*j) + (cos(ParamM[0])*i) + ParamM[2];
93 vXres[0]=(cos(ParamM[0])*vX[0]) - (sin(ParamM[0])*vX[1]) + ParamM[1];
94 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++)
116 dW_[0][i]=(cos(ParamM[0])*dwdp0[i]) - (sin(ParamM[0])*dwdp0[i+
nbParam]);
117 dW_[1][i]=(sin(ParamM[0])*dwdp0[i]) + (cos(ParamM[0])*dwdp0[i+
nbParam]);
124 vXres[0]=(cos(ParamM[0])*vX[0]) - (sin(ParamM[0])*vX[1]) + ParamM[1];
125 vXres[1]=(sin(ParamM[0])*vX[0]) + (cos(ParamM[0])*vX[1]) + ParamM[2];
134 MWrap[0][0]=cos(ParamM[0]);
135 MWrap[0][1]=-sin(ParamM[0]);
136 MWrap[1][0]=sin(ParamM[0]);
137 MWrap[1][1]=cos(ParamM[0]);
142 TransInv=(-1.0)*MWrapInv*Trans;
144 ParamMinv[0]= atan2(MWrapInv[1][0],MWrapInv[1][1]);
145 ParamMinv[1]=TransInv[0];
146 ParamMinv[2]=TransInv[1];
153 Trans1[0]=p1[1];Trans1[1]=p1[2];
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]);
162 Trans2[0]=p2[1];Trans2[1]=p2[1];
164 MWrap2[0][0]=cos(p2[0]);
165 MWrap2[0][1]=-sin(p2[0]);
166 MWrap2[1][0]=sin(p2[0]);
167 MWrap2[1][1]=cos(p2[0]);
171 TransRes=MWrap1*Trans2+Trans1;
172 MWrapRes=MWrap1*MWrap2;
174 pres[0]=atan2(MWrapRes[1][0],MWrapRes[1][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)
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true)
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 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