更新除穿孔算法,解决真实600dpi除穿孔失败的问题

This commit is contained in:
yangjiaxuan 2023-11-28 17:10:07 +08:00
parent 7f4bb50a57
commit a423b0c8ba
2 changed files with 24 additions and 23 deletions

View File

@ -212,7 +212,7 @@ void CImageApplyOutHole::apply(std::vector<cv::Mat>& mats, bool isTwoSide)
for (size_t i = 0; i < hole_contours.size(); i++) for (size_t i = 0; i < hole_contours.size(); i++)
{ {
std::vector<std::vector<cv::Point>> contourss_temp; std::vector<std::vector<cv::Point>> contourss_temp;
dilateContour(hole_contours[i], 5); dilateContour(hole_contours[i], m_borderSize / 4);
contourss_temp.push_back(hole_contours[i]); contourss_temp.push_back(hole_contours[i]);
cv::Mat front_temp = mats[0](roi_front); cv::Mat front_temp = mats[0](roi_front);
hg::fillPolys(front_temp, contourss_temp, color); hg::fillPolys(front_temp, contourss_temp, color);

View File

@ -27,7 +27,8 @@
* 2022/11/17 v1.9.2 BUG * 2022/11/17 v1.9.2 BUG
* 2023/05/16 v1.9.3 BUG * 2023/05/16 v1.9.3 BUG
* 2023/11/18 v1.10 * 2023/11/18 v1.10
* v1.10 * 2023/11/28 v1.10.1 kSize根据borderSize调整
* v1.10.1
* ==================================================== * ====================================================
*/ */