Forum

Author Topic: Markers/export/multiframes  (Read 177 times)

nath.bod

  • Newbie
  • *
  • Posts: 1
    • View Profile
Markers/export/multiframes
« on: January 21, 2019, 05:03:59 PM »
Hello,

We want to export the markers of each frame (estimated coordinate) but we are getting only the markers of the current frame.

i=0
path="e:"
for frame in frames:
    i+=1
   file_name=os.path.join(path,str(i))
   chunk.saveReference(file_name, PhotoScan.ReferenceFormatCSV, items=PhotoScan.ReferenceItemsMarkers, columns="n,[u|v|w],")

Any recommandation ?

Thanks !

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 9897
    • View Profile
Re: Markers/export/multiframes
« Reply #1 on: January 22, 2019, 02:48:31 PM »
Hello nath.bod,

saveReference operation is applied to the active frame, so you need to switch the frames in your script to save the information for each of them:

Code: [Select]
path="e:"
for i in range(len(chunk.frames)):
    chunk.frame = i
    file_name=os.path.join(path,str(i))
    chunk.frame.saveReference(file_name, Metashape.ReferenceFormatCSV, items=Metashape.ReferenceItemsMarkers,
columns="n,[u|v|w],")

Let me know, if it works as expected now and gives the desired result.
Best regards,
Alexey Pasumansky,
AgiSoft LLC