darktable-org / darktable-org/darktable
Lensfun unnecessary scale when there's no geometry correction.
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
I like to auto-apply lensfun based autocorrections on all my pictures. Depending what's available, it'll correct more or less things (TCA, vignette, geometry), and that's great, that's what I expect.
However, I'm finding that for a number of lenses I have, lensfun doesn't have geometry information, but still applies a "safety" scale of 1.002, or sometimes a little more. I get it that this comes from the lensfun database, and that they do that to avoid dealing with missing out-of-frame data when doing geometry corrections, but when there is no geometry being corrected, that serves no purpose, and needlessly scales/crop the images (by a tiny amount).
As far as I can tell, it is not possible to set up darktable to auto-apply lens correction, with all corrections available, except that it should not apply scale if there's no actual geometry correction being performed.
Would it be possible to make that the behavior available (likely through some kind of opt-in check box), and even possibly be the default setting? I suppose we cannot make it an always-on thing, as that would be a rendering change for previously processed images, but as long as the old behavior is available, we can have better defaults for new pictures.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing darktable’s lensfun auto-correction path and how scale is applied when geometry data is absent. Reproduce the behavior with a lens profile lacking geometry correction, then verify that an opt-in setting preserves existing behavior while avoiding unnecessary scaling for new processing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- computer-graphics, desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100