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

Method get_kinect_Calibration

scripts/3DGS/SMCReader.py:158–179  ·  view source on GitHub ↗

Get calibration matrixs of a certain kinect camera by its type and id Args: Camera_group (str): Camera_group in ['Kinect']. Camera_id (int/str of a number): CameraID(str) in {'Kinect': '0'~'7'} Returns: Dictionary

(self, Camera_id)

Source from the content-addressed store, hash-verified

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
160
161 Args:
162 Camera_group (str):
163 Camera_group in ['Kinect'].
164 Camera_id (int/str of a number):
165 CameraID(str) in {'Kinect': '0'~'7'}
166 Returns:
167 Dictionary of calibration matrixs.
168 ['D', 'K', 'RT']
169 """
170 if not 'Calibration' in self.smc:
171 print("=== no key: Calibration.\nplease check available keys!")
172 return None
173
174 Camera_id = f'{int(Camera_id):02d}'
175 assert(Camera_id in self.smc['Calibration']["Kinect"].keys())
176 rs = dict()
177 for k in ['D', 'K', 'RT']:
178 rs[k] = self.smc['Calibration']["Kinect"][Camera_id][k][()]
179 return rs
180
181 ### RGB image
182 def __read_color_from_bytes__(self, color_array):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected