Skip to content

Use Sensor Gain Adjustment for DJI sensors when calibration panels are not present/used#69

Merged
joeyfranck56 merged 15 commits intomainfrom
dji-band-sensitivity
Apr 10, 2026
Merged

Use Sensor Gain Adjustment for DJI sensors when calibration panels are not present/used#69
joeyfranck56 merged 15 commits intomainfrom
dji-band-sensitivity

Conversation

@joeyfranck56
Copy link
Copy Markdown
Contributor

@joeyfranck56 joeyfranck56 commented Mar 31, 2026

DJI Band Sensitivity

What?

  • Use "drone-dji:SensorGainAdjustment" for dji datasets that do not have calibration panels.

Why?

  • This will keep things consistent between Sentera cameras that use BandSensitivity for datasets without calibration panels.

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

@joeyfranck56 joeyfranck56 changed the title DJI Band Sensitivity Use Sensor Gain Adjustment for DJI sensors when calibration panels are not present/used Apr 7, 2026
Copy link
Copy Markdown
Contributor

@zthorson zthorson left a comment

Choose a reason for hiding this comment

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

I've never really used github workflows so I learned something new with this PR. I just added a manual trigger so I could understand them better (Can be triggered with github cli via: gh workflow run "executable_build_test.yaml" --ref dji-band-sensitivity then watched via gh watch and appears to complete successfully.

Though it doesn't look like you can access the exe's, with the current runner, it does at least test them.

Comment thread imgcorrect/corrections.py
Comment on lines +337 to +339
elif "drone-dji:SensorGainAdjustment" in xmp:
gain_adj = float(xmp["drone-dji:SensorGainAdjustment"])
return gain_adj
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.

Seems good to me. I can't think of any case where we would have Camera:BandSensitivity and drone-dji:SensorGainAdjustment at the same time, so we shouldn't have to worry about the order of the if statements.

Comment thread imgcorrect/io.py
Comment on lines +92 to +93
"Skipping %s images because they don't have data for all bands",
images_before_filtering - len(new_image_df.index),
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 find f-strings a bit easier to read for most cases, but it really doesn't matter here.

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.

Agreed, for some reason the linter doesn't like using f strings with logger calls

Comment thread correct_images_dir.spec Outdated
pathex=['.'],
binaries=[],
datas=[('exiftool/exiftool.exe', '.')],
datas=[('exiftool/exiftool.exe', '.')] + 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.

I'd expect the onefile and the dir versions to have the same datas list, but it looks like there aren't related exiftool cfg folders ( ('cfg/exiftool.cfg', 'cfg'), ('cfg/reg_config.ini', 'cfg'), ('sentera_radiometric_corrections_icon.ico', '.') that you had below. Are these files needed for the exe?

pathex=['.'],
binaries=[],
datas=[('exiftool/exiftool.exe', '.'), ('cfg/exiftool.cfg', 'cfg'), ('cfg/reg_config.ini', 'cfg')],
datas=[('exiftool/exiftool.exe', '.'), ('cfg/exiftool.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.

Same comment as above, are these extra files (exiftool cfg files) needed in both the onefile and dir version? I'd expect if it's needed in one it would be needed for the others?

Comment thread pyproject.toml
tqdm = "^4.59.0"
opencv-contrib-python = ">=4.6.0,<4.7.0"
imgparse = {git = "https://github.com/SenteraLLC/py-image-metadata-parser.git", tag = "v2.0.4"}
imgparse = {git = "https://github.com/SenteraLLC/py-image-metadata-parser.git", tag = "v2.0.10"}
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 this should still be good. We've had issues with conflicting versions of py-image-metadata-parser for quicktile-ms-wrapper, but I think elliot was able to resolve them in quicktile-core instead of here:

https://github.com/SenteraLLC/quicktile-ms-wrapper/pull/26
https://github.com/SenteraLLC/quicktile-core/pull/86

If we aren't planning on rolling this updated version of py-radiometric-corrections into the quicktile-ms-wrapper then we can ignore this entirely for now.

@joeyfranck56 joeyfranck56 merged commit 0e36706 into main Apr 10, 2026
2 checks passed
@joeyfranck56 joeyfranck56 deleted the dji-band-sensitivity branch April 10, 2026 20:59
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