通过OpenCV,制作一个有关图像处理的在Linux下的软件。
制作可以自动处理图像亮度的简单软件。
算法思想就是给每个像素加上一个固定的值来改变亮度。但是对于不同的图片效果就不是很好,最好是把代码中两行解注释利用手动调节的方法来完成。
开发环境:CodeBlocks
#include <iostream>
#include <string>
#include <opencv2/core/core.hpp>
#include<opencv2/highgui/highgui.hpp>
#include<opencv2/imgproc/imgproc.hpp>
using namespace cv;
using namespace std;
static void ContrastAndBright(int, void*);
int g_BrightValue = 37;
Mat g_srcImage, g_dstImage;
int main(int argc, char *argv[])
{
string filename;
cout << "Please input file name:&#