diff --git a/build/CMakeFiles/app0.dir/CXX.includecache b/build/CMakeFiles/app0.dir/CXX.includecache index 13a65a2..69a4c34 100644 --- a/build/CMakeFiles/app0.dir/CXX.includecache +++ b/build/CMakeFiles/app0.dir/CXX.includecache @@ -11,6 +11,10 @@ opencv2/opencv.hpp /home/zara/WORKSPACE/CPP/app0/opencv2/opencv.hpp iostream - +time.h +- +fstream +- /usr/include/opencv4/opencv2/calib3d.hpp opencv2/core.hpp diff --git a/build/CMakeFiles/app0.dir/main.cpp.o b/build/CMakeFiles/app0.dir/main.cpp.o index a4e4fe6..ef4c683 100644 Binary files a/build/CMakeFiles/app0.dir/main.cpp.o and b/build/CMakeFiles/app0.dir/main.cpp.o differ diff --git a/build/app0 b/build/app0 index 5325608..dedd7c5 100755 Binary files a/build/app0 and b/build/app0 differ diff --git a/main.cpp b/main.cpp index 223bac9..24c04bd 100644 --- a/main.cpp +++ b/main.cpp @@ -2,23 +2,52 @@ #include -int main(){ - cv::VideoCapture cap(0); - std::cout<<"isdfjodjfio"< + +#include + +void reMap(cv::Mat src, cv::Mat dst, cv::Mat gray, cv::Mat hist) +{ + for (int i = 0; i < src.rows * src.cols; i++) { - cv::imshow("default",image); - writer.write(image); - if(cv::waitKey(20) == 'q'){ - break; + if (gray.data[i] == 0) + { + dst.data[i * 3] = 0; + dst.data[i * 3 + 1] = 0; + dst.data[i * 3 + 2] = 0; } - if(i++>100){ - break; + else + { + dst.data[i * 3] = src.data[i * 3] * hist.data[i] / gray.data[i]; + dst.data[i * 3 + 1] = src.data[i * 3 + 1] * hist.data[i] / gray.data[i]; + dst.data[i * 3 + 2] = src.data[i * 3 + 2] * hist.data[i] / gray.data[i]; } - std::cout<<"i = "<