add 添加线的二次判断

main
liusiyang 3 weeks ago
parent dca60c28e1
commit 702a1556fe

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

@ -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";

Loading…
Cancel
Save