How to create distribution function from sketch? I'm playing with image manipulation based on various mathematical algorighms (such as edge detection).

I'm also changing the colors in various ways just to see what comes out of it. Regarding this, I usually need to find good consequent function for the value distribution - disconsequent functions provide ugly results.
For example, I wanted to distribute lightness as following (drawn in inkscape):

This would enhance high values and suppress the small ones, which is good for edge detection.
But I can't figure this function out. Is there an universal solution to aproximate any sketched function by real function?
Note that I don't care how does the resulting function behave outside my region of <0, 1>.
So far, I'm distributing the values only using $x^n$ where $n$ is constant greater than 0.
 A: On the one hand, I feel that your question is almost too general for math.se, but on the other hand I also think it is a fairly interesting one! In the following, I will provide some basic ideas regarding your question (just enough so that you will be able to research further on your own!) and also provide a suggestion for your particular case.
The question you ask is the following:  "Is there an universal solution to aproximate any sketched function by real function?"
This can be formalized as follows: You have a set of tuples $(x_i, y_i), i=0,\dotsc,n$ (which in case of a sketch would be many!) and want to define a function $f$ such that $f(x_i) \approx y_i$. One way to do this is by interpolation, this means that you are actually looking for a function $f$ such that $f(x_i) = y_i$ holds exactly $\forall i$. For example, there exists exactly one polynomial of degree $n$ which interpolates your points. This is instable though for high $n$. Another simple way, would be to just linearly interpolate between your points. To produce a smoother interpolating function you can also use splines of higher order.
Another way to do this, is by means of approximation theory. You usually define a parametric form for your function and then try to find the parameters which minimize a particular error measure, often the sums of squares.
Of course, in your particular case, you are actually looking for a distribution function whose support lies in $[0,1]$. For example this means that your tuples include $(0,0), (1,1)$ and your function is not decreasing. In order to estimate a distribution functions a variety of methods exist (e.g.the empirical CDF). These methods though usually assume that you have random points which were generated from these distributions rather than the $(x_i,y_i)$ tuples. Still here you could use non-linear least squares with parametric assumptions on the form of your distribution function.
For your case there actually exists an interesting result, if you are willing to further assume that your distribution function has a continuous density on $[0,1]$. In this case, (see Theorem 1 in  Diaconis, Persi, and Donald Ylvisaker. "Quantifying prior opinion." Bayesian statistics 2 (1985): 133-156.) the density can be approximated to an arbitrary precision by a mixture of densities of Beta distributions. Hence this is also the case for the distribution function. Thus, using a mixture of Beta distribution, you should be able to approximate any distribution you sketch on $[0,1]$.
This actually brings me to the actual answer: I think for your use case, it might be enough to experiment with a single Beta distribution. Then you would just have to play around with two parameters. (Have a look at the different shapes the Beta distribution function can take in the figures of the Wikipedia article.) As a matter of fact, the $x^n$ you have been using is a special case of the Beta distribution, namely $B(n+1,1)$.
I hope this helps!
