update 更改线的二次判断,异物添加范围

dev_heyuan
liusiyang 1 month ago
parent 9996b5a228
commit 2f5f0e1589

@ -327,6 +327,7 @@ int ImageResultJudge::ResultJudge(std::shared_ptr<ImageAllResult> 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<ImageAllResult> 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;

@ -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();

Loading…
Cancel
Save