Forum

Author Topic: Exporting cameras with errors and projections  (Read 2207 times)

PatCarbon@Durham

  • Newbie
  • *
  • Posts: 3
    • View Profile
Exporting cameras with errors and projections
« on: June 28, 2019, 11:54:23 AM »
Is there a way to script the export of cameras, after alignment, that preserves the error (m), error (pix) and the # Projections?  It seems that the default:

Code: [Select]
chunk.exportCameras(path=CamPath, format=Metashape.CamerasFormatOPK, export_points=True, export_markers=False, use_labels=True)

Just exports the basic XYZ OPK Rij and I'd like to retrieve more info on the cameras after alignement.
Thanks

EDIT: Found the answer use saveReference() instead!
« Last Edit: June 28, 2019, 01:46:33 PM by PatCarbon@Durham »

3DWinter

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Exporting cameras with errors and projections
« Reply #1 on: February 10, 2023, 12:57:24 AM »
According to Methsape Python API 2.0
Renamed Chunk.saveReference() method to Chunk.exportReference()

Below is my code to try to export the reference.
Code: [Select]
chunk.exportReference(path=pathi,format=Metashape.ReferenceFormatCSV,items=Metashape.Reference, columns='',delimiter=',', precision=6)
But I am not successful in exporting the projections and Error (pix) associated with each picture :(  Can someone help me?
« Last Edit: February 14, 2023, 10:21:05 AM by 3DWinter »

3DWinter

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Exporting cameras with errors and projections
« Reply #2 on: February 10, 2023, 10:58:09 PM »
Anyone's thoughts?

3DWinter

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Exporting cameras with errors and projections
« Reply #3 on: February 14, 2023, 09:35:04 AM »
Can anyone help with this?

Paulo

  • Hero Member
  • *****
  • Posts: 1303
    • View Profile
Re: Exporting cameras with errors and projections
« Reply #4 on: February 15, 2023, 01:29:14 AM »
Hi 3DWinter,

from the API reference manual, the columns parameter in exportReference method  can contain following:
Code: [Select]
columns (string) – Column order in csv format (n - label, o - enabled flag, x/y/z - coordinates,
X/Y/Z - coordinate accuracy, a/b/c - rotation angles, A/B/C - rotation angle accuracy,
u/v/w - estimated coordinates, U/V/W - coordinate errors, d/e/f - estimated orientation angles,
D/E/F - orientation errors, p/q/r - estimated coordinates variance, i/j/k - estimated orientation
angles variance, [] - group of multiple values, | - column separator within group).

So I do not think you can export projections and error(pix) with this method. It could be done by python script...
Best Regards,
Paul Pelletier,
Surveyor