From a915ef67294ba737ce8ca522d5f1c964edfcfcdc Mon Sep 17 00:00:00 2001 From: masayume_ht <1936714878@qq.com> Date: Tue, 6 Jun 2023 10:01:24 +0800 Subject: [PATCH] =?UTF-8?q?3360=E5=8F=91=E5=B8=83=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- huagao/Device/G400ScanConfig.cpp | 1 + huagao/Device/G400ScanConfig.h | 3 ++- huagao/Device/GScanO1003399.cpp | 16 ++++++++++------ huagao/Device/GScanO400.cpp | 3 ++- huagao/stdafx.h | Bin 28782 -> 28782 bytes 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/huagao/Device/G400ScanConfig.cpp b/huagao/Device/G400ScanConfig.cpp index 05453221..0cabb011 100644 --- a/huagao/Device/G400ScanConfig.cpp +++ b/huagao/Device/G400ScanConfig.cpp @@ -28,6 +28,7 @@ G400ScanConfig::G400ScanConfig(GScanCap& gcap) #endif// G300 cfg.params.dstHeight = (int)((size.cy+200)/100); cfg.params.sizedetect = gcap.en_sizecheck; + //cfg.params.slow_moire = true; cfg.params.reversed1 = cfg.params.reversed2 = cfg.params.lutmode = 0; } diff --git a/huagao/Device/G400ScanConfig.h b/huagao/Device/G400ScanConfig.h index 6c8f866f..ce799a42 100644 --- a/huagao/Device/G400ScanConfig.h +++ b/huagao/Device/G400ScanConfig.h @@ -19,7 +19,8 @@ public: unsigned int enableLed : 1; unsigned int sizedetect : 1; unsigned int lutmode : 1; - unsigned int reversed1 : 4; + unsigned int slow_moire : 1; + unsigned int reversed1 : 3; unsigned int isCorrect : 1; unsigned int dstHeight : 8; unsigned int reversed2 : 6; diff --git a/huagao/Device/GScanO1003399.cpp b/huagao/Device/GScanO1003399.cpp index 960679ae..1dbc4a0e 100644 --- a/huagao/Device/GScanO1003399.cpp +++ b/huagao/Device/GScanO1003399.cpp @@ -672,12 +672,12 @@ void GScanO1003399::start() CryptoPP::StringSink* str_encode = new CryptoPP::StringSink(encoded); CryptoPP::HexEncoder* hex_encode = new CryptoPP::HexEncoder(str_encode); CryptoPP::StringSource* source_cipher = new CryptoPP::StringSource(cipher, true, hex_encode); - free(str_cip); - free(ecb_filter); - free(source_plain); - free(str_encode); - free(hex_encode); - free(source_cipher); + delete str_cip; + delete ecb_filter; + delete source_plain; + delete str_encode; + delete hex_encode; + delete source_cipher; scanner_write_reg(m_usb, SR_DECODE_TOKEN, encoded.length()); m_usb->write_bulk(&encoded[0], encoded.length()); m_token = "null"; @@ -914,6 +914,10 @@ void GScanO1003399::imgproce(std::shared_ptr>& buff) { CImageApplyColorRecognition(m_param.automaticcolortype == 1 ? CImageApplyColorRecognition::ColorRecognitionMode::Color_Gray : CImageApplyColorRecognition::ColorRecognitionMode::Color_Mono).apply(mats,m_param.is_duplex); } + //for (auto& node : mats) + //{ + // cv::putText(node, "Top left", cv::Point(100, 100), CV_FONT_HERSHEY_SIMPLEX, 2, cv::Scalar(0, 0, 255), 4, 8); + //} if (m_param.is_split) { if (!is_back) diff --git a/huagao/Device/GScanO400.cpp b/huagao/Device/GScanO400.cpp index 8083ed4e..9281763e 100644 --- a/huagao/Device/GScanO400.cpp +++ b/huagao/Device/GScanO400.cpp @@ -783,12 +783,13 @@ void GScanO400::usbmain() if (autopaper_stop) break; } + UpdateScanInfo(L" "); if (sw_p.elapsed_s() < gcap.autopaper_timeout && (!autopaper_stop)) break; else { autopaper_stop = true; } - UpdateScanInfo(L" "); + } m_pImages->setscanflags(false); std::this_thread::sleep_for(std::chrono::milliseconds(500)); diff --git a/huagao/stdafx.h b/huagao/stdafx.h index 26d8a9c5037f5922d1909cbd806b003dec2941f0..c6cf74ddfdaf1b7f3d909f7a8ba8ca8225ebfc06 100644 GIT binary patch delta 24 gcmaF&fbrb}#tkhTti}um3(^b delta 24 gcmaF&fbrb}#tkhTtR@Tw3