1)void histogram_eq_demo(Mat& image);
2)void ColorInvert::histogram_eq_demo(Mat& image)
{
Mat gray;
cvtColor(image, gray, COLOR_BGR2GRAY);
imshow("灰度图像", gray);
Mat dst;
equalizeHist(gray, dst);
imshow("直方图均衡化演示", dst);
}
3)显示如下: