Name
sim_caltabT_sim_caltabSimCaltabsim_caltabSimCaltabSimCaltab — Simulate an image with calibration plate.
Herror sim_caltab(Hobject* SimImage, const HTuple& CalPlateDescr, const HTuple& CameraParam, const HTuple& CalPlatePose, const HTuple& GrayBackground, const HTuple& GrayPlate, const HTuple& GrayMarks, const HTuple& ScaleFac)
HImage HImage::SimCaltab(const HTuple& CalPlateDescr, const HTuple& CameraParam, const HTuple& CalPlatePose, const HTuple& GrayBackground, const HTuple& GrayPlate, const HTuple& GrayMarks, const HTuple& ScaleFac)
void SimCaltab(HObject* SimImage, const HTuple& CalPlateDescr, const HTuple& CameraParam, const HTuple& CalPlatePose, const HTuple& GrayBackground, const HTuple& GrayPlate, const HTuple& GrayMarks, const HTuple& ScaleFac)
void HImage::SimCaltab(const HString& CalPlateDescr, const HTuple& CameraParam, const HPose& CalPlatePose, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac)
void HImage::SimCaltab(const char* CalPlateDescr, const HTuple& CameraParam, const HPose& CalPlatePose, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac)
void HOperatorSetX.SimCaltab(
[out] IHUntypedObjectX** SimImage, [in] VARIANT CalPlateDescr, [in] VARIANT CameraParam, [in] VARIANT CalPlatePose, [in] VARIANT GrayBackground, [in] VARIANT GrayPlate, [in] VARIANT GrayMarks, [in] VARIANT ScaleFac)
void HImageX.SimCaltab(
[in] BSTR CalPlateDescr, [in] VARIANT CameraParam, [in] VARIANT CalPlatePose, [in] Hlong GrayBackground, [in] Hlong GrayPlate, [in] Hlong GrayMarks, [in] double ScaleFac)
static void HOperatorSet.SimCaltab(out HObject simImage, HTuple calPlateDescr, HTuple cameraParam, HTuple calPlatePose, HTuple grayBackground, HTuple grayPlate, HTuple grayMarks, HTuple scaleFac)
void HImage.SimCaltab(string calPlateDescr, HTuple cameraParam, HPose calPlatePose, int grayBackground, int grayPlate, int grayMarks, double scaleFac)
sim_caltabsim_caltabSimCaltabsim_caltabSimCaltabSimCaltab is used to generate a simulated calibration
image. The calibration plate description is read from the file
CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescr and will be projected into the image plane
using the given camera parameters (internal camera parameters
CameraParamCameraParamCameraParamCameraParamCameraParamcameraParam and external camera parameters
CalPlatePoseCalPlatePoseCalPlatePoseCalPlatePoseCalPlatePosecalPlatePose), see also project_3d_pointproject_3d_pointProject3dPointproject_3d_pointProject3dPointProject3dPoint.
In the simulated image only the calibration plate is shown. The
image background is set to the gray value GrayBackgroundGrayBackgroundGrayBackgroundGrayBackgroundGrayBackgroundgrayBackground,
the calibration plate background is set to GrayPlateGrayPlateGrayPlateGrayPlateGrayPlategrayPlate, and
the calibration marks are set to the gray value GrayMarksGrayMarksGrayMarksGrayMarksGrayMarksgrayMarks.
The parameter ScaleFacScaleFacScaleFacScaleFacScaleFacscaleFac influences the number of supporting
points to approximate the elliptic contours of the calibration
marks, see also disp_caltabdisp_caltabDispCaltabdisp_caltabDispCaltabDispCaltab. Increasing 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 image which touches a subpixel-boundary of this
kind, the gray value is set linearly between GrayMarksGrayMarksGrayMarksGrayMarksGrayMarksgrayMarks and
GrayPlateGrayPlateGrayPlateGrayPlateGrayPlategrayPlate dependent on the proportion Inside/Outside.
By applying the operator sim_caltabsim_caltabSimCaltabsim_caltabSimCaltabSimCaltab you can generate
synthetic calibration images (with known camera parameters!) to test
the quality of the calibration algorithm (see
calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras, or camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration).
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on internal data level.
Simulated calibration image.
File name of the calibration plate description.
Default value:
'calplate.cpd'
"calplate.cpd"
"calplate.cpd"
"calplate.cpd"
"calplate.cpd"
"calplate.cpd"
List of values: 'calplate.cpd'"calplate.cpd""calplate.cpd""calplate.cpd""calplate.cpd""calplate.cpd", 'calplate_20mm.cpd'"calplate_20mm.cpd""calplate_20mm.cpd""calplate_20mm.cpd""calplate_20mm.cpd""calplate_20mm.cpd", 'calplate_40mm.cpd'"calplate_40mm.cpd""calplate_40mm.cpd""calplate_40mm.cpd""calplate_40mm.cpd""calplate_40mm.cpd", 'calplate_80mm.cpd'"calplate_80mm.cpd""calplate_80mm.cpd""calplate_80mm.cpd""calplate_80mm.cpd""calplate_80mm.cpd", 'caltab.descr'"caltab.descr""caltab.descr""caltab.descr""caltab.descr""caltab.descr", 'caltab_160mm.cpd'"caltab_160mm.cpd""caltab_160mm.cpd""caltab_160mm.cpd""caltab_160mm.cpd""caltab_160mm.cpd"
File extension: .cpd, .descr
Internal camera parameters.
Number of elements: CameraParam == 8 || CameraParam == 10 || CameraParam == 11 || CameraParam == 12 || CameraParam == 14
External camera parameters (3D pose of the calibration
plate in camera coordinates).
Number of elements: 7
Gray value of image background.
Default value: 128
Suggested values: 0, 32, 64, 96, 128, 160
Restriction: 0 <= GrayBackground <= 255
Gray value of calibration plate.
Default value: 80
Suggested values: 144, 160, 176, 192, 208, 224, 240
Restriction: 0 <= GrayPlate <= 255
Gray value of calibration marks.
Default value: 224
Suggested values: 16, 32, 48, 64, 80, 96, 112
Restriction: 0 <= GrayMarks <= 255
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
* Read calibration image
read_image(Image1, 'calib-01')
* Find calibration pattern
StartCamPar := [Focus, Kappa, Sx, Sy, Cx, Cy, ImageWidth, ImageHeight]
create_calib_data ('calibration_object', 1, 1, CalibDataID)
set_calib_data_cam_param (CalibDataID, 0, 'area_scan_division', StartCamPar)
set_calib_data_calib_object (CalibDataID, 0, 'calplate.cpd')
find_caltab(Image1, CalPlate1, 'caltab.descr', 3, 112, 5)
* Find calibration marks and initial pose
find_calib_object (Image1, CalibDataID, 0, 0, 0, [], [])
* Camera calibration
calibrate_cameras (CalibDataID, Error)
* Simulate calibration image
get_calib_data (CalibDataID, 'calib_obj_pose', [0, 0], 'pose', FinalPose)
get_calib_data (CalibDataID, 'camera', 0, 'params', CameraParam)
sim_caltab(Image1Sim, 'calplate.cpd', CameraParam, FinalPose, 128, \
80, 224, 1)
sim_caltabsim_caltabSimCaltabsim_caltabSimCaltabSimCaltab returns 2 (H_MSG_TRUE) if all parameter values are
correct. If necessary, an exception is raised.
camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration,
find_marks_and_posefind_marks_and_poseFindMarksAndPosefind_marks_and_poseFindMarksAndPoseFindMarksAndPose,
read_poseread_poseReadPoseread_poseReadPoseReadPose,
read_cam_parread_cam_parReadCamParread_cam_parReadCamParReadCamPar,
hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPosehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPose
find_caltabfind_caltabFindCaltabfind_caltabFindCaltabFindCaltab
find_caltabfind_caltabFindCaltabfind_caltabFindCaltabFindCaltab,
find_marks_and_posefind_marks_and_poseFindMarksAndPosefind_marks_and_poseFindMarksAndPoseFindMarksAndPose,
camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration,
disp_caltabdisp_caltabDispCaltabdisp_caltabDispCaltabDispCaltab,
create_posecreate_poseCreatePosecreate_poseCreatePoseCreatePose,
hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPosehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPose,
project_3d_pointproject_3d_pointProject3dPointproject_3d_pointProject3dPointProject3dPoint,
gen_caltabgen_caltabGenCaltabgen_caltabGenCaltabGenCaltab
Calibration