When originally implementing the saturation adjustment in Rawstudio, we did it pretty simple. We do the transformation in HSV-space, so it is pretty easy to adjust saturation here. Up until now we simply multiplied the saturation value of the pixel with the selected saturation.
If we look at it visually, here is an unadjusted image:
We apply some saturation, and here is the result:
When switching between two images, you will probably notice that some areas are becoming fully saturated, while other parts of the image are hardly affected. So we started out by looking for a new algorithm, that would not give these artefacts. Let’s look at a graph displaying input (x-axis) and output (y-axis):
Blue: Unadjusted saturation.
Red: Old saturation adjustment.
Black: New saturation adjustment.
The blue line is unadjusted saturation. If we raise the saturation value, the red line shows what happens if you use the old algorithm, with a saturation value of 1.4. Raising saturation more will simply make the line steeper. What we see is that values are quite easily saturated. In this example, all input values higher than 0.7 are fully saturated.
The new algorithm applies saturation much gentler and avoids saturating areas that already have a high saturation value. If we look at the image above with the new algorithm applied, it looks like this:
Hopefully you will agree that this is a much more optimal result – the reds are not completely burnt out, while the same amount of saturation is applied to the rest of the image. In my experience the new algorithm is also much better at handling skin-tones, which had a tendency to easily burn out. But try it out yourself, and post your feedback below.