40 #include <visp3/core/vpDebug.h>
41 #include <visp3/core/vpHomogeneousMatrix.h>
42 #include <visp3/core/vpMath.h>
43 #include <visp3/core/vpPoint.h>
44 #include <visp3/visual_features/vpFeatureBuilder.h>
45 #include <visp3/visual_features/vpFeatureException.h>
46 #include <visp3/visual_features/vpFeaturePoint.h>
53 #ifdef ENABLE_VISP_NAMESPACE
63 vpTRACE(
"set point coordinates in the world frame ");
66 std::cout <<
"------------------------------------------------------" << std::endl;
67 vpTRACE(
"test the projection ");
70 vpTRACE(
"coordinates in the world frame ");
71 std::cout << point.
oP.
t() << std::endl;
72 vpTRACE(
"coordinates in the camera frame ");
73 std::cout << point.
cP.
t() << std::endl;
75 vpTRACE(
"2D coordinates ");
76 std::cout << point.
get_x() <<
" " << point.
get_y() << std::endl;
78 std::cout <<
"------------------------------------------------------" << std::endl;
79 vpTRACE(
"test the interaction matrix ");
86 std::cout << L << std::endl;
88 vpTRACE(
"test the interaction matrix select");
91 std::cout << L << std::endl;
95 std::cout << L << std::endl;
99 std::cout << L << std::endl;
101 vpTRACE(
"\t selectAll");
103 std::cout << L << std::endl;
105 std::cout <<
"------------------------------------------------------" << std::endl;
106 vpTRACE(
"test the error ");
114 std::cout << std::endl;
117 std::cout << e << std::endl;
119 vpTRACE(
"test the interaction matrix select");
120 vpTRACE(
"\t only X");
122 std::cout << e << std::endl;
124 vpTRACE(
"\t only Y");
126 std::cout << e << std::endl;
130 std::cout << e << std::endl;
132 vpTRACE(
"\t selectAll");
134 std::cout << e << std::endl;
137 std::cout << me << std::endl;
140 std::cout << me << std::endl;
142 std::cout <<
"------------------------------------------------------" << std::endl;
143 vpTRACE(
"test the dimension");
146 std::cout <<
"Dimension = " << dim << std::endl;
148 vpTRACE(
"test the dimension with select");
149 vpTRACE(
"\t only X");
151 std::cout <<
"Dimension = " << dim << std::endl;
153 vpTRACE(
"\t only Y");
155 std::cout <<
"Dimension = " << dim << std::endl;
159 std::cout <<
"Dimension = " << dim << std::endl;
161 vpTRACE(
"\t selectAll");
163 std::cout <<
"Dimension = " << dim << std::endl;
167 std::cout <<
"Catch an exception: " << e << std::endl;
static unsigned int selectAll()
Select all the features.
unsigned int getDimension(unsigned int select=FEATURE_ALL) const
Get the feature vector dimension.
Implementation of column vector and the associated operations.
error that can be emitted by ViSP classes.
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpImagePoint &t)
Error that can be emitted by the vpBasicFeature class and its derivates.
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
static unsigned int selectX()
vpColVector error(const vpBasicFeature &s_star, unsigned int select=FEATURE_ALL) VP_OVERRIDE
void print(unsigned int select=FEATURE_ALL) const VP_OVERRIDE
static unsigned int selectY()
vpMatrix interaction(unsigned int select=FEATURE_ALL) VP_OVERRIDE
void track(const vpHomogeneousMatrix &cMo)
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a matrix and operations on matrices.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
double get_y() const
Get the point y coordinate in the image plane.
double get_x() const
Get the point x coordinate in the image plane.
void setWorldCoordinates(double oX, double oY, double oZ)