Name
pose_to_hom_mat3dT_pose_to_hom_mat3dPoseToHomMat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3d — Konvertieren einer 3D-Lage (Pose) in eine homogene
Transformationsmatrix.
Herror T_pose_to_hom_mat3d(const Htuple Pose, Htuple* HomMat3D)
Herror pose_to_hom_mat3d(const HTuple& Pose, HTuple* HomMat3D)
pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3d konvertiert eine
3D-Lage PosePosePosePosePosepose, z.B. die externen Kameraparameter, in
die äquivalente homogene Transformationsmatrix
HomMat3DHomMat3DHomMat3DHomMat3DHomMat3DhomMat3D. Details zu 3D-Lagen und den zugehörigen
Transformationsmatrizen findet sich bei create_posecreate_poseCreatePosecreate_poseCreatePoseCreatePose.
Ein typischer Anwendungsfall von pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3d ist, dass eine
3D-Lage weiter transformiert, z.B. mittels hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotate oder
hom_mat3d_translatehom_mat3d_translateHomMat3dTranslatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslate rotiert oder verschoben werden soll. Im Falle der
externen Kameraparameter kann dies nötig sein, wenn der Kalibrierkörper nicht
so platziert werden kann, dass sein Koordinatensystem mit dem gewünschten
Weltkoordinatensystem zusammenfällt.
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
3D-Lage (Pose).
Parameteranzahl: 7
Äquivalente homogene Transformationsmatrix.
* read internal camera parameters
read_cam_par('campar.dat', CameraParam)
* read external camera parameters
read_pose('startpose.dat', StartPose)
* (read 3D world points [WorldPointsX,WorldPointsY,WorldPointsZ],
* extract corresponding 2D image points [PixelsRow,PixelsColumn])
* calibration of external camera parameters:
camera_calibration(WorldPointsX, WorldPointsY, WorldPointsZ, \
PixelsRow, PixelsColumn, CameraParam, 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, rad(90), 'y', 0, 0, 0, \
HomMat3DRotateY)
hom_mat3d_compose(cam_H_cal, HomMat3DRotateY, cam_H_w)
* read internal camera parameters
read_cam_par('campar.dat', CameraParam)
* read external camera parameters
read_pose('startpose.dat', StartPose)
* (read 3D world points [WorldPointsX,WorldPointsY,WorldPointsZ],
* extract corresponding 2D image points [PixelsRow,PixelsColumn])
* calibration of external camera parameters:
camera_calibration(WorldPointsX, WorldPointsY, WorldPointsZ, \
PixelsRow, PixelsColumn, CameraParam, 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, rad(90), 'y', 0, 0, 0, \
HomMat3DRotateY)
hom_mat3d_compose(cam_H_cal, HomMat3DRotateY, cam_H_w)
* read internal camera parameters
read_cam_par('campar.dat', CameraParam)
* read external camera parameters
read_pose('startpose.dat', StartPose)
* (read 3D world points [WorldPointsX,WorldPointsY,WorldPointsZ],
* extract corresponding 2D image points [PixelsRow,PixelsColumn])
* calibration of external camera parameters:
camera_calibration(WorldPointsX, WorldPointsY, WorldPointsZ, \
PixelsRow, PixelsColumn, CameraParam, 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, rad(90), 'y', 0, 0, 0, \
HomMat3DRotateY)
hom_mat3d_compose(cam_H_cal, HomMat3DRotateY, cam_H_w)
HTuple CameraParam, StartPose, FinalPose, Errors, FinalCamParam;
HTuple HomMat3DIdent, HomMat3DRotateY, cam_H_cal, cam_H_w;
HTuple WorldPointsX, WorldPointsY, WorldPointsZ, PixelsRow, PixelsColumn;
// (read 3D world points [WorldPointsX,WorldPointsY,WorldPointsZ],
// extract corresponding 2D image points [PixelsRow,PixelsColumn])
// read internal camera parameters:
read_cam_par("campar.dat", &CameraParam);
// read initial camera pose
read_pose("startpose.dat", &StartPose);
// calibration of external camera params:
camera_calibration(WorldPointsX, WorldPointsY, WorldPointsZ,
PixelsRow, PixelsColumn, CameraParam, StartPose, 'pose',
&FinalCamParam, &FinalPose, &Errors);
// transform FinalPose to homogeneous transformation matrix
pose_to_hom_mat3d(FinalPose, &cam_H_cal);
// rotate it 90 degree around the 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);
* read internal camera parameters
read_cam_par('campar.dat', CameraParam)
* read external camera parameters
read_pose('startpose.dat', StartPose)
* (read 3D world points [WorldPointsX,WorldPointsY,WorldPointsZ],
* extract corresponding 2D image points [PixelsRow,PixelsColumn])
* calibration of external camera parameters:
camera_calibration(WorldPointsX, WorldPointsY, WorldPointsZ, \
PixelsRow, PixelsColumn, CameraParam, 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, rad(90), 'y', 0, 0, 0, \
HomMat3DRotateY)
hom_mat3d_compose(cam_H_cal, HomMat3DRotateY, cam_H_w)
* read internal camera parameters
read_cam_par('campar.dat', CameraParam)
* read external camera parameters
read_pose('startpose.dat', StartPose)
* (read 3D world points [WorldPointsX,WorldPointsY,WorldPointsZ],
* extract corresponding 2D image points [PixelsRow,PixelsColumn])
* calibration of external camera parameters:
camera_calibration(WorldPointsX, WorldPointsY, WorldPointsZ, \
PixelsRow, PixelsColumn, CameraParam, 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, rad(90), 'y', 0, 0, 0, \
HomMat3DRotateY)
hom_mat3d_compose(cam_H_cal, HomMat3DRotateY, cam_H_w)
Sind die Parameterwerte korrekt, dann liefert pose_to_hom_mat3dpose_to_hom_mat3dPoseToHomMat3dpose_to_hom_mat3dPoseToHomMat3dPoseToHomMat3d
den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration,
read_poseread_poseReadPoseread_poseReadPoseReadPose
affine_trans_point_3daffine_trans_point_3dAffineTransPoint3daffine_trans_point_3dAffineTransPoint3dAffineTransPoint3d,
hom_mat3d_inverthom_mat3d_invertHomMat3dInverthom_mat3d_invertHomMat3dInvertHomMat3dInvert,
hom_mat3d_translatehom_mat3d_translateHomMat3dTranslatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslate,
hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotate,
hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPosehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPose
create_posecreate_poseCreatePosecreate_poseCreatePoseCreatePose,
camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration,
write_posewrite_poseWritePosewrite_poseWritePoseWritePose,
read_poseread_poseReadPoseread_poseReadPoseReadPose,
hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPosehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPose,
project_3d_pointproject_3d_pointProject3dPointproject_3d_pointProject3dPointProject3dPoint,
get_line_of_sightget_line_of_sightGetLineOfSightget_line_of_sightGetLineOfSightGetLineOfSight,
hom_mat3d_rotatehom_mat3d_rotateHomMat3dRotatehom_mat3d_rotateHomMat3dRotateHomMat3dRotate,
hom_mat3d_translatehom_mat3d_translateHomMat3dTranslatehom_mat3d_translateHomMat3dTranslateHomMat3dTranslate,
hom_mat3d_inverthom_mat3d_invertHomMat3dInverthom_mat3d_invertHomMat3dInvertHomMat3dInvert,
affine_trans_point_3daffine_trans_point_3dAffineTransPoint3daffine_trans_point_3dAffineTransPoint3dAffineTransPoint3d
Foundation