OrbbecSDK 2.5.5
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Utils.h File Reference
#include "ObTypes.h"

Go to the source code of this file.

Functions

OB_EXPORT bool ob_transformation_3d_to_3d (const OBPoint3f source_point3f, OBExtrinsic extrinsic, OBPoint3f *target_point3f, ob_error **error)
 Transform a 3d point of a source coordinate system into a 3d point of the target coordinate system.
OB_EXPORT bool ob_transformation_2d_to_3d (const OBPoint2f source_point2f, const float source_depth_pixel_value, const OBCameraIntrinsic source_intrinsic, OBExtrinsic extrinsic, OBPoint3f *target_point3f, ob_error **error)
 Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point of the target coordinate system.
OB_EXPORT bool ob_transformation_3d_to_2d (const OBPoint3f source_point3f, const OBCameraIntrinsic target_intrinsic, const OBCameraDistortion target_distortion, OBExtrinsic extrinsic, OBPoint2f *target_point2f, ob_error **error)
 Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the target camera.
OB_EXPORT bool ob_transformation_2d_to_2d (const OBPoint2f source_point2f, const float source_depth_pixel_value, const OBCameraIntrinsic source_intrinsic, const OBCameraDistortion source_distortion, const OBCameraIntrinsic target_intrinsic, const OBCameraDistortion target_distortion, OBExtrinsic extrinsic, OBPoint2f *target_point2f, ob_error **error)
 Transform a 2d pixel coordinate with an associated depth value of the source camera into a 2d pixel coordinate of the target camera.
OB_EXPORT ob_frametransformation_depth_frame_to_color_camera (ob_device *device, ob_frame *depth_frame, uint32_t target_color_camera_width, uint32_t target_color_camera_height, ob_error **error)
OB_EXPORT bool transformation_init_xy_tables (const ob_calibration_param calibration_param, const ob_sensor_type sensor_type, float *data, uint32_t *data_size, ob_xy_tables *xy_tables, ob_error **error)
OB_EXPORT void transformation_depth_to_pointcloud (ob_xy_tables *xy_tables, const void *depth_image_data, void *pointcloud_data, ob_error **error)
OB_EXPORT void transformation_depth_to_rgbd_pointcloud (ob_xy_tables *xy_tables, const void *depth_image_data, const void *color_image_data, void *pointcloud_data, ob_error **error)
OB_EXPORT bool ob_calibration_3d_to_3d (const ob_calibration_param calibration_param, const ob_point3f source_point3f, const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point3f *target_point3f, ob_error **error)
OB_EXPORT bool ob_calibration_2d_to_3d (const ob_calibration_param calibration_param, const ob_point2f source_point2f, const float source_depth_pixel_value, const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point3f *target_point3f, ob_error **error)
OB_EXPORT bool ob_calibration_3d_to_2d (const ob_calibration_param calibration_param, const ob_point3f source_point3f, const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point2f *target_point2f, ob_error **error)
OB_EXPORT bool ob_calibration_2d_to_2d (const ob_calibration_param calibration_param, const ob_point2f source_point2f, const float source_depth_pixel_value, const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point2f *target_point2f, ob_error **error)
OB_EXPORT bool ob_save_pointcloud_to_ply (const char *file_name, ob_frame *frame, bool save_binary, bool use_mesh, float mesh_threshold, ob_error **error)
 save point cloud to ply file.

Function Documentation

◆ ob_transformation_3d_to_3d()

OB_EXPORT bool ob_transformation_3d_to_3d ( const OBPoint3f source_point3f,
OBExtrinsic extrinsic,
OBPoint3f * target_point3f,
ob_error ** error )

Transform a 3d point of a source coordinate system into a 3d point of the target coordinate system.

Parameters
[in]source_point3fSource 3d point value
[in]extrinsicTransformation matrix from source to target
[out]target_point3fTarget 3d point value
[out]errorPointer to an error object that will be set if an error occurs.
Returns
bool Transform result

Referenced by ob::CoordinateTransformHelper::transformation3dto3d().

◆ ob_transformation_2d_to_3d()

OB_EXPORT bool ob_transformation_2d_to_3d ( const OBPoint2f source_point2f,
const float source_depth_pixel_value,
const OBCameraIntrinsic source_intrinsic,
OBExtrinsic extrinsic,
OBPoint3f * target_point3f,
ob_error ** error )

Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point of the target coordinate system.

Parameters
[in]source_point2fSource 2d point value
[in]source_depth_pixel_valueThe depth of sourcePoint2f in millimeters
[in]source_intrinsicSource intrinsic parameters
[in]extrinsicTransformation matrix from source to target
[out]target_point3fTarget 3d point value
[out]errorPointer to an error object that will be set if an error occurs.
Returns
bool Transform result

Referenced by ob::CoordinateTransformHelper::transformation2dto3d().

◆ ob_transformation_3d_to_2d()

