#include <opencv2/opencv.hpp>
#include <iostream>
#include <math.h>
using namespace cv;
Mat src, dst, map_x, map_y;
const char* OUTPUT_TITLE = "remap demo";
int index = 0;
void update_map(void);
int main(int argc, char** argv) {
src = imread(".//pic//kate.png");
if (!src.data) {
printf("can not load image...\n");
return -1;
}
char input_win[] = "input image";
namedWindow(input_win, CV_WINDOW_AUTOSIZE);
//转成灰度图
cvtColor(src, src, CV_BGR2GRAY);
imshow(input_win, src);
equalizeHist(src, dst);
imshow("均衡化", dst);
waitKey(0);
return 0;
}