Skip to content

Use exiftool to extract metadata of a photo series and save it to a Python dictionary

Notifications You must be signed in to change notification settings

dobedobedo/Extract-metadata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Extract-metadata

Use exiftool to extract metadata of a photo series and save it to a Python dictionary

Note

This script uses exiftool, see http://www.sno.phy.queensu.ca/~phil/exiftool/
Add the exiftool executable to path or put it in the same folder.

Usage

Add the following code in your python script:

  • import Retrieve_Metadata

  • from Retrieve_Metadata import PathImage

  • Metadata = Retrieve_Metadata.RetrieveData(PathImage, 'Tags')

'Tags' are optional and must be separated by comma.  

For example,
Metadata = Retrive_Metadata.RetrieveData(PathImage, 'GPSPosition', 'GPSAltitude') will get a dictionary like:
{'IMG_170204_044007_0716_NIR.TIF': {'GPSAltitude': '39.2 m Above Sea Level', 'GPSPosition': '24 deg 47' 14.17" S, 152 deg 16' 19.11" E'},
'IMG_170204_044007_0716_NIR2.TIF': {'GPSAltitude': '39.2 m Above Sea Level', 'GPSPosition': '24 deg 47' 14.17" S, 152 deg 16' 19.11" E'}}

Then you can use your own script to parse the data as you like.

About

Use exiftool to extract metadata of a photo series and save it to a Python dictionary

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages