| OrbbecSDK 1.10.18 OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras

Loading...
Searching...
No Matches
Utils.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include "Types.hpp"
9
10 namespace ob {
11 class Device;
12
13 class OB_EXTENSION_API CoordinateTransformHelper {
14 public:
26 static bool calibration3dTo3d(const OBCalibrationParam calibrationParam, const OBPoint3f sourcePoint3f, const OBSensorType sourceSensorType,
27 const OBSensorType targetSensorType, OBPoint3f *targetPoint3f);
28
41 static bool calibration2dTo3d(const OBCalibrationParam calibrationParam, const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue,
42 const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint3f *targetPoint3f);
43
57 static bool calibration2dTo3dUndistortion(const OBCalibrationParam calibrationParam, const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue,
58 const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint3f *targetPoint3f);
59
71 static bool calibration3dTo2d(const OBCalibrationParam calibrationParam, const OBPoint3f sourcePoint3f, const OBSensorType sourceSensorType,
72 const OBSensorType targetSensorType, OBPoint2f *targetPoint2f);
73
86 static bool calibration2dTo2d(const OBCalibrationParam calibrationParam, const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue,
87 const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint2f *targetPoint2f);
88
99 static std::shared_ptr<ob::Frame> transformationDepthFrameToColorCamera(std::shared_ptr<ob::Device> device, std::shared_ptr<ob::Frame> depthFrame,
100 uint32_t targetColorCameraWidth, uint32_t targetColorCameraHeight);
101
114 static bool transformationInitXYTables(const OBCalibrationParam calibrationParam, const OBSensorType sensorType, float *data, uint32_t *dataSize,
115 OBXYTables *xyTables);
116
125 static void transformationDepthToPointCloud(OBXYTables *xyTables, const void *depthImageData, void *pointCloudData);
126
136 static void transformationDepthToRGBDPointCloud(OBXYTables *xyTables, const void *depthImageData, const void *colorImageData, void *pointCloudData);
137};
138} // namespace ob
OBSensorType
OBSensorType
Enumeration value describing the sensor type.
Definition ObTypes.h:162
OB_EXTENSION_API
#define OB_EXTENSION_API
Definition ObTypes.h:28
Types.hpp
Provides SDK structure and enumeration constant definitions (depending on libobsensor/h/ObTypes....
ob::CoordinateTransformHelper
Definition Utils.hpp:13
ob::CoordinateTransformHelper::calibration3dTo2d
static bool calibration3dTo2d(const OBCalibrationParam calibrationParam, const OBPoint3f sourcePoint3f, const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint2f *targetPoint2f)
Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the target camera.
ob::CoordinateTransformHelper::calibration2dTo3dUndistortion
static bool calibration2dTo3dUndistortion(const OBCalibrationParam calibrationParam, const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue, const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint3f *targetPoint3f)
Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point o...
ob::CoordinateTransformHelper::calibration2dTo2d
static bool calibration2dTo2d(const OBCalibrationParam calibrationParam, const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue, const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint2f *targetPoint2f)
Transform a 2d pixel coordinate with an associated depth value of the source camera into a 2d pixel c...
ob::CoordinateTransformHelper::calibration3dTo3d
static bool calibration3dTo3d(const OBCalibrationParam calibrationParam, const OBPoint3f sourcePoint3f, const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint3f *targetPoint3f)
Transform a 3d point of a source coordinate system into a 3d point of the target coordinate system.
ob::CoordinateTransformHelper::transformationInitXYTables
static bool transformationInitXYTables(const OBCalibrationParam calibrationParam, const OBSensorType sensorType, float *data, uint32_t *dataSize, OBXYTables *xyTables)
Init transformation tables.
ob::CoordinateTransformHelper::transformationDepthFrameToColorCamera
static std::shared_ptr< ob::Frame > transformationDepthFrameToColorCamera(std::shared_ptr< ob::Device > device, std::shared_ptr< ob::Frame > depthFrame, uint32_t targetColorCameraWidth, uint32_t targetColorCameraHeight)
Transforms the depth frame into the geometry of the color camera.
ob::CoordinateTransformHelper::transformationDepthToPointCloud
static void transformationDepthToPointCloud(OBXYTables *xyTables, const void *depthImageData, void *pointCloudData)
Transform depth image to point cloud data.
ob::CoordinateTransformHelper::transformationDepthToRGBDPointCloud
static void transformationDepthToRGBDPointCloud(OBXYTables *xyTables, const void *depthImageData, const void *colorImageData, void *pointCloudData)
Transform depth image to RGBD point cloud data.
ob::CoordinateTransformHelper::calibration2dTo3d
static bool calibration2dTo3d(const OBCalibrationParam calibrationParam, const OBPoint2f sourcePoint2f, const float sourceDepthPixelValue, const OBSensorType sourceSensorType, const OBSensorType targetSensorType, OBPoint3f *targetPoint3f)
Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point o...
ob
Definition Context.hpp:16
OBCalibrationParam
calibration parameters
Definition ObTypes.h:486
OBPoint2f
2D point structure in the SDK
Definition ObTypes.h:754
OBPoint
3D point structure in the SDK
Definition ObTypes.h:745
OBXYTables
Definition ObTypes.h:759