69 lines
1.6 KiB
C++
69 lines
1.6 KiB
C++
#pragma once
|
|
|
|
#if defined(SG_API_LIBRARY)
|
|
# define SG_APISHARED_EXPORT __declspec(dllexport)
|
|
#else
|
|
# define SG_APISHARED_EXPORT __declspec(dllimport)
|
|
#endif
|
|
|
|
#include "SG_baseDataType.h"
|
|
#include <vector>
|
|
#include <opencv2/opencv.hpp>
|
|
|
|
#define _OUTPUT_DEBUG_DATA 1
|
|
|
|
typedef struct
|
|
{
|
|
double lineLen; //直线段长度
|
|
}SSX_BQworkpiecePara;
|
|
|
|
typedef struct
|
|
{
|
|
int workpieceType;
|
|
SVzNL3DPoint corner_L[3];
|
|
SVzNL3DPoint corner_R[3];
|
|
SVzNL3DPoint corner_T[3];
|
|
SVzNL3DPoint corner_B[3];
|
|
}SSX_BQworkpieceResult;
|
|
|
|
typedef struct
|
|
{
|
|
int rgnIdx;
|
|
SVzNL3DPoint* edge;
|
|
int edge_size;
|
|
SVzNL3DPoint edge_ends[2];
|
|
SVzNL3DPoint* edgeLink_1;
|
|
int edgeLink1_size;
|
|
SVzNL3DPoint edge_link1_ends[2];
|
|
SVzNL3DPoint* edgeLink_2;
|
|
int edgeLink2_size;
|
|
SVzNL3DPoint edge_link2_ends[2];
|
|
}SSX_debugInfo;
|
|
|
|
//读版本号
|
|
SG_APISHARED_EXPORT const char* wd_BQWorkpieceCornerVersion(void);
|
|
|
|
//计算一个平面调平参数。
|
|
//数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平
|
|
//旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数
|
|
SG_APISHARED_EXPORT SSG_planeCalibPara sx_BQ_getBaseCalibPara(
|
|
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_BQworkpieceResult sx_BQ_getWorkpieceCorners(
|
|
std::vector< std::vector<SVzNL3DPosition>>& scanLines,
|
|
const SSG_cornerParam cornerPara,
|
|
const SSG_outlierFilterParam filterParam,
|
|
SSG_treeGrowParam growParam,
|
|
SSG_planeCalibPara groundCalibPara,
|
|
SSX_BQworkpiecePara workpieceParam,
|
|
#if _OUTPUT_DEBUG_DATA
|
|
SSX_debugInfo* debug_conturs,
|
|
#endif
|
|
int* errCode); |