Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract more metadata using exifTool #2645

Merged
merged 5 commits into from
Feb 5, 2025

Conversation

demoulinv
Copy link
Contributor

Description

This PR adds a pure python node dedicated to extract metadata from image files using exifTool. This node can be connected to the cameraInit node and for all images referenced in the "cameraInit.sfm" file, if exifTool is available, a file containing all metadata is generated. The file format can be selected amongst "txt", "xmp", "xml". Be aware that the "xmp" format cannot store all metadata contained in the image file.

Features list

Implementation remarks

The invocated exifTool command depends on the requested file format in the following way:

  • "txt": exiftool [args] imageFile > metadataFile.txt
  • "xml": exiftool -X [args] imageFile > metadataFile.xml
  • "xmp": exiftool -tagsfromfile imageFile [args] metadataFile.xmp

Optional arguments 'args' can be defined through a string parameter of the meshroom node.
The boolean parameter "keepfilename" allows to keep the image file name for the metadata file but changing the file extension.

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 8.19672% with 56 lines in your changes missing coverage. Please review.

Project coverage is 69.42%. Comparing base (3e8b736) to head (534b95e).
Report is 43 commits behind head on develop.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
meshroom/nodes/aliceVision/ExtractMetadata.py 8.19% 56 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2645      +/-   ##
===========================================
- Coverage    69.93%   69.42%   -0.51%     
===========================================
  Files          121      123       +2     
  Lines         7088     7167      +79     
===========================================
+ Hits          4957     4976      +19     
- Misses        2131     2191      +60     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@servantftechnicolor servantftechnicolor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I got non explicit errors if nothing is connected to the node
  • Nothing appears in the log if exiftool is not found
  • On Error, the node does not fail.

meshroom/nodes/aliceVision/ExtractMetadata.py Outdated Show resolved Hide resolved
@servantftechnicolor servantftechnicolor merged commit 8a8cb8b into develop Feb 5, 2025
2 of 3 checks passed
@servantftechnicolor servantftechnicolor deleted the dev/extractMetadataWithExifTool branch February 5, 2025 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants