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

Go to the source code of this file.

Functions

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)
 Transform a 3d point of a source coordinate system into a 3d point of the target coordinate system.
 
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)
 Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point of the target coordinate system.
 
bool ob_calibration_2d_to_3d_undistortion (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)
 Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point of the target coordinate system.
 
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)
 Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the target camera.
 
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)
 Transform a 2d pixel coordinate with an associated depth value of the source camera into a 2d pixel coordinate of the target camera.
 
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)
 Transforms the depth frame into the geometry of the color camera.
 
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)
 Init transformation tables.
 
void transformation_depth_to_pointcloud (ob_xy_tables *xy_tables, const void *depth_image_data, void *pointcloud_data, ob_error **error)
 Transform depth image to point cloud data.
 
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)
 Transform depth image to point cloud data.
 

Function Documentation

◆ ob_calibration_3d_to_3d()

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 
)

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

Parameters
[in]calibration_paramDevice calibration param,see pipeline::getCalibrationParam
[in]source_point3fSource 3d point value
[in]source_sensor_typeSource sensor type
[in]target_sensor_typeTarget sensor type
[out]target_point3fTarget 3d point value
[out]errorLog error messages
Returns
bool Transform result

◆ ob_calibration_2d_to_3d()

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 
)

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]calibration_paramDevice calibration param,see pipeline::getCalibrationParam
[in]source_point2fSource 2d point value
[in]source_depth_pixel_valueThe depth of sourcePoint2f in millimeters
[in]source_sensor_typeSource sensor type
[in]target_sensor_typeTarget sensor type
[out]target_point3fTarget 3d point value
[out]errorLog error messages
Returns
bool Transform result

◆ ob_calibration_2d_to_3d_undistortion()

bool ob_calibration_2d_to_3d_undistortion ( 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 
)

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]calibration_paramDevice calibration param,see pipeline::getCalibrationParam
[in]source_point2fSource 2d point value
[in]source_depth_pixel_valueThe depth of sourcePoint2f in millimeters
[in]source_sensor_typeSource sensor type
[in]target_sensor_typeTarget sensor type
[out]target_point3fTarget 3d point value
[out]errorLog error messages
Returns
bool Transform result

◆ ob_calibration_3d_to_2d()

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 
)

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

Parameters
[in]calibration_paramDevice calibration param,see pipeline::getCalibrationParam
[in]source_point3fSource 3d point value
[in]source_sensor_typeSource sensor type
[in]target_sensor_typeTarget sensor type
[out]target_point2fTarget 2d point value
[out]errorLog error messages
Returns
bool Transform result

◆ ob_calibration_2d_to_2d()

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 
)

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]calibration_paramDevice calibration param,see pipeline::getCalibrationParam
[in]source_point2fSource 2d point value
[in]source_depth_pixel_valueThe depth of sourcePoint2f in millimeters
[in]source_sensor_typeSource sensor type
[in]target_sensor_typeTarget sensor type
[out]target_point2fTarget 2d point value
[out]errorLog error messages
Returns
bool Transform result

◆ transformation_depth_frame_to_color_camera()

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 
)

Transforms the depth frame into the geometry of the color camera.

Parameters
[in]deviceDevice handle
[in]depth_frameInput depth frame
[in]target_color_camera_widthTarget color camera width
[in]target_color_camera_heightTarget color camera height
[out]errorLog error messages
Returns
ob_frame* Transformed depth frame

◆ transformation_init_xy_tables()

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 
)

Init transformation tables.

Parameters
[in]calibration_paramDevice calibration param,see pipeline::getCalibrationParam
[in]sensor_typesensor type
[in]datainput data,needs to be allocated externally.During initialization, the external allocation size is 'data_size', for example, data_size = 1920
  • 1080 * 2*sizeof(float) (1920 * 1080 represents the image resolution, and 2 represents two LUTs, one for x-coordinate and one for y-coordinate).
[in]data_sizeinput data size
[out]xy_tablesoutput xy tables
[out]errorLog error messages
Returns
bool Transform result

◆ transformation_depth_to_pointcloud()

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

Transform depth image to point cloud data.

Parameters
[in]xy_tablesinput xy tables,see transformation_init_xy_tables
[in]depth_image_datainput depth image data
[out]pointcloud_dataoutput point cloud data
[out]errorLog error messages

◆ transformation_depth_to_rgbd_pointcloud()

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 
)

Transform depth image to point cloud data.

Parameters
[in]xy_tablesinput xy tables,see transformation_init_xy_tables
[in]depth_image_datainput depth image data
[in]color_image_datainput color image data (only RGB888 support)
[out]pointcloud_dataoutput point cloud data
[out]errorLog error messages