51 #include <visp/vpConfig.h>
53 #ifdef VISP_HAVE_LIBFREENECT_AND_DEPENDENCIES
55 #if (defined (VISP_HAVE_X11) || defined(VISP_HAVE_GTK) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_GDI))
58 #include <visp/vpImage.h>
59 #include <visp/vpDisplayX.h>
60 #include <visp/vpDisplayGTK.h>
61 #include <visp/vpDisplayOpenCV.h>
62 #include <visp/vpDisplayGDI.h>
63 #include <visp/vpKinect.h>
64 #include <visp/vpTime.h>
69 #ifdef VISP_HAVE_LIBFREENECT_OLD
71 Freenect::Freenect<vpKinect> freenect;
72 vpKinect & kinect = freenect.createDevice(0);
74 Freenect::Freenect freenect;
81 kinect.setTiltDegrees(angle);
96 #if defined VISP_HAVE_X11
97 vpDisplayX display, displayRgb, displayRgbWarped;
98 #elif defined VISP_HAVE_GTK
102 #elif defined VISP_HAVE_OPENCV
106 #elif defined VISP_HAVE_GDI
112 display.
init(Idmap, 100, 200,
"Depth map");
113 displayRgb.
init(Irgb, 900, 200,
"Color Image");
114 displayRgbWarped.
init(Iwarped,900,700,
"Warped Color Image");
117 std::cout <<
"Click in one image to stop acquisition" << std::endl;
135 std::cout <<
"Stop acquisition" << std::endl;
140 std::cout <<
"Catch an exception: " << e << std::endl;
144 std::cout <<
"Catch an exception " << std::endl;
154 std::cout <<
"You should install a video device (X11, GTK, OpenCV, GDI) to run this example" << std::endl;
162 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)