From 21c0ddec8f7740d1924c33dc5ca37d6ee93218c1 Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Wed, 6 Dec 2023 14:40:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E4=BB=B6=E5=8D=8F=E8=AE=AE=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=98=B2=E6=B8=97=E9=80=8F=E7=AD=89=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/common_setting.h | 1 + hgdriver/hgdev/hg_scanner.cpp | 14 ++------------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/hgdriver/hgdev/common_setting.h b/hgdriver/hgdev/common_setting.h index 398e333..beed805 100644 --- a/hgdriver/hgdev/common_setting.h +++ b/hgdriver/hgdev/common_setting.h @@ -622,6 +622,7 @@ typedef struct _scan_conf double discare_meanth; /**< 调过空白页文稿底色阈值>*/ bool en_contaminationdetection; /**< 脏污检测使能>*/ bool detect_size_diascard_blank; /**< 基于压缩图像大小跳过空白页使能*/ + int refuseInflow_level; /**< 防止渗透等级*/ uint32_t reserve[1024]; /**< 预留4096字节做协议扩展*/ }SCANCONF ,*LPSCANCONF; //图像参数设置 -OVER diff --git a/hgdriver/hgdev/hg_scanner.cpp b/hgdriver/hgdev/hg_scanner.cpp index 0857bb6..3b5898c 100644 --- a/hgdriver/hgdev/hg_scanner.cpp +++ b/hgdriver/hgdev/hg_scanner.cpp @@ -5349,18 +5349,7 @@ void hg_scanner::image_process(std::shared_ptr& buffer, uint32_t id 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 - - 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; + int lv = image_prc_param_.bits.is_permeate_lv_ * 10 + 20; //image_prc_param_.bits.is_permeate_lv_ = 0 1 2 3 4 hg_imgproc::antiInflow(ImagePrc_pHandle_, lv); (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.isfillcolor = is_color_fill; ic.refuseInflow = image_prc_param_.bits.is_permeate; + ic.refuseInflow_level = image_prc_param_.bits.is_permeate_lv_ * 10 + 20; ic.colorCorrection = 0; ic.removeMorr = image_prc_param_.bits.remove_morr; ic.errorExtention = image_prc_param_.bits.error_extention;//