From 8ddf2db090eab85704e8ff2d66c015c9d1749553 Mon Sep 17 00:00:00 2001 From: jerryzeng Date: Sun, 7 Jun 2026 00:14:59 +0800 Subject: [PATCH] =?UTF-8?q?rodAndBarDetection=20version=201.3.7=20:=20?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E5=AE=9A=E4=BD=8D=E7=9B=98=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=E6=B5=8B=E9=87=8F=E5=8A=9F=E8=83=BD=EF=BC=9A=E8=BF=9B=E4=B8=80?= =?UTF-8?q?=E6=AD=A5=E4=BC=98=E5=8C=96=E4=BA=86=E5=86=85=E9=83=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=EF=BC=8C=E4=BC=98=E5=8C=96=E4=BA=86=E5=9E=82=E7=9B=B4?= =?UTF-8?q?=E7=82=B9=E5=8E=BB=E9=99=A4=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rodAndBarDetection_test/rodAndBarDetection_test.cpp | 2 +- sourceCode/SG_baseAlgo_Export.h | 1 - sourceCode/SG_lineFeature.cpp | 5 ++--- sourceCode/rodAndBarDetection.cpp | 13 ++++++++----- 4 files changed, 11 insertions(+), 10 deletions(-) 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);