Beep6581 / RawTherapee

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

LA -> Mask and Modifications -> L curve : Wrong behaviour. #6734

Open jade-nl opened 1 year ago

jade-nl commented 1 year ago

Short description

When using Mask and Modifications:

When dialing in an L curve the opposite behaviour is seen until you reach the halfway point (0.5). Lowering the curve should decrease the effect, not increase it. This wrong behaviour is only seen on the right (light) side of the curve, the left (dark) side behaves correctly.

This is what the tooltip has to say about the L curve:

L=f(L) the luminance varies according to the luminance, so you can decrease the brightness to improve the selection.

Steps to reproduce

  1. load an image
  2. set neutral profile (not needed, just to make sure)
  3. set some lockable colour pickers in dark -> neutral light areas
  4. activate LA and add a spot
  5. set spot on middle grey area (for balance, not a requirement per-se)
  6. select Color&Light tool and dial in +100 lightness

Up to here all is as it should be

  1. open Mask and Modifications and enable it
  2. select L curves tab and make sure the middle dot is on the centre line
  3. lower the left most dot to 0.5
  4. lower the right most dot to 0.5

If you turn the mask off and on you see that the left side behaves as described (the darks are less influenced by the +100 setting) but the right side has become brighter (increasing effect), which is wrong, it should be getting darker (decreasing effect).

Expected behavior

The right side behaves the same as the left: decreasing the effect based on the lightness so a refinement in the mask can be dialed in.

Additional information

Other useful information:

Although I did notice it while editing a normal RAW, the above described issue might not be all that good to see. Here's a video and 2 screenshots when using a TIFF showing wedges and with colour pickers set:

https://user-images.githubusercontent.com/56407344/229288922-1520d23b-84c6-4041-901e-9808eeb2db57.mp4

LA Colour & Light only:

la defaults 100l

Mask and Modification activated:

la defaults 100l and L masking

Desmis commented 1 year ago

@jade-nl

I will have a look. but i can't guarantee anything... :)

jacques

jade-nl commented 1 year ago

Hi @Desmis,

I see that you're rather busy with https://github.com/Beep6581/RawTherapee/pull/6643 and that would put this one on the back-burner. Nothing wrong with that, just want to mention something else I noticed that might be of interest .

This wrong behaviour isn't limited to the initially selected area/shape. It also targets, and thus increases the area that is not initially selected/dialed in. Have a look at this:

https://user-images.githubusercontent.com/56407344/229579807-da77a8a4-ce0b-4682-afe4-d7c3dda14b56.mp4

Not entirely sure if this is relevant, but it might narrow things down a bit for you.

Desmis commented 1 year ago

@jade-nl

Hello jacques No I am not putting this on standby or on hold (back burner). Simply, given my state of health, more than chaotic (I only sleep 2 or 3 hours a day, since several months...) and as I am still in treatment, to put it simply, I am not in good shape.

It is only a question of priorities. I asked users for their point of view (including yours, for which you no longer give an opinion), and I have to provide a credible solution, on this complex subject.

I do not dispute the problem which is certain, but I have already (a little) looked, I understand your impatience, and no obvious solution .... But I will take a closer look ... when?

A question, when I could no longer ensure for various reasons (age, illness...) the follow-up of LA, and the other algorithms for which I cooperated, who will take over?

Cordially

The other Jacques

jade-nl commented 1 year ago

Hi Jacques,

I'm somewhat amazed, to be honest, that you still manage to do all that you are doing. You mentioned once that all this gives you distraction, hope that is still the case.

I understand your impatience,

Trust me on this one: I'm not impatient or trying to push you in any way. I'm still playing with the Mask and Modification functionality and noticed this out-of-area behaviour and thought it worth mentioning.

I more then understand that you need to prioritize, so, take your time with this one (and that is assuming it can actually be solved).


A bit off-topic and regarding #6643 and you request for input:

The reason I haven't given any is solely based on it being an impossible task :-)

Sensors react differently, camera brands apply their own colour magic, which might even be camera type specific, lenses have a tendency to influence colour etc, etc. You'll be tuning forever and will never get a satisfying result that can be applied generally. RawTherapee now has many ways to set WB, and you (and Lawrence3) improved upon that and temperature correlation specifically. But, depending on the situation, one might need to use the camera provided setting, (auto) RGB Grey or dial the WB in manually.

As you can see there's no ill intent from me at all, I'm rather happy with the work you've done with #6643!

Jacques.

Desmis commented 1 year ago

Hi Jacques

I will have a look soon :)

jacques

Desmis commented 1 year ago

@jade-nl

I have looked closely at what you are describing, and indeed the right side of the curve does not react like the usual masks (or as one would generally expect). These masks are entirely my design and the operation is "in accordance" with what I expected, even if it does not correspond to user expectations. All masks are affected (not only Color & Light), they all work (identical code, but with different parameters) in the same way. Revisiting the masks of LA supposes a complete overhaul, and that is not in my objectives. But, we can leave this issue with this "special" behavior, if someone wants to spend some time on it.

Thank you for reporting this behavior.

Cordially

jacques

jade-nl commented 1 year ago

Hi Jacques,

I have looked closely at what you are describing, and indeed the right side of the curve does not react like the usual masks (or as one would generally expect).

Thanks for looking at this one and confirming the issue.

Revisiting the masks of LA supposes a complete overhaul, and that is not in my objectives.

That's too bad, but it is what it is.

But, we can leave this issue with this "special" behavior, if someone wants to spend some time on it.

Hopefully RawTherapee's masking can be overhauled as part of RawTherapee version 6.0.

Jacques.