Convert a 3D pose into a homogeneous transformation matrix.
pose_to_hom_mat3d converts a 3D pose Pose, e.g., the exterior camera parameters, into the equivalent homogeneous transformation matrix HomMat3D. For details about 3D poses and the corresponding transformation matrices please refer to create_pose.
A typical application of pose_to_hom_mat3d is that you want to further transform the pose, e.g., rotate or translate it using hom_mat3d_rotate or hom_mat3d_translate. In case of the exterior 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.
|
Pose (input_control) |
pose-array -> real / integer |
| 3D pose. | |
| Number of elements: 7 | |
|
HomMat3D (output_control) |
affine3d-array -> real |
| Equivalent homogeneous transformation matrix. | |
| Number of elements: 12 | |
* read interior camera parameters
read_cam_par('campar.dat', CamParam)
* read exterior camera parameters
read_pose('startpose.dat', StartPose)
* (read 3D world points [WorldPointsX,WorldPointsY,WorldPointsZ],
* extract corresponding 2D image points [PixelsRow,PixelsColumn])
* calibration of exterior camera parameters:
camera_calibration(WorldPointsX, WorldPointsY, WorldPointsZ,
PixelsRow, PixelsColumn, CamParam, StartPose, 'pose',
FinalCamParam, FinalPose, Errors)
* transform FinalPose to homogeneous transformation matrix
pose_to_hom_mat3d(FinalPose, cam_H_cal)
* rotate it 90 degree 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, deg(90), 'y', 0, 0, 0,
HomMat3DRotateY)
hom_mat3d_compose(cam_H_cal, HomMat3DRotateY, cam_H_w)
pose_to_hom_mat3d returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception handling is raised
pose_to_hom_mat3d is reentrant and processed without parallelization.
affine_trans_point_3d, hom_mat3d_invert, hom_mat3d_translate, hom_mat3d_rotate, hom_mat3d_to_pose
create_pose, camera_calibration, write_pose, read_pose, hom_mat3d_to_pose, project_3d_point, get_line_of_sight, hom_mat3d_rotate, hom_mat3d_translate, hom_mat3d_invert, affine_trans_point_3d
Camera calibration