Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.76k stars 313 forks source link

LA Color Appearance Cam16 – improvments Sigmoid Q, Log encoding Q, mask: branch lacam16 #6653

Open Desmis opened 1 year ago

Desmis commented 1 year ago

Purpose of this change – lacam16 branch Make the LA module "Color Appearance", for the moment for its part Cam16, more efficient (the last important modifications date from summer and autumn 2021):

Two major difficulties: 1. Cam16 and the 6 dimensions A point of programming is necessary to understand certain difficulties and constraints of working with Cam16 (it is identical with Cam02). During the development of Ciecam, around 2011, 2012, it quickly became apparent that unlike working in RGB, XYZ, or Lab* mode which requires declarations of 3-dimensional variables, Ciecam requires 6 dimensions: J luminance, Q brightness, C chromaticity, S saturation, M colorfullness, h hue. This implies a considerable memory occupation and significant processing times. The choice was made to use these variables one by one and sequentially in a global loop, which limits the memory occupation, but has a major drawback: the optimization of a procedure called in the middle of the loop is almost impossible. As a result, optimizations of functions such as contrast, sigmoid, etc. are limited and global.

2. Peculiarities of Q

Constraints that I imposed on myself

General principle

Summary Reminder

Provisional documentation in French is available (paragraphs marked « lacam16 » - 3.4 Utilisation de Cam16 et des fonctionnalités HDR). I do not provide 'test' images, there are enough on the forums... Depending on the case, you can use this module alone, or associated with other LA modules (equalizer, tone mapping, wavelets... ), or 'Abstract Profiles', etc.

Happy New Year to all.

And excuse my bad english.

Jacques

Desmis commented 1 year ago

Hello all

For those who are interested ... I made several improvements. https://github.com/Beep6581/RawTherapee/tree/lacam16

In fact, it's quite "curious" to see the lack of reactions on RT, of algorithms "similar" to those of DT which enthrall readers (of course you can tell me that my thing is less good, too complicated... ).

Jacques

Desmis commented 1 year ago

Some additional information: Optimizing the system so that the default settings are suitable in a majority of cases is a (very difficult) self-imposed constraint.

Reminder:

I wanted to keep the settings in "Basic" mode to a minimum. The "advanced" mode allows access to advanced settings, which should only be optional.

I added a module upstream of Cam16, but in the "Color appearance (Cam16 & JzCzHz)" module, which is inspired by "Abstract profile" but simplified:

This module has principles (in terms of results and language) to Filmic or Sigmoid or new color management in DT. But the code, its principles have a very limited relationship with DT... This does not mean that it is better or worse... It is different.

jacques