Name
sim_caltabT_sim_caltabSimCaltabsim_caltabSimCaltabSimCaltab — Simulieren eines Bildes mit Kalibrierkörper.
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 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
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)
IHImageX* HCamParX.SimCaltab(
[in] BSTR CalPlateDescr, [in] VARIANT CameraParam, [in] VARIANT CalPlatePose, [in] Hlong GrayBackground, [in] Hlong GrayPlate, [in] Hlong GrayMarks, [in] double ScaleFac)
IHImageX* HPoseX.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, 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_caltabSimCaltabsim_caltabSimCaltabSimCaltab dient der Simulation eines Kalibrierbildes.
Dazu wird die Kalibrierkörperbeschreibung aus der Datei
CalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrCalPlateDescrcalPlateDescr eingelesen und die darin enthaltende
3D-Beschreibung mit Hilfe der angegebenen Kameraparameter (interne
Kameraparameter CameraParamCameraParamCameraParamCameraParamCameraParamcameraParam, externe Kameraparameter
CalPlatePoseCalPlatePoseCalPlatePoseCalPlatePoseCalPlatePosecalPlatePose) auf die Bildebene projiziert (vgl.
project_3d_pointproject_3d_pointProject3dPointproject_3d_pointProject3dPointProject3dPoint).
In dem simulierten Bild ist nur der Kalibrierkörper abgebildet. Der
Bildhintergrund wird mit dem Grauwert GrayBackgroundGrayBackgroundGrayBackgroundGrayBackgroundGrayBackgroundgrayBackground, der
Hintergrund des Kalibrierkörpers mit GrayPlateGrayPlateGrayPlateGrayPlateGrayPlategrayPlate und die
Kalibrierkörpermarken werden mit GrayMarksGrayMarksGrayMarksGrayMarksGrayMarksgrayMarks belegt. Der
Parameter ScaleFacScaleFacScaleFacScaleFacScaleFacscaleFac beeinflusst die Anzahl der Stützstellen,
mit der die ellipsenförmigen Konturen der Kalibrierkörpermarken
approximiert werden (vgl. disp_caltabdisp_caltabDispCaltabdisp_caltabDispCaltabDispCaltab). 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
GrayMarksGrayMarksGrayMarksGrayMarksGrayMarksgrayMarks und GrayPlateGrayPlateGrayPlateGrayPlateGrayPlategrayPlate anhand des Verhältnisses
Innerhalb/Außerhalb gesetzt.
Mit dem Operator sim_caltabsim_caltabSimCaltabsim_caltabSimCaltabSimCaltab lassen sich synthetische
Kalibrierbilder (mit bekannten Kameraparametern!) erzeugen, mit
denen man die Güte des Kalibrieralgorithmus (vgl.
calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras oder camera_calibrationcamera_calibrationCameraCalibrationcamera_calibrationCameraCalibrationCameraCalibration) 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_320mm.cpd'
"calplate_320mm.cpd"
"calplate_320mm.cpd"
"calplate_320mm.cpd"
"calplate_320mm.cpd"
"calplate_320mm.cpd"
Werteliste: 'calplate_10mm.cpd'"calplate_10mm.cpd""calplate_10mm.cpd""calplate_10mm.cpd""calplate_10mm.cpd""calplate_10mm.cpd", 'calplate_1200mm.cpd'"calplate_1200mm.cpd""calplate_1200mm.cpd""calplate_1200mm.cpd""calplate_1200mm.cpd""calplate_1200mm.cpd", 'calplate_160mm.cpd'"calplate_160mm.cpd""calplate_160mm.cpd""calplate_160mm.cpd""calplate_160mm.cpd""calplate_160mm.cpd", 'calplate_20mm.cpd'"calplate_20mm.cpd""calplate_20mm.cpd""calplate_20mm.cpd""calplate_20mm.cpd""calplate_20mm.cpd", 'calplate_20mm_dark_on_light.cpd'"calplate_20mm_dark_on_light.cpd""calplate_20mm_dark_on_light.cpd""calplate_20mm_dark_on_light.cpd""calplate_20mm_dark_on_light.cpd""calplate_20mm_dark_on_light.cpd", 'calplate_320mm.cpd'"calplate_320mm.cpd""calplate_320mm.cpd""calplate_320mm.cpd""calplate_320mm.cpd""calplate_320mm.cpd", 'calplate_40mm.cpd'"calplate_40mm.cpd""calplate_40mm.cpd""calplate_40mm.cpd""calplate_40mm.cpd""calplate_40mm.cpd", 'calplate_40mm_dark_on_light.cpd'"calplate_40mm_dark_on_light.cpd""calplate_40mm_dark_on_light.cpd""calplate_40mm_dark_on_light.cpd""calplate_40mm_dark_on_light.cpd""calplate_40mm_dark_on_light.cpd", 'calplate_5mm.cpd'"calplate_5mm.cpd""calplate_5mm.cpd""calplate_5mm.cpd""calplate_5mm.cpd""calplate_5mm.cpd", 'calplate_640mm.cpd'"calplate_640mm.cpd""calplate_640mm.cpd""calplate_640mm.cpd""calplate_640mm.cpd""calplate_640mm.cpd", 'calplate_80mm.cpd'"calplate_80mm.cpd""calplate_80mm.cpd""calplate_80mm.cpd""calplate_80mm.cpd""calplate_80mm.cpd", 'calplate_80mm_dark_on_light.cpd'"calplate_80mm_dark_on_light.cpd""calplate_80mm_dark_on_light.cpd""calplate_80mm_dark_on_light.cpd""calplate_80mm_dark_on_light.cpd""calplate_80mm_dark_on_light.cpd", 'caltab_100mm.descr'"caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr""caltab_100mm.descr", 'caltab_10mm.descr'"caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr""caltab_10mm.descr", 'caltab_200mm.descr'"caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr""caltab_200mm.descr", 'caltab_2500um.descr'"caltab_2500um.descr""caltab_2500um.descr""caltab_2500um.descr""caltab_2500um.descr""caltab_2500um.descr", 'caltab_30mm.descr'"caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr""caltab_30mm.descr", 'caltab_650um.descr'"caltab_650um.descr""caltab_650um.descr""caltab_650um.descr""caltab_650um.descr""caltab_650um.descr", 'caltab_6mm.descr'"caltab_6mm.descr""caltab_6mm.descr""caltab_6mm.descr""caltab_6mm.descr""caltab_6mm.descr", 'caltab_800mm.descr'"caltab_800mm.descr""caltab_800mm.descr""caltab_800mm.descr""caltab_800mm.descr""caltab_800mm.descr", 'caltab_big.descr'"caltab_big.descr""caltab_big.descr""caltab_big.descr""caltab_big.descr""caltab_big.descr", 'caltab_small.descr'"caltab_small.descr""caltab_small.descr""caltab_small.descr""caltab_small.descr""caltab_small.descr"
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_caltabSimCaltabsim_caltabSimCaltabSimCaltab
den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
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