121 lines
3.8 KiB
C
121 lines
3.8 KiB
C
|
|
#pragma once
|
|||
|
|
|
|||
|
|
#if defined(_MSC_VER) || defined(WIN64) || defined(_WIN64) || defined(__WIN64__) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
|
|||
|
|
# define Q_DECL_EXPORT __declspec(dllexport)
|
|||
|
|
# define Q_DECL_IMPORT __declspec(dllimport)
|
|||
|
|
#else
|
|||
|
|
# define Q_DECL_EXPORT __attribute__((visibility("default")))
|
|||
|
|
# define Q_DECL_IMPORT __attribute__((visibility("default")))
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#if defined(SG_API_LIBRARY)
|
|||
|
|
# define SG_BAGSHARED_EXPORT Q_DECL_EXPORT
|
|||
|
|
#else
|
|||
|
|
# define SG_BAGSHARED_EXPORT Q_DECL_IMPORT
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#define OUTPUT_DEBUG 0
|
|||
|
|
#define BAG_ALGO_USE_CORNER_FEATURE 1
|
|||
|
|
#define RGN_HIST_SIZE 16 //Ŀ<><C4BF><EFBFBD><EFBFBD>ɫͳ<C9AB>Ƶ<EFBFBD><C6B5><EFBFBD>Ŀ
|
|||
|
|
|
|||
|
|
#include "SG_baseDataType.h"
|
|||
|
|
#include <vector>
|
|||
|
|
|
|||
|
|
typedef struct
|
|||
|
|
{
|
|||
|
|
SSG_bagParam bagParam;
|
|||
|
|
SSG_outlierFilterParam filterParam;
|
|||
|
|
#if BAG_ALGO_USE_CORNER_FEATURE
|
|||
|
|
SSG_cornerParam cornerParam;
|
|||
|
|
#else
|
|||
|
|
SSG_slopeParam slopeParam;
|
|||
|
|
SSG_VFeatureParam valleyPara;
|
|||
|
|
#endif
|
|||
|
|
SSG_treeGrowParam growParam;
|
|||
|
|
//SSG_objSortParam sortParam;
|
|||
|
|
//SSG_polarScanParam polarScanParam;
|
|||
|
|
}SG_bagPositionParam;
|
|||
|
|
|
|||
|
|
typedef struct
|
|||
|
|
{
|
|||
|
|
double hueTh;
|
|||
|
|
double saturateTh;
|
|||
|
|
double FBVldPtRatioTh; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>ɫ<EFBFBD><C9AB><EFBFBD>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
bool frontVldPtGreater; //true<75><65><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>ߵĵ<DFB5><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>棻false<73><65><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>ߵĵ<DFB5><C4B5><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>
|
|||
|
|
bool front_upVldPtGreater;//true<75><65><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>ߵĵ<DFB5><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>泯<EFBFBD>ϣ<EFBFBD>false<73><65><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>ߵĵ<DFB5><C4B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>泯<EFBFBD><E6B3AF>
|
|||
|
|
bool back_upVldPtGreater; //true<75><65><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>ߵĵ<DFB5><C4B5><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>泯<EFBFBD>ϣ<EFBFBD>false<73><65><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD><EFBFBD>ߵĵ<DFB5><C4B5><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>泯<EFBFBD><E6B3AF>
|
|||
|
|
}SSG_hsvCmpParam;
|
|||
|
|
|
|||
|
|
typedef struct
|
|||
|
|
{
|
|||
|
|
double jumpTh; //<2F><><EFBFBD>ֳ<EFBFBD><D6B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>йأ<D0B9>Ϊ<EFBFBD><CEAA><EFBFBD>̵Ŀ<C4BF><D7B6><EFBFBD>Z<EFBFBD><5A><EFBFBD><EFBFBD>
|
|||
|
|
double baseHoleLen; //<2F><><EFBFBD>ֳ<EFBFBD><D6B3>йأ<D0B9><D8A3><EFBFBD><EFBFBD>̿<CCBF><D7B6>ij<EFBFBD><C4B3><EFBFBD>
|
|||
|
|
double baseHoleDist; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><D7B6>ľ<EFBFBD><C4BE><EFBFBD>
|
|||
|
|
}SSG_stackBaseParam;
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>ݵ<EFBFBD>ƽ
|
|||
|
|
SG_BAGSHARED_EXPORT void sg_lineDataR(
|
|||
|
|
SVzNL3DLaserLine* a_line,
|
|||
|
|
const double* camPoseR,
|
|||
|
|
double groundH);
|
|||
|
|
|
|||
|
|
SG_BAGSHARED_EXPORT void sg_lineDataR_RGBD(
|
|||
|
|
SVzNLXYZRGBDLaserLine* a_line,
|
|||
|
|
const double* camPoseR,
|
|||
|
|
double groundH);
|
|||
|
|
|
|||
|
|
SG_BAGSHARED_EXPORT void sg_bagPositioning_lineProc(
|
|||
|
|
SVzNL3DLaserLine* a_line,
|
|||
|
|
int lineIdx,
|
|||
|
|
int* errCode,
|
|||
|
|
std::vector<SSG_lineFeature>& all_vLineFeatures,
|
|||
|
|
std::vector<std::vector<int>>& noisePts,
|
|||
|
|
const SG_bagPositionParam algoParam);
|
|||
|
|
|
|||
|
|
//<2F><>ȡ<EFBFBD><C8A1>֯<EFBFBD><D6AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ץȡ<D7A5><C8A1><EFBFBD><EFBFBD>̬<EFBFBD><CCAC><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD>ץȡ
|
|||
|
|
SG_BAGSHARED_EXPORT void sg_getBagPosition(
|
|||
|
|
SVzNL3DLaserLine* laser3DPoints,
|
|||
|
|
int lineNum,
|
|||
|
|
//std::vector<SSG_lineFeature>& all_vLineFeatures,
|
|||
|
|
//std::vector<std::vector<int>>& noisePts,
|
|||
|
|
const SG_bagPositionParam algoParam,
|
|||
|
|
const SSG_planeCalibPara poseCalibPara,
|
|||
|
|
std::vector<SSG_peakRgnInfo>& objOps);
|
|||
|
|
|
|||
|
|
SG_BAGSHARED_EXPORT void sg_getBagPositionAndOrientation(
|
|||
|
|
SVzNLXYZRGBDLaserLine* laser3DPoints,
|
|||
|
|
int lineNum,
|
|||
|
|
//std::vector<SSG_lineFeature>& all_vLineFeatures,
|
|||
|
|
//std::vector<std::vector<int>>& noisePts,
|
|||
|
|
const SG_bagPositionParam algoParam,
|
|||
|
|
const SSG_planeCalibPara poseCalibPara,
|
|||
|
|
const SSG_hsvCmpParam colorCmpParam,
|
|||
|
|
const RGB rgbColorPattern, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><D6B4>ӷ<EFBFBD><D3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
|||
|
|
const double frontColorTemplate[RGN_HIST_SIZE],
|
|||
|
|
const double backColorTemplate[RGN_HIST_SIZE],
|
|||
|
|
std::vector<SSG_peakOrienRgnInfo>& objOps,
|
|||
|
|
#if OUTPUT_DEBUG
|
|||
|
|
std::vector<std::vector< SVzNL3DPosition>>& bagPositionCloudPts,
|
|||
|
|
#endif
|
|||
|
|
int* errCode);
|
|||
|
|
|
|||
|
|
SG_BAGSHARED_EXPORT void sg_sideBagPosition(
|
|||
|
|
SVzNL3DLaserLine* laser3DPoints,
|
|||
|
|
int lineNum,
|
|||
|
|
const SG_bagPositionParam algoParam,
|
|||
|
|
std::vector<SSG_sideBagInfo>& objOps);
|
|||
|
|
|
|||
|
|
SG_BAGSHARED_EXPORT void sg_getSideBagStackBasePosition(
|
|||
|
|
SVzNL3DLaserLine* laser3DPoints,
|
|||
|
|
int lineNum,
|
|||
|
|
const SSG_stackBaseParam stackBaseParam,
|
|||
|
|
const SSG_treeGrowParam growParam,
|
|||
|
|
SSG_6DOF* stackBasePosition //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD>λ<EFBFBD>úͽǶ<CDBD>
|
|||
|
|
);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>п<EFBFBD><D0BF><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD>Ͳο<CDB2><CEBF><EFBFBD>ƽƽ<C6BD>棬<EFBFBD><E6A3AC><EFBFBD><EFBFBD><EFBFBD>ߵ<EFBFBD>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>ƽ
|
|||
|
|
//<2F><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ƽ<EFBFBD><C6BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD>淨<EFBFBD><E6B7A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>ֱ<EFBFBD><D6B1><EFBFBD><EFBFBD><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>
|
|||
|
|
SG_BAGSHARED_EXPORT SSG_planeCalibPara sg_getBagBaseCalibPara(
|
|||
|
|
SVzNL3DLaserLine* laser3DPoints,
|
|||
|
|
int lineNum);
|