sim_caltab ( : SimImage : CalTabDescrFile, CamParam, CamPose, GreyBackground, GreyCaltab, GreyMarks, ScaleFac : )
Simulate a video image with calibration table.
sim_caltab is used to generate a simulated calibration image.
The calibration table description is read from the file
CalTabDescrFile and will be projected into the image plane
using the given camera parameters (internal camera parameters
CamParam and external camera parameters CamPose),
see also project_3d_point.
In the simulated image only the calibration table is shown. The
image background is set to the grey value GreyBackground,
the calibration table background is set to GreyCaltab,
and the calibration marks are set to the grey value GreyMarks.
The parameter ScaleFac influences the number of supporting
points to approximate the elliptic contours of the calibration marks,
see also disp_caltab. The increasing of the number of supporting
points causes a more accurate determination of the mark boundary, but
increases the computation time, too.
For each pixel of the simulated video image, which touches such a
subpixel-boundary, the grey value is set linearly between
GreyMarks and GreyCaltab dependent on the
proportion Inside/Outside.
By applying the operator sim_caltab you can generate
synthetic calibration images (with known camera parameters!) to
test the quality of the calibration algorithm (see
camera_calibration).
Parameters
SimImage (output_object)
|
image -> object : byte
|
Simulated calibration image. |
CalTabDescrFile (input_control)
|
string -> string
|
File name of the calibration table description. |
Default value: 'caltab.descr' |
CamParam (input_control)
|
number-array -> real / integer
|
Internal camera parameters. |
Number of elements: 8 |
CamPose (input_control)
|
number-array -> real / integer
|
External camera parameters. |
Number of elements: 7 |
GreyBackground (input_control)
|
integer -> integer
|
Grey value of image background. |
Default value: 128 |
Suggested values: 0, 32, 64, 96, 128, 160 |
Restriction: (0 <= GreyBackground) <= 255 |
GreyCaltab (input_control)
|
integer -> integer
|
Grey value of calibration table. |
Default value: 224 |
Suggested values: 144, 160, 176, 192, 208, 224, 240 |
Restriction: (0 <= GreyCaltab) <= 255 |
GreyMarks (input_control)
|
integer -> integer
|
Grey value of calibration marks. |
Default value: 80 |
Suggested values: 16, 32, 48, 64, 80, 96, 112 |
Restriction: (0 <= GreyMarks) <= 255 |
ScaleFac (input_control)
|
real -> real
|
Scaling factor to reduce oversampling. |
Default value: 1.0 |
Suggested values: 1.0, 0.5, 0.25, 0.125 |
Recommended increment: 0.05
|
Restriction: 1.0 >= ScaleFac |
Example
/* read calibration image */
read_image(:Image1:'calib-01.tiff':) >
/* find calibration pattern */
find_caltab(Image1:Caltab1:'caltab.descr',3,112:) >
/* find calibration marks and initial pose */
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) >
/* read 3D positions of calibration marks */
caltab_points(::'caltab.descr':NX,NY,NZ) >
/* camera calibration */
camera_calibration(::NX,NY,NZ,RCoord1,CCoord1,
[0.008,0.0,0.000011,0.000011,384,288,768,576],
StartPose1,11:CamParam,FinalPose,Errors) >
/* simulate calibration image */
sim_caltab(:Image1Sim:'caltab.descr',CamParam,FinalPose,128,224,80,1:).
Result
sim_caltab returns TRUE if all parameter values are
correct. If necessary an exception is raised.
Possible Predecessors
camera_calibration,
find_marks_and_pose,
read_cam_pose,
read_cam_par,
hom_mat_to_pose
Possible Successors
find_caltab
See also
find_caltab,
find_marks_and_pose,
camera_calibration,
disp_caltab,
hom_mat_to_pose,
project_3d_point,
create_caltab
Copyright © 1996-1997 MVTec Software GmbH