Write the external camera parameters to text file.
write_cam_pose is used to write the external camera parameters CamPose into a text file with the name CamPoseFile. The first three values in CamPose describe the 3D translation vector (in meter), the next three values represent the three rotation angles.
The last value in CamPose encodes the representation type of the described 3D transform: Hereby the value 0 says, that the 3D rotation is performed before the 3D translation, that the three rotations are specified as angles (in degree), and that the rotation order is Gamma-Beta-Alpha, i.e., the first rotation is around the Z-axis, the second one around the new Y-axis, and the third one around the new X-axis. Other representation types for the 3D transform are not supported yet.
A file generated by write_cam_pose looks like the following:
# EXTERNAL CAMERA PARAMETERS: rotation and translation # Used representation type: f 0 # Rotation angles [deg] or Rodriguez-vector: r -17.8134 1.83816 0.288092 # Translational vector (x y z [m]): t 0.280164 0.150644 1.7554
CamPose (input_control) |
number-array -> real / integer |
External camera parameters. | |
Number of elements: 7 |
CamPoseFile (input_control) |
string -> string |
File name of the external camera parameters. | |
Default value: 'campose.dat' | |
List of values: 'campose.dat', 'campose.initial', 'campose.final' |
/* read calibration images */ read_image(:Image1:'calib-01.tiff':) > read_image(:Image2:'calib-02.tiff':) > read_image(:Image3:'calib-03.tiff':) > /* find calibration pattern */ find_caltab(Image1:Caltab1:'caltab.descr',3,112:) > find_caltab(Image2:Caltab2:'caltab.descr',3,112:) > find_caltab(Image3:Caltab3:'caltab.descr',3,112:) > /* find calibration marks and start poses */ find_marks_and_pose(Image1,Caltab1::'caltab.descr',[0.008,0.0, 0.000011,0.000011,384,288,768,576],128,10:RCoord1,CCoord1,StartPose1) > find_marks_and_pose(Image2,Caltab2::'caltab.descr',[0.008,0.0, 0.000011,0.000011,384,288,768,576],128,10:RCoord2,CCoord2,StartPose2) > find_marks_and_pose(Image3,Caltab3::'caltab.descr',[0.008,0.0, 0.000011,0.000011,384,288,768,576],128,10:RCoord3,CCoord3,StartPose3) > /* read 3D positions of calibration marks */ caltab_points(::'caltab.descr':NX,NY,NZ) > /* camera calibration */ camera_calibration(::NX,NY,NZ,[RCoord1,RCoord2,RCoord3], [CCoord1,CCoord2,CCoord3],[0.008,0.0,0.000011,0.000011,384,288,768,576], [StartPose1,StartPose2,StartPose3],11:CamParam,NFinalPose,Errors) > /* write external camera parameters of first calibration image */ write_cam_pose(::NFinalPose[0],NFinalPose[1],NFinalPose[2],NFinalPose[3], NFinalPose[4],NFinalPose[5],NFinalPose[6],'campose.dat':).
write_cam_pose returns TRUE if all parameter values are correct and the file has been written successfully. If necessary an exception is raised.
camera_calibration, hom_mat_to_pose
find_marks_and_pose, camera_calibration, disp_caltab, sim_caltab, read_cam_pose, pose_to_hom_mat, hom_mat_to_pose