darktable-org / darktable-org/darktable

Lens correction: use strength modifier for both Lensfun database & manual vignetting corrections

Open
#18,683 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

no-issue-activity scope: image processing scope: UI
Dominant language
C
Stars
13.1k
Forks
1.4k
Avg merge
22h 14m
Merged PRs (30d)
198

Description

Is your feature request related to a problem? Please describe.
Users have expressed their need for a strength modifier in the past, like #10872 and #1990, or indirectly like #4028.

In the current lens correction module, the parameters are applied from the Lensfun database to correct the vignetting fully, without the possibility of a partial correction. As several users have already described in past feature requests or in forums, some amount of vignetting is often desired as an artistic artefact, but some lenses have too much vignetting to be left entirely uncorrected.

Describe the solution you'd like
The past feature requests have unfortunately been auto-closed simply because the PR was inactive for an arbitrary number of days. I understand that there are limited resources and that they're working voluntarily, so other features have been picked first.

However, the situation has changed a little, so it's worth to revisit this issue: another feature request, #4578, asked to add support for manual vignetting correction, and a pull request, #14828, added just that. Interestingly, the lens correction module now features a strength modifier for the manual vignetting correction (and manual correction only).

A simple and elegant solution would be to use that strength control for both database-based and manual vignetting correction:

  • move the control on the UI to make it obvious it applies to both manual and database-based corrections
  • change the code to that effect, making sure the default strength is 100% if the module is first activated for a lens supported by the Lensfun database and something else (0%?) if it's not—I think that's the current default value.

I see no apparent downside. It's indeed be less probable than users should want to use both database-based and manual corrections at the same time, thus leading to a conflict of that control. Should that happen, it's always possible to add another instance of the module (which it's hard to do so to lessen the 100% correction applied by the current module).

Image

As an alternative solution, another strength control could be added for the database-based correction.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the lens correction module, locating its UI strength control and the separate Lensfun database and manual vignetting correction paths. Review how the current manual strength and default values are applied; done means one clearly placed strength control affects both correction sources, with the requested 100% Lensfun default and an appropriate default when Lensfun correction is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.