44 #include <visp3/core/vpConfig.h>
46 #if defined(VISP_HAVE_OCCIPITAL_STRUCTURE) && ( VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11 ) \
47 && (defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI))
49 #include <visp3/core/vpImageConvert.h>
50 #include <visp3/gui/vpDisplayGDI.h>
51 #include <visp3/gui/vpDisplayX.h>
52 #include <visp3/sensor/vpOccipitalStructure.h>
58 unsigned int display_scale = 1;
61 ST::CaptureSessionSettings settings;
62 settings.source = ST::CaptureSessionSourceId::StructureCore;
63 settings.structureCore.visibleEnabled =
true;
64 settings.applyExpensiveCorrection =
true;
72 #if defined(VISP_HAVE_X11)
75 #elif defined(VISP_HAVE_GDI)
80 #if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI)
84 display_visible.
init(I_visible, 10, 10,
"Visible image");
90 display_depth.
init(I_depth,
static_cast<int>(I_visible.
getWidth() / display_scale) + 20, 10,
"Depth image");
114 std::cerr <<
"Structure SDK error " << e.
what() << std::endl;
116 catch (
const std::exception &e) {
117 std::cerr << e.what() << std::endl;
125 #if !defined(VISP_HAVE_OCCIPITAL_STRUCTURE)
126 std::cout <<
"You do not have Occipital Structure SDK functionality enabled..." << std::endl;
127 std::cout <<
"Tip:" << std::endl;
128 std::cout <<
"- Install libStructure, configure again ViSP using cmake and build again this example" << std::endl;
130 #elif ( VISP_CXX_STANDARD < VISP_CXX_STANDARD_11 )
131 std::cout <<
"You do not build ViSP with c++11 or higher compiler flag" << std::endl;
132 std::cout <<
"Tip:" << std::endl;
133 std::cout <<
"- Configure ViSP again using cmake -DUSE_CXX_STANDARD=11, and build again this example" << std::endl;
134 #elif !(defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI))
135 std::cout <<
"You don't have X11 or GDI display capabilities" << std::endl;
Display for windows using GDI (available on any windows 32 platform).
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)
virtual void setDownScalingFactor(unsigned int scale)
static void display(const vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
error that can be emitted by ViSP classes.
const char * what() const
static void createDepthHistogram(const vpImage< uint16_t > &src_depth, vpImage< vpRGBa > &dest_rgba)
unsigned int getWidth() const
Type * bitmap
points toward the bitmap
unsigned int getHeight(vpOccipitalStructureStream stream_type)
void acquire(vpImage< unsigned char > &gray, bool undistorted=false, double *ts=nullptr)
unsigned int getWidth(vpOccipitalStructureStream stream_type)
bool open(const ST::CaptureSessionSettings &settings)
VISP_EXPORT double measureTimeMs()