answered Aug 21 '12
Use the compareHistogram function. See,
http://docs.opencv.org/doc/tutorials/imgproc/histograms/histogram_comparison/histogram_comparison.html