| 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_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.
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_param | Device calibration param,see pipeline::getCalibrationParam
  [in] | source_point3f | Source 3d point value
  [in] | source_sensor_type | Source sensor type
  [in] | target_sensor_type | Target sensor type
  [out] | target_point3f | Target 3d point value
  [out] | error | Log 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_param | Device calibration param,see pipeline::getCalibrationParam
  [in] | source_point2f | Source 2d point value
  [in] | source_depth_pixel_value | The depth of sourcePoint2f in millimeters
  [in] | source_sensor_type | Source sensor type
  [in] | target_sensor_type | Target sensor type
  [out] | target_point3f | Target 3d point value
  [out] | error | Log 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_param | Device calibration param,see pipeline::getCalibrationParam
  [in] | source_point2f | Source 2d point value
  [in] | source_depth_pixel_value | The depth of sourcePoint2f in millimeters
  [in] | source_sensor_type | Source sensor type
  [in] | target_sensor_type | Target sensor type
  [out] | target_point3f | Target 3d point value
  [out] | error | Log 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_param | Device calibration param,see pipeline::getCalibrationParam
  [in] | source_point3f | Source 3d point value
  [in] | source_sensor_type | Source sensor type
  [in] | target_sensor_type | Target sensor type
  [out] | target_point2f | Target 2d point value
  [out] | error | Log 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_param | Device calibration param,see pipeline::getCalibrationParam
  [in] | source_point2f | Source 2d point value
  [in] | source_depth_pixel_value | The depth of sourcePoint2f in millimeters
  [in] | source_sensor_type | Source sensor type
  [in] | target_sensor_type | Target sensor type
  [out] | target_point2f | Target 2d point value
  [out] | error | Log 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] | device | Device handle
  [in] | depth_frame | Input depth frame
  [in] | target_color_camera_width | Target color camera width
  [in] | target_color_camera_height | Target color camera height
  [out] | error | Log 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_param | Device calibration param,see pipeline::getCalibrationParam
  [in] | sensor_type | sensor type
  [in] | data | input 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_size | input data size
  [out] | xy_tables | output xy tables
  [out] | error | Log 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_tables | input xy tables,see transformation_init_xy_tables
  [in] | depth_image_data | input depth image data
  [out] | pointcloud_data | output point cloud data
  [out] | error | Log 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_tables | input xy tables,see transformation_init_xy_tables
  [in] | depth_image_data | input depth image data
  [in] | color_image_data | input color image data (only RGB888 support)
  [out] | pointcloud_data | output point cloud data
  [out] | error | Log error messages