1 #include <visp3/core/vpDisplay.h>
2 #include <visp3/core/vpPixelMeterConversion.h>
3 #include <visp3/vision/vpPose.h>
5 #include "pose_helper.h"
7 #ifdef ENABLE_VISP_NAMESPACE
12 void computePose(std::vector<vpPoint> &point,
const std::vector<vpImagePoint> &ip,
const vpCameraParameters &cam,
17 for (
unsigned int i = 0; i < point.size(); i++) {
33 #if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV)
37 double distance_same_blob = 10.;
38 std::vector<vpImagePoint> ip(dot.size());
41 for (
unsigned int i = 0; i < dot.size(); i++) {
42 dot[i].setGraphics(
true);
43 dot[i].setGraphicsThickness(2);
45 ss <<
"Click on point " << i + 1;
49 dot[i].initTracking(I);
54 for (
unsigned int i = 0; i < dot.size(); i++) {
58 for (
unsigned int i = 0; i < dot.size(); i++) {
59 ip[i] = dot[i].getCog();
62 for (
unsigned int i = 0; i < ip.size(); i++) {
63 for (
unsigned int j = i + 1; j < ip.size(); j++) {
65 std::cout <<
"Traking lost: 2 blobs are the same" << std::endl;
74 std::cout <<
"Traking lost" << std::endl;
Generic class defining intrinsic camera parameters.
static void flush(const vpImage< unsigned char > &I)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
error that can be emitted by ViSP classes.
Implementation of an homogeneous matrix and operations on such kind of matrices.
static double distance(const vpImagePoint &iP1, const vpImagePoint &iP2)
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Class used for pose computation from N points (pose from point only). Some of the algorithms implemen...
void addPoint(const vpPoint &P)
@ DEMENTHON_LAGRANGE_VIRTUAL_VS
bool computePose(vpPoseMethodType method, vpHomogeneousMatrix &cMo, FuncCheckValidityPose func=nullptr)