I haven't done this stuff in a while.
If I have an image $I$ I can equalize the histogram of the image using some opencv procedure, it's already defined. Equalizing an histogram means essentially to construct a function such that applied to each pixel $p \in I$ the new value it's like it had been sampled from a uniform distribution, assuming gray scale image for such explanation.
I don't remember if what I want to do has a specific name, but I kind of remember it was possible, but suppose I have a gaussian distribution (instead of a uniform one), say $\mathcal{N}(0,\Sigma)$, and I want to re-distribute the colors according to such distribution.
Is there a way to do this in opencv?