 |
Visual Servoing Platform
version 3.3.0
|
48 #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))
53 #include <visp3/core/vpImage.h>
54 #include <visp3/core/vpTime.h>
55 #include <visp3/gui/vpDisplayGDI.h>
56 #include <visp3/gui/vpDisplayGTK.h>
57 #include <visp3/gui/vpDisplayOpenCV.h>
58 #include <visp3/gui/vpDisplayX.h>
59 #include <visp3/sensor/vpKinect.h>
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 VISP_HAVE_OPENCV
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;
139 std::cout <<
"Catch an exception: " << e << std::endl;
142 std::cout <<
"Catch an exception " << std::endl;
151 std::cout <<
"You do not have X11, or GDI (Graphical Device Interface), or GTK, or OpenCV functionalities to display images..." << std::endl;
152 std::cout <<
"Tip if you are on a unix-like system:" << std::endl;
153 std::cout <<
"- Install X11, configure again ViSP using cmake and build again this example" << std::endl;
154 std::cout <<
"Tip if you are on a windows-like system:" << std::endl;
155 std::cout <<
"- Install GDI, configure again ViSP using cmake and build again this example" << std::endl;
163 std::cout <<
"You do not have Freenect functionality enabled" << std::endl;
164 std::cout <<
"Tip if you are on a unix-like system:" << std::endl;
165 std::cout <<
"- Install libfreenect, configure again ViSP using cmake and build again this example" << std::endl;
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
bool getDepthMap(vpImage< float > &map)
void start(vpKinect::vpDMResolution res=DMAP_LOW_RES)
Display for windows using GDI (available on any windows 32 platform).
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
void warpRGBFrame(const vpImage< vpRGBa > &Irgb, const vpImage< float > &Idepth, vpImage< vpRGBa > &IrgbWarped)
static void display(const vpImage< unsigned char > &I)
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
bool getRGB(vpImage< vpRGBa > &IRGB)
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
Driver for the Kinect-1 device.
static void flush(const vpImage< unsigned char > &I)
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
error that can be emited by ViSP classes.