HistogramTransformInterpolation[{data1,data2,…,datan},ref] finds a function so that the transformed datasets would have nearly the same distribution as a reference dataset or image ref. If ref is an image it should have either 1 or n channels.