query_calib_data_observ_indicesT_query_calib_data_observ_indicesQueryCalibDataObservIndicesQueryCalibDataObservIndices (Operator)

Name

query_calib_data_observ_indicesT_query_calib_data_observ_indicesQueryCalibDataObservIndicesQueryCalibDataObservIndices — Abfragen von Information zur Beziehung zwischen Kameras, Kalibrierkörpern und Kalibrierkörperposen.

Signatur

query_calib_data_observ_indices( : : CalibDataID, ItemType, ItemIdx : Index1, Index2)

Herror T_query_calib_data_observ_indices(const Htuple CalibDataID, const Htuple ItemType, const Htuple ItemIdx, Htuple* Index1, Htuple* Index2)

void QueryCalibDataObservIndices(const HTuple& CalibDataID, const HTuple& ItemType, const HTuple& ItemIdx, HTuple* Index1, HTuple* Index2)

HTuple HCalibData::QueryCalibDataObservIndices(const HString& ItemType, Hlong ItemIdx, HTuple* Index2) const

HTuple HCalibData::QueryCalibDataObservIndices(const char* ItemType, Hlong ItemIdx, HTuple* Index2) const

HTuple HCalibData::QueryCalibDataObservIndices(const wchar_t* ItemType, Hlong ItemIdx, HTuple* Index2) const   (Nur Windows)

static void HOperatorSet.QueryCalibDataObservIndices(HTuple calibDataID, HTuple itemType, HTuple itemIdx, out HTuple index1, out HTuple index2)

HTuple HCalibData.QueryCalibDataObservIndices(string itemType, int itemIdx, out HTuple index2)

Beschreibung

Ein Kalibrierdatenmodell (CalibDataIDCalibDataIDCalibDataIDCalibDataIDcalibDataID) speichert einen Satz von Beobachtungsdaten, die mit set_calib_data_observ_pointsset_calib_data_observ_pointsSetCalibDataObservPointsSetCalibDataObservPointsSetCalibDataObservPoints zum Modell hinzugefügt werden. Jede Beobachtung wird einer Kamera und einer Kalibrierkörperpose zugeordnet. Der Operator query_calib_data_observ_indicesquery_calib_data_observ_indicesQueryCalibDataObservIndicesQueryCalibDataObservIndicesQueryCalibDataObservIndices liefert die Indizes von Beobachtungsdaten zurück, welche einer bestimmten Kamera bzw. einer bestimmten Kalibrierkörperpose zugeordnet sind.

Für ItemTypeItemTypeItemTypeItemTypeitemType='camera'"camera""camera""camera""camera" muss ein gültiger Kameraindex in ItemIdxItemIdxItemIdxItemIdxitemIdx eingegeben werden. Das ist eine Zahl, die zwischen 0 und NumCameras-1 liegt, wobei NumCameras mit dem Operator create_calib_datacreate_calib_dataCreateCalibDataCreateCalibDataCreateCalibData bereits bei der Erstellung des Modells gesetzt wurde. Dann liefern die Ausgabeparameter Index1Index1Index1Index1index1 und Index2Index2Index2Index2index2 eine Liste von Kalibrierkörperindizes bzw. eine Liste von Poseindizes zurück. Die Einträge beider Listen bilden Schlüsselpaare [Index1[I],Index2[I]] der 'beobachteten' Kalibrierkörperposen mit I=0..|Index1|-1 und |Index1| = |Index2|.

Für ItemTypeItemTypeItemTypeItemTypeitemType='calib_obj_pose'"calib_obj_pose""calib_obj_pose""calib_obj_pose""calib_obj_pose" muss ein gültiger Kalibrierkörperindex in ItemIdxItemIdxItemIdxItemIdxitemIdx eingegeben werden. Das ist eine Zahl, die zwischen 0 und NumCalibObjects-1 liegt, wobei NumCalibObjects mit dem Operator create_calib_datacreate_calib_dataCreateCalibDataCreateCalibDataCreateCalibData bereits bei der Erstellung des Modells gesetzt wurde. Dann liefern die Ausgabeparameter Index1Index1Index1Index1index1 und Index2Index2Index2Index2index2 eine Liste von Kameraindizes bzw. eine Liste von Kalibrierkörperposen-Indizes zurück. Jedes Paar [Index1[I],Index2[I]] mit I=0..|Index1|-1 und |Index1| = |Index2|, bedeutet, dass die Kamera Index1[I] die Kalibrierkörperpose [ItemIdx, Index2[I]] 'beobachtet'.

