algoLib/sourceCode/rodAndBarDetection_Export.h
jerryzeng 4bd528ebb9 rodAarcFeatueDetection version 1.1.0 :
添加了地面调平和棒材定位
2026-03-21 23:15:43 +08:00

66 lines
1.8 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include "SG_algo_Export.h"
#include <vector>
#define _OUTPUT_DEBUG_DATA 1
typedef struct
{
SVzNL3DPoint center; //螺杆端部中心点
SVzNL3DPoint axialDir; //轴向向量
double rotateAngle; //-30 - 30度
}SSX_hexHeadScrewInfo; //六角头螺杆
typedef struct
{
double diameter;
double len;
}SSX_rodParam; //棒材信息
typedef struct
{
SVzNL3DPoint center; //螺杆端部中心点
SVzNL3DPoint axialDir; //轴向向量
SVzNL3DPoint normalDir; //法向量
SVzNL3DPoint startPt;
SVzNL3DPoint endPt;
}SSX_rodPositionInfo;
//读版本号
SG_APISHARED_EXPORT const char* wd_rodAndBarDetectionVersion(void);
//计算一个平面调平参数。
//数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平
//旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数
SG_APISHARED_EXPORT SSG_planeCalibPara sx_rodPosition_getBaseCalibPara(
std::vector< std::vector<SVzNL3DPosition>>& scanLines);
#if 0
//相机姿态调平,并去除地面
SG_APISHARED_EXPORT void sx_rodPosition_lineDataR(
std::vector< SVzNL3DPosition>& a_line,
const double* camPoseR,
double groundH);
#endif
//六角头螺杆端部中心点和轴向测量
SG_APISHARED_EXPORT void sx_hexHeadScrewMeasure(
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_hexHeadScrewInfo>& screwInfo,
int* errCode);
SG_APISHARED_EXPORT void sx_rodPositioning(
std::vector< std::vector<SVzNL3DPosition>>& scanLines,
const SSG_planeCalibPara poseCalibPara,
const SSG_cornerParam cornerPara,
const SSG_outlierFilterParam filterParam,
const SSG_treeGrowParam growParam,
const SSX_rodParam rodParam,
std::vector<SSX_rodPositionInfo>& rodInfo,
int* errCode);