pose_to_hom_mat3dT_pose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3dpose_to_hom_mat3d (算子)
名称
pose_to_hom_mat3dT_pose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3dpose_to_hom_mat3d — 将三维姿态转换为齐次变换矩阵。
签名
Herror T_pose_to_hom_mat3d(const Htuple Pose, Htuple* HomMat3D)
def pose_to_hom_mat3d(pose: Sequence[Union[int, float]]) -> Sequence[float]
描述
pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3dPoseToHomMat3dpose_to_hom_mat3d converts a 3D pose PosePosePosePoseposepose,
e.g., the external camera parameters, into the
equivalent homogeneous transformation matrix HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d. For details
about 3D poses and the corresponding transformation matrices please refer to
create_posecreate_poseCreatePoseCreatePoseCreatePosecreate_pose。
A typical application of pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3dPoseToHomMat3dpose_to_hom_mat3d is that you want
to further transform the pose, e.g., rotate or translate it using
hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotateHomMat3dRotatehom_mat3d_rotate or hom_mat3d_translatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslateHomMat3dTranslatehom_mat3d_translate。In case of the
external camera parameters, this can be necessary if the calibration plate
cannot be placed such that its coordinate system coincides with the desired
world coordinate system.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
参数
PosePosePosePoseposepose (输入控制) pose → HPose, HTupleSequence[Union[int, float]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
3D pose.
元素数量:
7
HomMat3DHomMat3DHomMat3DHomMat3DhomMat3Dhom_mat_3d (输出控制) hom_mat3d → HHomMat3D, HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Equivalent homogeneous transformation matrix.
示例(HDevelop)
* Calibrate camera.
calibrate_cameras (CalibDataID,Error)
* Get reference pose (pose 2 of calibration object 0).
get_calib_data (CalibDataID, 'calib_obj_pose',\
[0,2], 'pose', ObjInCameraPose)
* Convert pose to homogeneous transformation matrix.
pose_to_hom_mat3d(ObjInCameraPose, cam_H_cal)
* Rotate it 90 degrees around its y-axis to obtain a world coordinate system
* whose y- and z-axis lie in the plane of the calibration plate while the
* x-axis point 'upwards': cam_H_w = cam_H_cal * RotY(90).
hom_mat3d_identity(HomMat3DIdent)
hom_mat3d_rotate(HomMat3DIdent, rad(90), 'y', 0, 0, 0, \
HomMat3DRotateY)
hom_mat3d_compose(cam_H_cal, HomMat3DRotateY, cam_H_w)
* Convert transformed matrix back to pose.
hom_mat3d_to_pose (cam_H_w, Pose)
结果
pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3dPoseToHomMat3dpose_to_hom_mat3d 在所有参数值正确时返回 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration,
read_poseread_poseReadPoseReadPoseReadPoseread_pose
可能的后继
affine_trans_point_3daffine_trans_point_3dAffineTransPoint3dAffineTransPoint3dAffineTransPoint3daffine_trans_point_3d,
hom_mat3d_inverthom_mat3d_invertHomMat3dInvertHomMat3dInvertHomMat3dInverthom_mat3d_invert,
hom_mat3d_translatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslateHomMat3dTranslatehom_mat3d_translate,
hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotateHomMat3dRotatehom_mat3d_rotate,
hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose
替代
pose_to_dual_quatpose_to_dual_quatPoseToDualQuatPoseToDualQuatPoseToDualQuatpose_to_dual_quat
另见
create_posecreate_poseCreatePoseCreatePoseCreatePosecreate_pose,
camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibrationcamera_calibration,
write_posewrite_poseWritePoseWritePoseWritePosewrite_pose,
read_poseread_poseReadPoseReadPoseReadPoseread_pose,
hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPosehom_mat3d_to_pose,
project_3d_pointproject_3d_pointProject3dPointProject3dPointProject3dPointproject_3d_point,
get_line_of_sightget_line_of_sightGetLineOfSightGetLineOfSightGetLineOfSightget_line_of_sight,
hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotateHomMat3dRotatehom_mat3d_rotate,
hom_mat3d_translatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslateHomMat3dTranslatehom_mat3d_translate,
hom_mat3d_inverthom_mat3d_invertHomMat3dInvertHomMat3dInvertHomMat3dInverthom_mat3d_invert,
affine_trans_point_3daffine_trans_point_3dAffineTransPoint3dAffineTransPoint3dAffineTransPoint3daffine_trans_point_3d
模块
基础