OpenCV  3.4.4
Open Source Computer Vision
samples/cpp/demhist.cpp

An example for creating histograms of an image