From 1c30e8bf3a70018aa8097b07f2783ad84b2be278 Mon Sep 17 00:00:00 2001 From: 13038267101 Date: Fri, 7 Jul 2023 18:54:27 +0800 Subject: [PATCH] =?UTF-8?q?dsp=E6=97=8B=E8=BD=AC=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hgdriver/hgdev/image_process.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hgdriver/hgdev/image_process.cpp b/hgdriver/hgdev/image_process.cpp index 2a62779..21f8c4c 100644 --- a/hgdriver/hgdev/image_process.cpp +++ b/hgdriver/hgdev/image_process.cpp @@ -546,6 +546,14 @@ namespace hg_imgproc else mats_.push_back(Temp_mat[0]); } + if (mats_.size() % 2 == 0 + && ((CImageApplyRotation::RotationType)img_conf_.imageRotateDegree == CImageApplyRotation::RotationType::Rotate_90_clockwise + || (CImageApplyRotation::RotationType)img_conf_.imageRotateDegree == CImageApplyRotation::RotationType::Rotate_90_anti_clockwise)) + { + cv::flip(mats_[1], mats_[1], 0); + cv::flip(mats_[1], mats_[1], 1); + } + } else @@ -946,14 +954,6 @@ namespace hg_imgproc Rotation.apply(mats,img_conf_.is_duplex); mats_ = mats; - if (mats_.size() % 2 == 0 - && ((CImageApplyRotation::RotationType)img_conf_.imageRotateDegree == CImageApplyRotation::RotationType::Rotate_90_clockwise - || (CImageApplyRotation::RotationType)img_conf_.imageRotateDegree == CImageApplyRotation::RotationType::Rotate_90_anti_clockwise)) - { - cv::flip(mats_[1], mats_[1],0); - cv::flip(mats_[1], mats_[1], 1); - } - if (mats_.empty()) { return SCANNER_ERR_NO_DATA;