42 #include <visp/vpTemplateTrackerWarpSRT.h>
92 j2=((1.0+ParamM[0])*cos(ParamM[1])*j) - ((1.0+ParamM[0])*sin(ParamM[1])*i) + ParamM[2];
93 i2=((1.0+ParamM[0])*sin(ParamM[1])*j) + ((1.0+ParamM[0])*cos(ParamM[1])*i) + ParamM[3];
99 vXres[0]=((1.0+ParamM[0])*cos(ParamM[1])*vX[0]) - ((1.0+ParamM[0])*sin(ParamM[1])*vX[1]) + ParamM[2];
100 vXres[1]=((1.0+ParamM[0])*sin(ParamM[1])*vX[0]) + ((1.0+ParamM[0])*cos(ParamM[1])*vX[1]) + ParamM[3];
108 dW_[0][0]=cos(ParamM[1])*j - sin(ParamM[1])*i;
109 dW_[0][1]=(-(1.0+ParamM[0])*sin(ParamM[1])*j) - ((1.0+ParamM[0])*cos(ParamM[1])*i);
112 dW_[1][0]=sin(ParamM[1])*j + cos(ParamM[1])*i;
113 dW_[1][1]=(1.0+ParamM[0])*cos(ParamM[1])*j - (1.0+ParamM[0])*sin(ParamM[1])*i;
122 for(
unsigned int i=0;i<
nbParam;i++)
124 dW_[0][i]=((1.+ParamM[0])*cos(ParamM[1])*dwdp0[i]) - ((1.0+ParamM[0])*sin(ParamM[1])*dwdp0[i+
nbParam]);
125 dW_[1][i]=((1.+ParamM[0])*sin(ParamM[1])*dwdp0[i]) + ((1.0+ParamM[0])*cos(ParamM[1])*dwdp0[i+
nbParam]);
132 vXres[0]=((1.0+ParamM[0])*cos(ParamM[1])*vX[0]) - ((1.0+ParamM[0])*sin(ParamM[1])*vX[1]) + ParamM[2];
133 vXres[1]=((1.0+ParamM[0])*sin(ParamM[1])*vX[0]) + ((1.0+ParamM[0])*cos(ParamM[1])*vX[1]) + ParamM[3];
142 MWrap[0][0]=cos(ParamM[1]);
143 MWrap[0][1]=-sin(ParamM[1]);
144 MWrap[1][0]=sin(ParamM[1]);
145 MWrap[1][1]=cos(ParamM[1]);
150 TransInv=(-1.0/(1.0+ParamM[0]))*MWrapInv*Trans;
152 ParamMinv[0]=1.0/(1.0+ParamM[0]) - 1.0;
153 ParamMinv[1]= atan2(MWrapInv[1][0],MWrapInv[1][1]);
154 ParamMinv[2]=TransInv[0];
155 ParamMinv[3]=TransInv[1];
162 Trans1[0]=p1[2];Trans1[1]=p1[3];
164 MWrap1[0][0]=cos(p1[1]);
165 MWrap1[0][1]=-sin(p1[1]);
166 MWrap1[1][0]=sin(p1[1]);
167 MWrap1[1][1]=cos(p1[1]);
171 Trans2[0]=p2[2];Trans2[1]=p2[3];
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]);
Definition of the vpMatrix class.
void resize(const unsigned int nrows, const unsigned int ncols, const bool nullify=true)
void pRondp(const vpColVector &p1, const vpColVector &p2, vpColVector &pres) const
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)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
void getParamInverse(const vpColVector &ParamM, vpColVector &ParamMinv) const