47 #include <visp3/core/vpConfig.h>
49 #ifdef VISP_HAVE_LIBFREENECT_AND_DEPENDENCIES
51 #if (defined (VISP_HAVE_X11) || defined(VISP_HAVE_GTK) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_GDI))
54 #include <visp3/core/vpImage.h>
55 #include <visp3/gui/vpDisplayX.h>
56 #include <visp3/gui/vpDisplayGTK.h>
57 #include <visp3/gui/vpDisplayOpenCV.h>
58 #include <visp3/gui/vpDisplayGDI.h>
59 #include <visp3/sensor/vpKinect.h>
60 #include <visp3/core/vpTime.h>
65 #ifdef VISP_HAVE_LIBFREENECT_OLD
67 Freenect::Freenect<vpKinect> freenect;
68 vpKinect & kinect = freenect.createDevice(0);
70 Freenect::Freenect freenect;
77 kinect.setTiltDegrees(angle);
92 #if defined VISP_HAVE_X11
93 vpDisplayX display, displayRgb, displayRgbWarped;
94 #elif defined VISP_HAVE_GTK
98 #elif defined VISP_HAVE_OPENCV
102 #elif defined VISP_HAVE_GDI
108 display.
init(Idmap, 100, 200,
"Depth map");
109 displayRgb.
init(Irgb, 900, 200,
"Color Image");
110 displayRgbWarped.
init(Iwarped,900,700,
"Warped Color Image");
113 std::cout <<
"Click in one image to stop acquisition" << std::endl;
131 std::cout <<
"Stop acquisition" << std::endl;
136 std::cout <<
"Catch an exception: " << e << std::endl;
140 std::cout <<
"Catch an exception " << std::endl;
150 std::cout <<
"You should install a video device (X11, GTK, OpenCV, GDI) to run this example" << std::endl;
158 std::cout <<
"You should install libfreenect to run this example" << std::endl;
void start(vpKinect::vpDMResolution res=DMAP_LOW_RES)
Display for windows using GDI (available on any windows 32 platform).
Define the X11 console to display images.
error that can be emited by ViSP classes.
Driver for the Kinect device.
static void flush(const vpImage< unsigned char > &I)
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the opencv library.
The vpDisplayGTK allows to display image using the GTK+ library version 1.2.
bool getRGB(vpImage< vpRGBa > &IRGB)
void warpRGBFrame(const vpImage< vpRGBa > &Irgb, const vpImage< float > &Idepth, vpImage< vpRGBa > &IrgbWarped)
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const char *title=NULL)
virtual bool getClick(bool blocking=true)=0
bool getDepthMap(vpImage< float > &map)