Skip to content

Bug Fix: New DJI config file for consistent M3M tags#75

Merged
joeyfranck56 merged 5 commits into
mainfrom
m3m-tag-fix
Jun 1, 2026
Merged

Bug Fix: New DJI config file for consistent M3M tags#75
joeyfranck56 merged 5 commits into
mainfrom
m3m-tag-fix

Conversation

@joeyfranck56

Copy link
Copy Markdown
Contributor

Bug Fix: New DJI config file for consistent M3M tags

What?

  • Add new DJI config file to be used with DJI sensors.

Why?

  • The DJI tags do not properly copy using the Sentera exiftool config file and thus some software is not able to properly read those calibrated images.
  • Pix4d Fields does not currently support the 3rd generation Sentera panel, this will allow users to calibrate the imagery and stitch it using the current version of pix4d fields.

PR Checklist

  • Merged latest master
  • Updated version number
  • All private git packages are at their newest version in both pyproject.toml and environment.yml
  • All git package version numbers match between pyproject.toml and environment.yml
  • dist/ImageryCorrector.exe and dist/GetCorrectionsCsv.exe have been rebuilt

Breaking Changes

@zthorson zthorson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree this is much cleaner than his solution (given we couldn't fully figure out why his was working). Just a few questions to see if we can clean it up more.

Comment thread cfg/dji.cfg
Comment on lines +1 to +12
#------------------------------------------------------------------------------
# File: exiftool.cfg
#
# Description: This config file contains tag definitions needed to be able
# to write Pix4D and Sentera XMP-Camera tags
#
# Usage: exiftool -config exiftool.cfg -XMP-camera:TAG=VAL ...
#
# Requires: ExifTool version 7.00 or later
#
# References: 1) https://support.pix4d.com/hc/en-us/articles/360016450032-Specifications-of-xmpcamera-tags
#------------------------------------------------------------------------------

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Description should be updated to mention dji tags as well.

Is there a reason a new file was created rather than just updating the existing exiftool.cfg? Unless there were conflicts, you should be able to extend the existing file without affecting the other entries, making maintenance easier.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was hoping it would be as simple as adding the drone-dji section but we write CaptureUUID in XMP-Camera and DJI writes it in drone-dji. This was one of the main issues with processing corrected images in pix4d fields and likely ODM.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you should be able to have both, as they are in different namespaces (XMP-Camera vs XMP-DJI), but maybe there is something I'm missing. If you've already tried it and it doesn't work then I'm good with the workaround. Otherwise I can try it on my end this afternoon as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll try it to double check, I think I had some of the syntax wrong the first time I tried and this method worked.

Comment thread imgcorrect/metadata.py
Comment on lines +18 to +23
make = parser.make()
if make == "DJI":
command += ["-config", "cfg/dji.cfg"]
elif make == "Sentera":
command += ["-config", "cfg/exiftool.cfg"]
command += [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same question as above on whether we need to distinguish the two modes.

pathex=['.'],
binaries=[],
datas=[('exiftool/exiftool.exe', '.'), ('cfg/exiftool.cfg', 'cfg'), ('cfg/reg_config.ini', 'cfg')] + metadata_datas,
datas=[('exiftool/exiftool.exe', '.'), ('cfg/exiftool.cfg', 'cfg'), ('cfg/dji.cfg', 'cfg'), ('cfg/reg_config.ini', 'cfg')] + metadata_datas,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

get_corrections_*.spec also had the exiftool.cfg, but it doesn't look like they actually use it. If we decide to keep the dji.cfg/exiftool.cfg split, maybe we update those spec files to remove exiftool.cfg to make it clearer that it isn't used for those exes. Or since very few people use get_correction, we could just remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thats a good catch, I will remove those from the get_corrections files

@zthorson zthorson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Further testing reveals differences in where tags are copied if we try to merge it into 1 file, so we will have to maintain the 2 separate files. See Joey's notes for details.

@joeyfranck56 joeyfranck56 merged commit 663fc0b into main Jun 1, 2026
1 check passed
@joeyfranck56 joeyfranck56 deleted the m3m-tag-fix branch June 1, 2026 15:21
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