更新螺杆算法

This commit is contained in:
杰仔 2026-06-11 18:36:01 +08:00
parent 39fb667756
commit 7f8c09addd
19 changed files with 26 additions and 10 deletions

View File

@ -184,9 +184,9 @@ int DetectPresenter::DetectScrew(
LOG_DEBUG("before sx_hexHeadScrewMeasure \n");
std::vector<SSX_rodPoseInfo> screwInfo;
sx_hexHeadScrewMeasure(
sx_hexHeadScrewMeasure_PCA(
xyzData,
isHorizonScan,
// isHorizonScan,
cornerParam,
filterParam,
growParam,

View File

@ -3,7 +3,7 @@
#define SCREWPOSITION_APP_NAME "螺杆定位"
#define SCREWPOSITION_VERSION_STRING "1.2.3"
#define SCREWPOSITION_VERSION_STRING "1.2.4"
#define SCREWPOSITION_BUILD_STRING "1"
#define SCREWPOSITION_FULL_VERSION_STRING "V" SCREWPOSITION_VERSION_STRING "_" SCREWPOSITION_BUILD_STRING

View File

@ -1,3 +1,6 @@
# 1.2.4 2026-06-10
1. 更新算法:螺杆的接口更新
# 1.2.3 2026-06-06
1. 更新算法:ARM上检测结果为空

View File

@ -84,6 +84,18 @@ SG_APISHARED_EXPORT void sx_hexHeadScrewMeasure(
std::vector<SSX_rodPoseInfo>& screwInfo,
int* errCode);
//PCA方法计算螺杆端部中心点位姿
//相对于sx_hexHeadScrewMeasure()算法上1去除了水平段2使用PCA方法计算轴向
SG_APISHARED_EXPORT void sx_hexHeadScrewMeasure_PCA(
std::vector< std::vector<SVzNL3DPosition>>& scanLines,
//bool isHorizonScan, //true:激光线平行槽道false:激光线垂直槽道
const SSG_cornerParam cornerPara,
const SSG_outlierFilterParam filterParam,
const SSG_treeGrowParam growParam,
double rodDiameter,
std::vector<SSX_rodPoseInfo>& screwInfo,
int* errCode);
//计算定位盘中心点位姿
SG_APISHARED_EXPORT SSX_platePoseInfo sx_getLocationPlatePose(
std::vector< std::vector<SVzNL3DPosition>>& scanLines,

View File

@ -471,9 +471,10 @@ void _outputRGBDScan_RGBD(
sw << "{" << rgb.r << "," << rgb.g << "," << rgb.b << "," << size << " }" << std::endl;
//输出法向
rgb = { 250, 255, 0 };
size = 1;
double len1 = 30;
double len2 = 200;
double len2 = 300;
lineIdx = 0;
for (int i = 0; i < objNum; i++)
{
@ -998,11 +999,11 @@ void screwTest(void)
const char* ver = wd_rodAndBarDetectionVersion();
printf("ver:%s\n", ver);
for (int grp = 9; grp < SCREW_TEST_GROUP; grp++)
for (int grp = 3; grp <= 6; grp++)
{
for (int fidx = fileIdx[grp].nMin; fidx <= fileIdx[grp].nMax; fidx++)
{
//fidx =3;
//fidx =2;
char _scan_file[256];
if(0 == grp)
@ -1052,9 +1053,9 @@ void screwTest(void)
bool isHorizonScan = true; //true:激光线平行槽道false:激光线垂直槽道
int errCode = 0;
std::vector<SSX_rodPoseInfo> screwInfo;
sx_hexHeadScrewMeasure(
sx_hexHeadScrewMeasure_PCA(
scanLines,
isHorizonScan, //true:激光线平行槽道false:激光线垂直槽道
//isHorizonScan, //true:激光线平行槽道false:激光线垂直槽道
cornerParam,
filterParam,
growParam,
@ -1743,9 +1744,9 @@ typedef enum
int main()
{
//ESG_testMode testMode = keSG_测试_配天螺杆定位;
ESG_testMode testMode = keSG_测试_配天螺杆定位;
//ESG_testMode testMode = keSG_测试_配天定位盘定位;
ESG_testMode testMode = keSG_测试_配天新定位盘定位;
//ESG_testMode testMode = keSG_测试_配天新定位盘定位;
//ESG_testMode testMode = keSG_测试_棒材抓取;
//ESG_testMode testMode = keSG_测试_筑裕钢筋焊缝定位;