Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: claranine on August 18, 2016, 10:30:59 AM
-
Hi all,
I'm trying to use the error values I see in the reference pane of PhotoScan for some logic in my scripting, is there anywhere that the "total error" values are stored or the individual errors for each camera in metres?
I am able to get the lat/long of the camera via camera.reference.location but how do I find the lat/long/altitude error of the camera's position in metres?
I was thinking about trying estPos = chunk.crs.project(camera.transform.mulp(camera.reference.location)) to find the estimated position of the camera and subtract it from the reference location to determine the difference in lat/long decimal degrees which could then be converted to metres but I think I'm mixing up my coordinate systems here which is producing incorrect results.
Any help is greatly appreciated,
Cheers,
J
-
after a little more digging this seems to get close to what I'm after
estPos = chunk.crs.project(chunk.transform.matrix.mulp(camera.center))
source = camera.reference.location
error = estPos - source
Is this correct to get the error for a specific camera?
-
Hello claranine,
sourceGeogr = camera.reference.location #source values in geographic coordinate system
estGeogr = chunk.crs.project(chunk.transform.matrix.mulp(camera.center)) #estimated position in geographic coordinate system
sourceGeoc = chunk.crs.unproject(camera.reference.location) #measured values in geocentric coordinates
estimGeoc = chunk.transform.matrix.mulp(camera.center) #estimated coordinates in geocentric coordinates
local = chunk.crs.localframe(chunk.transform.matrix.mulp(camera.center)) #local LSE coordinates
error = local.mulv(estim - source)
-
Hi Alexey,
Once again thanks, this gets the values I'm after.
Cheers!