From 2f5f0e1589b8e2fa113a705073fa6be0cb1e2619 Mon Sep 17 00:00:00 2001 From: liusiyang Date: Mon, 29 Jun 2026 11:51:16 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=9B=B4=E6=94=B9=E7=BA=BF=E7=9A=84?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E5=88=A4=E6=96=AD=EF=BC=8C=E5=BC=82=E7=89=A9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AlgorithmModule/src/ImageResultJudge.cpp | 12 ++++++ AlgorithmModule/src/ImgCheckAnalysisy.cpp | 46 ++++++++++++++--------- 2 files changed, 40 insertions(+), 18 deletions(-) diff --git a/AlgorithmModule/src/ImageResultJudge.cpp b/AlgorithmModule/src/ImageResultJudge.cpp index 9d1a722..f0c0795 100644 --- a/AlgorithmModule/src/ImageResultJudge.cpp +++ b/AlgorithmModule/src/ImageResultJudge.cpp @@ -327,6 +327,7 @@ int ImageResultJudge::ResultJudge(std::shared_ptr pImageResult) float hj = pParam->paramArr[j].hj; float Len = pParam->paramArr[j].length; float md = pParam->paramArr[j].density; + float area_max = pParam->paramArr[j].area_max; Judge_Status = true; @@ -385,6 +386,17 @@ int ImageResultJudge::ResultJudge(std::shared_ptr pImageResult) BOOL_TO_STR(flen >= Len), flen, BOOL_TO_ThanLess(flen > Len), Len); } + if( config_qx_type == CONFIG_QX_NAME_POL_Cell && area_max > 0) + { + if(detArea > area_max) + { + nerrortype = 0; + result = true; + } + pQxLog->AddCheckstr(PrintLevel_4, DET_LOG_LEVEL_3, "PolCell_Area_Max", "%s -> %f %s %f ", + BOOL_TO_STR(detArea > area_max), detArea, BOOL_TO_ThanLess(detArea > area_max), area_max); + } + if (!result) { break; diff --git a/AlgorithmModule/src/ImgCheckAnalysisy.cpp b/AlgorithmModule/src/ImgCheckAnalysisy.cpp index 54371e3..b1faf3f 100644 --- a/AlgorithmModule/src/ImgCheckAnalysisy.cpp +++ b/AlgorithmModule/src/ImgCheckAnalysisy.cpp @@ -3918,24 +3918,34 @@ int ImgCheckAnalysisy::AI_Classify_New(const cv::Mat &src_Img, cv::Rect qx_roi, len = qx_roi.height; } - // 长宽比过大,判断成 - if (flenr > 18 && - 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); - // getchar(); - cls_num = AI_CLass_QX_NAME_line; - strclassName = "line"; - bIsLine = true; - } - // 长宽比过小,判断成 - else if (flenr > 4 && - len > 180 && - widt < 220 && - fjustarea < 800 && - fjustarea > 20) + // // 长宽比过大,判断成 + // if (flenr > 18 && + // 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); + // // getchar(); + // cls_num = AI_CLass_QX_NAME_line; + // strclassName = "line"; + // bIsLine = true; + // } + // // 长宽比过小,判断成 + // 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"; + // bIsLine = true; + // } + + //长宽比满足,判断为线 + if (flenr > 10) { // printf("\n\n\n\n\n\n\n\n\n--------- flenr %f len %d,widt %d,fjustarea %f\n", flenr,len,widt,fjustarea); // getchar();