45 #include <visp3/core/vpConfig.h>
46 #ifdef VISP_HAVE_LIBFREENECT_AND_DEPENDENCIES
48 #if (defined(VISP_HAVE_X11) || defined(VISP_HAVE_GTK) || defined(VISP_HAVE_OPENCV) || defined(VISP_HAVE_GDI))
50 #include <visp3/core/vpImage.h>
51 #include <visp3/core/vpTime.h>
52 #include <visp3/gui/vpDisplayGDI.h>
53 #include <visp3/gui/vpDisplayGTK.h>
54 #include <visp3/gui/vpDisplayOpenCV.h>
55 #include <visp3/gui/vpDisplayX.h>
56 #include <visp3/sensor/vpKinect.h>
60 #ifdef ENABLE_VISP_NAMESPACE
65 #ifdef VISP_HAVE_LIBFREENECT_OLD
68 Freenect::Freenect<vpKinect> freenect;
69 vpKinect &kinect = freenect.createDevice(0);
71 Freenect::Freenect freenect;
78 kinect.setTiltDegrees(angle);
97 #if defined(VISP_HAVE_X11)
98 vpDisplayX display, displayRgb, displayRgbWarped;
99 #elif defined(VISP_HAVE_GTK)
103 #elif defined(HAVE_OPENCV_HIGHGUI)
107 #elif defined(VISP_HAVE_GDI)
113 display.init(Idmap, 100, 200,
"Depth map");
114 displayRgb.init(Irgb, 900, 200,
"Color Image");
115 displayRgbWarped.init(Iwarped, 900, 700,
"Warped Color Image");
118 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;
153 std::cout <<
"You do not have X11, or GDI (Graphical Device Interface), or GTK, or OpenCV functionalities to display "
156 std::cout <<
"Tip if you are on a unix-like system:" << std::endl;
157 std::cout <<
"- Install X11, configure again ViSP using cmake and build again this example" << std::endl;
158 std::cout <<
"Tip if you are on a windows-like system:" << std::endl;
159 std::cout <<
"- Install GDI, configure again ViSP using cmake and build again this example" << std::endl;
167 std::cout <<
"You do not have Freenect functionality enabled" << std::endl;
168 std::cout <<
"Tip if you are on a unix-like system:" << std::endl;
169 std::cout <<
"- Install libfreenect, configure again ViSP using cmake and build again this example" << std::endl;
Display for windows using GDI (available on any windows 32 platform).
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
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 flush(const vpImage< unsigned char > &I)
error that can be emitted by ViSP classes.
Driver for the Kinect-1 device.
void warpRGBFrame(const vpImage< vpRGBa > &Irgb, const vpImage< float > &Idepth, vpImage< vpRGBa > &IrgbWarped)
bool getDepthMap(vpImage< float > &map)
void start(vpKinect::vpDMResolution res=DMAP_LOW_RES)
bool getRGB(vpImage< vpRGBa > &IRGB)