2 #include <visp/vp1394CMUGrabber.h>
3 #include <visp/vp1394TwoGrabber.h>
4 #include <visp/vpDisplayGDI.h>
5 #include <visp/vpDisplayX.h>
6 #include <visp/vpDot2.h>
7 #include <visp/vpPixelMeterConversion.h>
8 #include <visp/vpPose.h>
10 void computePose(std::vector<vpPoint> &point,
const std::vector<vpDot2> &dot,
13 vpPose pose;
double x=0, y=0;
14 for (
unsigned int i=0; i < point.size(); i ++) {
25 #if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI)
30 for(
unsigned int i=0; i<dot.size(); i++) {
31 dot[i].setGraphics(
true);
32 dot[i].setGraphicsThickness(2);
33 dot[i].initTracking(I);
38 for(
unsigned int i=0; i<dot.size(); i++) {
47 #if (defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI)) && (defined(VISP_HAVE_DC1394_2) || defined(VISP_HAVE_CMU1394))
50 #if defined(VISP_HAVE_DC1394_2)
52 #elif defined(VISP_HAVE_CMU1394)
63 std::vector<vpDot2> dot(4);
64 std::vector<vpPoint> point(4);
66 point[0].setWorldCoordinates(-L, -L, 0);
67 point[1].setWorldCoordinates( L, -L, 0);
68 point[2].setWorldCoordinates( L, L, 0);
69 point[3].setWorldCoordinates(-L, L, 0);
72 #if defined(VISP_HAVE_X11)
74 #elif defined(VISP_HAVE_GDI)
83 computePose(point, dot, cam, init, cMo);
86 if (init) init =
false;
unsigned int getWidth() const
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
void open(vpImage< unsigned char > &I)
Display for windows using GDI (available on any windows 32 platform).
Define the X11 console to display images.
static const vpColor none
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Point coordinates conversion from pixel coordinates to normalized coordinates in meter...
static void flush(const vpImage< unsigned char > &I)
Firewire cameras video capture based on CMU 1394 Digital Camera SDK.
void acquire(vpImage< unsigned char > &I)
static void display(const vpImage< unsigned char > &I)
Class used for pose computation from N points (pose from point only).
Generic class defining intrinsic camera parameters.
static void displayFrame(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double size, const vpColor &color, unsigned int thickness=1)
unsigned int getHeight() const
Class for firewire ieee1394 video devices using libdc1394-2.x api.
void computePose(vpPoseMethodType methode, vpHomogeneousMatrix &cMo)
compute the pose for a given method
virtual bool getClick(bool blocking=true)=0
void addPoint(const vpPoint &P)
Add a new point in this array.