OB_EXPORT bool ob_transformation_3d_to_2d ( const OBPoint3f source_point3f,
const OBCameraIntrinsic target_intrinsic,
const OBCameraDistortion target_distortion,
OBExtrinsic extrinsic,
OBPoint2f * target_point2f,
ob_error ** error )

Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the target camera.

Parameters
[in]source_point3fSource 3d point value
[in]target_intrinsicTarget intrinsic parameters
[in]target_distortionTarget distortion parameters
[in]extrinsicTransformation matrix from source to target
[out]target_point2fTarget 2d point value
[out]errorPointer to an error object that will be set if an error occurs.
Returns
bool Transform result

Referenced by ob::CoordinateTransformHelper::transformation3dto2d().

◆ ob_transformation_2d_to_2d()

OB_EXPORT bool ob_transformation_2d_to_2d ( const OBPoint2f source_point2f,
const float source_depth_pixel_value,
const OBCameraIntrinsic source_intrinsic,
const OBCameraDistortion source_distortion,
const OBCameraIntrinsic target_intrinsic,
const OBCameraDistortion target_distortion,
OBExtrinsic extrinsic,
OBPoint2f * target_point2f,
ob_error ** error )

Transform a 2d pixel coordinate with an associated depth value of the source camera into a 2d pixel coordinate of the target camera.

Parameters
[in]source_intrinsicSource intrinsic parameters
[in]source_distortionSource distortion parameters
[in]source_point2fSource 2d point value
[in]source_depth_pixel_valueThe depth of sourcePoint2f in millimeters
[in]target_intrinsicTarget intrinsic parameters
[in]target_distortionTarget distortion parameters
[in]extrinsicTransformation matrix from source to target
[out]target_point2fTarget 2d point value
[out]errorPointer to an error object that will be set if an error occurs.
Returns
bool Transform result

Referenced by ob::CoordinateTransformHelper::transformation2dto2d().

◆ transformation_depth_frame_to_color_camera()

OB_EXPORT ob_frame * transformation_depth_frame_to_color_camera ( ob_device * device,
ob_frame * depth_frame,
uint32_t target_color_camera_width,
uint32_t target_color_camera_height,
ob_error ** error )

◆ transformation_init_xy_tables()

OB_EXPORT bool transformation_init_xy_tables ( const ob_calibration_param calibration_param,
const ob_sensor_type sensor_type,
float * data,
uint32_t * data_size,
ob_xy_tables * xy_tables,
ob_error ** error )

◆ transformation_depth_to_pointcloud()

OB_EXPORT void transformation_depth_to_pointcloud ( ob_xy_tables * xy_tables,
const void * depth_image_data,
void * pointcloud_data,
ob_error ** error )

◆ transformation_depth_to_rgbd_pointcloud()

OB_EXPORT void transformation_depth_to_rgbd_pointcloud ( ob_xy_tables * xy_tables,
const void * depth_image_data,
const void * color_image_data,
void * pointcloud_data,
ob_error ** error )

◆ ob_calibration_3d_to_3d()

OB_EXPORT bool ob_calibration_3d_to_3d ( const ob_calibration_param calibration_param,
const ob_point3f source_point3f,
const ob_sensor_type source_sensor_type,
const ob_sensor_type target_sensor_type,
ob_point3f * target_point3f,
ob_error ** error )

◆ ob_calibration_2d_to_3d()

OB_EXPORT bool ob_calibration_2d_to_3d ( const ob_calibration_param calibration_param,
const ob_point2f source_point2f,
const float source_depth_pixel_value,
const ob_sensor_type source_sensor_type,
const ob_sensor_type target_sensor_type,
ob_point3f * target_point3f,
ob_error ** error )

◆ ob_calibration_3d_to_2d()

OB_EXPORT bool ob_calibration_3d_to_2d ( const ob_calibration_param calibration_param,
const ob_point3f source_point3f,
const ob_sensor_type source_sensor_type,
const ob_sensor_type target_sensor_type,
ob_point2f * target_point2f,
ob_error ** error )

◆ ob_calibration_2d_to_2d()

OB_EXPORT bool ob_calibration_2d_to_2d ( const ob_calibration_param calibration_param,
const ob_point2f source_point2f,
const float source_depth_pixel_value,
const ob_sensor_type source_sensor_type,
const ob_sensor_type target_sensor_type,
ob_point2f * target_point2f,
ob_error ** error )

◆ ob_save_pointcloud_to_ply()

OB_EXPORT bool ob_save_pointcloud_to_ply ( const char * file_name,
ob_frame * frame,
bool save_binary,
bool use_mesh,
float mesh_threshold,
ob_error ** error )

save point cloud to ply file.

Parameters
[in]file_namePoint cloud save path
[in]framePoint cloud frame
[in]save_binaryBinary or textual,true: binary, false: textual
[in]use_meshSave mesh or not, true: save as mesh, false: not save as mesh
[in]mesh_thresholdDistance threshold for creating faces in point cloud,default value :50
[out]errorPointer to an error object that will be set if an error occurs.
Returns
bool save point cloud result

Referenced by ob::PointCloudHelper::savePointcloudToPly().