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>
62 #ifdef VISP_HAVE_LIBFREENECT_OLD
65 Freenect::Freenect<vpKinect> freenect;
66 vpKinect &kinect = freenect.createDevice(0);
68 Freenect::Freenect freenect;
75 kinect.setTiltDegrees(angle);
94 #if defined(VISP_HAVE_X11)
96 #elif defined(VISP_HAVE_GTK)
100 #elif defined(HAVE_OPENCV_HIGHGUI)
104 #elif defined(VISP_HAVE_GDI)
110 display.init(Idmap, 100, 200,
"Depth map");
111 displayRgb.
init(Irgb, 900, 200,
"Color Image");
112 displayRgbWarped.
init(Iwarped, 900, 700,
"Warped Color Image");
115 std::cout <<
"Click in one image to stop acquisition" << std::endl;
132 std::cout <<
"Stop acquisition" << std::endl;
137 std::cout <<
"Catch an exception: " << e << std::endl;
141 std::cout <<
"Catch an exception " << std::endl;
150 std::cout <<
"You do not have X11, or GDI (Graphical Device Interface), or GTK, or OpenCV functionalities to display "
153 std::cout <<
"Tip if you are on a unix-like system:" << std::endl;
154 std::cout <<
"- Install X11, configure again ViSP using cmake and build again this example" << std::endl;
155 std::cout <<
"Tip if you are on a windows-like system:" << std::endl;
156 std::cout <<
"- Install GDI, configure again ViSP using cmake and build again this example" << std::endl;
164 std::cout <<
"You do not have Freenect functionality enabled" << std::endl;
165 std::cout <<
"Tip if you are on a unix-like system:" << std::endl;
166 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...
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
void init(vpImage< unsigned char > &I, int win_x=-1, int win_y=-1, const std::string &win_title="") vp_override
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)
void display(vpImage< unsigned char > &I, const std::string &title)
Display a gray-scale image.