dsp旋转处理

This commit is contained in:
13038267101 2023-07-07 18:54:27 +08:00
parent 6e0b8290a2
commit 1c30e8bf3a
1 changed files with 8 additions and 8 deletions

View File

@ -546,6 +546,14 @@ namespace hg_imgproc
else else
mats_.push_back(Temp_mat[0]); 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 else
@ -946,14 +954,6 @@ namespace hg_imgproc
Rotation.apply(mats,img_conf_.is_duplex); Rotation.apply(mats,img_conf_.is_duplex);
mats_ = mats; 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()) if (mats_.empty())
{ {
return SCANNER_ERR_NO_DATA; return SCANNER_ERR_NO_DATA;