Name
sim_caltabT_sim_caltabSimCaltabSimCaltab — Simulieren eines Bildes mit Kalibrierkörper.
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 HCamPar& CameraParam, const HPose& CalPlatePose, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac)
void HImage::SimCaltab(const char* CalPlateDescr, const HCamPar& CameraParam, const HPose& CalPlatePose, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac)
HImage HCamPar::SimCaltab(const HString& CalPlateDescr, const HPose& CalPlatePose, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac) const
HImage HCamPar::SimCaltab(const char* CalPlateDescr, const HPose& CalPlatePose, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac) const
HImage HPose::SimCaltab(const HString& CalPlateDescr, const HCamPar& CameraParam, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac) const
HImage HPose::SimCaltab(const char* CalPlateDescr, const HCamPar& CameraParam, Hlong GrayBackground, Hlong GrayPlate, Hlong GrayMarks, double ScaleFac) const
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, HCamPar cameraParam, HPose calPlatePose, int grayBackground, int grayPlate, int grayMarks, double scaleFac)
HImage HCamPar.SimCaltab(string calPlateDescr, HPose calPlatePose, int grayBackground, int grayPlate, int grayMarks, double scaleFac)
HImage HPose.SimCaltab(string calPlateDescr, HCamPar cameraParam, int grayBackground, int grayPlate, int grayMarks, double scaleFac)
sim_caltabsim_caltabSimCaltabSimCaltabSimCaltab dient der Simulation eines Kalibrierbildes.
Dazu wird die Kalibrierkörperbeschreibung aus der Datei
CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescr eingelesen und die darin enthaltende
3D-Beschreibung mit Hilfe der angegebenen Kameraparameter (interne
Kameraparameter CameraParamCameraParamCameraParamCameraParamcameraParam, externe Kameraparameter
CalPlatePoseCalPlatePoseCalPlatePoseCalPlatePosecalPlatePose) auf die Bildebene projiziert (vgl.
project_3d_pointproject_3d_pointProject3dPointProject3dPointProject3dPoint).
In dem simulierten Bild ist nur der Kalibrierkörper abgebildet. Der
Bildhintergrund wird mit dem Grauwert GrayBackgroundGrayBackgroundGrayBackgroundGrayBackgroundgrayBackground, der
Hintergrund des Kalibrierkörpers mit GrayPlateGrayPlateGrayPlateGrayPlategrayPlate und die
Kalibrierkörpermarken werden mit GrayMarksGrayMarksGrayMarksGrayMarksgrayMarks belegt. Der
Parameter ScaleFacScaleFacScaleFacScaleFacscaleFac beeinflusst die Anzahl der Stützstellen,
mit der die ellipsenförmigen Konturen der Kalibrierkörpermarken
approximiert werden (vgl. disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltab). Die Erhöhung der
Stützstellenanzahl bewirkt daher eine genauere Bestimmung der
Markenbegrenzung, erhöht aber gleichzeitig die Rechenzeit. Für jedes
Pixel des simulierten Bildes, das eine solche subpixelgenaue
Markenbegrenzung berührt, wird der Grauwert linear zwischen
GrayMarksGrayMarksGrayMarksGrayMarksgrayMarks und GrayPlateGrayPlateGrayPlateGrayPlategrayPlate anhand des Verhältnisses
Innerhalb/Außerhalb gesetzt.
Mit dem Operator sim_caltabsim_caltabSimCaltabSimCaltabSimCaltab lassen sich synthetische
Kalibrierbilder (mit bekannten Kameraparametern!) erzeugen, mit
denen man die Güte des Kalibrieralgorithmus (vgl.
calibrate_camerascalibrate_camerasCalibrateCamerasCalibrateCamerasCalibrateCameras oder camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibration) testen kann.
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Automatisch parallelisiert auf interner Datenebene.
Simuliertes Kalibrierbild.
Dateiname der Kalibrierkörperbeschreibungsdatei.
Defaultwert:
'calplate.cpd'
"calplate.cpd"
"calplate.cpd"
"calplate.cpd"
"calplate.cpd"
Werteliste: '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_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", '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"
Dateiendung: .cpd, .descr
externe Kameraparameter (3D-Lage des Kalibrierkörpers in
Kamerakoordinaten).
Parameteranzahl: 7
Hintergrundgrauwert des Bildes.
Defaultwert: 128
Wertevorschläge: 0, 32, 64, 96, 128, 160
Restriktion: 0 <= GrayBackground <= 255
Grauwert der Kalibrierkörperplatte.
Defaultwert: 80
Wertevorschläge: 144, 160, 176, 192, 208, 224, 240
Restriktion: 0 <= GrayPlate <= 255
Grauwert der Kalibrierkörpermarkierungen.
Defaultwert: 224
Wertevorschläge: 16, 32, 48, 64, 80, 96, 112
Restriktion: 0 <= GrayMarks <= 255
Skalierungsfaktor zum Herabsetzen der Überabtastung.
Defaultwert: 1.0
Wertevorschläge: 1.0, 0.5, 0.25, 0.125
Empfohlene Schrittweite: 0.05
Restriktion: 1.0 >= ScaleFac
* Read calibration image.
read_image(Image1, 'calib-01')
* Find calibration pattern.
CameraType := 'area_scan_division'
StartCamPar := [CameraType, Focus, Kappa, Sx, Sy, Cx, Cy, \
ImageWidth, ImageHeight]
create_calib_data ('calibration_object', 1, 1, CalibDataID)
set_calib_data_cam_param (CalibDataID, 0, [], 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)
Sind die Parameterwerte korrekt, dann liefert sim_caltabsim_caltabSimCaltabSimCaltabSimCaltab
den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibration,
find_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPoseFindMarksAndPose,
read_poseread_poseReadPoseReadPoseReadPose,
read_cam_parread_cam_parReadCamParReadCamParReadCamPar,
hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPose
find_caltabfind_caltabFindCaltabFindCaltabFindCaltab
find_caltabfind_caltabFindCaltabFindCaltabFindCaltab,
find_marks_and_posefind_marks_and_poseFindMarksAndPoseFindMarksAndPoseFindMarksAndPose,
camera_calibrationcamera_calibrationCameraCalibrationCameraCalibrationCameraCalibration,
disp_caltabdisp_caltabDispCaltabDispCaltabDispCaltab,
create_posecreate_poseCreatePoseCreatePoseCreatePose,
hom_mat3d_to_posehom_mat3d_to_poseHomMat3dToPoseHomMat3dToPoseHomMat3dToPose,
project_3d_pointproject_3d_pointProject3dPointProject3dPointProject3dPoint,
gen_caltabgen_caltabGenCaltabGenCaltabGenCaltab
Calibration