402亮度对比度不生效

This commit is contained in:
13038267101 2023-03-23 15:42:59 +08:00
parent 4c0dfa674d
commit ea065c66c3
2 changed files with 4 additions and 4 deletions

View File

@ -1687,7 +1687,7 @@ int hg_scanner::setting_bright(void* data)
ret = SCANNER_ERR_NOT_EXACT;
*((int*)data) = bright_;
}
VLOG_MINI_1(LOG_LEVEL_WARNING, "bright_ = %d\r\n", bright_);
return ret;
}
int hg_scanner::setting_contrast(void* data)
@ -1700,7 +1700,7 @@ int hg_scanner::setting_contrast(void* data)
ret = SCANNER_ERR_NOT_EXACT;
*((int*)data) = contrast_;
}
VLOG_MINI_1(LOG_LEVEL_WARNING, "contrast_ = %d\r\n", contrast_);
return ret;
}
int hg_scanner::setting_gamma(void* data)

View File

@ -918,13 +918,13 @@ namespace hg_imgproc
//VLOG_MINI_4(LOG_LEVEL_DEBUG_INFO, "adjust_color: table len = %d, brightness = %f, contrast = %f, gamma = %f\n", tableLength
// , img_conf_.brightness, img_conf_.contrast, img_conf_.gamma);
if(gamma_table && tableLength)
if (gamma_table && tableLength)
{
CImageApplyCustomGamma gamme(gamma_table, tableLength);
gamme.apply(mats, img_conf_.is_duplex);
}
else if(pid_ != 0x0402 && pid_ != 0x0239 && pid_ != 0x439 && pid_ != 0x0302 && pid_ != 0x0139)
else if (pid_ != 0x0239 && pid_ != 0x439 && pid_ != 0x0139)
{
if (img_conf_.brightness != 128 ||img_conf_.contrast != 4 || ((img_conf_.gamma < (1.0f - 1e-2)) || (img_conf_.gamma > (1.0f + 1e-2))) )