固件协议增加防渗透等级

This commit is contained in:
yangjiaxuan 2023-12-06 14:40:21 +08:00
parent 3ce9a65ae6
commit 21c0ddec8f
2 changed files with 3 additions and 12 deletions

View File

@ -622,6 +622,7 @@ typedef struct _scan_conf
double discare_meanth; /**< 调过空白页文稿底色阈值>*/ double discare_meanth; /**< 调过空白页文稿底色阈值>*/
bool en_contaminationdetection; /**< 脏污检测使能>*/ bool en_contaminationdetection; /**< 脏污检测使能>*/
bool detect_size_diascard_blank; /**< 基于压缩图像大小跳过空白页使能*/ bool detect_size_diascard_blank; /**< 基于压缩图像大小跳过空白页使能*/
int refuseInflow_level; /**< 防止渗透等级*/
uint32_t reserve[1024]; /**< 预留4096字节做协议扩展*/ uint32_t reserve[1024]; /**< 预留4096字节做协议扩展*/
}SCANCONF ,*LPSCANCONF; }SCANCONF ,*LPSCANCONF;
//图像参数设置 -OVER //图像参数设置 -OVER

View File

@ -5349,18 +5349,7 @@ void hg_scanner::image_process(std::shared_ptr<tiny_buffer>& buffer, uint32_t id
if ((img_conf_.refuseInflow) && (pid_ != 0x239 && pid_ != 0x439)) if ((img_conf_.refuseInflow) && (pid_ != 0x239 && pid_ != 0x439))
{ {
int lv = image_prc_param_.bits.is_permeate_lv_; //image_prc_param_.bits.is_permeate_lv_ = 0 1 2 3 4 int lv = image_prc_param_.bits.is_permeate_lv_ * 10 + 20; //image_prc_param_.bits.is_permeate_lv_ = 0 1 2 3 4
if (0 == lv)
lv = 20;
else if (1 == lv)
lv = 30;
else if (2 == lv)
lv = 40;
else if (3 == lv)
lv = 50;
else if (4 == lv)
lv = 60;
hg_imgproc::antiInflow(ImagePrc_pHandle_, lv); hg_imgproc::antiInflow(ImagePrc_pHandle_, lv);
(this->*dump_img_)(ImagePrc_pHandle_, "antiInflow"); (this->*dump_img_)(ImagePrc_pHandle_, "antiInflow");
@ -5597,6 +5586,7 @@ int hg_scanner::image_configuration(SCANCONF& ic)
ic.is_autotext = image_prc_param_.bits.text_direction == TEXT_DIRECTION_AUTO ? 1 : 0; ic.is_autotext = image_prc_param_.bits.text_direction == TEXT_DIRECTION_AUTO ? 1 : 0;
ic.isfillcolor = is_color_fill; ic.isfillcolor = is_color_fill;
ic.refuseInflow = image_prc_param_.bits.is_permeate; ic.refuseInflow = image_prc_param_.bits.is_permeate;
ic.refuseInflow_level = image_prc_param_.bits.is_permeate_lv_ * 10 + 20;
ic.colorCorrection = 0; ic.colorCorrection = 0;
ic.removeMorr = image_prc_param_.bits.remove_morr; ic.removeMorr = image_prc_param_.bits.remove_morr;
ic.errorExtention = image_prc_param_.bits.error_extention;// ic.errorExtention = image_prc_param_.bits.error_extention;//