Gamut mapping compression curves

There should not be real surprise that by fiddling with the parametrisation the curves will eventually produce an output relatively similar for a given domain, they all share the sigmoid trait.

The good function is the one that preserves purity at the highest possible limit, i.e. not a small domain, while being free of defects.

I’m tempted to say that if anything, your images show that tanh is almost ideal over a small distance :yum:

C2 continuity will guarantee identical curvature at the graft point which prevents steep slope from the function you are appending. B-Splines are C2 continuous so as mentioned somewhere above we could also look into that but I don’t feel like it is warranted and it would certainly complexify the implementation.

Something to keep in mind is that the numbers I gave above (along those extended by @JamesEggleton) are for HalfFloat computations thus it is extreme case scenario as high quality image processing will happen with at least single-precision 32-bit representation. There are of course real-time applications that use HalfFloat happily for processing but in the context of this group this is no-concern.

I will re-run the notebook with Float32, hopefully the Colab VM does not run out of ram :smile: