Visual Servoing Platform  version 3.5.0 under development (2022-02-15)
vpOccipitalStructure Class Reference

#include <visp3/sensor/vpOccipitalStructure.h>

Public Types

enum  vpOccipitalStructureStream { visible, depth, infrared, imu }
 

Public Member Functions

 vpOccipitalStructure ()
 
 ~vpOccipitalStructure ()
 
void acquire (vpImage< unsigned char > &gray, bool undistorted=false, double *ts=NULL)
 
void acquire (vpImage< vpRGBa > &rgb, bool undistorted=false, double *ts=NULL)
 
void acquire (vpImage< vpRGBa > *rgb, vpImage< vpRGBa > *depth, vpColVector *acceleration_data=NULL, vpColVector *gyroscope_data=NULL, bool undistorted=false, double *ts=NULL)
 
void acquire (vpImage< unsigned char > *gray, vpImage< vpRGBa > *depth, vpColVector *acceleration_data=NULL, vpColVector *gyroscope_data=NULL, bool undistorted=false, double *ts=NULL)
 
void acquire (unsigned char *const data_image, unsigned char *const data_depth, std::vector< vpColVector > *const data_pointCloud=NULL, unsigned char *const data_infrared=NULL, vpColVector *acceleration_data=NULL, vpColVector *gyroscope_data=NULL, bool undistorted=true, double *ts=NULL)
 
void acquire (unsigned char *const data_image, unsigned char *const data_depth, std::vector< vpColVector > *const data_pointCloud, pcl::PointCloud< pcl::PointXYZ >::Ptr &pointcloud, unsigned char *const data_infrared=NULL, vpColVector *acceleration_data=NULL, vpColVector *gyroscope_data=NULL, bool undistorted=true, double *ts=NULL)
 
void acquire (unsigned char *const data_image, unsigned char *const data_depth, std::vector< vpColVector > *const data_pointCloud, pcl::PointCloud< pcl::PointXYZRGB >::Ptr &pointcloud, unsigned char *const data_infrared=NULL, vpColVector *acceleration_data=NULL, vpColVector *gyroscope_data=NULL, bool undistorted=true, double *ts=NULL)
 
void getIMUVelocity (vpColVector *imu_vel, double *ts)
 
void getIMUAcceleration (vpColVector *imu_acc, double *ts)
 
void getIMUData (vpColVector *imu_vel, vpColVector *imu_acc, double *ts=NULL)
 
bool open (const ST::CaptureSessionSettings &settings)
 
void close ()
 
ST::StructureCoreCameraType getCameraType () const
 
ST::CaptureSessionUSBVersion getUSBVersion () const
 
std::string getSerialNumber () const
 
ST::CaptureSession & getCaptureSession ()
 
ST::CaptureSessionSettings & getCaptureSessionSettings ()
 
unsigned int getWidth (vpOccipitalStructureStream stream_type)
 
unsigned int getHeight (vpOccipitalStructureStream stream_type)
 
float getDepth (int x, int y)
 
vpPoint unprojectPoint (int row, int col)
 
vpHomogeneousMatrix getTransform (const vpOccipitalStructureStream from, const vpOccipitalStructureStream to)
 
ST::Intrinsics getIntrinsics (const vpOccipitalStructureStream stream_type) const
 
vpCameraParameters getCameraParameters (const vpOccipitalStructureStream stream_type, vpCameraParameters::vpCameraParametersProjType type=vpCameraParameters::perspectiveProjWithoutDistortion)
 
void saveDepthImageAsPointCloudMesh (std::string &filename)
 

Protected Member Functions

void getPointcloud (std::vector< vpColVector > &pointcloud)
 
void getPointcloud (pcl::PointCloud< pcl::PointXYZ >::Ptr &pointcloud)
 
void getColoredPointcloud (pcl::PointCloud< pcl::PointXYZRGB >::Ptr &pointcloud)
 

Protected Attributes

bool m_init
 
float m_invalidDepthValue
 
float m_maxZ
 
