Hi everybody,
I'm working on a method to extend Edoardo's method, but allowing to set a black-point (-ish) to your image.
Now... a normal HT is composed by two steps:
- Map the input range [0,1] to the output range [x_low, x_high]. This can be done with the function
- Apply the MidtonesTransferFunction (MTF) to the mapped values. I.e.:
As Alex was saying, the problem with this procedure is the f(x) is not invertible due to the "hard" min-max operation. This is what makes a normal HT irreversible.
Edoardo's solution was therefore to skip this step, and perform only the midtones stretch.
The problem I (and others, judging the comments below Edoardo's youtube video) are having, is that if your background is not dark enough, stretching only the midtones causes a non-negligible stretch to the background too, turning the whole image white-ish.
A solution I'm working to is to "smooth" the min-max clipping operation, using a modified softplus function.
This function is fully invertible, even for x<x_low (where x_low is the shadow clipping value).
At the moment the problem I'm having is that tuning the shadow clipping value and the midtones value using this modified function can be tricky. These values can't be directly copied from the STF as the softplus makes some adjustments required. At the same time, without a live-preview and/or a live histogram preview, tuning these requires a lot of iterations.
Is there someone that would be interested in helping me bringing this approach forward?
PS: at the moment I'm not modifying the highlights clipping point. For this reason I do not need a second "smoothing" at the upper kink. However the softplus equation can be modified to turn it into a "pseudo" sigmoid with a second horizontal asymptote at y=1. Only, the math will become slightly trickier.