Forum

Author Topic: Extracting reference error  (Read 4790 times)

claranine

  • Newbie
  • *
  • Posts: 14
    • View Profile
Extracting reference error
« 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

claranine

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Extracting reference error
« Reply #1 on: August 18, 2016, 10:58:42 AM »
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?
« Last Edit: August 18, 2016, 12:16:59 PM by claranine »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15067
    • View Profile
Re: Extracting reference error
« Reply #2 on: August 18, 2016, 11:06:45 AM »
Hello claranine,

Code: [Select]
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)
Best regards,
Alexey Pasumansky,
Agisoft LLC

claranine

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Extracting reference error
« Reply #3 on: August 18, 2016, 12:17:33 PM »
Hi Alexey,

Once again thanks, this gets the values I'm after.

Cheers!