ST::CaptureSession m_captureSession
 
ST::CaptureSessionSettings m_captureSessionSettings
 
SessionDelegate m_delegate
 
vpCameraParameters m_visible_camera_parameters
 
vpCameraParameters m_depth_camera_parameters
 

Detailed Description

This class provides a wrapper over the Occipital Structure SDK library https://structure.io/developers. It allows to capture data from the Occipital Structure Core camera.

Note
Supported devices for Occipital Structure SDK 0.9:
  • Occipital Structure Core.

The usage of vpOccipitalStructure class is enabled when libStructure 3rd party is successfully installed. The following tutorials explain how to proceed:

Moreover, if Point Cloud Library (PCL) 3rd party is installed, we also propose interfaces to retrieve point cloud as pcl::PointCloud<pcl::PointXYZ> or pcl::PointCloud<pcl::PointXYZRGB> data structures.

Warning
Notice that the usage of this class requires compiler and library support for the ISO C++ 2011 standard. This support is enabled by default in ViSP when supported by the compiler. Hereafter we give an example of a CMakeLists.txt file that allows to build sample-structure-core.cpp that uses vpOccipitalStructure class.
project(sample)
cmake_minimum_required(VERSION 3.0)
find_package(VISP REQUIRED)
include_directories(${VISP_INCLUDE_DIRS})
add_executable(sample-structure-core sample-structure-core.cpp)
target_link_libraries(sample-structure-core ${VISP_LIBRARIES})

