调整7010色彩问题

This commit is contained in:
13038267101 2023-10-25 18:42:34 +08:00
parent e6080d803f
commit c4bb56fc79
1 changed files with 4 additions and 4 deletions

View File

@ -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<unsigned char>& 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<int>(temp)));
}
}