Following Paul’s comments, I’ve made a few improvements to simplify the GUI of “lacam16n”, in particular the part concerning masks.
In “LA”, masks are not available in “Basic”, with limited possibilities in “Standard” and with the maximum in “Advanced”.
The fact that I classified “JzCzHz” as “advanced” made it compulsory, with the global GUI, for the masks associated with Jz to always be “maximum”, thus making them difficult to read and adding to the complexity.
I’ve added an “Enable all mask tools” checkbutton, which only appears in “advanced” mode for both Cam16 and JzczHz. By default, it’s disabled, offering only the simple masks menu. This simplifies the form, but makes no difference to the algorithms. I’m by no means a GUI specialist…
As a reminder, the masks are of the “jdc” type…I added them because I was asked to. In most cases, you should be able to do without them. Nevertheless, for the enthusiasts, they will be satisfied. Nevertheless, these masks are “incomplete” because I don’t know how to use the GUI to draw curves, polygons… But the problem with LA to delimit the action (polygons, etc.) is not limited to the GUI - the problem of adapting the algorithm is at least as important.
Executables
https://github.com/Beep6581/RawTherapee/releases/tag/pre-dev-github-actions
JzCzHz
I’ll come back to its complexity… not so much.
In fact, there is a “simple” part (if we can use this formula), which is the use of the basics of XYZ<=>Jzazbz conversion. This can be found in many reports and, barring errors, poses no problems.
Where difficulties arise is when you want to go from a theoretical tool, to something useful for photography. Adjusting brightness (not to be confused with lightness), saturation and contrast. The problem is more complex than it seems.
Several parameters work against the developer:
- instead of having bounded values (like RGB, XYZ, Lab, etc.), whether in the range [0…1], or [0…65535], as with Cam16 in Jz, Brightness takes into account absolute luminance, which is obviously different between a scene on a winter’s morning and one at noon in the tropics… Even if the Camera “compensates”… Our eye, our brain sees that it’s not the same. Brigthness is not stubborn…
- Jzazbz (or JzCzHz, which is basically the same thing) takes into account image dynamics (whether it’s called Scene or Source is secondary) through a PQ (Perceptual Quantizer) function…and Absolute luminance. This may seem obvious, but in the long run monitor performance, as shown in the previous graph, will also have to be taken into account. This means that the data “converted” by Jz are not in the range [0…1] for “Jz” or [-0.5…0.5] for “az” and “bz”, but at values that are often considerably lower (notably due to the influence of PQ), e.g. [0.000001 - 0.22]. As a result, all the usual sliders and curves are “lost” and respond poorly or not at all.
So I “got around” the obstacle - without changing the algorithm - in such a way that every slider, curves, or other tool is in the right interval [0…1], etc.
I’ve added some personal interpretations in “Scene conditions” to take account of PQ and absolute luminance (Absolute luminance, PQ -peak luminance, Jz remapping…) as well as some “tinkering” to make it usable and realistic. Perhaps I’m mistaken?
In order to be able to better evaluate Jz, and not remain at the reference level (output of conversion matrices), I’ve added some functionalities to the usual sliders - found in RT:
- Log encoding Jz, Sigmoid Jz, which must work with the above constraints (unbounded data…)
- Curves: Jz(Jz), Cz(Cz), Cz(Jz), Jz(Hz), Hz(Hz), Cz(Hz)… with Hz some (rare) bad behavior.
- Shadows/Highlights (Jz)
- Wavelets Jz: a) Local contrast - with attenuation response and choice of decomposition level range; b) Clarity/Sharp mask/blend & Soften images.
Of course, the masks, which are the same as those of the other modules, are located “before Jz”… hence the probable negative impact of the Laplacian on the image, and “Recovery based on luminance mask”, which is located “after Jz”.
It is possible, without major difficulty, to add features that are present elsewhere in RT - those in Lab mode, almost all of LA - notably the Wavelet part - Edges sharpness - which both softens the background of images and hardens contours - here no Laplacian, but an algorithm taking into account the Sobel-Canny transform, and “Attenuation response”).
Thanks to Paul for testing this module, which is “less complex” than you might think…
Jacques