3 #include <visp3/core/vpConfig.h>
4 #include <visp3/core/vpIoTools.h>
5 #include <visp3/gui/vpDisplayGDI.h>
6 #include <visp3/gui/vpDisplayOpenCV.h>
7 #include <visp3/gui/vpDisplayX.h>
8 #include <visp3/io/vpImageIo.h>
11 #include "pose_helper.h"
14 int main(
int,
char *argv[])
16 #ifdef ENABLE_VISP_NAMESPACE
25 #if defined(VISP_HAVE_X11)
27 #elif defined(VISP_HAVE_GDI)
29 #elif defined(HAVE_OPENCV_HIGHGUI)
37 std::vector<vpDot2> dot(4);
38 std::vector<vpImagePoint> ip(4);
45 std::vector<vpPoint> point;
46 point.push_back(
vpPoint(-0.06, -0.06, 0));
47 point.push_back(
vpPoint(0.06, -0.06, 0));
48 point.push_back(
vpPoint(0.06, 0.06, 0));
49 point.push_back(
vpPoint(-0.06, 0.06, 0));
61 for (
unsigned int i = 0; i < dot.size(); i++) {
62 dot[i].setGraphics(
true);
64 ip[i] = dot[i].getCog();
68 computePose(point, ip, cam, init, cMo);
91 std::cout <<
"Catch an exception: " << e.
getMessage() << std::endl;
Generic class defining intrinsic camera parameters.
static const vpColor none
Display for windows using GDI (available on any windows 32 platform).
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void display(const vpImage< unsigned char > &I)
static void displayFrame(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color=vpColor::none, unsigned int thickness=1, const vpImagePoint &offset=vpImagePoint(0, 0), const std::string &frameName="", const vpColor &textColor=vpColor::black, const vpImagePoint &textOffset=vpImagePoint(15, 15))
static void flush(const vpImage< unsigned char > &I)
error that can be emitted by ViSP classes.
const char * getMessage() const
Implementation of an homogeneous matrix and operations on such kind of matrices.
static void read(vpImage< unsigned char > &I, const std::string &filename, int backend=IO_DEFAULT_BACKEND)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
unsigned int getWidth() const
unsigned int getHeight() const
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
VISP_EXPORT int wait(double t0, double t)