Hello Emanuele,
as specified by Alexey, let us say you have your cameras referenced in WGS84 CRS (chunk.crs) and want to convert them to WGS84/ UTM zone 6 N ("EPSG::32606") then following code will do the trick:
chunk = Metashape.app.document.chunk
source_crs = chunk.crs # WGS84
target_crs = PhotoScan.CoordinateSystem("EPSG::32606") # WGS84/UTM06 N
for camera in chunk.cameras:
if not camera.reference.location:
continue
print("Source Coordinates for",camera.label,":",camera.reference.location," in",source_crs.name)
camera.reference.location = Metashape.CoordinateSystem.transform(camera.reference.location, source_crs, target_crs)
print("Target Coordinates for",camera.label,":",camera.reference.location," in",target_crs.name)
chunk.crs = target_crs
and the printed output would be as:
2021-03-18 06:03:11 Source Coordinates for DJI_0357.tiff : Vector([-147.858200000127, 64.8554152780109, 248.0]) in WGS 84
2021-03-18 06:03:11 Target Coordinates for DJI_0357.tiff : Vector([459312.5123923809, 7192616.907659786, 248.0]) in WGS 84 / UTM zone 6N
2021-03-18 06:03:11 Source Coordinates for DJI_0359.tiff : Vector([-147.858108611107, 64.85547638893128, 247.0]) in WGS 84
2021-03-18 06:03:11 Target Coordinates for DJI_0359.tiff : Vector([459316.93729799363, 7192623.658982667, 247.0]) in WGS 84 / UTM zone 6N
2021-03-18 06:03:11 Source Coordinates for DJI_0361.tiff : Vector([-147.858062777519, 64.85551444424524, 248.0]) in WGS 84
2021-03-18 06:03:11 Target Coordinates for DJI_0361.tiff : Vector([459319.1676681044, 7192627.870324763, 248.0]) in WGS 84 / UTM zone 6N
2021-03-18 06:03:11 Source Coordinates for DJI_0363.tiff : Vector([-147.858047500187, 64.85552222198912, 247.0]) in WGS 84
2021-03-18 06:03:11 Target Coordinates for DJI_0363.tiff : Vector([459319.903684075, 7192628.727240421, 247.0]) in WGS 84 / UTM zone 6N
2021-03-18 06:03:11 Source Coordinates for DJI_0365.tiff : Vector([-147.85801694446104, 64.85552222198912, 247.0]) in WGS 84
2021-03-18 06:03:11 Target Coordinates for DJI_0365.tiff : Vector([459321.3522641624, 7192628.707601423, 247.0]) in WGS 84 / UTM zone 6N
2021-03-18 06:03:11 Source Coordinates for DJI_0367.tiff : Vector([-147.857864444521, 64.8555069446563, 248.0]) in WGS 84
2021-03-18 06:03:11 Target Coordinates for DJI_0367.tiff : Vector([459328.558876019, 7192626.907122786, 248.0]) in WGS 84 / UTM zone 6N
2021-03-18 06:03:11 Source Coordinates for DJI_0369.tiff : Vector([-147.857681388855, 64.85549916691251, 247.0]) in WGS 84
2021-03-18 06:03:11 Target Coordinates for DJI_0369.tiff : Vector([459337.2254038893, 7192625.922768301, 247.0]) in WGS 84 / UTM zone 6N
2021-03-18 06:03:11 Source Coordinates for DJI_0371.tiff : Vector([-147.857528611289, 64.8554916667938, 247.0]) in WGS 84
2021-03-18 06:03:11 Target Coordinates for DJI_0371.tiff : Vector([459344.45693601645, 7192624.988825623, 247.0]) in WGS 84 / UTM zone 6N
2021-03-18 06:03:11 Source Coordinates for DJI_0373.tiff : Vector([-147.857345555623, 64.85548388905, 247.0]) in WGS 84
2021-03-18 06:03:11 Target Coordinates for DJI_0373.tiff : Vector([459353.1234738997, 7192624.0045170905, 247.0]) in WGS 84 / UTM zone 6N
Hope this clears uo your doubts,