mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 03:57:46 +08:00
Update orbbecsdk library to v1.9.3
This commit is contained in:
@@ -398,7 +398,8 @@ typedef struct {
|
||||
* @brief calibration parameters
|
||||
*/
|
||||
typedef struct {
|
||||
OBCameraIntrinsic intrinsics[OB_SENSOR_COUNT]; ///< Sensor internal parameters
|
||||
OBCameraIntrinsic intrinsics[OB_SENSOR_COUNT]; ///< Sensor internal parameters
|
||||
OBCameraDistortion distortion[OB_SENSOR_COUNT]; ///< Sensor distortion
|
||||
OBTransform extrinsics[OB_SENSOR_COUNT][OB_SENSOR_COUNT]; ///< The extrinsic parameters allow 3D coordinate conversions between sensor.To transform from a
|
||||
///< source to a target 3D coordinate system,under extrinsics[source][target].
|
||||
} OBCalibrationParam, ob_calibration_param;
|
||||
@@ -418,18 +419,18 @@ typedef struct {
|
||||
|
||||
/**
|
||||
* @brief Configuration for mgc filter
|
||||
*/
|
||||
typedef struct{
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
int max_width_left;
|
||||
int max_width_right;
|
||||
int max_radius;
|
||||
int margin_x_th;
|
||||
int margin_y_th;
|
||||
int limit_x_th;
|
||||
int limit_y_th;
|
||||
}OBMGCFilterConfig,ob_mgc_filter_config;
|
||||
int max_width_left;
|
||||
int max_width_right;
|
||||
int max_radius;
|
||||
int margin_x_th;
|
||||
int margin_y_th;
|
||||
int limit_x_th;
|
||||
int limit_y_th;
|
||||
} OBMGCFilterConfig, ob_mgc_filter_config;
|
||||
|
||||
/**
|
||||
* @brief Alignment mode
|
||||
@@ -654,6 +655,13 @@ typedef struct {
|
||||
float y; ///< Y coordinate
|
||||
} OBPoint2f, ob_point2f;
|
||||
|
||||
typedef struct {
|
||||
float *xTable; ///< table used to compute X coordinate
|
||||
float *yTable; ///< table used to compute Y coordinate
|
||||
int width; ///< width of x and y tables
|
||||
int height; ///< height of x and y tables
|
||||
} OBXYTables, ob_xy_tables;
|
||||
|
||||
/**
|
||||
* @brief 3D point structure with color information
|
||||
*/
|
||||
|
||||
@@ -11,14 +11,14 @@ extern "C" {
|
||||
*
|
||||
* @param[in] calibration_param Device calibration param,see pipeline::getCalibrationParam
|
||||
* @param[in] source_point3f Source 3d point value
|
||||
* @param[in] source_sensor_Type Source sensor type
|
||||
* @param[in] source_sensor_type Source sensor type
|
||||
* @param[in] target_sensor_type Target sensor type
|
||||
* @param[out] target_point3f Target 3d point value
|
||||
* @param[out] error Log error messages
|
||||
*
|
||||
* @return bool Transform result
|
||||
*/
|
||||
bool ob_calibration_3d_to_3d(const ob_calibration_param calibration_param, const ob_point3f source_point3f, const ob_sensor_type source_sensor_Type,
|
||||
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);
|
||||
|
||||
/**
|
||||
@@ -28,14 +28,31 @@ bool ob_calibration_3d_to_3d(const ob_calibration_param calibration_param, const
|
||||
* @param[in] source_point2f Source 2d point value
|
||||
* @param[in] source_depth_pixel_value The depth of sourcePoint2f in millimeters
|
||||
* @param[in] source_sensor_type Source sensor type
|
||||
* @param[in] target_sensor_Type Target sensor type
|
||||
* @param[in] target_sensor_type Target sensor type
|
||||
* @param[out] target_point3f Target 3d point value
|
||||
* @param[out] error Log error messages
|
||||
*
|
||||
* @return bool Transform result
|
||||
*/
|
||||
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);
|
||||
const ob_sensor_type source_sensor_type, const ob_sensor_type target_sensor_type, ob_point3f *target_point3f, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Transform a 2d pixel coordinate with an associated depth value of the source camera into a 3d point of the target coordinate system.
|
||||
*
|
||||
* @param[in] calibration_param Device calibration param,see pipeline::getCalibrationParam
|
||||
* @param[in] source_point2f Source 2d point value
|
||||
* @param[in] source_depth_pixel_value The depth of sourcePoint2f in millimeters
|
||||
* @param[in] source_sensor_type Source sensor type
|
||||
* @param[in] target_sensor_type Target sensor type
|
||||
* @param[out] target_point3f Target 3d point value
|
||||
* @param[out] error Log error messages
|
||||
*
|
||||
* @return bool Transform result
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* @brief Transform a 3d point of a source coordinate system into a 2d pixel coordinate of the target camera.
|
||||
@@ -82,6 +99,44 @@ bool ob_calibration_2d_to_2d(const ob_calibration_param calibration_param, const
|
||||
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);
|
||||
|
||||
/**
|
||||
* @brief Init transformation tables
|
||||
*
|
||||
* @param[in] calibration_param Device calibration param,see pipeline::getCalibrationParam
|
||||
* @param[in] sensor_type sensor type
|
||||
* @param[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).
|
||||
* @param[in] data_size input data size
|
||||
* @param[out] xy_tables output xy tables
|
||||
* @param[out] error Log error messages
|
||||
*
|
||||
* @return bool Transform result
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* @brief Transform depth image to point cloud data
|
||||
*
|
||||
* @param[in] xy_tables input xy tables,see transformation_init_xy_tables
|
||||
* @param[in] depth_image_data input depth image data
|
||||
* @param[out] pointcloud_data output point cloud data
|
||||
* @param[out] error Log error messages
|
||||
*/
|
||||
void transformation_depth_to_pointcloud(ob_xy_tables *xy_tables, const void *depth_image_data, void *pointcloud_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Transform depth image to point cloud data
|
||||
*
|
||||
* @param[in] xy_tables input xy tables,see transformation_init_xy_tables
|
||||
* @param[in] depth_image_data input depth image data
|
||||
* @param[in] color_image_data input color image data (only RGB888 support)
|
||||
* @param[out] pointcloud_data output point cloud data
|
||||
* @param[out] error Log error messages
|
||||
*/
|
||||
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);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user