I have not understood all of your message. Below I describe how you can find the functions that HistogramTransform
uses.
image = ExampleData[{"TestImage", "Lena"}];
HistogramTransform[image]
Find the corresponding functions, plot them, and apply them to the image, and get the same result as HistogramTransform
:
{rfunc, gfunc, bfunc} = HistogramTransformInterpolation[image]
Plot[{Quiet@rfunc[t], Quiet@gfunc[t], Quiet@bfunc[t]}, {t, 0, 1}, PlotLegends -> {"R", "G", "B"}]
MapThread[ ImageApply, {{rfunc, gfunc, bfunc}, ColorSeparate[image]}] // ColorCombine