algoLib/sourceCode/bagThreadPositioning_Export.h
jerryzeng 09de9f850d bagThreadPositioning version 1.1.0 :
添加了标定Mark检测,添加了相对于标定柱的坐标输出,添加了相机调平功能
同时包含电机定子抓取的算法开发的过程代码
2026-02-08 22:32:36 +08:00

55 lines
1.7 KiB
C++
Raw Permalink 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 threadPos; //线头位置
SVzNL3DPoint operatePos; //下刀位置
double rotateAngle; //水平旋转角
}SSX_bagThreadInfo; //线头信息
typedef struct
{
bool isHorizonScan;
bool scanFromThreadHead;
double camInstallAngle; //相机安装时与台面夹角
double stitchWidth; //针脚最小宽度,用于过滤虚假的针脚
double operateDist; //下刀位置距针脚距离
double mark_height; //标定柱高度
double mark_diameter; //标定柱外径
double mark_distance; //两个标定柱的距离
}SSX_ScanInfo;
//读版本号
SG_APISHARED_EXPORT const char* wd_bagThreadPositioningVersion(void);
//计算一个平面调平参数。
//数据输入中可以有一个地平面和参考调平平面,以最高的平面进行调平
//旋转矩阵为调平参数,即将平面法向调整为垂直向量的参数
SG_APISHARED_EXPORT SSG_planeCalibPara wd_bagThread_getBaseCalibPara(
std::vector< std::vector<SVzNL3DPosition>>& scanLines);
//相机姿态调平,并去除地面
SG_APISHARED_EXPORT void wd_bagThread_lineDataR(
std::vector< SVzNL3DPosition>& a_line,
const double* camPoseR,
double groundH);
//线头位置检测定位
SG_APISHARED_EXPORT void wd_bagThreadPositioning(
std::vector< std::vector<SVzNL3DPosition>>& scanLines,
const SSX_ScanInfo scanInfo, //true:激光线平行槽道false:激光线垂直槽道
const SSG_planeCalibPara groundCalibPara,
const SSG_outlierFilterParam filterParam, //噪点过滤参数
const SSG_cornerParam cornerPara, //V型特征参数
const SSG_raisedFeatureParam raisedFeaturePara,//线尾凸起参数
const SSG_treeGrowParam growParam, //特征生长参数
std::vector<SSX_bagThreadInfo>& bagThreadInfo,
std::vector<SSX_bagThreadInfo>& bagThreadInfo_relative, //相对于Mark的坐标
std::vector<SVzNL3DPoint>& output_markCenter, //输出Mark位置信息
int* errCode);