Hi, I have a problem. I want to write the intrinsics JSON file calibrated by OAK-D into the FLASH area using the following code, but it throws the error below:
from pathlib import Path
import depthai as dai
import argparse
calibJsonFile = str((Path(__file__).parent / Path('/home/t**/dd.json')).resolve().absolute())
calibBackUpFile = str((Path(__file__).parent / Path('/home/t***/xx.json')).resolve().absolute())
parser = argparse.ArgumentParser()
parser.add_argument('calibJsonFile', nargs='?', help="Path to calibration file in json", default=calibJsonFile)
args = parser.parse_args()
# Connect device
with dai.Device(dai.OpenVINO.VERSION_UNIVERSAL, dai.UsbSpeed.HIGH) as device:
deviceCalib = device.readCalibration()
deviceCalib.eepromToJsonFile(calibBackUpFile)
print("Calibration Data on the device is backed up at:")
print(calibBackUpFile)
calibData = dai.CalibrationHandler(args.calibJsonFile)
try:
device.flashCalibration2(calibData)
print('Successfully flashed calibration')
except Exception as ex:
print(f'Failed flashing calibration: {ex}')
Calibration Data on the device is backed up at:
/home/t***/xx.json
Failed flashing calibration: No PROTECTED permissions to override protected EEPROM fields