diff --git a/rodAndBarDetection_test/rodAndBarDetection_test.cpp b/rodAndBarDetection_test/rodAndBarDetection_test.cpp index 03fde37..1ed1e01 100644 --- a/rodAndBarDetection_test/rodAndBarDetection_test.cpp +++ b/rodAndBarDetection_test/rodAndBarDetection_test.cpp @@ -1151,7 +1151,7 @@ void newLocatingPlateTest(void) }; SVzNLRange fileIdx[NEW_LOCATING_PALTE_TEST_GROUP] = { - {12,13}, {52,52} + {12,13}, {1,52} }; const char* ver = wd_rodAndBarDetectionVersion(); diff --git a/sourceCode/SG_baseAlgo_Export.h b/sourceCode/SG_baseAlgo_Export.h index 31564f2..501130a 100644 --- a/sourceCode/SG_baseAlgo_Export.h +++ b/sourceCode/SG_baseAlgo_Export.h @@ -305,7 +305,6 @@ SG_APISHARED_EXPORT void wd_getLineCorerFeature( SG_APISHARED_EXPORT void wd_getXYVertialFeature_dirAngleMethod( std::vector< SVzNL3DPosition>& lineData, int lineIdx, - const double peakChkWin, const SSG_cornerParam cornerPara, std::vector& xyVerticalFlags //环 ); diff --git a/sourceCode/SG_lineFeature.cpp b/sourceCode/SG_lineFeature.cpp index c73ee10..e12029d 100644 --- a/sourceCode/SG_lineFeature.cpp +++ b/sourceCode/SG_lineFeature.cpp @@ -5716,14 +5716,13 @@ void wd_getLineCorerFeature( void wd_getXYVertialFeature_dirAngleMethod( std::vector< SVzNL3DPosition>& lineData, int lineIdx, - const double peakChkWin, const SSG_cornerParam cornerPara, std::vector& xyVerticalFlags ) { - if (lineIdx == 1062) + if (lineIdx == 745) int kkk = 1; - double minVerticalAngle = 75.0; //arc上每个点的转角最小值 + double minVerticalAngle = cornerPara.cornerTh; //arc上每个点的转角最小值 xyVerticalFlags.resize(lineData.size()); //计算前向角和后向角 diff --git a/sourceCode/rodAndBarDetection.cpp b/sourceCode/rodAndBarDetection.cpp index f1fb12b..dc75f6b 100644 --- a/sourceCode/rodAndBarDetection.cpp +++ b/sourceCode/rodAndBarDetection.cpp @@ -27,7 +27,8 @@ //version 1.3.4 : 新的定位盘中心测量功能算法优化 //version 1.3.5 : 新的定位盘中心测量功能占将float运算改成double ,测试PC和3588差异 //version 1.3.6 : 新的定位盘中心测量功能:优化聚类前的垂直点去除算法,保证聚类结果正确 -std::string m_strVersion = "1.3.6"; +//version 1.3.7 : 新的定位盘中心测量功能:进一步优化了内部参数,优化了垂直点去除效果 +std::string m_strVersion = "1.3.7"; const char* wd_rodAndBarDetectionVersion(void) { return m_strVersion.c_str(); @@ -2024,6 +2025,10 @@ SSX_platePoseInfo sx_getLocationPlatePose_new( //4、提取孔 //5、拟合 //6、计算中间坐标 + //内部参数 + SSG_cornerParam removeVertialPara = cornerPara; + removeVertialPara.scale = 3.0; + removeVertialPara.cornerTh = 60; std::vector> flags; flags.resize(lineNum); @@ -2041,8 +2046,7 @@ SSX_platePoseInfo sx_getLocationPlatePose_new( wd_getXYVertialFeature_dirAngleMethod( scanLines[line], line, - cornerPara.scale, - cornerPara, + removeVertialPara, line_verticalFlags ); zVertivalFlags.push_back(line_verticalFlags); @@ -2063,8 +2067,7 @@ SSX_platePoseInfo sx_getLocationPlatePose_new( wd_getXYVertialFeature_dirAngleMethod( scanLines_h[line], line, - cornerPara.scale, - cornerPara, + removeVertialPara, line_verticalFlags ); zVertivalFlags_h.push_back(line_verticalFlags);