Forum

Author Topic: Average Camera Location Error  (Read 5574 times)

ksunglieng

  • Newbie
  • *
  • Posts: 14
    • View Profile
Average Camera Location Error
« on: April 21, 2023, 07:51:21 PM »
I'm trying to understand better how Agisoft estimates the average camera location error using the EXIF data of a camera.

What is Agisoft using to estimate the errors? Is this same variable/baseline used when estimating errors of GCPs?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15424
    • View Profile
Re: Average Camera Location Error
« Reply #1 on: April 21, 2023, 07:56:54 PM »
Hello ksunglieng,

The error estimation for camera locations is similar to marker errors calculation. See page 80 of Metashape Pro manual:
https://www.agisoft.com/pdf/metashape-pro_2_0_en.pdf


Quote
Fig. Camera locations and error estimates - presenting camera locations and error estimates. Z error is
represented by ellipse color. X, Y error are represented by ellipse shape. Estimated camera locations are
marked with a black dot.
X error (m) - root mean square error for X coordinate for all the cameras.
Y error (m) - root mean square error for Y coordinate for all the cameras.
XY error (m) - root mean square error for X and Y coordinates for all the cameras.
Z error (m) - root mean square error for Z coordinate for all the cameras.
Total error (m) - root mean square error for X, Y, Z coordinates for all the cameras.
Best regards,
Alexey Pasumansky,
Agisoft LLC

ksunglieng

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Average Camera Location Error
« Reply #2 on: April 21, 2023, 08:28:57 PM »
I'm still having difficulty understanding the metric used to evaluate the estimated error.

Hello ksunglieng,

The error estimation for camera locations is similar to marker errors calculation. See page 80 of Metashape Pro manual:
https://www.agisoft.com/pdf/metashape-pro_2_0_en.pdf


Quote
Fig. Camera locations and error estimates - presenting camera locations and error estimates. Z error is
represented by ellipse color. X, Y error are represented by ellipse shape. Estimated camera locations are
marked with a black dot.
X error (m) - root mean square error for X coordinate for all the cameras.
Y error (m) - root mean square error for Y coordinate for all the cameras.
XY error (m) - root mean square error for X and Y coordinates for all the cameras.
Z error (m) - root mean square error for Z coordinate for all the cameras.
Total error (m) - root mean square error for X, Y, Z coordinates for all the cameras.

Paulo

  • Hero Member
  • *****
  • Posts: 1498
    • View Profile
Re: Average Camera Location Error
« Reply #3 on: April 21, 2023, 09:40:10 PM »
hello ksunglieng,

given a chunk, the root mean square error for all aligned cameras can be calculated as follows:
Code: [Select]
import numpy as np
T = chunk.transform.matrix
crs = chunk.crs
errcam=[]
for c in chunk.cameras:
    if not c.reference.enabled:
    continue
    c_est = T.mulp(c.center)  # estimated camera center in geoccs
    errloc = c_est - ps.CoordinateSystem.transform(c.reference.location, crs, crs.geoccs) #err in geoccs
    errcam.append(crs.localframe(c_est).rotation() * errloc)   #err in chunk crs
errcam = np.array(errcam)
rms = np.sqrt(np.mean(np.square(errcam),axis = 0)) # rms camera errors (X,Y,Z) or Total error in reference pane

as you can see in attachment...
Best Regards,
Paul Pelletier,
Surveyor

dpitman

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
Re: Average Camera Location Error
« Reply #4 on: April 22, 2023, 01:32:17 AM »
Perhaps @ksunglieng is asking about the mechanism for how MS comes up with it's figures rather than identifying the figures?  In other words, WHY does MS say a camera position is more or less "accurate".
« Last Edit: April 22, 2023, 01:53:37 AM by dpitman »

Paulo

  • Hero Member
  • *****
  • Posts: 1498
    • View Profile
Re: Average Camera Location Error
« Reply #5 on: April 22, 2023, 06:57:31 PM »
Yes. Of course the final RMS error camera coordinates shows how well the estimate camera coordinates agree with the input reference coordinates. So for a PPKÉRTK drone survey this should be at the cm level. For an autonomous GPS more like dm to meter level....
Best Regards,
Paul Pelletier,
Surveyor

dpitman

  • Sr. Member
  • ****
  • Posts: 256
    • View Profile
Re: Average Camera Location Error
« Reply #6 on: April 22, 2023, 09:31:01 PM »
So, MS creates tie points (the sparse cloud) and based upon that and the specifications of the particular camera, MS determines a location from where the image was captured without consideration of where the camera says it was taken. And then compares those 2 locations and that is the reported error, correct? 

How does the weighting of the accuracy metric of the cameras play into that calculation?