I was editing an image by increasing the contrast. For this I used the formula $(\tanh(\mathtt{CONTRAST\_FACTOR}*(x-0.5))+1)/2$ This formula has limits at 0 and 1, with y=0.5 at x=0.5.
The problem for my situation is that y is only limited between 0 and 1, but I want a formula that has the following properties:
- the curve is continuous (at least between 0 and 1)
- the line goes through $(0,0)$, $(0.5,0.5)$ and $(1,1)$
- I want a constant (like contrast factor above) that can influence the slope around $(0.5,0.5)$, which basically determine the curviness.
Does anyone know a formula like that?