Get calibration matrix of all cameras and save it in self Args: None Returns: Dictionary of calibration matrixs of all matrixs. dict( Camera_Parameter: Camera_id : Matrix_type : value ) Notice:
(self)
| 72 | |
| 73 | ### RGB Camera Calibration |
| 74 | def get_Calibration_all(self): |
| 75 | """Get calibration matrix of all cameras and save it in self |
| 76 | |
| 77 | Args: |
| 78 | None |
| 79 | |
| 80 | Returns: |
| 81 | Dictionary of calibration matrixs of all matrixs. |
| 82 | dict( |
| 83 | Camera_Parameter: Camera_id : Matrix_type : value |
| 84 | ) |
| 85 | Notice: |
| 86 | Camera_id(str) in {'Camera_5mp': '0'~'47', 'Camera_12mp':'48'~'60'} |
| 87 | Matrix_type in ['D', 'K', 'RT', 'Color_Calibration'] |
| 88 | """ |
| 89 | if not 'Camera_Parameter' in self.smc: |
| 90 | print("=== no key: Camera_Parameter.\nplease check available keys!") |
| 91 | return None |
| 92 | |
| 93 | if self.__calibration_dict__ is not None: |
| 94 | return self.__calibration_dict__ |
| 95 | |
| 96 | self.__calibration_dict__ = dict() |
| 97 | for ci in self.smc['Camera_Parameter'].keys(): |
| 98 | self.__calibration_dict__.setdefault(ci,dict()) |
| 99 | for mt in ['D', 'K', 'RT', 'Color_Calibration'] : |
| 100 | self.__calibration_dict__[ci][mt] = \ |
| 101 | self.smc['Camera_Parameter'][ci][mt][()] |
| 102 | return self.__calibration_dict__ |
| 103 | |
| 104 | def get_Calibration(self, Camera_id): |
| 105 | """Get calibration matrixs of a certain camera by its type and id |
nothing calls this directly
no outgoing calls
no test coverage detected