Exposure - Tone Curves profiles per brand (or camera)

Hello,

thanks for help … I will use ART for now … I am fine with that … I have opened an *issue on github so this problem is already reported …

could you be please so kind and try to explain me (only briefly) what’s the problem in mainline RT that FUJI x-trans RAFs are processed very inaccurately like that ?.. I have to repeat, I’ve never hit this kind of issue with thousands of Nikon NEFs edited in RT since version 4.x over past years …

thanks and regards, dan

the problem is in the auto-matching algorithm, not in RT itself. It seems that some Fuji cameras (X100 models especially, from what I’ve seen) tend to underexpose quite a lot and then compensate this when generating the embedded JPEG. This confuses the auto-matching algorithm, which sometimes generates “bad” curves. If you switch to using a fixed curve instead of auto-matching (I think RT ships with a profile called “standard film curve” which might be suitable), then there is no problem.

HTH

Thanks, I’ll see what I can find and possibly improve upon.

In addition to this, as I try to show with my Mathematica graphs, the algorithm actually performs very well. The point is that it computes the matching curve based on the luminance of the pixels, and this may or may not give good results if the mode of the tone curve is set to ‘Film like’ or ‘Standard’. But it may be better if you set it to ‘Luminance’.

Other than that, I am inclined to say that there is not an immediate ‘broken’ thing in RT that can be fixed for Fuji files.

great !! thanks much for answers … understood … d

Seems my guess was not so wrong :wink:

2 Likes

spot on, indeed :slight_smile:

2 Likes

One final thought on this after experimenting a little more: you can get a much better match with the embedded JPEG if you match on the RGB channels separately. Of course this is not how our tone-curves work atm. It might be a worthwhile feature request for the future.

Proof of principle.
JPEG

Matched RAW through separate channel matching

Example 2
JPEG

Matched RAW through separate channel matching

2 Likes

This appears common for many cameras and does not even remotely surprise me - back long ago, it was probably the simplest computationally, and camera manufacturers didn’t want people to complain about sudden massive changes in color rendering once more advanced curve approaches were feasible.

I’m 95% certain Sony’s JPEG engine still does per-channel tone curves (darktable’s basecurve module in its original pre-“preserve colors” form with a “Sony-like” curve was an almost 100% match to Sony JPEGs), and they continue to do this because while a vocal minority endlessly bitches about Sony colors due to some of the corner cases where hue twisting gets seriously problematic, most users are used to that behavior at this point.

Also of note: In the case of a camera underexposing significantly, it might be beneficial to look to see if there are any EXIF tags that hint at some form of DRO in play. Of course, if that’s the case, the camera might also be doing local tonemapping which will FUBAR any attempts to duplicate the behavior with a simple tone curve match.

1 Like

@Thanatomanic :: great job ! thanks much, appreciated !!

best regards, d

Hello,

would you be please so kind and point me to the DOCu that describe (or some video on yt) your workflow, I am unfortunately not that good with RT and I simply don’t understand well howto adopt your workflow, eg you’re saying:

you can get a much better match with the embedded JPEG if you match on the RGB channels separately.

I was trying with this another prominent example:


++ RAF here
https://infophagia.com/ntz/paste/DSCF2952.RAF.gz

thanks much and best regards,
~dan

Hi Dan, the match I was talking about was done outside RawTherapee purely for academical purposes, so it’s of little practical use unfortunately. The way in which the tone curves work in RT is not suitable for RGB-independent matching, but maybe we ought to support that at some point in the future. Definitely not something for the next release, I’m sorry to say.

I will repeat my earlier claim that when you switch to ‘Luminance’ mode instead of ‘Film-like’ you will usually get a bit closer to the embedded JPEG.

And finally, FWIW, the tone curve generated here is pretty sensible: the image is quite underexposed so there are very little midtones and highlights. Therefore the curve rises steeply and flattens off.

a-ha … thanks for explanation !!!

:slight_smile:

I am confused by this whole discussion. It seems to be working on the assumption that tone = color. I always understood the tone curve to change how light or dark a color is, but not to change the fundamental color. Fuji applies film simulations to its jpgs, which also alter the colors in addition to the shades. If you want to match one of these, you need to use a LUT and not just a tone curve.

I suspect that the way Fuji handles exposure compensation and whether that is read or used might also contribute to some of these issues…RT may not use this info when it matches against the JPG but Fuji does creating its JPG…

I am basing this on comments from here…Does Fuji Cheat with its Sensors?

Update: Thanks to some awesome people like Iliah Borg, we now know the reason why Fuji RAW files appear darker. Turns out that Fuji has a special tag (0x9650) in its RAW files that highlights the necessary midpoint compensation for RAW files to interpret and make necessary changes. Below are the values for the Fuji X-T1:

ISO 200 / 0.72EV
ISO 400 / 0.72EV
ISO 800 / 0.72EV
ISO 1600 / 0.72EV
ISO 3200 / 1.38EV
ISO 6400 / 2.38EV

So keep the above in mind when looking at Fuji RAW files and comparing them to other cameras. If you are using a RAW converter from Adobe (and potentially other RAW converters), make sure to look at the above table for adjustments needed to make images appear as they should. Big thanks to Iliah Borg and the LibRaw team for discovering the Fuji tags and letting us know!

Likely due to this…if RT is aware of the correct exif tag it might be able to correct properly…

Interesting discussion here Raw exposure bias: Fujifilm X System / SLR Talk Forum: Digital Photography Review

Not true. See DCamProf

Beyond what is discussed there, many cameras implement a per-channel RGB tone curve that is well known to cause hue twisting - see the discussion of curve mode at Exposure - RawPedia

Yes, but Fuji intentionally shifts the colors to provide a specific look rather than as a side effect of the curve applied.

Maarten has a nice demonstration of these in the last half of his video with vectorscope representations in the primary colors showing the hue rotations and saturation changes…he plays them in sequence at the end of the video…I guess you could model on those for a reasonable approximation…

There are LUTs available here to get very close to Fuji’s jpgs

Ya there are a few places where people have created some.

Great article here on them

https://www.imaging-resource.com/news/2020/08/18/fujifilm-film-simulations-definitive-guide