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>
68 #ifdef VISP_HAVE_LIBFREENECT_OLD
70 Freenect::Freenect<vpKinect> freenect;
71 vpKinect & kinect = freenect.createDevice(0);
73 Freenect::Freenect freenect;
80 kinect.setTiltDegrees(angle);
95 #if defined VISP_HAVE_X11
96 vpDisplayX display, displayRgb, displayRgbWarped;
97 #elif defined VISP_HAVE_GTK
101 #elif defined VISP_HAVE_OPENCV
105 #elif defined VISP_HAVE_GDI
111 display.
init(Idmap, 100, 200,
"Depth map");
112 displayRgb.
init(Irgb, 900, 200,
"Color Image");
113 displayRgbWarped.
init(Iwarped,900,700,
"Warped Color Image");
116 std::cout <<
"Click in one image to stop acquisition" << std::endl;
134 std::cout <<
"Stop acquisition" << std::endl;
144 std::cout <<
"You should install a video device (X11, GTK, OpenCV, GDI) to run this example" << std::endl;
152 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.
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)