Forum

Author Topic: getting the final accuracy for the reference coordinates  (Read 1552 times)

mpatalberta

  • Newbie
  • *
  • Posts: 24
    • View Profile
getting the final accuracy for the reference coordinates
« on: February 12, 2019, 11:55:15 PM »
I can get the following to work
import Metashape
doc = Metashape.app.document
chunk = doc.chunk
chunk.camera_location_accuracy = Metashape.Vector([0.001,0.001,0.001])

How do I get the actually accuracy values solved for after running the align command?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14855
    • View Profile
Re: getting the final accuracy for the reference coordinates
« Reply #1 on: February 13, 2019, 12:05:35 PM »
Hello mpatalberta,

camera_location_accuracy parameter defines the precision of the measurement device, so this value is fixed and wouldn't change due to the processing workflow.

If you need to get the difference between the estimated camera locations and the source values, input to the Reference pane, then you can use the following code:
Code: [Select]
import Metashape
chunk = Metashape.app.document.chunk #active chunk
for camera in chunk.cameras:
    if camera.transform: #checking only aligned cameras   
        estimated_coord = chunk.crs.project(chunk.transform.matrix.mulp(camera.center)) #estimated XYZ in coordinate system units
        source_coord = camera.refence.location #source values in the Referenece pane
        error = (chunk.crs.unproject(estimated_coord) -  chunk.crs.unproject(source_coord)).norm()
        print(camera.label, error)
This code should print to the Console the errors for the camera locations as difference between source and estimated values.

[/code]
Best regards,
Alexey Pasumansky,
Agisoft LLC