54 #include <visp/vpMath.h>
55 #include <visp/vpRotationMatrix.h>
56 #include <visp/vpHomography.h>
57 #include <visp/vpDebug.h>
58 #include <visp/vpThetaUVector.h>
59 #include <visp/vpParseArgv.h>
64 #define GETOPTARGS "h"
71 void usage(
const char *name,
const char *badparam)
74 Tests transformation within various representations of rotation.\n\
85 fprintf(stdout,
"\nERROR: Bad parameter [%s]\n", badparam);
94 bool getOptions(
int argc,
const char **argv)
101 case 'h': usage(argv[0], NULL);
return false;
break;
104 usage(argv[0], optarg);
109 if ((c == 1) || (c == -1)) {
111 usage(argv[0], NULL);
112 std::cerr <<
"ERROR: " << std::endl;
113 std::cerr <<
" Bad argument " << optarg << std::endl << std::endl;
122 main(
int argc,
const char ** argv)
125 if (getOptions(argc, argv) ==
false) {
132 std::cout <<
"Initialization " <<std::endl ;
136 std::cout <<
"From vpThetaUVector to vpRotationMatrix " << std::endl ;
146 std::cout <<
"M" <<std::endl <<M << std::endl ;
152 std::cout <<
"H" <<std::endl <<H << std::endl ;
160 H.computeDisplacement(R,T,n) ;
162 std::cout <<
"R" <<std::endl << R ;
163 std::cout <<
"T" <<std::endl << T.
t() ;
164 std::cout <<
"n" <<std::endl << n.
t() ;
168 std::cout <<
"------------------------------------------------------" << std::endl ;
173 std::cout <<
"Initialization " <<std::endl ;
177 std::cout <<
"From vpThetaUVector to vpRotationMatrix " << std::endl ;
191 std::cout <<
"M" <<std::endl <<M << std::endl ;
197 std::cout <<
"H" <<std::endl <<H << std::endl ;
205 H.computeDisplacement(R,T,n) ;
207 std::cout <<
"R" <<std::endl << R ;
208 std::cout <<
"T" <<std::endl << T.
t() ;
209 std::cout <<
"n" <<std::endl << n.
t() ;
214 std::cout <<
"------------------------------------------------------" << std::endl ;
229 std::cout <<
"M" <<std::endl <<M << std::endl ;
235 std::cout <<
"H" <<std::endl <<H << std::endl ;
240 H.computeDisplacement(R,T,n) ;
242 std::cout <<
"R" <<std::endl << R ;
243 std::cout <<
"T" <<std::endl << T.
t() ;
244 std::cout <<
"n" <<std::endl << n.
t() ;
246 vpPlane p1(n[0],n[1],n[2],1.0) ;
247 H.buildFrom(R,T,p1) ;
248 std::cout <<
"H" <<std::endl <<H << std::endl ;
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
static bool parse(int *argcPtr, const char **argv, vpArgvInfo *argTable, int flags)
The vpRotationMatrix considers the particular case of a rotation matrix.
void insert(const vpRotationMatrix &R)
This class aims to compute the homography wrt.two images.
vpRowVector t() const
transpose of Vector
static double rad(double deg)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
This class defines the container for a plane geometrical structure.
Class that consider the case of a translation vector.
Class that consider the case of the parameterization for the rotation.