4#include <visp3/core/vpConfig.h>
5#include <visp3/core/vpImageConvert.h>
6#include <visp3/gui/vpDisplayFactory.h>
7#include <visp3/sensor/vpOccipitalStructure.h>
8#include <visp3/sensor/vpRealSense2.h>
15#if defined(VISP_HAVE_REALSENSE2) && defined(VISP_HAVE_OCCIPITAL_STRUCTURE) && (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
16#ifdef ENABLE_VISP_NAMESPACE
39 cfg.enable_stream(RS2_STREAM_COLOR, width, height, RS2_FORMAT_RGBA8, 30);
40 cfg.enable_stream(RS2_STREAM_DEPTH, width, height, RS2_FORMAT_Z16, 30);
44 ST::CaptureSessionSettings settings;
45 settings.source = ST::CaptureSessionSourceId::StructureCore;
46 settings.structureCore.visibleEnabled =
true;
47 settings.applyExpensiveCorrection =
true;
52 rs.
acquire(
reinterpret_cast<unsigned char *
>(I_color_rs.bitmap),
53 reinterpret_cast<unsigned char *
>(rs_I_depth_raw.bitmap),
nullptr,
nullptr,
nullptr,
nullptr,
nullptr);
54 sc.
acquire(
reinterpret_cast<unsigned char *
>(I_color_sc.bitmap),
55 reinterpret_cast<unsigned char *
>(sc_I_depth_raw.bitmap));
77#if !(defined(VISP_HAVE_OCCIPITAL_STRUCTURE))
78 std::cout <<
"Install libStructure, configure and build ViSP again to use this example" << std::endl;
80#if !(defined(VISP_HAVE_REALSENSE2))
81 std::cout <<
"Install librealsense, configure and build ViSP again to use this example" << std::endl;
83#if (VISP_CXX_STANDARD < VISP_CXX_STANDARD_11)
84 std::cout <<
"This tutorial should be built with c++11 support" << std::endl;
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)
static void createDepthHistogram(const vpImage< uint16_t > &src_depth, vpImage< vpRGBa > &dest_rgba)
Definition of the vpImage class member functions.
void acquire(vpImage< unsigned char > &gray, bool undistorted=false, double *ts=nullptr)
bool open(const ST::CaptureSessionSettings &settings)
void acquire(vpImage< unsigned char > &grey, double *ts=nullptr)
bool open(const rs2::config &cfg=rs2::config())
std::shared_ptr< vpDisplay > createDisplay()
Return a smart pointer vpDisplay specialization if a GUI library is available or nullptr otherwise.