39 #include <visp3/tt/vpTemplateTrackerWarpSRT.h>
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];
96 vXres[0]=((1.0+ParamM[0])*cos(ParamM[1])*vX[0]) - ((1.0+ParamM[0])*sin(ParamM[1])*vX[1]) + ParamM[2];
97 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 dW_[0][i]=((1.+ParamM[0])*cos(ParamM[1])*dwdp0[i]) - ((1.0+ParamM[0])*sin(ParamM[1])*dwdp0[i+
nbParam]);
122 dW_[1][i]=((1.+ParamM[0])*sin(ParamM[1])*dwdp0[i]) + ((1.0+ParamM[0])*cos(ParamM[1])*dwdp0[i+
nbParam]);
129 vXres[0]=((1.0+ParamM[0])*cos(ParamM[1])*vX[0]) - ((1.0+ParamM[0])*sin(ParamM[1])*vX[1]) + ParamM[2];
130 vXres[1]=((1.0+ParamM[0])*sin(ParamM[1])*vX[0]) + ((1.0+ParamM[0])*cos(ParamM[1])*vX[1]) + ParamM[3];
139 MWrap[0][0]=cos(ParamM[1]);
140 MWrap[0][1]=-sin(ParamM[1]);
141 MWrap[1][0]=sin(ParamM[1]);
142 MWrap[1][1]=cos(ParamM[1]);
147 TransInv=(-1.0/(1.0+ParamM[0]))*MWrapInv*Trans;
149 ParamMinv[0]=1.0/(1.0+ParamM[0]) - 1.0;
150 ParamMinv[1]= atan2(MWrapInv[1][0],MWrapInv[1][1]);
151 ParamMinv[2]=TransInv[0];
152 ParamMinv[3]=TransInv[1];
159 Trans1[0]=p1[2];Trans1[1]=p1[3];
161 MWrap1[0][0]=cos(p1[1]);
162 MWrap1[0][1]=-sin(p1[1]);
163 MWrap1[1][0]=sin(p1[1]);
164 MWrap1[1][1]=cos(p1[1]);
168 Trans2[0]=p2[2];Trans2[1]=p2[3];
170 MWrap2[0][0]=cos(p2[1]);
171 MWrap2[0][1]=-sin(p2[1]);
172 MWrap2[1][0]=sin(p2[1]);
173 MWrap2[1][1]=cos(p2[1]);
177 TransRes=(1.0+p1[0])*MWrap1*Trans2+Trans1;
178 MWrapRes=MWrap1*MWrap2;
180 pres[0]=(1.0+p1[0])*(1.0+p2[0]) - 1.0;
181 pres[1]=atan2(MWrapRes[1][0],MWrapRes[1][1]);
Implementation of a matrix and operations on matrices.
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)
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)
vpMatrix transpose() const
void getdWdp0(const int &i, const int &j, double *dIdW)
void getParamPyramidUp(const vpColVector &p, vpColVector &pup)
void warpX(const vpColVector &vX, vpColVector &vXres, const vpColVector &ParamM)
void getParamPyramidDown(const vpColVector &p, vpColVector &pdown)
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