To acquire images from the Structure Core color camera and convert them into grey level images, a good starting is to use the following code that corresponds to the content of `sample-structure-core.cpp:

#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/sensor/vpOccipitalStructure.h>
int main()
{
ST::CaptureSessionSettings settings;
settings.source = ST::CaptureSessionSourceId::StructureCore;
settings.structureCore.visibleEnabled = true;
sc.open(settings);
#ifdef VISP_HAVE_X11
vpDisplayX d(I);
#elif defined(VISP_HAVE_GDI)
#endif
while (true) {
sc.acquire(I);
if (vpDisplay::getClick(I, false))
break;
}
return 0;
}

If you want to acquire color images, in the previous sample replace:

by

If you are interested in the point cloud and if ViSP is build with PCL support, you can start from the following example where we use PCL library to visualize the point cloud

#include <visp3/sensor/vpOccipitalStructure.h>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/visualization/pcl_visualizer.h>
int main()
{
ST::CaptureSessionSettings settings;
settings.source = ST::CaptureSessionSourceId::StructureCore;
settings.structureCore.visibleEnabled = true;
settings.applyExpensiveCorrection = true; // Apply a correction and clean filter to the depth before streaming.
sc.open(settings);
// Calling these 2 functions to set internal variables.
pcl::PointCloud<pcl::PointXYZRGB>::Ptr pointcloud(new pcl::PointCloud<pcl::PointXYZRGB>);
sc.acquire(NULL, NULL, NULL, pointcloud);
pcl::visualization::PCLVisualizer::Ptr viewer (new pcl::visualization::PCLVisualizer ("3D Viewer"));
pcl::visualization::PointCloudColorHandlerRGBField<pcl::PointXYZRGB> rgb(pointcloud);
viewer->setBackgroundColor(0, 0, 0);
viewer->initCameraParameters();
viewer->setCameraPosition(0, 0, -0.5, 0, -1, 0);
while (true) {
sc.acquire(NULL, NULL, NULL, pointcloud);
static bool update = false;
if (!update) {
viewer->addPointCloud<pcl::PointXYZRGB> (pointcloud, rgb, "sample cloud");
viewer->setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 1, "sample cloud");
update = true;
} else {
viewer->updatePointCloud<pcl::PointXYZRGB> (pointcloud, rgb, "sample cloud");
}
viewer->spinOnce(30);
}
return 0;
}

References to ST::CaptureSession and ST::CaptureSessionSettings can be retrieved with (sc.open() must be called before):

ST::CaptureSession &getCaptureSession();
ST::CaptureSessionSettings &getCaptureSessionSettings();
Examples:
testOccipitalStructure_Core_images.cpp, testOccipitalStructure_Core_imu.cpp, testOccipitalStructure_Core_pcl.cpp, tutorial-apriltag-detector-live-rgbd-structure-core.cpp, tutorial-grabber-rgbd-D435-structurecore.cpp, tutorial-grabber-structure-core.cpp, and tutorial-mb-generic-tracker-rgbd-structure-core.cpp.

Definition at line 266 of file vpOccipitalStructure.h.

Member Enumeration Documentation

◆ vpOccipitalStructureStream

Enumerator
visible 

Visible stream.

depth 

Depth stream.

infrared 

Infrared stream.

imu 

IMU stream.

Definition at line 269 of file vpOccipitalStructure.h.

Constructor & Destructor Documentation

◆ vpOccipitalStructure()

vpOccipitalStructure::vpOccipitalStructure ( )

Default constructor.

Definition at line 58 of file vpOccipitalStructure.cpp.

◆ ~vpOccipitalStructure()

vpOccipitalStructure::~vpOccipitalStructure ( )

Default destructor that stops the streaming.

See also
stop()

Definition at line 67 of file vpOccipitalStructure.cpp.

References close().

Member Function Documentation

◆ acquire() [1/7]

void vpOccipitalStructure::acquire ( vpImage< unsigned char > &  gray,
bool  undistorted = false,
double *  ts = NULL 
)

Acquire greyscale image from Structure Core device.

Parameters
gray: Greyscale image.
undistorted: Set to true to get undistorted grayscale image.
ts: Image timestamp or NULL if not wanted.
Examples:
testOccipitalStructure_Core_images.cpp, testOccipitalStructure_Core_pcl.cpp, tutorial-apriltag-detector-live-rgbd-structure-core.cpp, tutorial-grabber-rgbd-D435-structurecore.cpp, tutorial-grabber-structure-core.cpp, and tutorial-mb-generic-tracker-rgbd-structure-core.cpp.

Definition at line 75 of file vpOccipitalStructure.cpp.

References vpImage< Type >::bitmap, SessionDelegate::cv_sampleLock, m_delegate, SessionDelegate::m_sampleLock, and SessionDelegate::m_visibleFrame.

◆ acquire() [2/7]

void vpOccipitalStructure::acquire ( vpImage< vpRGBa > &  rgb,
bool  undistorted = false,
double *  ts = NULL 
)

Acquire color image from Structure Core device.

Parameters
rgb: RGB image.
undistorted: Set to true to get undistorted image.
ts: Image timestamp or NULL if not wanted.

Definition at line 100 of file vpOccipitalStructure.cpp.

References vpImage< Type >::bitmap, SessionDelegate::cv_sampleLock, vpImageConvert::GreyToRGBa(), SessionDelegate::m_cameraType, m_delegate, SessionDelegate::m_sampleLock, SessionDelegate::m_visibleFrame, and vpImageConvert::RGBToRGBa().

◆ acquire() [3/7]

void vpOccipitalStructure::acquire ( vpImage< vpRGBa > *  rgb,
vpImage< vpRGBa > *  depth,
vpColVector acceleration_data = NULL,
vpColVector gyroscope_data = NULL,
bool  undistorted = false,
double *  ts = NULL 
)

Acquire rgb image and IMU data from Structure Core device.

Parameters
rgb: RGB image or NULL if not wanted.
depth: Depth image or NULL if not wanted.
acceleration_data: Acceleration data or NULL if not wanted.
gyroscope_data: Gyroscope data or NULL if not wanted.
undistorted: Set to true to get undistorted image.
ts: Image timestamp or NULL if not wanted.

Definition at line 141 of file vpOccipitalStructure.cpp.

References vpImage< Type >::bitmap, SessionDelegate::cv_sampleLock, vpImageConvert::GreyToRGBa(), SessionDelegate::m_accelerometerEvent, SessionDelegate::m_cameraType, m_delegate, SessionDelegate::m_depthFrame, SessionDelegate::m_gyroscopeEvent, SessionDelegate::m_sampleLock, SessionDelegate::m_visibleFrame, and vpImageConvert::RGBToRGBa().

◆ acquire() [4/7]

void vpOccipitalStructure::acquire ( vpImage< unsigned char > *  gray,
vpImage< vpRGBa > *  depth,
vpColVector acceleration_data = NULL,
vpColVector gyroscope_data = NULL,
bool  undistorted = false,
double *  ts = NULL 
)

Acquire grayscale image, depth and IMU data from Structure Core device.

Parameters
gray: Gray image or NULL if not wanted.
depth: Depth image or NULL if not wanted.
acceleration_data: Acceleration data or NULL if not wanted.
gyroscope_data: Gyroscope data or NULL if not wanted.
undistorted: Set to true to get undistorted image.
ts: Image timestamp or NULL if not wanted.

Definition at line 203 of file vpOccipitalStructure.cpp.

References vpImage< Type >::bitmap, SessionDelegate::cv_sampleLock, SessionDelegate::m_accelerometerEvent, m_delegate, SessionDelegate::m_depthFrame, SessionDelegate::m_gyroscopeEvent, SessionDelegate::m_sampleLock, and SessionDelegate::m_visibleFrame.

◆ acquire() [5/7]

void vpOccipitalStructure::acquire ( unsigned char *const  data_image,
unsigned char *const  data_depth,
std::vector< vpColVector > *const  data_pointCloud = NULL,
unsigned char *const  data_infrared = NULL,
vpColVector acceleration_data = NULL,
vpColVector gyroscope_data = NULL,
bool  undistorted = true,
double *  ts = NULL 
)

Acquire data from Structure Core device.

Parameters
data_image: Visible image buffer or NULL if not wanted.
data_depth: Depth image buffer in millimeters or NULL if not wanted.
data_pointCloud: Point cloud vector pointer or NULL if not wanted.
data_infrared: Infrared image buffer or NULL if not wanted.
acceleration_data: Acceleration data or NULL if not wanted.
gyroscope_data: Gyroscope data or NULL if not wanted.
undistorted: Set to true if you want undistorted monochrome device image.
ts: Data timestamp or NULL if not wanted.

Definition at line 253 of file vpOccipitalStructure.cpp.

References SessionDelegate::cv_sampleLock, getPointcloud(), vpImageConvert::GreyToRGBa(), SessionDelegate::m_accelerometerEvent, SessionDelegate::m_cameraType, m_delegate, SessionDelegate::m_depthFrame, SessionDelegate::m_gyroscopeEvent, SessionDelegate::m_infraredFrame, SessionDelegate::m_sampleLock, SessionDelegate::m_visibleFrame, and vpImageConvert::RGBToRGBa().

◆ acquire() [6/7]

void vpOccipitalStructure::acquire ( unsigned char *const  data_image,
unsigned char *const  data_depth,
std::vector< vpColVector > *const  data_pointCloud,
pcl::PointCloud< pcl::PointXYZ >::Ptr &  pointcloud,
unsigned char *const  data_infrared = NULL,
vpColVector acceleration_data = NULL,
vpColVector gyroscope_data = NULL,
bool  undistorted = true,
double *  ts = NULL 
)

Acquire data from Structure Core device.

Parameters
data_image: Color image buffer or NULL if not wanted.
data_depth: Depth image buffer or NULL if not wanted.
data_pointCloud: Point cloud vector pointer or NULL if not wanted.
pointcloud: Point cloud (in PCL format and without texture information) pointer or NULL if not wanted.
data_infrared: Infrared image buffer or NULL if not wanted.
acceleration_data: Acceleration data or NULL if not wanted.
gyroscope_data: Gyroscope data or NULL if not wanted.
undistorted: Set to true if you want undistorted monochrome device image.
ts: Data timestamp or NULL if not wanted.

Definition at line 322 of file vpOccipitalStructure.cpp.

References SessionDelegate::cv_sampleLock, getPointcloud(), vpImageConvert::GreyToRGBa(), SessionDelegate::m_accelerometerEvent, SessionDelegate::m_cameraType, m_delegate, SessionDelegate::m_depthFrame, SessionDelegate::m_gyroscopeEvent, SessionDelegate::m_infraredFrame, SessionDelegate::m_sampleLock, SessionDelegate::m_visibleFrame, and vpImageConvert::RGBToRGBa().

◆ acquire() [7/7]

void vpOccipitalStructure::acquire ( unsigned char *const  data_image,
unsigned char *const  data_depth,
std::vector< vpColVector > *const  data_pointCloud,
pcl::PointCloud< pcl::PointXYZRGB >::Ptr &  pointcloud,
unsigned char *const  data_infrared = NULL,
vpColVector acceleration_data = NULL,
vpColVector gyroscope_data = NULL,
bool  undistorted = true,
double *  ts = NULL 
)

Acquire data from Structure Core device.

Parameters
data_image: Color image buffer or NULL if not wanted.
data_depth: Depth image buffer or NULL if not wanted.
data_pointCloud: Point cloud vector pointer or NULL if not wanted.
pointcloud: Point cloud (in PCL format) pointer or NULL if not wanted.
data_infrared: Infrared image buffer or NULL if not wanted.
acceleration_data: Acceleration data or NULL if not wanted.
gyroscope_data: Gyroscope data or NULL if not wanted.
undistorted: Set to true if you want undistorted monochrome device image.
ts: Data timestamp or NULL if not wanted.

Definition at line 392 of file vpOccipitalStructure.cpp.

References SessionDelegate::cv_sampleLock, getColoredPointcloud(), getPointcloud(), vpImageConvert::GreyToRGBa(), SessionDelegate::m_accelerometerEvent, SessionDelegate::m_cameraType, m_delegate, SessionDelegate::m_depthFrame, SessionDelegate::m_gyroscopeEvent, SessionDelegate::m_infraredFrame, SessionDelegate::m_sampleLock, SessionDelegate::m_visibleFrame, and vpImageConvert::RGBToRGBa().

◆ close()

void vpOccipitalStructure::close ( )

libStructure documentation:

Unlike the start functions, this function runs synchronously and will block until the device has successfully stopped streaming. Once successful, the captureSessionEventDidOccur delegate will receive CaptureSessionEventId::Ready. If an error occurs, the captureSessionEventDidOccur delegate will receive CaptureSessionEventId::Error or the specific error case enum.

Definition at line 627 of file vpOccipitalStructure.cpp.

References m_captureSession, and m_init.

Referenced by open(), and ~vpOccipitalStructure().

◆ getCameraParameters()

◆ getCameraType()

ST::StructureCoreCameraType vpOccipitalStructure::getCameraType ( ) const
inline

Get camera type: Color or Monochrome.

Definition at line 314 of file vpOccipitalStructure.h.

◆ getCaptureSession()

ST::CaptureSession& vpOccipitalStructure::getCaptureSession ( )
inline

Definition at line 318 of file vpOccipitalStructure.h.

◆ getCaptureSessionSettings()

ST::CaptureSessionSettings& vpOccipitalStructure::getCaptureSessionSettings ( )
inline

◆ getColoredPointcloud()

void vpOccipitalStructure::getColoredPointcloud ( pcl::PointCloud< pcl::PointXYZRGB >::Ptr &  pointcloud)
protected

◆ getDepth()

float vpOccipitalStructure::getDepth ( int  x,
int  y 
)

Returns depth in millimeters at (x,y) if it exists, NAN otherwise.

Parameters
x: Pixel x-location.
y: Pixel y-location

Definition at line 701 of file vpOccipitalStructure.cpp.

References SessionDelegate::cv_sampleLock, m_delegate, SessionDelegate::m_depthFrame, and SessionDelegate::m_sampleLock.

◆ getHeight()

unsigned int vpOccipitalStructure::getHeight ( vpOccipitalStructureStream  stream_type)

◆ getIMUAcceleration()

void vpOccipitalStructure::getIMUAcceleration ( vpColVector imu_acc,
double *  ts 
)

Get linear acceleration from IMU's accelerometer.

Parameters
imu_acc: IMU 3-dim angular velocity vector from gyro.
ts: Timestamp.
Note
Default IMU streaming rate is 400Hz.
ST::CaptureSessionSettings settings;
settings.source = ST::CaptureSessionSourceId::StructureCore;
settings.structureCore.depthEnabled = false;
settings.structureCore.accelerometerEnabled = true;
settings.structureCore.gyroscopeEnabled = true;
st.open(settings);
vpColVector imu_acc;
double timestamp;
st.getIMUAcceleration(&imu_acc, &timestamp);

Definition at line 513 of file vpOccipitalStructure.cpp.

References SessionDelegate::cv_sampleLock, SessionDelegate::m_accelerometerEvent, m_delegate, SessionDelegate::m_sampleLock, and vpColVector::resize().

◆ getIMUData()

void vpOccipitalStructure::getIMUData ( vpColVector imu_vel,
vpColVector imu_acc,
double *  ts = NULL 
)

Get IMU data (angular velocities and linear acceleration) from Structure Core device.

Parameters
imu_vel: IMU 3-dim angular velocity vector from gyro.
imu_acc: IMU 3-dim linear acceleration vector.
ts: Timestamp.
Note
Default IMU streaming rate is 400Hz.
Be aware that IMU frame's X and Z axes are opposite to X and Z axes of pose frame.
ST::CaptureSessionSettings settings;
settings.source = ST::CaptureSessionSourceId::StructureCore;
settings.structureCore.depthEnabled = false;
settings.structureCore.accelerometerEnabled = true;
settings.structureCore.gyroscopeEnabled = true;
st.open(settings);
vpColVector imu_acc, imu_vel;
double timestamp;
st.getIMUData(&imu_acc, &imu_vel, &timestamp);
Examples:
testOccipitalStructure_Core_imu.cpp.

Definition at line 555 of file vpOccipitalStructure.cpp.

References SessionDelegate::cv_sampleLock, SessionDelegate::m_accelerometerEvent, m_delegate, SessionDelegate::m_gyroscopeEvent, SessionDelegate::m_sampleLock, and vpColVector::resize().

◆ getIMUVelocity()

void vpOccipitalStructure::getIMUVelocity ( vpColVector imu_vel,
double *  ts 
)

Get angular velocities from IMU's gyroscope.

Parameters
imu_vel: IMU 3-dim angular velocity vector from gyro.
ts: Timestamp.
Note
Default IMU streaming rate is 400Hz.
ST::CaptureSessionSettings settings;
settings.source = ST::CaptureSessionSourceId::StructureCore;
settings.structureCore.depthEnabled = false;
settings.structureCore.accelerometerEnabled = true;
settings.structureCore.gyroscopeEnabled = true;
st.open(settings);
vpColVector imu_vel;
double timestamp;
st.getIMUVelocity(&imu_vel, &timestamp);

Definition at line 474 of file vpOccipitalStructure.cpp.

References SessionDelegate::cv_sampleLock, m_delegate, SessionDelegate::m_gyroscopeEvent, SessionDelegate::m_sampleLock, and vpColVector::resize().

◆ getIntrinsics()

ST::Intrinsics vpOccipitalStructure::getIntrinsics ( const vpOccipitalStructureStream  stream_type) const

Get intrinsic parameters corresponding to the stream. This function has to be called after open().

Parameters
stream_type: Stream for which the camera intrinsic parameters are returned.

Definition at line 823 of file vpOccipitalStructure.cpp.

References depth, infrared, m_delegate, SessionDelegate::m_depthFrame, SessionDelegate::m_infraredFrame, SessionDelegate::m_visibleFrame, and visible.

◆ getPointcloud() [1/2]

void vpOccipitalStructure::getPointcloud ( std::vector< vpColVector > &  pointcloud)
protected

Definition at line 896 of file vpOccipitalStructure.cpp.

References m_delegate, SessionDelegate::m_depthFrame, m_invalidDepthValue, and m_maxZ.

Referenced by acquire().

◆ getPointcloud() [2/2]

void vpOccipitalStructure::getPointcloud ( pcl::PointCloud< pcl::PointXYZ >::Ptr &  pointcloud)
protected

◆ getSerialNumber()

std::string vpOccipitalStructure::getSerialNumber ( ) const
inline

Definition at line 317 of file vpOccipitalStructure.h.

◆ getTransform()

vpHomogeneousMatrix vpOccipitalStructure::getTransform ( const vpOccipitalStructureStream  from,
const vpOccipitalStructureStream  to 
)

Get the extrinsic transformation from one stream to another. This function has to be called after open().

Parameters
from,to: Streams for which the camera extrinsic parameters are returned.
Examples:
tutorial-mb-generic-tracker-rgbd-structure-core.cpp.

Definition at line 743 of file vpOccipitalStructure.cpp.

References depth, imu, infrared, m_captureSession, m_delegate, SessionDelegate::m_depthFrame, and visible.

◆ getUSBVersion()

ST::CaptureSessionUSBVersion vpOccipitalStructure::getUSBVersion ( ) const
inline

Definition at line 316 of file vpOccipitalStructure.h.

◆ getWidth()

unsigned int vpOccipitalStructure::getWidth ( vpOccipitalStructureStream  stream_type)

◆ open()

◆ saveDepthImageAsPointCloudMesh()

void vpOccipitalStructure::saveDepthImageAsPointCloudMesh ( std::string &  filename)

Converts the depth frame into a 3D point cloud using intrinsic calibration then writes out the result as PLY mesh at the provided path.

Parameters
filename: PLY file name.

Definition at line 855 of file vpOccipitalStructure.cpp.

References m_delegate, and SessionDelegate::m_depthFrame.

◆ unprojectPoint()

vpPoint vpOccipitalStructure::unprojectPoint ( int  row,
int  col 
)

Returns 3D coordinates of point whose projection is at (row, col).

Parameters
row: Pixel row.
col: Pixel column.

Definition at line 721 of file vpOccipitalStructure.cpp.

References SessionDelegate::cv_sampleLock, m_delegate, SessionDelegate::m_depthFrame, and SessionDelegate::m_sampleLock.

Member Data Documentation

◆ m_captureSession

ST::CaptureSession vpOccipitalStructure::m_captureSession
protected

Definition at line 343 of file vpOccipitalStructure.h.

Referenced by close(), getTransform(), and open().

◆ m_captureSessionSettings

ST::CaptureSessionSettings vpOccipitalStructure::m_captureSessionSettings
protected

Definition at line 344 of file vpOccipitalStructure.h.

Referenced by open().

◆ m_delegate

◆ m_depth_camera_parameters

vpCameraParameters vpOccipitalStructure::m_depth_camera_parameters
protected

Definition at line 346 of file vpOccipitalStructure.h.

Referenced by getCameraParameters().

◆ m_init

bool vpOccipitalStructure::m_init
protected

Definition at line 339 of file vpOccipitalStructure.h.

Referenced by close(), and open().

◆ m_invalidDepthValue

float vpOccipitalStructure::m_invalidDepthValue
protected

Definition at line 340 of file vpOccipitalStructure.h.

Referenced by getColoredPointcloud(), and getPointcloud().

◆ m_maxZ

float vpOccipitalStructure::m_maxZ
protected

Definition at line 341 of file vpOccipitalStructure.h.

Referenced by getColoredPointcloud(), and getPointcloud().

◆ m_visible_camera_parameters

vpCameraParameters vpOccipitalStructure::m_visible_camera_parameters
protected

Definition at line 346 of file vpOccipitalStructure.h.

Referenced by getCameraParameters(), and getColoredPointcloud().