I have a set of 10 projects in which I would like to re-start the camera optimization process.
I have twelve projects, each with at least 6 sensors, thus I would like to accomplish resetting the cx, cy, k1-4, b1, b2, and p1-4 to 0.0 with python instead of by hand.
I have tried out a couple of guesses at how to do this, but have not been successful.
I would expect that the following would work, but did not find that it changed the values. Any recommendations are welcome.
for file in files:
doc = Metashape.Document()
doc.open(file)
for chunk in doc.chunks:
for sensor in chunk.sensors:
sensor.calibration.cx = 0
sensor.calibration.cy = 0.
sensor.calibration.b1 = 0.
sensor.calibration.b2 = 0.
sensor.calibration.k1 = 0.
sensor.calibration.k2 = 0.
sensor.calibration.k3 = 0.
sensor.calibration.k4 = 0.
sensor.calibration.p1 = 0.
sensor.calibration.p2 = 0.
sensor.calibration.p3 = 0.
sensor.calibration.p4 = 0.
doc.save()
thank you,
katy