42 #include <visp/vpConfig.h>
43 #include <visp/vpHomogeneousMatrix.h>
44 #include <visp/vpPoint.h>
45 #include <visp/vpDisplay.h>
46 #include <visp/vpDisplayX.h>
47 #include <visp/vpImage.h>
48 #include <visp/vpCameraParameters.h>
49 #include <visp/vpPoseFeatures.h>
50 #include <visp/vpPose.h>
53 #include <visp/vpPose.h>
63 #ifndef DOXYGEN_SHOULD_SKIP_THIS
64 #ifdef VISP_HAVE_CPP11_COMPATIBILITY
65 class vp_createPointClass{
69 vp_createPointClass() : value(0){}
96 std::cout <<
"Reference pose used to create the visual features : " << std::endl;
97 std::cout << pose_ref.
t() << std::endl;
166 #ifdef VISP_HAVE_CPP11_COMPATIBILITY
171 vp_createPointClass cpClass;
172 int (vp_createPointClass::*ptrClass)(
vpFeaturePoint&,
const vpPoint&) = &vp_createPointClass::vp_createPoint;
185 std::cout <<
"\nPose used as initialisation of the pose computation : " << std::endl;
186 std::cout << pose_est.
t() << std::endl;
192 std::cout <<
"\nEstimated pose from visual features : " << std::endl;
194 std::cout << pose_est.
t() << std::endl;
196 std::cout <<
"\nResulting covariance (Diag): " << std::endl;
198 std::cout << covariance[0][0] <<
" " << covariance[1][1] <<
" "
199 << covariance[2][2] <<
" " << covariance[3][3] <<
" "
200 << covariance[4][4] <<
" " << covariance[5][5] <<
" " << std::endl;
203 for(
unsigned int i=0; i<6; i++) {
204 if (std::fabs(pose_ref[i]-pose_est[i]) > 0.001)
208 std::cout <<
"\nPose is " << (test_fail ?
"badly" :
"well") <<
" estimated" << std::endl;
213 std::cout <<
"Catch an exception: " << e << std::endl;
Definition of the vpMatrix class.
void setVerbose(const bool &mode)
void setVVSIterMax(const unsigned int &val)
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
void setWorldCoordinates(const double &A1, const double &B1, const double &C1, const double &D1, const double &A2, const double &B2, const double &C2, const double &D2)
error that can be emited by ViSP classes.
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
void addFeatureVanishingPoint(const vpPoint &)
void setLambda(const double &val)
void addFeaturePoint3D(const vpPoint &)
void addFeaturePoint(const vpPoint &)
Class that defines what is a point.
void addFeatureEllipse(const vpCircle &)
vpPoseVector buildFrom(const vpHomogeneousMatrix &M)
void computePose(vpHomogeneousMatrix &cMo, const vpPoseFeaturesMethodType &type=VIRTUAL_VS)
Class that defines a line in the object frame, the camera frame and the image plane. All the parameters must be set in meter.
Class that defines a 2D segment visual features. This class allow to consider two sets of visual feat...
vpRowVector t() const
transpose of Vector
Class that defines a 2D line visual feature which is composed by two parameters that are and ...
static double rad(double deg)
void setCovarianceComputation(const bool &flag)
vpMatrix getCovarianceMatrix() const
The pose is a complete representation of every rigid motion in the euclidian space.
void addSpecificFeature(RetType(*fct_ptr)(ArgsFunc...), Args &&...args)
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
Tools for pose computation from any feature.This class allows to estimate a pose by virtual visual se...
Class that defines what is a circle.
void setWorldCoordinates(const vpColVector &oP)
void setWorldCoordinates(const double ox, const double oy, const double oz)
Set the point world coordinates. We mean here the coordinates of the point in the object frame...