Forum

Author Topic: How to get EXIF info of tiff or jpg files by Python  (Read 3222 times)

knt3rist3as

  • Newbie
  • *
  • Posts: 2
    • View Profile
How to get EXIF info of tiff or jpg files by Python
« on: October 28, 2016, 03:42:30 PM »
Hi, im trying to find the solution of that problem.

I made a model with some .tif files and now i would like to create an exel table with the information of each pic,
but I donĀ“t know how to get automatically the EXIF information by python,

its also possible choose the type of the output file (xml,excel,csv)?

thanks in advance

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14846
    • View Profile
Re: How to get EXIF info of tiff or jpg files by Python
« Reply #1 on: October 28, 2016, 05:32:06 PM »
Hello knt3rist3as,

You can access the meta-data read by PhotoScan using the following code:
Code: [Select]
camera.photo.meta()It contains meta data as a dictionary representation.
Best regards,
Alexey Pasumansky,
Agisoft LLC

knt3rist3as

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How to get EXIF info of tiff or jpg files by Python
« Reply #2 on: November 07, 2016, 06:52:15 PM »
Thanks Alexey.

But it will be possible to do it for the active pics of the current project? Without write any name or folder?


Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14846
    • View Profile
Re: How to get EXIF info of tiff or jpg files by Python
« Reply #3 on: November 07, 2016, 06:57:43 PM »
Hello knt3rist3as,

Not quite sure, what you mean.
For example, if camera = chunk.cameras[0] - the first camera in the active chunk, you can write the following code to print all the information read by PhotoScan from EXIF:
Code: [Select]
for key in camera.photo.meta.keys():
      print(": ".join([key, c.photo.meta[key]]))
Best regards,
Alexey Pasumansky,
Agisoft LLC