旋转仅文本方向识别放在PC识别,旋转放在片上处理

This commit is contained in:
lovelyyoung 2021-08-05 18:59:12 +08:00
parent 043aba521c
commit dd286bef54
1 changed files with 5 additions and 4 deletions

View File

@ -662,20 +662,21 @@ void GScanO1003399::imgproce(std::shared_ptr<std::vector<char>>& buff)
FileTools::writelog(log_DEBUG, "ͼÏñ½âÂëºÄʱ " + to_string(sw.elapsed_ms()));
sw.reset();
buffs.clear();
if (m_param.imageRotateDegree != 0.0 || m_param.is_backrotate180 || m_param.is_autotext)
if (m_param.is_autotext)
{
CImageApplyRotation::RotationType type;
if (m_param.imageRotateDegree > 89.0f && m_param.imageRotateDegree < 91.0f)
/*if (m_param.imageRotateDegree > 89.0f && m_param.imageRotateDegree < 91.0f)
type = CImageApplyRotation::RotationType::Rotate_90_clockwise;
else if (m_param.imageRotateDegree > 269.0f && m_param.imageRotateDegree < 271.0f)
type = CImageApplyRotation::RotationType::Rotate_90_anti_clockwise;
else if (m_param.imageRotateDegree > 179.0f && m_param.imageRotateDegree < 181.0f)
type = CImageApplyRotation::RotationType::Rotate_180;
else
type = CImageApplyRotation::RotationType::Invalid;
else*/
if (m_param.is_autotext)
type = CImageApplyRotation::RotationType::AutoTextOrientation;
else
type = CImageApplyRotation::RotationType::Invalid;//只处理自动文本方向识别 其他的不处理
TCHAR szIniFile[MAX_PATH] = { 0 };
SHGetSpecialFolderPath(NULL, szIniFile, CSIDL_WINDOWS, TRUE);