#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
#include <stdio.h>
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{
Mat src, dst;
VideoCapture cap(0);
while (1)
{
cap >> src;
dst = src.clone();
/// Convert to grayscale
cvtColor(src, src, CV_BGR2GRAY);
/// Apply Histogram Equalization
equalizeHist(src, dst);
/// Display results
namedWindow("Original image", CV_WINDOW_AUTOSIZE);
namedWindow("equalized_window", CV_WINDOW_AUTOSIZE);
imshow("Original image", src);
imshow("equalized_window", dst);
if (waitKey(30) == 27)
break;
}
return 0;
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น