From 702a1556fe3577781378820b558f9a78bef9a1d3 Mon Sep 17 00:00:00 2001 From: liusiyang Date: Mon, 1 Jun 2026 09:58:55 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=B7=BB=E5=8A=A0=E7=BA=BF=E7=9A=84?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AlgorithmModule/src/Blob.c | 4 ++-- AlgorithmModule/src/ImgCheckAnalysisy.cpp | 21 +++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/AlgorithmModule/src/Blob.c b/AlgorithmModule/src/Blob.c index e76bad4..8b1e625 100644 --- a/AlgorithmModule/src/Blob.c +++ b/AlgorithmModule/src/Blob.c @@ -465,8 +465,8 @@ int GetBlobs_V2(ERROR_DOTS_BLOBS *blobs, unsigned char *pImgdata, unsigned char } int minEnergy = 2; - int mergeDistanceX = 1; - int mergeDistanceY = 1; + int mergeDistanceX = 0; + int mergeDistanceY = 0; offset = 0; int nErrorType = 0; int lasttype = -1; diff --git a/AlgorithmModule/src/ImgCheckAnalysisy.cpp b/AlgorithmModule/src/ImgCheckAnalysisy.cpp index 154698b..00de3a5 100644 --- a/AlgorithmModule/src/ImgCheckAnalysisy.cpp +++ b/AlgorithmModule/src/ImgCheckAnalysisy.cpp @@ -3353,6 +3353,7 @@ int ImgCheckAnalysisy::BLobToDetResult() if (config_qx_type == CONFIG_QX_NAME_MTX || config_qx_type == CONFIG_QX_NAME_POL_Cell || + config_qx_type == CONFIG_QX_NAME_Other || config_qx_type == CONFIG_QX_NAME_LD) { std::string qx_name = CONFIG_QX_NAME_Names[config_qx_type]; @@ -3901,11 +3902,23 @@ int ImgCheckAnalysisy::AI_Classify_New(const cv::Mat &src_Img, cv::Rect qx_roi, // 长宽比过大,判断成 if (flenr > 18 && - len > 500 && - widt < 40 && - fjustarea < 850) + len > 70 && + widt < 220 && + fjustarea < 800) { - // printf("\n\n\n\n\n\n\n\n\n--------- flenr %f len %d,widt %d,fjustarea %f\n", flenr,len,widt,fjustarea); + printf("\n\n\n\n\n\n\n\n\n--------- flenr %f len %d,widt %d,fjustarea %f\n", flenr,len,widt,fjustarea); + // getchar(); + cls_num = AI_CLass_QX_NAME_line; + strclassName = "line"; + } + // 长宽比过小,判断成 + else if (flenr > 4 && + len > 180 && + widt < 220 && + fjustarea < 800 && + fjustarea > 20) + { + printf("\n\n\n\n\n\n\n\n\n--------- flenr %f len %d,widt %d,fjustarea %f\n", flenr,len,widt,fjustarea); // getchar(); cls_num = AI_CLass_QX_NAME_line; strclassName = "line";