diff --git a/huagao/Device/GScanO200.cpp b/huagao/Device/GScanO200.cpp index 1de02f7b..7a419161 100644 --- a/huagao/Device/GScanO200.cpp +++ b/huagao/Device/GScanO200.cpp @@ -713,7 +713,7 @@ std::shared_ptr> GScanO200::Get_Img_Data(int bufferSize) int startindex = 0; while (totalength > 0) { - int dstlength = 1024 * 1024; + int dstlength = 512 * 1024; if (totalength <= dstlength) { dstlength = totalength; diff --git a/huagao/ImageProcess/ImageApplyAutoCrop.cpp b/huagao/ImageProcess/ImageApplyAutoCrop.cpp index b929ab0e..8df60464 100644 --- a/huagao/ImageProcess/ImageApplyAutoCrop.cpp +++ b/huagao/ImageProcess/ImageApplyAutoCrop.cpp @@ -54,10 +54,6 @@ void CImageApplyAutoCrop::apply(cv::Mat& pDib, int side) if (m_maxContour.size() == 0) { - thre.release(); -#ifdef LOG - FileTools::write_log("imgprc.txt", "exit CImageApplyAutoCrop apply"); -#endif // LOG return; } thre.release(); diff --git a/huagao/ImageProcess/ImageApplyRotation.cpp b/huagao/ImageProcess/ImageApplyRotation.cpp index 8e8db5aa..801fcc02 100644 --- a/huagao/ImageProcess/ImageApplyRotation.cpp +++ b/huagao/ImageProcess/ImageApplyRotation.cpp @@ -91,12 +91,12 @@ void CImageApplyRotation::apply(cv::Mat & pDib, int side) if (m_rotation == RotationType::Rotate_90_clockwise || m_rotation == RotationType::Rotate_90_anti_clockwise) //90�� -90�� { transpose(pDib, pDib); - flip(pDib, pDib, m_rotation == RotationType::Rotate_90_clockwise ? 1 : 0); + flip(pDib, pDib, m_rotation == RotationType::Rotate_90_clockwise ? 0 : 1); } else { - flip(pDib, pDib, 0); flip(pDib, pDib, 1); + flip(pDib, pDib, 0); } } } @@ -105,7 +105,7 @@ void CImageApplyRotation::apply(cv::Mat & pDib, int side) if (m_rotation == RotationType::Rotate_90_clockwise || m_rotation == RotationType::Rotate_90_anti_clockwise) //90�� -90�� { transpose(pDib, pDib); - flip(pDib, pDib, m_rotation == RotationType::Rotate_90_clockwise ? 0 : 1); + flip(pDib, pDib, m_rotation == RotationType::Rotate_90_clockwise ? 1 : 0); } else if (m_rotation == RotationType::Rotate_180) { diff --git a/huagao/huagaods.cpp b/huagao/huagaods.cpp index 6d2b07c8..9d55c516 100644 --- a/huagao/huagaods.cpp +++ b/huagao/huagaods.cpp @@ -850,9 +850,19 @@ Result HuagaoDs::identityOpenDs(const Identity&) { m_caps[CapType::UiControllable] = std::bind(oneValGet, _1, _2, Bool(true)); m_query[CapType::DeviceOnline] = msgSupportGetAll; - m_caps[CapType::DeviceOnline] = std::bind(enmGet, _1, _2, Bool(scanner->IsConnected())); - + //m_caps[CapType::DeviceOnline] = std::bind(enmGet, _1, _2, Bool(scanner->IsConnected())); + m_caps[CapType::DeviceOnline] = [this](Msg msg, Capability& data) -> Result { + switch (msg) { + case Msg::Get: + case Msg::GetCurrent: + case Msg::GetDefault: + data = Capability::createOneValue((Twpp::Bool)scanner->IsConnected()); + return {}; + default: + return { ReturnCode::Failure, ConditionCode::CapBadOperation }; + } + }; m_query[CapType::XferCount] = msgSupportGetAllSetReset; m_caps[CapType::XferCount] = [this](Msg msg, Capability& data) -> Result { diff --git a/huagao/stdafx.h b/huagao/stdafx.h index 4d5a64b6..e93aee20 100644 Binary files a/huagao/stdafx.h and b/huagao/stdafx.h differ