Hello Alexey,
thank you very much for your quick reply.
So the problem now is that I am not good in scripting... I have found out below script in the forum and have tried to run the script, but it does not work out. Could you please help me? I need to convert from EPSG::3068 to EPSG::4326 as in a testing area.
import math
import PhotoScan
print("Script started")
doc = PhotoScan.app.document
chunk = doc.chunk
new_crs = PhotoScan.CoordinateSystem("EPSG::4326")
new_wkt = new_crs.wkt.split("TOWGS84[")[1].split("]")[0]
dx, dy, dz, rx, ry, rz, s = [float(x) for x in new_wkt.split(",")]
rx = rx * math.pi / (180. * 3600.)
ry = ry * math.pi / (180. * 3600.)
rz = rz * math.pi / (180. * 3600.)
s = 1.0 + s / 1.0E6
R = s * PhotoScan.Matrix([[1, -rz, ry], [rz, 1, -rx], [-ry, rx, 1]])
T = PhotoScan.Matrix([[R[0,0], R[0,1], R[0,2], dx], [R[1,0], R[1,1], R[1,2], dy], [R[2,0], R[2,1], R[2,2], dz], [0, 0, 0, 1]])
for camera in chunk.cameras:
new_loc = new_crs.project(T.inv().mulp(chunk.crs.unproject(camera.reference.location)))
camera.reference.location = new_loc
chunk.crs = new_crs
PhotoScan.app.update()
print("Script finished")