Experiments with a scene-referred local contrast module - proof of concept

For me, it’s a wonderful challenge!

The two approaches, “Pyramidal mode” and “Multi-scale Expert mode,” have been merged into a single file, contrast_rgb.c.

Thanks to the algorithm developed by @wilecoyote, whom I would like to thank, and a slightly crazy idea, I tried to come up with a proposal that complies with darktable standards (linear pipeline).

Here is a summary of the latest developments:

Fusion of approaches: Two processing logics in a single module allowing you to switch between a simplified (Pyramidal) approach and an advanced technical (Multi-scale) approach.

Optimization of the “fused” code for greater responsiveness.

Dual interface: Creation of two separate displays that adapt dynamically according to the selected mode.

Contrast refinement and dark area protection:

Noise Threshold: Implementation of intelligent protection in linear mode to avoid amplifying noise in deep shadows.

Visual adaptation (CSF): Integration of human eye sensitivity, hidden in Expert mode to give the user full technical control.

Here is an example comparing the previous version and the new version with dark area protection of a photo taken from a playraw



For comparison purposes, this appimage contains the previous “pyramidal contrast” version as well as the latest “RGB contrast” version.

You can also test @Wilecoyote & @Jandren s channelwise proposal; this interesting approach deserves a separate module. A true surgical scalpel.

Next step.

@Wilecoyote @Pascal_Obry : What do you think? I would like to hear your opinion before continuing with the possible development of this proposal.

Here is the latest appimage, thank you for testing it.
https://drive.google.com/drive/folders/1zahcvlAyaN03L1VmX5esOOyhBkO8jiko?usp=sharing
The code can be found on LC-test branch GitHub - Christian-Bouhon/darktable at LC-test

8 Likes