Dieser Operator ist insbesondere dann nützlich, wenn die Beobachtungsdaten eines Kalibrierdatenmodells untersucht werden sollen. Das ist typischerweise der Fall bei Kalibrierdatenmodellen, die aus einer Datei gelesen werden und deren Konfiguration und Inhalt noch unbekannt sind. Darüber hinaus wird der Operator zum Abfragen einer Liste aller Posen, welche einem Kalibrierkörper zugeordnet sind, benutzt (siehe Beispiel).

Ausführungsinformationen

Dieser Operator modifiziert den Zustand des folgenden Eingabeparameters:

Während der Ausführung dieses Operators muss der Zugriff auf den Wert dieses Parameters synchronisiert werden, wenn er über mehrere Threads hinweg verwendet wird.

Parameter

CalibDataIDCalibDataIDCalibDataIDCalibDataIDcalibDataID (input_control, Zustand wird modifiziert)  calib_data HCalibData, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle des Kalibrierdatenmodells.

ItemTypeItemTypeItemTypeItemTypeitemType (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Typ des abgefragten Elements.

Defaultwert: 'camera' "camera" "camera" "camera" "camera"

Werteliste: 'calib_obj'"calib_obj""calib_obj""calib_obj""calib_obj", 'camera'"camera""camera""camera""camera"

ItemIdxItemIdxItemIdxItemIdxitemIdx (input_control)  number HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index einer Kamera ID oder eines Kalibrierkörpers (je nach Auswahl in ItemTypeItemTypeItemTypeItemTypeitemType).

Defaultwert: 0

Wertevorschläge: 0, 1, 2

Index1Index1Index1Index1index1 (output_control)  number-array HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Liste von Kalibriermarkennummer oder Liste von Kameranummer (je nach Auswahl in ItemTypeItemTypeItemTypeItemTypeitemType).

Index2Index2Index2Index2index2 (output_control)  number-array HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Kalibrierkörpernummer.

Beispiel (HDevelop)

* Read a calibration model from a file.
read_calib_data ('calib_data.ccd',CalibDataID)

* Get calibration object indices assigned to calibration object 0.
query_calib_data_observ_indices (CalibDataID, 'calib_obj', 0, _, \
                                 CalibObjPoseIndices)
* CalibObjPoseIndices contains the list of pose indices of calibration
* object 0. In order to be stored in the model, each calibration object
* needs to be observed by at least one camera in the setup (a calibration
* object pose that is not observed by any camera cannot be stored in
* the model). Typically, a calibration object pose can be observed by more
* than one camera. Hence, some calibration object pose indices might appear
* repeatedly in CalibObjPoseIndices. We use tuple_sort and tuple_uniq to
* extract a unique list of calibration object pose indices for calibration
* object 0.
tuple_sort (CalibObjPoseIndices, CalibObjPoseIndices)
tuple_uniq (CalibObjPoseIndices, CalibObjPoseIndices)

* Get poses of calibration objects observed by camera 2.
calibrate_cameras (CalibDataID, Error)
query_calib_data_observ_indices (CalibDataID, 'camera', 2, CalibObjIndices,\
                                 CalibObjPoseIndices)
for I := 0 to |CalibObjIndices|-1 by 1
  get_calib_data (CalibDataID, 'calib_obj_pose', \
                  [CalibObjIndices[I], CalibObjPoseIndices[I]], \
                  'pose', CalibObjPose)
endfor

Modul

Calibration