Skip to content

Draft: Add lens distortion correct function using `lensfun`

☃ Stephen Shkardoon ☃ requested to merge ss23/siril:lensfix into master

This is a first pass at adding a lens distortion correct pass into Siril. At the stage, it's working, but not ready for a merge due to a large number of bugs and build issues. I'd like to get some feedback on whether this is something you'd like to have me work on further and get into a mergeable state, and give some guidance on any changes to the approach you'd like to see (e.g. should this just be another part of the calibration step?).

The list of things to complete is:

  • Use a proper version of lensfun that compiles properly (can't use master - https://github.com/lensfun/lensfun/pull/1999)
  • Ensure relevant data for distortion is either passed through to this step properly, or allow the user to select it in the UI.
  • Get the changed merged into master for initial testing

Future work:

  • Generate our own distortion maps for a lens (should be doable with plate solving a large number of lights and looking for distortions that way)

I expect there's a lot that isn't great about the code at the moment (I don't really know C/C++), so if there's any improvements you'd like to see, just let me know.

Merge request reports