User/axduan/add mm in parameter name (#159)
* Add mm in the parameter name to bring more clarity * Small change * remove _in from the name * Add unsaved file * addressing comments * update doxgen * clang format
This commit is contained in:
Родитель
9e6916f91f
Коммит
2a4e6d925f
|
@ -1412,7 +1412,7 @@ K4A_EXPORT k4a_result_t k4a_calibration_get_from_raw(char *raw_calibration,
|
|||
* \param calibration
|
||||
* Location to read the camera calibration data.
|
||||
*
|
||||
* \param source_point3d
|
||||
* \param source_point3d_mm
|
||||
* The 3D coordinates in millimeters representing a point in \p source_camera.
|
||||
*
|
||||
* \param source_camera
|
||||
|
@ -1421,19 +1421,19 @@ K4A_EXPORT k4a_result_t k4a_calibration_get_from_raw(char *raw_calibration,
|
|||
* \param target_camera
|
||||
* The target camera.
|
||||
*
|
||||
* \param target_point3d
|
||||
* \param target_point3d_mm
|
||||
* Pointer to the output where the new 3D coordinates of the input point in the coordinate space of \p target_camera is
|
||||
* stored.
|
||||
* stored in millimeters.
|
||||
*
|
||||
* \returns
|
||||
* ::K4A_RESULT_SUCCEEDED if \p target_point3d was successfully written. ::K4A_RESULT_FAILED if \p calibration
|
||||
* ::K4A_RESULT_SUCCEEDED if \p target_point3d_mm was successfully written. ::K4A_RESULT_FAILED if \p calibration
|
||||
* contained invalid transformation parameters.
|
||||
*
|
||||
* \remarks
|
||||
* This function is used to transform 3D points between depth and color camera coordinate systems. The function uses the
|
||||
* extrinsic camera calibration. It computes the output via multiplication with a precomputed matrix encoding a 3D
|
||||
* rotation and a 3D translation. If \p source_camera and \p target_camera are the same, then \p target_point3d will be
|
||||
* identical to \p source_point3d.
|
||||
* rotation and a 3D translation. If \p source_camera and \p target_camera are the same, then \p target_point3d_mm will
|
||||
* be identical to \p source_point3d_mm.
|
||||
*
|
||||
* \relates k4a_calibration_t
|
||||
*
|
||||
|
@ -1446,10 +1446,10 @@ K4A_EXPORT k4a_result_t k4a_calibration_get_from_raw(char *raw_calibration,
|
|||
* \endxmlonly
|
||||
*/
|
||||
K4A_EXPORT k4a_result_t k4a_calibration_3d_to_3d(const k4a_calibration_t *calibration,
|
||||
const k4a_float3_t *source_point3d,
|
||||
const k4a_float3_t *source_point3d_mm,
|
||||
const k4a_calibration_type_t source_camera,
|
||||
const k4a_calibration_type_t target_camera,
|
||||
k4a_float3_t *target_point3d);
|
||||
k4a_float3_t *target_point3d_mm);
|
||||
|
||||
/** Transform a 2D pixel coordinate with an associated depth value of the source camera into a 3D point of the target
|
||||
* coordinate system.
|
||||
|
@ -1460,7 +1460,7 @@ K4A_EXPORT k4a_result_t k4a_calibration_3d_to_3d(const k4a_calibration_t *calibr
|
|||
* \param source_point2d
|
||||
* The 2D pixel in \p source_camera coordinates.
|
||||
*
|
||||
* \param source_depth
|
||||
* \param source_depth_mm
|
||||
* The depth of \p source_point2d in millimeters.
|
||||
*
|
||||
* \param source_camera
|
||||
|
@ -1469,23 +1469,23 @@ K4A_EXPORT k4a_result_t k4a_calibration_3d_to_3d(const k4a_calibration_t *calibr
|
|||
* \param target_camera
|
||||
* The target camera.
|
||||
*
|
||||
* \param target_point3d
|
||||
* \param target_point3d_mm
|
||||
* Pointer to the output where the 3D coordinates of the input pixel in the coordinate system of \p target_camera is
|
||||
* stored.
|
||||
* stored in millimeters.
|
||||
*
|
||||
* \param valid
|
||||
* The output parameter returns a value of 1 if the \p source_point2d is a valid coordinate, and will return 0 if
|
||||
* the coordinate is not valid in the calibration model.
|
||||
*
|
||||
* \returns
|
||||
* ::K4A_RESULT_SUCCEEDED if \p target_point3d was successfully written. ::K4A_RESULT_FAILED if \p calibration
|
||||
* ::K4A_RESULT_SUCCEEDED if \p target_point3d_mm was successfully written. ::K4A_RESULT_FAILED if \p calibration
|
||||
* contained invalid transformation parameters. If the function returns ::K4A_RESULT_SUCCEEDED, but \p valid is 0,
|
||||
* the transformation was computed, but the results in \p target_point3d are outside of the range of valid calibration
|
||||
* and should be ignored.
|
||||
* the transformation was computed, but the results in \p target_point3d_mm are outside of the range of valid
|
||||
* calibration and should be ignored.
|
||||
*
|
||||
* \remarks
|
||||
* This function applies the intrinsic calibration of \p source_camera to compute the 3D ray from the focal point of the
|
||||
* camera through pixel \p source_point2d. The 3D point on this ray is then found using \p source_depth. If \p
|
||||
* camera through pixel \p source_point2d. The 3D point on this ray is then found using \p source_depth_mm. If \p
|
||||
* target_camera is different from \p source_camera, the 3D point is transformed to \p target_camera using
|
||||
* k4a_calibration_3d_to_3d(). In practice, \p source_camera and \p target_camera will often be identical. In this
|
||||
* case, no 3D to 3D transformation is applied.
|
||||
|
@ -1493,7 +1493,7 @@ K4A_EXPORT k4a_result_t k4a_calibration_3d_to_3d(const k4a_calibration_t *calibr
|
|||
* \remarks
|
||||
* If \p source_point2d is not considered as valid pixel coordinate
|
||||
* according to the intrinsic camera model, \p valid is set to 0. If it is valid, \p valid will be set to 1. The user
|
||||
* should not use the value of \p target_point3d if \p valid was set to 0.
|
||||
* should not use the value of \p target_point3d_mm if \p valid was set to 0.
|
||||
*
|
||||
* \relates k4a_calibration_t
|
||||
*
|
||||
|
@ -1507,10 +1507,10 @@ K4A_EXPORT k4a_result_t k4a_calibration_3d_to_3d(const k4a_calibration_t *calibr
|
|||
*/
|
||||
K4A_EXPORT k4a_result_t k4a_calibration_2d_to_3d(const k4a_calibration_t *calibration,
|
||||
const k4a_float2_t *source_point2d,
|
||||
const float source_depth,
|
||||
const float source_depth_mm,
|
||||
const k4a_calibration_type_t source_camera,
|
||||
const k4a_calibration_type_t target_camera,
|
||||
k4a_float3_t *target_point3d,
|
||||
k4a_float3_t *target_point3d_mm,
|
||||
int *valid);
|
||||
|
||||
/** Transform a 3D point of a source coordinate system into a 2D pixel coordinate of the target camera.
|
||||
|
@ -1518,7 +1518,7 @@ K4A_EXPORT k4a_result_t k4a_calibration_2d_to_3d(const k4a_calibration_t *calibr
|
|||
* \param calibration
|
||||
* Location to read the camera calibration obtained by k4a_device_get_calibration().
|
||||
*
|
||||
* \param source_point3d
|
||||
* \param source_point3d_mm
|
||||
* The 3D coordinates in millimeters representing a point in \p source_camera
|
||||
*
|
||||
* \param source_camera
|
||||
|
@ -1531,7 +1531,7 @@ K4A_EXPORT k4a_result_t k4a_calibration_2d_to_3d(const k4a_calibration_t *calibr
|
|||
* Pointer to the output where the 2D pixel in \p target_camera coordinates is stored.
|
||||
*
|
||||
* \param valid
|
||||
* The output parameter returns a value of 1 if the \p source_point3d is a valid coordinate in the \p target_camera
|
||||
* The output parameter returns a value of 1 if the \p source_point3d_mm is a valid coordinate in the \p target_camera
|
||||
* coordinate system, and will return 0 if the coordinate is not valid in the calibration model.
|
||||
*
|
||||
* \returns
|
||||
|
@ -1541,15 +1541,15 @@ K4A_EXPORT k4a_result_t k4a_calibration_2d_to_3d(const k4a_calibration_t *calibr
|
|||
* and should be ignored.
|
||||
*
|
||||
* \remarks
|
||||
* If \p target_camera is different from \p source_camera, \p source_point3d is transformed to \p target_camera using
|
||||
* If \p target_camera is different from \p source_camera, \p source_point3d_mm is transformed to \p target_camera using
|
||||
* k4a_calibration_3d_to_3d(). In practice, \p source_camera and \p target_camera will often be identical. In this
|
||||
* case, no 3D to 3D transformation is applied. The 3D point in the coordinate system of \p target_camera is then
|
||||
* projected onto the image plane using the intrinsic calibration of \p target_camera.
|
||||
*
|
||||
* \remarks
|
||||
* If \p source_point3d does not map to a valid 2D coordinate in the \p target_camera coordinate system, \p valid is set
|
||||
* to 0. If it is valid, \p valid will be set to 1. The user should not use the value of \p target_point2d if \p valid
|
||||
* was set to 0.
|
||||
* If \p source_point3d_mm does not map to a valid 2D coordinate in the \p target_camera coordinate system, \p valid is
|
||||
* set to 0. If it is valid, \p valid will be set to 1. The user should not use the value of \p target_point2d if \p
|
||||
* valid was set to 0.
|
||||
*
|
||||
* \relates k4a_calibration_t
|
||||
*
|
||||
|
@ -1562,7 +1562,7 @@ K4A_EXPORT k4a_result_t k4a_calibration_2d_to_3d(const k4a_calibration_t *calibr
|
|||
* \endxmlonly
|
||||
*/
|
||||
K4A_EXPORT k4a_result_t k4a_calibration_3d_to_2d(const k4a_calibration_t *calibration,
|
||||
const k4a_float3_t *source_point3d,
|
||||
const k4a_float3_t *source_point3d_mm,
|
||||
const k4a_calibration_type_t source_camera,
|
||||
const k4a_calibration_type_t target_camera,
|
||||
k4a_float2_t *target_point2d,
|
||||
|
@ -1577,7 +1577,7 @@ K4A_EXPORT k4a_result_t k4a_calibration_3d_to_2d(const k4a_calibration_t *calibr
|
|||
* \param source_point2d
|
||||
* The 2D pixel in \p source_camera coordinates.
|
||||
*
|
||||
* \param source_depth
|
||||
* \param source_depth_mm
|
||||
* The depth of \p source_point2d in millimeters.
|
||||
*
|
||||
* \param source_camera
|
||||
|
@ -1625,7 +1625,7 @@ K4A_EXPORT k4a_result_t k4a_calibration_3d_to_2d(const k4a_calibration_t *calibr
|
|||
*/
|
||||
K4A_EXPORT k4a_result_t k4a_calibration_2d_to_2d(const k4a_calibration_t *calibration,
|
||||
const k4a_float2_t *source_point2d,
|
||||
const float source_depth,
|
||||
const float source_depth_mm,
|
||||
const k4a_calibration_type_t source_camera,
|
||||
const k4a_calibration_type_t target_camera,
|
||||
k4a_float2_t *target_point2d,
|
||||
|
|
|
@ -879,48 +879,48 @@ k4a_result_t k4a_calibration_get_from_raw(char *raw_calibration,
|
|||
}
|
||||
|
||||
k4a_result_t k4a_calibration_3d_to_3d(const k4a_calibration_t *calibration,
|
||||
const k4a_float3_t *source_point3d,
|
||||
const k4a_float3_t *source_point3d_mm,
|
||||
const k4a_calibration_type_t source_camera,
|
||||
const k4a_calibration_type_t target_camera,
|
||||
k4a_float3_t *target_point3d)
|
||||
k4a_float3_t *target_point3d_mm)
|
||||
{
|
||||
return TRACE_CALL(
|
||||
transformation_3d_to_3d(calibration, source_point3d->v, source_camera, target_camera, target_point3d->v));
|
||||
transformation_3d_to_3d(calibration, source_point3d_mm->v, source_camera, target_camera, target_point3d_mm->v));
|
||||
}
|
||||
|
||||
k4a_result_t k4a_calibration_2d_to_3d(const k4a_calibration_t *calibration,
|
||||
const k4a_float2_t *source_point2d,
|
||||
const float source_depth,
|
||||
const float source_depth_mm,
|
||||
const k4a_calibration_type_t source_camera,
|
||||
const k4a_calibration_type_t target_camera,
|
||||
k4a_float3_t *target_point3d,
|
||||
k4a_float3_t *target_point3d_mm,
|
||||
int *valid)
|
||||
{
|
||||
return TRACE_CALL(transformation_2d_to_3d(
|
||||
calibration, source_point2d->v, source_depth, source_camera, target_camera, target_point3d->v, valid));
|
||||
calibration, source_point2d->v, source_depth_mm, source_camera, target_camera, target_point3d_mm->v, valid));
|
||||
}
|
||||
|
||||
k4a_result_t k4a_calibration_3d_to_2d(const k4a_calibration_t *calibration,
|
||||
const k4a_float3_t *source_point3d,
|
||||
const k4a_float3_t *source_point3d_mm,
|
||||
const k4a_calibration_type_t source_camera,
|
||||
const k4a_calibration_type_t target_camera,
|
||||
k4a_float2_t *target_point2d,
|
||||
int *valid)
|
||||
{
|
||||
return TRACE_CALL(transformation_3d_to_2d(
|
||||
calibration, source_point3d->v, source_camera, target_camera, target_point2d->v, valid));
|
||||
calibration, source_point3d_mm->v, source_camera, target_camera, target_point2d->v, valid));
|
||||
}
|
||||
|
||||
k4a_result_t k4a_calibration_2d_to_2d(const k4a_calibration_t *calibration,
|
||||
const k4a_float2_t *source_point2d,
|
||||
const float source_depth,
|
||||
const float source_depth_mm,
|
||||
const k4a_calibration_type_t source_camera,
|
||||
const k4a_calibration_type_t target_camera,
|
||||
k4a_float2_t *target_point2d,
|
||||
int *valid)
|
||||
{
|
||||
return TRACE_CALL(transformation_2d_to_2d(
|
||||
calibration, source_point2d->v, source_depth, source_camera, target_camera, target_point2d->v, valid));
|
||||
calibration, source_point2d->v, source_depth_mm, source_camera, target_camera, target_point2d->v, valid));
|
||||
}
|
||||
|
||||
k4a_transformation_t k4a_transformation_create(const k4a_calibration_t *calibration)
|
||||
|
|
Загрузка…
Ссылка в новой задаче