Beep6581 / RawTherapee

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

B&W channel mixer weird behavior #6102

Open TechXavAL opened 3 years ago

TechXavAL commented 3 years ago

When using the Channel Mixer method in the Black-and-White tool, Preset: Relative RGB, according to RawPedia:

Relative RGB: it offers to the user to mix the three channels R, G and B, but with control for the limits. You can enter positive or negative values, but the sum will always been forced to 100%

Whenever you use one negative value that is not «higher» than the addition of the other 2 channels, everything goes as expected:

R 2% G 2% B -4% cmok

While if you set a negative number bigger than the addition of the other channels, the image gets suddenly inverted:

R 2% G 2% B -5% cmweird

You can choose any combination you want: if negative is «bigger» than positives combined, then the image gets inverted.

At the very least this behavior is surprising and absolutely unexpected.

If the intended behavior is that the sum of all channels have to always be 100% (as said in RawPedia), then the formula should take good note of the sign of the channel and a setting of R10, G10, B-60 shouldn't be an inverted image, but R12.5, G12.5, B-75, meaning an stronger effect on the blue channel, but not an inverted image.

heckflosse commented 3 years ago

ping @Desmis

Desmis commented 3 years ago

@TechXavAL I will have a look...But to remember, all these algorithms are about 10 years old

And as I say (10 years ago) - traduct from my french "On the contrary, in the absolute mode, negative values, the use of the sliders “OYCPM” and the algorithm “Special effects” can lead to unexpected results: black screen, artefacts, ..." In french there is not "in the absolute mode", but "absolute mode"...That is to say when you used negatives values...you can leads to unexpected results

:)

I just verify...all seems to work well...with the remarks above. Jacques

TechXavAL commented 3 years ago

I think I understand that if I use the Presets: Absolute/Relative ROYGCBPM with the Special effect sliders, I can get odd results depending on the settings on the sliders. Ok.

But I'm talking about the default Preset: Relative RGB. I haven't checked yet other modes, but this one is the default, the preset everybody will be faced to when using this Channel Mixer Method. No Special Effects here, I think.

Desmis commented 3 years ago

Yes

But if you put negative values, in preset relative RGB...you can lead to special effects also..

For me all is "normal"...if it is normal to use negatives values :)

jacques.

TechXavAL commented 3 years ago

I've had some time to make some more tests. Allow me to ask again, please.

So just to make sure I'm not wrong, I've converted an image to B&W using the channel mixer method. I've left the default values for red and green (33), and I've changed blue one step at a time. This are the RGB channel values I've got (values are %):

chmxchart

The values with pale green background are constantly bigger negative numbers for the blue channel. The green line is the turning point The values in pale red show an inverse progression than that seen in the values with green background.

To note: the turning point value is always the sum of the other sliders with the sign changed, no matter if they are big or small, or if they are different. And the progression gets inverted after the turning point, with exactly the same values for R and G (but different sign).

So, is this normal? Does this have to be expected?

Desmis commented 3 years ago

@TechXavAL

All is normal....since you used negatives values....

jacques