From 96938e61b5ea3433999600f52bdda960595ebabd Mon Sep 17 00:00:00 2001 From: jerryzeng Date: Sun, 19 Apr 2026 11:56:16 +0800 Subject: [PATCH] =?UTF-8?q?rodAndBarDetection=20version=201.2.2=20:=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=86=E5=AE=9A=E4=BD=8D=E7=9B=98=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=E5=A7=BF=E6=80=81=E5=AE=9A=E4=B9=89=EF=BC=9A=E6=B3=95?= =?UTF-8?q?=E5=90=91=EF=BC=88Z=E5=90=91=EF=BC=89=EF=BC=9A=E5=90=91?= =?UTF-8?q?=E5=8F=B3=EF=BC=9BY=EF=BC=9A=E5=90=91=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rodAndBarDetection_test/rodAndBarDetection_test.cpp | 12 ++++++------ sourceCode/rodAndBarDetection.cpp | 9 +++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/rodAndBarDetection_test/rodAndBarDetection_test.cpp b/rodAndBarDetection_test/rodAndBarDetection_test.cpp index 0313203..99f225f 100644 --- a/rodAndBarDetection_test/rodAndBarDetection_test.cpp +++ b/rodAndBarDetection_test/rodAndBarDetection_test.cpp @@ -492,9 +492,9 @@ void _outputRGBDScan_RGBD_centerPose( double len = 60; lineIdx = 0; { - SVzNL3DPoint pt0 = { poseInfo.center.x - len * poseInfo.normalDir.x, - poseInfo.center.y - len * poseInfo.normalDir.y, - poseInfo.center.z - len * poseInfo.normalDir.z }; + SVzNL3DPoint pt0 = { poseInfo.center.x, // - len * poseInfo.normalDir.x, + poseInfo.center.y, // - len * poseInfo.normalDir.y, + poseInfo.center.z }; // - len * poseInfo.normalDir.z }; SVzNL3DPoint pt1 = { poseInfo.center.x + len * poseInfo.normalDir.x, poseInfo.center.y + len * poseInfo.normalDir.y, poseInfo.center.z + len * poseInfo.normalDir.z }; @@ -1079,7 +1079,7 @@ void rodWeldSeamPosition_test(void) { //fidx =1; char _scan_file[256]; - sprintf_s(_scan_file, "%sLaserData_%d.txt", dataPath[grp], fidx); + sprintf_s(_scan_file, "%s%d_LaserData_ID019567.txt", dataPath[grp], fidx); std::vector> scanLines; wdReadLaserScanPointFromFile_XYZ_vector(_scan_file, scanLines); @@ -1091,8 +1091,8 @@ void rodWeldSeamPosition_test(void) long t1 = (long)GetTickCount64();//统计时间 SSX_rodParam rodParam; - rodParam.diameter = 52.0; //圆棒直径 - rodParam.len = 290; + rodParam.diameter = 16.0; //钢筋直径 + rodParam.len = 50; SSG_cornerParam cornerParam; cornerParam.cornerTh = 60; //45度角 diff --git a/sourceCode/rodAndBarDetection.cpp b/sourceCode/rodAndBarDetection.cpp index 00fbd40..189c493 100644 --- a/sourceCode/rodAndBarDetection.cpp +++ b/sourceCode/rodAndBarDetection.cpp @@ -10,7 +10,8 @@ //version 1.1.1 : ³õʼ·¢²¼¸ø¿Í»§µÄ°æ±¾ //version 1.2.0 : ÅäÌìÂݸ˲âÁ¿Ôö¼ÓÁ˶¨Î»ÅÌÖÐÐIJâÁ¿¹¦ÄÜ //version 1.2.1 : Ôö¼ÓÁ˶¨Î»ÅÌÖÐÐÄÍêÕû×Ë̬Êä³ö -std::string m_strVersion = "1.2.1"; +//version 1.2.2 : µ÷ÕûÁ˶¨Î»ÅÌÖÐÐÄ×Ë̬¶¨Ò壺·¨Ïò£¨ZÏò£©£ºÏòÓÒ£»Y£ºÏòÏ +std::string m_strVersion = "1.2.2"; const char* wd_rodAndBarDetectionVersion(void) { return m_strVersion.c_str(); @@ -832,9 +833,9 @@ SSX_pointPoseInfo sx_getLocationPlatePose( } double center_z = (ptTop.z + ptBtm.z + ptLeft.z + ptRight.z) / 4; resultPose.center = { center_x, center_y, center_z }; - resultPose.xDir = { 1.0, 0.0, 0 }; + resultPose.xDir = { 0.0, 0.0, -1.0 }; // { 1.0, 0.0, 0 }; resultPose.yDir = { 0.0, 1.0, 0 }; - resultPose.normalDir = { 0.0, 0.0, 1.0 }; + resultPose.normalDir = { 1.0, 0.0, 0 };// { 0.0, 0.0, 1.0 }; //Ðýת»ØÈ¥ for (int i = 0; i < lineNum; i++) { @@ -875,7 +876,7 @@ void rodAarcFeatueDetection( int linePtNum = (int)scanLines[0].size(); for (int line = 0; line < lineNum; line++) { - if (line == 424) + if (line == 1100) int kkk = 1; std::vector& lineData = scanLines[line];