#include <iostream>
#include <iomanip>
#include<opencv2//opencv.hpp>
using namespace std;
using namespace cv;
//函数adjustBrightness用于图片增加亮度
void adjustBrightness(cv::Mat& image, int targetBrightness) {
// 获取图像的通道数
int channels = image.channels();
// 计算调整亮度的因子
float factor = 1.0f;
if (targetBrightness > 0) {
factor = static_cast<float>(targetBrightness) / 255.0f;
}
else if (targetBrightness < 0) {
factor = 255.0f / static_cast<float>(255 - std::abs(targetBrightness));
}
// 遍历图像的每个像素
for (int i = 0; i < image.rows; ++i) {
for (int j = 0; j < image.cols; ++j) {
// 获取像素值
cv::Vec3b& pixel = image.at<cv::Vec3b>(i, j);
//