39#ifndef _vpOccipitalStructure_h_
40#define _vpOccipitalStructure_h_
42#include <visp3/core/vpConfig.h>
44#if defined(VISP_HAVE_OCCIPITAL_STRUCTURE) && (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
46#include <condition_variable>
48#include <ST/CaptureSession.h>
51#include <pcl/common/common_headers.h>
54#include <visp3/core/vpCameraParameters.h>
55#include <visp3/core/vpImage.h>
217 case ST::CaptureSessionEventId::Booting:
break;
218 case ST::CaptureSessionEventId::Connected:
219 printf(
"Starting streams...\n");
220 session->startStreaming();
230 case ST::CaptureSessionEventId::Disconnected:
232 case ST::CaptureSessionEventId::Error:
236 printf(
"Capture session event unhandled\n");
245 if(sample.visibleFrame.isValid())
248 if(sample.depthFrame.isValid())
251 if(sample.infraredFrame.isValid())
254 if(sample.type == ST::CaptureSessionSample::Type::AccelerometerEvent)
257 if(sample.type == ST::CaptureSessionSample::Type::GyroscopeEvent)
275 } vpOccipitalStructureStream;
281 void acquire(
vpImage<vpRGBa> &rgb,
bool undistorted=
false,
double *ts=NULL);
284 bool undistorted=
false,
double *ts=NULL);
286 bool undistorted=
false,
double *ts=NULL);
288 void acquire(
unsigned char *
const data_image,
unsigned char *
const data_depth,
289 std::vector<vpColVector> *
const data_pointCloud=NULL,
unsigned char *
const data_infrared=NULL,
291 bool undistorted=
true,
double *ts=NULL);
294 void acquire(
unsigned char *
const data_image,
unsigned char *
const data_depth,
295 std::vector<vpColVector> *
const data_pointCloud, pcl::PointCloud<pcl::PointXYZ>::Ptr &pointcloud,
296 unsigned char *
const data_infrared=NULL,
vpColVector *acceleration_data=NULL,
vpColVector *gyroscope_data=NULL,
297 bool undistorted=
true,
double *ts=NULL);
298 void acquire(
unsigned char *
const data_image,
unsigned char *
const data_depth,
299 std::vector<vpColVector> *
const data_pointCloud, pcl::PointCloud<pcl::PointXYZRGB>::Ptr &pointcloud,
300 unsigned char *
const data_infrared=NULL,
vpColVector *acceleration_data=NULL,
vpColVector *gyroscope_data=NULL,
301 bool undistorted=
true,
double *ts=NULL);
304 void getIMUVelocity(
vpColVector *imu_vel,
double *ts);
305 void getIMUAcceleration(
vpColVector *imu_acc,
double *ts);
308 bool open(
const ST::CaptureSessionSettings &settings);
314 ST::StructureCoreCameraType
getCameraType()
const {
return m_delegate.m_cameraType; }
316 ST::CaptureSessionUSBVersion
getUSBVersion()
const {
return m_delegate.m_USBVersion; }
321 unsigned int getWidth(vpOccipitalStructureStream stream_type);
322 unsigned int getHeight(vpOccipitalStructureStream stream_type);
325 float getDepth(
int x,
int y);
327 vpPoint unprojectPoint(
int row,
int col);
329 vpHomogeneousMatrix getTransform(
const vpOccipitalStructureStream from,
const vpOccipitalStructureStream to);
331 ST::Intrinsics getIntrinsics(
const vpOccipitalStructureStream stream_type)
const;
336 void saveDepthImageAsPointCloudMesh(std::string &filename);
348 void getPointcloud(std::vector<vpColVector> &pointcloud);
350 void getPointcloud(pcl::PointCloud<pcl::PointXYZ>::Ptr &pointcloud);
351 void getColoredPointcloud(pcl::PointCloud<pcl::PointXYZRGB>::Ptr &pointcloud);
Generic class defining intrinsic camera parameters.
vpCameraParametersProjType
@ perspectiveProjWithoutDistortion
Implementation of column vector and the associated operations.
error that can be emited by ViSP classes.
Implementation of an homogeneous matrix and operations on such kind of matrices.
ST::CaptureSessionUSBVersion getUSBVersion() const
ST::StructureCoreCameraType getCameraType() const
vpCameraParameters m_depth_camera_parameters
ST::CaptureSession & getCaptureSession()
ST::CaptureSession m_captureSession
float m_invalidDepthValue
std::string getSerialNumber() const
ST::CaptureSessionSettings m_captureSessionSettings
SessionDelegate m_delegate
@ infrared
Infrared stream.
ST::CaptureSessionSettings & getCaptureSessionSettings()
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
VISP_EXPORT int wait(double t0, double t)
ST::CaptureSessionUSBVersion m_USBVersion
ST::AccelerometerEvent m_accelerometerEvent
std::string m_serialNumber
ST::StructureCoreCameraType m_cameraType
ST::DepthFrame m_depthFrame
void captureSessionDidOutputSample(ST::CaptureSession *, const ST::CaptureSessionSample &sample) override
std::condition_variable cv_sampleLock
ST::ColorFrame m_visibleFrame
void captureSessionEventDidOccur(ST::CaptureSession *session, ST::CaptureSessionEventId event) override
ST::GyroscopeEvent m_gyroscopeEvent
ST::InfraredFrame m_infraredFrame