1 #include <opencv2/opencv.hpp> 2 #include <iostream> 3 #include <math.h> 4 5 using namespace cv; 6 using namespace std; 7 8 9 int main(int argc, char** argv) 10 { 11 Mat src,src_gray,dst; 12 //src = imread("3 input.bmp"); 13 src = imread("test.jpg"); 14 15 imshow("原图像", src); 16 cvtColor(src, src_gray, COLOR_BGR2GRAY); 17 18 //直方图均衡化 19 equalizeHist(src_gray, dst); 20 21 22 imshow("效果图", dst); 23 24 waitKey(0); 25 return 0; 26 27 }
原文地址:https://www.cnblogs.com/long5683/p/9692382.html
时间: 2024-10-10 01:38:41