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> 60 unsigned int display_scale = 1;
63 ST::CaptureSessionSettings settings;
64 settings.source = ST::CaptureSessionSourceId::StructureCore;
65 settings.structureCore.visibleEnabled =
true;
66 settings.applyExpensiveCorrection =
true;
74 #if defined( VISP_HAVE_X11 ) 77 #elif defined( VISP_HAVE_GDI ) 82 #if defined( VISP_HAVE_X11 ) || defined( VISP_HAVE_GDI ) 86 display_visible.
init( I_visible, 10, 10,
"Visible image" );
93 display_depth.
init( I_depth, static_cast< int >( I_visible.
getWidth() / display_scale ) + 20, 10,
"Depth image" );
119 std::cerr <<
"Structure SDK error " << e.
what() << std::endl;
121 catch (
const std::exception &e )
123 std::cerr << e.what() << std::endl;
132 #if !defined( VISP_HAVE_OCCIPITAL_STRUCTURE ) 133 std::cout <<
"You do not have Occipital Structure SDK functionality enabled..." << std::endl;
134 std::cout <<
"Tip:" << std::endl;
135 std::cout <<
"- Install libStructure, configure again ViSP using cmake and build again this example" << std::endl;
137 #elif ( VISP_CXX_STANDARD < VISP_CXX_STANDARD_11 ) 138 std::cout <<
"You do not build ViSP with c++11 or higher compiler flag" << std::endl;
139 std::cout <<
"Tip:" << std::endl;
140 std::cout <<
"- Configure ViSP again using cmake -DUSE_CXX_STANDARD=11, and build again this example" << std::endl;
141 #elif !( defined( VISP_HAVE_X11 ) || defined( VISP_HAVE_GDI ) ) 142 std::cout <<
"You don't have X11 or GDI display capabilities" << std::endl;
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
Type * bitmap
points toward the bitmap
Display for windows using GDI (available on any windows 32 platform).
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
unsigned int getWidth(vpOccipitalStructureStream stream_type)
error that can be emited by ViSP classes.
bool open(const ST::CaptureSessionSettings &settings)
static void flush(const vpImage< unsigned char > &I)
VISP_EXPORT double measureTimeMs()
void acquire(vpImage< unsigned char > &gray, bool undistorted=false, double *ts=NULL)
static void display(const vpImage< unsigned char > &I)
void setDownScalingFactor(unsigned int scale)
const char * what() const
unsigned int getHeight(vpOccipitalStructureStream stream_type)
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
unsigned int getWidth() const
static void createDepthHistogram(const vpImage< uint16_t > &src_depth, vpImage< vpRGBa > &dest_rgba)