Function skeleton of histogram equalization