This post is still work in progress!!!
----------------
Introduction
This post describes the new shadows/highlights adjustment tool that I have introduced in PhotoFlow, and gives some implementation details in case someone would like to port the code to some other image editor.
The shadows/highlights adjustment can be split in the following steps:
The shadows/highlights adjustment can be split in the following steps:
- the input pixels are converted from linear RGB to log grayscale, to create a log-luminance (LL) mask:
LL = log10(lumi(RGB)) - the LL mask is blurred with a guided filter pyramid (more on this below)
- the blurred LL mask is tone-mapped with an analytical function that rises the shadows and lowers the highlights (more on this below); an anchor parameter allows to define the splitting point between shadows and highlights regions
- the input RGB values are linearly scaled by the ratio of the blurred LL mask after/before the tone mapping