1 #include <visp3/vision/vpPose.h> 2 #include <visp3/core/vpDisplay.h> 3 #include <visp3/core/vpPixelMeterConversion.h> 5 #include "pose_helper.h" 8 void computePose(std::vector<vpPoint> &point,
const std::vector<vpImagePoint> &ip,
13 for (
unsigned int i = 0; i < point.size(); i++) {
27 if (residual_dem < residual_lag)
36 #if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) 40 double distance_same_blob = 10.;
41 std::vector<vpImagePoint> ip(dot.size());
44 for (
unsigned int i = 0; i < dot.size(); i++) {
45 dot[i].setGraphics(
true);
46 dot[i].setGraphicsThickness(2);
48 ss <<
"Click on point " << i+1;
52 dot[i].initTracking(I);
56 for (
unsigned int i = 0; i < dot.size(); i++) {
60 for (
unsigned int i = 0; i < dot.size(); i++) {
61 ip[i] = dot[i].getCog();
64 for (
unsigned int i=0; i < ip.size(); i++) {
65 for (
unsigned int j=i+1; j < ip.size(); j++) {
67 std::cout <<
"Traking lost: 2 blobs are the same" << std::endl;
76 std::cout <<
"Traking lost" << std::endl;
bool computePose(vpPoseMethodType method, vpHomogeneousMatrix &cMo, bool(*func)(const vpHomogeneousMatrix &)=NULL)
Implementation of an homogeneous matrix and operations on such kind of matrices.
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
error that can be emited by ViSP classes.
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
static void flush(const vpImage< unsigned char > &I)
static double distance(const vpImagePoint &iP1, const vpImagePoint &iP2)
Class used for pose computation from N points (pose from point only). Some of the algorithms implemen...
Generic class defining intrinsic camera parameters.
void addPoint(const vpPoint &P)
double computeResidual(const vpHomogeneousMatrix &cMo) const
Compute and return the sum of squared residuals expressed in meter^2 for the pose matrix cMo...