55 lines
1.4 KiB
C++
55 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "SG_algo_Export.h"
|
|
#include <vector>
|
|
|
|
#define _OUTPUT_DEBUG_DATA 1
|
|
|
|
typedef struct
|
|
{
|
|
int type; //组件种类
|
|
double lineLen; //直线段长度
|
|
}SSX_BQAssemblyPara;
|
|
|
|
typedef struct
|
|
{
|
|
int type; //组件种类
|
|
SVzNL3DPoint O; //工件中心点
|
|
SVzNL3DPoint X; //工件坐标系OX轴向量。
|
|
SVzNL3DPoint Y; //工件坐标系OY轴向量。
|
|
SVzNL3DPoint Z; //工件坐标系OZ轴向量。
|
|
}SSX_BQAssemblyInfo;
|
|
|
|
//读版本号
|
|
SG_APISHARED_EXPORT const char* wd_BQAssemblyPositionVersion(void);
|
|
|
|
//计算一个平面调平参数。
|
|
//数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平
|
|
//旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数
|
|
SG_APISHARED_EXPORT SSG_planeCalibPara sx_BQ_getHoleBaseCalibPara(
|
|
std::vector< std::vector<SVzNL3DPosition>>& scanLines);
|
|
|
|
//相机姿态调平,并去除地面
|
|
SG_APISHARED_EXPORT void sx_BQ_lineDataR(
|
|
std::vector< SVzNL3DPosition>& a_line,
|
|
const double* camPoseR,
|
|
double groundH);
|
|
|
|
//提取工件角点及定位长度信息
|
|
SG_APISHARED_EXPORT SSX_BQAssemblyInfo sx_BQ_computeAssemblyInfoFrom3D(
|
|
std::vector< std::vector<SVzNL3DPosition>>& scanLines,
|
|
const SSG_cornerParam cornerPara,
|
|
const SSG_outlierFilterParam filterParam,
|
|
SSG_treeGrowParam growParam,
|
|
SSG_planeCalibPara groundCalibPara,
|
|
SSX_BQAssemblyPara assemblyParam,
|
|
int* errCode);
|
|
|
|
//根据Mark计算工件位置和姿态
|
|
SG_APISHARED_EXPORT SSX_BQAssemblyInfo sx_BQ_computeAssemblyInfoFromMark(
|
|
SSX_BQAssemblyInfo& originPos,
|
|
std::vector<SVzNL3DPoint>& originMark,
|
|
std::vector<SVzNL3DPoint>& currMark,
|
|
int* errCode);
|
|
|