erik I've finally found a way to save the camera parameters. I'm saving all I need inside a .json file with the following structure:
mapDepthData = {
'FOV': device.readCalibration().getFov(dai.CameraBoardSocket(depthData.getInstanceNum())),
'MaxDisparity':stereo.initialConfig.getMaxDisparity(),
'disp': dispQ.get().getFrame().tolist(),
'depthDataArray': depthData.getFrame().tolist(),
'calibrations': device.readCalibration().eepromToJson()}
Then, I just changed some elements inside the HostSpatialsCalc
class in calc.py to use directly the elements in the json (in the original class, it takes device-related variables, but they cannot be encoded into json).
The class CalibrationHandler
contains a static method .fromJson(calibrations)
to re-generate the object from the dictionary saved in the json file.
Thanks for your help!!