diff --git a/hgdriver/hgdev/image_process.cpp b/hgdriver/hgdev/image_process.cpp index e3b116a..147bcf3 100644 --- a/hgdriver/hgdev/image_process.cpp +++ b/hgdriver/hgdev/image_process.cpp @@ -523,7 +523,7 @@ namespace hg_imgproc float vratio = 0.0; float hratio = 0.0; - //cv::imwrite("C:\\image\\imdecode" + std::to_string(img_idx++) + ".jpg", mat); + cv::imwrite("C:\\image\\imdecode" + std::to_string(img_idx++) + ".jpg", mat); int dpi = param_.dpi == 600 ? 3 : (param_.dpi < 599 && param_.dpi >= 300) ? 2 : 1; int mode = param_.color_mode == COLOR_MODE_24_BITS ? 1 : 0; for (auto it : correction_image_map_) @@ -1767,8 +1767,8 @@ namespace hg_imgproc } -#define GAMMA_EX 1.7f -#define BLACK_OFFSET 0 +#define GAMMA_EX 2.0f +#define BLACK_OFFSET 8 void fittingLUT(const std::vector& points, unsigned char min_value, unsigned char max_value, unsigned char* data) { @@ -1784,7 +1784,7 @@ namespace hg_imgproc float temp; for (int j = 0, length = (255 - b + 1); j < length; j++) { - temp = tb + step * j;// gamma(tb + step * j, GAMMA_EX) - BLACK_OFFSET; + temp = gamma(tb + step * j, GAMMA_EX) - BLACK_OFFSET;//tb + step * j;// data[j + b] = (cv::min)(255, (cv::max)(0, static_cast(temp))); } }