50 #define GETOPTARGS "h"
52 #include <visp/vpMath.h>
53 #include <visp/vpHomogeneousMatrix.h>
54 #include <visp/vpPoint.h>
55 #include <visp/vpFeaturePoint.h>
56 #include <visp/vpFeatureException.h>
57 #include <visp/vpDebug.h>
58 #include <visp/vpFeatureBuilder.h>
59 #include <visp/vpParseArgv.h>
69 void usage(
const char *name,
const char *badparam)
72 Performs various tests on the point class.\n\
83 fprintf(stdout,
"\nERROR: Bad parameter [%s]\n", badparam);
92 bool getOptions(
int argc,
const char **argv)
99 case 'h': usage(argv[0], NULL);
return false;
break;
102 usage(argv[0], optarg);
107 if ((c == 1) || (c == -1)) {
109 usage(argv[0], NULL);
110 std::cerr <<
"ERROR: " << std::endl;
111 std::cerr <<
" Bad argument " << optarg << std::endl << std::endl;
120 main(
int argc,
const char ** argv)
123 if (getOptions(argc, argv) ==
false) {
133 vpTRACE(
"set point coordinates in the world frame ") ;
137 std::cout <<
"------------------------------------------------------"<<std::endl ;
138 vpTRACE(
"test the projection ") ;
141 vpTRACE(
"coordinates in the world frame ") ;
142 std::cout << point.
oP.
t() << std::endl ;
143 vpTRACE(
"coordinates in the camera frame ") ;
144 std::cout << point.
cP.
t() << std::endl ;
147 std::cout<< point.
get_x() <<
" " << point.
get_y() << std::endl ;
149 std::cout <<
"------------------------------------------------------"<<std::endl ;
150 vpTRACE(
"test the interaction matrix ") ;
157 std::cout << L << std::endl ;
159 vpTRACE(
"test the interaction matrix select") ;
162 std::cout << L << std::endl ;
166 std::cout << L << std::endl ;
171 std::cout << L << std::endl ;
175 std::cout << L << std::endl ;
177 std::cout <<
"------------------------------------------------------"<<std::endl ;
185 pd.
print() ; std::cout << std::endl ;
188 std::cout << e << std::endl ;
190 vpTRACE(
"test the interaction matrix select") ;
193 std::cout << e << std::endl ;
197 std::cout << e << std::endl ;
201 std::cout << e << std::endl ;
205 std::cout << e << std::endl ;
208 catch(
vpException me){ std::cout << me << std::endl ; }
209 std::cout <<
"------------------------------------------------------"<<std::endl ;
210 vpTRACE(
"test the dimension") ;
213 std::cout <<
"Dimension = " << dim << std::endl ;
215 vpTRACE(
"test the dimension with select") ;
218 std::cout <<
"Dimension = " << dim << std::endl ;
222 std::cout <<
"Dimension = " << dim << std::endl ;
226 std::cout <<
"Dimension = " << dim << std::endl ;
230 std::cout <<
"Dimension = " << dim << std::endl ;