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

Dehaze and Channel Mixer output only on Luma channel #5123

Open sandros94 opened 5 years ago

sandros94 commented 5 years ago

Hi, dehaze and channel mixer are great tools, both produce stunning resaults, but most of the times to me it would be perfect to use them only on the luma channel, to recover some details.

Ex n.1: I have a nice sunset with nice and balanced colours but a really small haze, sure I can just a contrast adjustment to fix that, but if the only tool I had the possibility to use was the dehaze tool all the colours will shift, in this case I could have applied the output of the dehaze tool only on the luminosity channel just to add a tiny bit more information to the haze part.

Ex n.2: Similar situation, but the image is mainly a red or green or blue scene, like a grass field with grey sky, most of the information would be on the G channle and almost none on the R and B channels, adding some G on those channels would add a ton of information and details on the other two, but it will shift the colours alot, so making the channel mixer output apply only to the luma channel I can get the details and information that I want but without shifting colours.

Thanks, if more information is needed I'll do my best to replay

heckflosse commented 5 years ago

@Sandros94

Hi, dehaze and channel mixer are great tools, both produce stunning resaults, but most of the times to me it would be perfect to use them only on the luma channel, to recover some details.

Can you elaborate on how to use the channel mixer only on the luma channel?

Beep6581 commented 5 years ago

And this part:

adding some G on those channels would add a ton of information and details on the other two

afr-e commented 5 years ago

I think he wants to use the tool to modify only the luma/luminosity/lightness[1] of the image with the idea that it would recover some of the detail but not affect the colours.

[1] He used all of these terms in discuss. We need to get the terms straight. 😅

sandros94 commented 5 years ago

Yes sorry, maybe I don't know terminology quite right, or at least only for as a video coloris. @heckflosse @Beep6581 @afr-e

Atm the channel mixer takes in input the RGB channels separately and outputs them again in each one, this feature would output in the L channel of Lab instead of each one of RGB.

"adding some G to other channels" is just a cheap way to say increasing the Green slider of the channel mixer on the Red and Blue channels.

Luma is the L channel for Lab, and yes it refers to the luminosity of a picture (not colored), and this feature request is mainly to recover details or alter the luma channel without affecting colours.

iliasg commented 5 years ago

Ex n.1: I have a nice sunset with nice and balanced colours but a really small haze, sure I can just a contrast adjustment to fix that, but if the only tool I had the possibility to use was the dehaze tool all the colours will shift, in this case I could have applied the output of the dehaze tool only on the luminosity channel just to add a tiny bit more information to the haze part.

The main (and difficult .. ;)) task of DeHaze tools is (should be) to also recover chromaticity .. because haze except from dumpening contrast dumpens color information. Recovering contrast is secondary because there are other tools which are effective on simply recovering contrast.. I personally like Contrast by detail tool .. increasing the low sliders .. and tuning protection or overaction on specific regions of the color spectrum with the "skin hue - skin targetting protection" tool

Ex n.2: Similar situation, but the image is mainly a red or green or blue scene, like a grass field with grey sky, most of the information would be on the G channle and almost none on the R and B channels, adding some G on those channels would add a ton of information and details on the other two, but it will shift the colours alot, so making the channel mixer output apply only to the luma channel I can get the details and information that I want but without shifting colours.

Maybe some screenshots could help here .. to show what you mean in pictures ;)

Although I don't understand what kind of usefull information can a user gain by adding G on B,R .. normally this will destroy color fidelity and only gain something in noise ..

Most usefull information transfer from G on R,B is (should be) achieved by the demosaicer

SoupyGit commented 3 years ago

Channel mixer applying only to luminosity - I would LOVE to see this also. My explanation of it is this: In Black and White module you can select method: 'channel mixer', with an R,G and B slider to adjust. It would be great if you could blend this so it effects only luminosity (I am not totally sure on the difference between luma, luminance and luminosity - so take this to mean - so it effects brightness, not colour).

Use cases for something like this: Can darken blue skies by adjust R (cyan) or B sliders. Can lighten or darken skin tones. Can lighten or darken foliage by adjusting G slider. It is equivalent to having shot with a colour filter over the lens.

It would also be great if the user can save their own presets. In other programs with this feature I have presets saved for all the primary, secondary and tertiary colours. Am happy to share them here if there is interest.

Bonus points if there is an option to split into two parts - 1 for highlights and 1 for shadows (ie. one set of R,G,B sliders for highlights, and another set of R,G,B sliders for shadows).

Further note: When picking a colour filter preset in this module, they should adjust the sliders. Currently, picking a colour filter in the 'black and white' module doesn't adjust sliders.

Here are a couple of examples of what you can do with this, posted in a recent thread titled 'introducing color calibration module' in darktable. Before: https://pixls-discuss.s3.dualstack.us-east-1.amazonaws.com/original/3X/5/8/58ccc80d0ee6af49c00effc6199524d3d25113a4.png After: https://pixls-discuss.s3.dualstack.us-east-1.amazonaws.com/original/3X/6/9/695f5824f4103e03e28a4babfb3240096626234f.png

Before: https://pixls-discuss.s3.dualstack.us-east-1.amazonaws.com/original/3X/c/9/c98bce4946d725f97d7c04fdae728216435c5a4d.png After: https://pixls-discuss.s3.dualstack.us-east-1.amazonaws.com/original/3X/e/a/ea9fffbf32fa671750413ea8869f0e9de4094ae4.png