From 9e5dad553180f1537762256eb84fea3128b238dd Mon Sep 17 00:00:00 2001 From: "mo1027728827@qq.com" Date: Fri, 10 Jun 2022 17:44:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E8=A3=81=E5=88=87=E7=9A=84=E6=8E=A7=E4=BB=B6=E4=BA=92=E6=96=A5?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E8=B7=B3=E8=BF=87=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E9=A1=B5=E5=9B=A0=E4=B8=BA=E6=8A=98=E5=8F=A0=E8=BF=87=E7=9A=84?= =?UTF-8?q?=E7=BA=B8=E5=BC=A0=E8=80=8C=E8=B7=B3=E4=B8=8D=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/hg_scanner_239.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/hgdriver/hgdev/hg_scanner_239.cpp b/hgdriver/hgdev/hg_scanner_239.cpp index 596031e..f3b0559 100644 --- a/hgdriver/hgdev/hg_scanner_239.cpp +++ b/hgdriver/hgdev/hg_scanner_239.cpp @@ -843,7 +843,7 @@ else ic.is_autocontrast = 0; //无参数 ic.is_autocrop = (ic.papertype == TwSS::None || ic.papertype ==TwSS::USStatement); ic.is_autodiscradblank_normal = image_prc_param_.bits.page == PAGE_OMIT_EMPTY; - ic.discardblank_percent = omit_empty_level_ >= 60 ? 60 : omit_empty_level_; //默认20 + ic.discardblank_percent = omit_empty_level_ >= 70 ? 70 : omit_empty_level_; ic.is_autodiscradblank_vince = image_prc_param_.bits.page == PAGE_OMIT_EMPTY_RECEIPT; ic.is_switchfrontback = image_prc_param_.bits.exchange; ic.autodescrew = image_prc_param_.bits.automatic_skew; @@ -886,7 +886,7 @@ else ic.errorExtention = image_prc_param_.bits.error_extention ;// ic.textureRemove = image_prc_param_.bits.remove_txtture;// ic.splitImage = image_prc_param_.bits.split; - +{ ic.cropRect.enable = custom_area_; int height = (custom_area_br_y_ *ic.resolution_dst) /25.4 - (custom_area_lt_y_ *ic.resolution_dst /25.4); int width = (custom_area_br_x_ *ic.resolution_dst) /25.4 - (custom_area_lt_x_ *ic.resolution_dst /25.4); @@ -894,7 +894,7 @@ else ic.cropRect.width = width; ic.cropRect.x = custom_area_lt_x_ *ic.resolution_dst /25.4; ic.cropRect.y = custom_area_lt_y_ *ic.resolution_dst /25.4; - +} ic.multiOutput = (MultiOutput)image_prc_param_.bits.multi_out; ic.normalCrop = image_prc_param_.bits.dark_sample; ic.dogeardistabce = fractate_level_; @@ -929,9 +929,6 @@ else ||image_prc_param_.bits.paper == PAPER_MAX_SIZE ||image_prc_param_.bits.paper == PAPER_MAX_SIZE_CLIP ||image_prc_param_.bits.paper == PAPER_TRIGEMINY - ||image_prc_param_.bits.paper == PAPER_16K - ||image_prc_param_.bits.paper == PAPER_8K - ||image_prc_param_.bits.paper == PAPER_16K_LATERAL ) { ic.cropRect.enable = false; @@ -1567,8 +1564,8 @@ void hg_scanner_239::thread_handle_usb_read(void) LOG_INFO(LOG_LEVEL_DEBUG_INFO, "received 'STOPSCAN' message in usb thread, check remaining image and finish scanning ...\n"); // fetch all buffered images and exit ... - while(!is_dev_image_process_done()) - std::this_thread::sleep_for(std::chrono::milliseconds(30)); + //while(!is_dev_image_process_done()) + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); while (get_image_count() > 0) {