MCPcopy Create free account
hub / github.com/DNA-Rendering/DNA-Rendering / get_Kinect_Calibration_all

Method get_Kinect_Calibration_all

scripts/3DGS/SMCReader.py:125–156  ·  view source on GitHub ↗

Get calibration matrix of all kinect cameras and save it in self Args: None Returns: Dictionary of calibration matrixs of all matrixs. dict( Camera_group: Camera_id : Matrix_type : value ) Noti

(self)

Source from the content-addressed store, hash-verified

123
124 ### Kinect Camera Calibration
125 def get_Kinect_Calibration_all(self):
126 """Get calibration matrix of all kinect cameras and save it in self
127
128 Args:
129 None
130
131 Returns:
132 Dictionary of calibration matrixs of all matrixs.
133 dict(
134 Camera_group: Camera_id : Matrix_type : value
135 )
136 Notice:
137 Camera_group(str) in ['Kinect']
138 Camera_id(str) in {'Kinect': '0'~'7'}
139 Matrix_type in ['D', 'K', 'RT']
140 """
141 if not 'Calibration' in self.smc:
142 print("=== no key: Calibration.\nplease check available keys!")
143 return None
144
145 if self.__kinect_calib_dict__ is not None:
146 return self.__kinect_calib_dict__
147
148 self.__kinect_calib_dict__ = dict()
149 for cg in ['Kinect']:
150 self.__kinect_calib_dict__.setdefault(cg,dict())
151 for ci in self.smc['Calibration'][cg].keys():
152 self.__kinect_calib_dict__[cg].setdefault(ci,dict())
153 for mt in ['D', 'K', 'RT'] :
154 self.__kinect_calib_dict__[cg][ci][mt] = \
155 self.smc['Calibration'][cg][ci][mt][()]
156 return self.__kinect_calib_dict__
157
158 def get_kinect_Calibration(self, Camera_id):
159 """Get calibration matrixs of a certain kinect camera by its type and id

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected