Rawtherapee: Tone Mapping settings unavailable in RT 5.7 commit c6f021dcc

Created on 8 Jan 2020  路  16Comments  路  Source: Beep6581/RawTherapee

I've found an odd behavior while testing a pp3 from another RT user.

This is the About from my RT:

Version: 5.7-394-gc6f021dcc
Branch: dev
Commit: c6f021dcc
Commit date: 2020-01-06
Compiler: cc 7.4.0
Processor: x86_64
System: Linux
Bit depth: 64 bits
Gtkmm: V3.22.2
Lensfun: V0.3.2.0
Build type: release
Build flags:  -std=c++11 -march=native -Werror=unused-label -Werror=delete-incomplete -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -fopenmp -Werror=unknown-pragmas -O3 -DNDEBUG -ftree-vectorize
Link flags:  -march=native
OpenMP support: ON
MMAP support: ON

My OS is Linux Mint Cinnamon 19.3

The problematic files are:

And now this is how the odd behavior appears:

  • after downloading the raw and the pp3 from the other user, I rename the pp3 to match the name of the raw
  • edit the image in RT dev (all Tone Mapping sliders are available)
    profile-mbs-onload
  • load my profile (no Strength nor Gamma settings available)
    profile-mine
  • load the pp3 I want to test again (no Gamma available)
    profile-mbs-again
  • load my profile again (again, no Strength, nor Gamma available)
  • go to Wavelet Levels tool and turn it off, after that turn off Tone Mapping off and then on again (now I have Strength available, but no Gamma)
    profile-mine-waveletsoff

I've tried to start from scratch with my image, and every slider inside Tone Mapping is available to me, no matter which other tools I've turned on.

If there's something more I have to tell or test, just say it!

All 16 comments

How interesting! I did not know Wavelet Levels and Tone Mapping interact with each other. If Residual Image Compression strength is not 0 (Wavelet Levels and Residual Image must be on, of course), Tone Mapping Strength and Gamma are not used. The intended behavior is that Compression strength controls the availability of the Tone Mapping adjusters. That said, I see several problems with the Tone Mapping and Residual Image tools.

  • Tone Mapping Gamma fails to become available when Wavelet Levels is turned off. This is what's happening above. Both Gamma and Strength should be available if Wavelet Levels is off.
  • Tone Mapping Strength and Gamma can become unavailable even if Residual Image is off. Currently, the value of Residual Image Compression strength always controls the availability, but this should not happen if Residual Image is off.
  • Tone Mapping Edge stopping, Scale, and Reweighting iterates are still available when Residual Image Compression method is set to Contrast. The entire Tone Mapping tool has no effect when wavelet contrast compression is used. Users should have visual indication that none of the adjusters have an effect.
  • Tone Mapping may have no effect even if Residual Image is off. The Tone Mapping ImProcFunctions should check if Residual Image is off when deciding whether or not tone mapping should be applied.

I just push a change in dev 2ff619e for this bad behavior with the slider "gamma" in "Tone-mapping"

1) it is "normal" when you enable "wavelet levels" / "Residual image" / "compression method" = "tone mapping" that "strength and gamma are desabled" to avoid big artefacts
2) but it was not "normal" when you disabled "wavelet" that "gamma" does not reappear

Thank's

Jacques

Wow! I didn't expect the problem was going to be so intricate. Thanks @Lawrence37 for such much more detailed testing than mine!

But @Jacques, strength and gamma are disabled with "compression method=contrast" in my pp3.

Anyway, after writing the most up-to-date wavelet levels documentation, it has caught me by surprise that the "compression method" slider does turn off another tool (or some of its sliders). Is that behavior documented somewhere in the french documentation? If not, is there any other interaction in this way when using any other wavelet levels slider? I have to update the documentation...

@TechXavAL
Ok, It was also a bad behavior with "compress method = contrast"

I will post soon a commit to fix

Btw : this "bug" is here since many many time....about 5 years...

Jacques

@Desmis

Ok. I'm not saying this is a bug (you're currently fixing the bug part), but I don't recall it being documented anywhere, and although it's taken me a while to find this behavior, I guess there would be people that will usually make use of both tools at the same time, so it must be documented.

I will update the Rawpedia documentation, but it would be nice to know if there's anything more undocumented that I must be aware of, to reflect it in Rawpedia.

As we say in french "mon brave monsieur c'est un probl猫me connu"

Or how to do documentation when there is almost no feedback.
The point you raise is only one among many, and this concerns almost all so-called complex modules

a) Ciecam, b) Retinex, c) wavelet, d) tone mapping (the code is complex - and also difficult to use in some cases),e) local adjustements. All modules - at least : a) b) c) e) - where I had an important part

I don't say for all these modules rawpedia is up to date, but it has the merit of existing and therefore of being able to be criticized

For wavelet I don't know if there are others interactions....

But, "wavelet pyramid " in local adjustements introduces a new approach that is both more efficient and more complex (Tone mapping with wavelet is quasi unknown in research... certainly afterwards, after developing the code, I looked for references ... to see... and I find something... different from I have done...less documented). I think probably, if people are interested, it will be possible to carry out a partial porting towards "wavelet main"

jacques

Ok. Thanks for the clarification.

However, I think we're going more and more out of topic. This discussion should take place in another place.

Please, let us know when the remaining bug is solved.

Regards

The "bug" is fixed since commit d8564cb

But I think we are not off topic, but completely inside !

If some people 5 years ago read my documentation he would find the bug ?

If 5 years ago, I would have perfected "Wavelet tone mapping" I would never have used "tone mapping" (from Ben S), and no bug...

Regards

Jacques

Correct me if I'm wrong, please:

  • the unintended behavior is what I call a bug: some sliders were not available again in Tone Mapping when turning off the Wavelet Levels tool.
  • the intended behavior is what I call a not documented behavior: when using the compression strength threshold in the Wavelets Levels tool, then some sliders in Tone Mapping were forced to not be available. As I have understood, that was intended, but wasn't mentioned in the documentation.

Anyway, if I'm right, with the latest commit we have 3 scenarios:

  • Compression Method is set to Contrast: the Tone Mapping tool works without limitations
  • Compression Method is set to Tone Mapping and Compression Strength is set to 0: the Tone Mapping tool works without limitations
  • Compression Method is set to Tone Mapping and Compression Strength is set to any other value than 0: the Tone Mapping tool has the Strength and Gamma sliders disabled

The only caveat is that if you have used the Tone Mapping tool before setting the Compression Method in the Wavelet Levels tool, you have to turn off and then on again the Tone Mapping tool to update the availability of the sliders.

Is all of these the intended behavior of the tools? If it is, I will update the documentation that way.

@Desmis
I tested the latest commit. The gamma adjuster is now properly enabled when wavelets is turned off. However, there are still problems from the user's perspective.

  • With Compression strength != 0, Wavelet Levels on, and Residual Image off, Tone Mapping has no effect. I expect Tone Mapping to be applied because wavelet compression is off.
  • With Compression strength != 0, Compression method "Tone Mapping", Wavelet Levels on, and Residual Image off, Tone Mapping Strength and Gamma are disabled. Since wavelet compression is off, I expect all Tone Mapping adjusters to be available.
  • The tooltip for Compression strength should say that Strength and Gamma adjusters are greyed out if Compression strength is not zero AND Compression method is "Tone Mapping". Translations may need to be updated.

@TechXavAL
When Compression method is "Contrast", Wavelet Levels is on, and Compression strength is not zero, Tone Mapping is not applied. I don't know if this is the desired behavior.

@TechXavAL @Lawrence37
The easiest way is to remove this warning about the interaction between Tone-mapping (from Ben S) and Wavelet residual (same Tone Mapping Ben S) and therefore leave the user free to use both at the same time.
In this case, be aware that the following settings (from TM main) will be used in wavelet (compression tone mapping)

  • edge stopping
  • scale
  • reweit Iterates

But I think, in some times, I will change this "tone mapping" compression in wavelet residual to replace by the one in "Local adjustements" best performances and of course for levels and not residual only

Therefore the (provisional) documentation must mention the precautions and the interactions with the 3 sliders

I will commit this change this morning

Now it's fixed commit 01fbc2e
You can now use wavelet and tone-mapping together or separately (with the 3 sliders above shared)

I don't think there is other intercation with wavelet (??)

But there are many with tone-mapping when you use Ciecam - 5 years ago there have been many discussions about the ciecam TM intercation... but never with wavelet

I will work on "wavelet TM " for "main" when

  • branch wavelenh wil be merge !
  • local adjustements TM Wvalet tested

Regards

Jacques

It's working fine on my computer.

There are 3 scenarios:

  • Compression Method is set to Contrast: the Tone Mapping tool works without limitations
  • Compression Method is set to Tone Mapping and Compression Strength = 0: the Tone Mapping tool works without limitations
  • Compression Method is set to Tone Mapping and Compression Strength is set to any other value than 0: the Tone Mapping tool has the Strength and Gamma sliders disabled

Should this issue be closed?

Tone Mapping Strength and Gamma are always available.

@Lawrence37 @TechXavAL

As I said, there is now "no protection", it is up to the user to manage the possible mixture, between "Tone mapping main" and "Tone mapping in residual wavelet"

But If you want, it will be a work to do :)

jacques

@Lawrence37
True, true. My fault: it seems that I didn't update to the latest commit, but you're right.

@Desmis
This is my personal opinion, but if the behaviour is correctly documented, the user should be well aware of that, so unless making crazy processings, there shouldn't be many problems. Well, at least not undoable problems.

Was this page helpful?
0 / 5 - 0 ratings