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