This solution does not appear to work anymore, unless I have done something wrong? I am attempting to set the correct pixel size for my DJI cameras, I access the camera model info, and want to set the pixel size based on the model number. I have pasted my code below, before that point it is exactly as in the general_workflow.py. The code below does not return an error but the values remain unchanged.
a = chunk.sensors
print(a) #returns [< Sensor 'FC330 *3.61mm)'>]
for sensor in chunk.sensors:
if camera_model == P4:
sensor.pixel_size = Metashape.Vector([0.0015625, 0.0015625])
elif camera_model == I2:
sensor.pixel_size = Metashape.Vector([0.00328, 0.00328])
else:
print("pixel size set by agisoft")