转载来自:http://blog.csdn.net/yeyang911/article/details/22752935
#include <opencv2\imgproc\imgproc.hpp>
#include <opencv2\highgui\highgui.hpp>
#include <opencv2\core\core.hpp>
#include <iostream>
#include <math.h>
using namespace cv;
using namespace std;
void main()
{
Mat I;
I = imread("D:\\ymrf\\enhance\\paper\\test_img\\flower.jpg",0);
int height = I.rows;
int width = I.cols;
namedWindow("原始图像", 0);
imshow("原始图像", I);
Ptr<CLAHE> clahe = createCLAHE();
Mat dst;
clahe->apply(I, dst);
namedWindow("dst",0);
imshow("dst", dst);
waitKey(0);
}
实验结果: