rodAndBarDetection version 1.3.1 :
定位盘中心测量功能添加了噪声过滤
This commit is contained in:
parent
1ed1e1242d
commit
16fb40399a
@ -1085,7 +1085,7 @@ void newLocatingPlateTest(void)
|
||||
};
|
||||
|
||||
SVzNLRange fileIdx[NEW_LOCATING_PALTE_TEST_GROUP] = {
|
||||
{2,11},
|
||||
{12,13},
|
||||
};
|
||||
|
||||
const char* ver = wd_rodAndBarDetectionVersion();
|
||||
@ -1137,7 +1137,7 @@ void newLocatingPlateTest(void)
|
||||
void rodPositionTest(void)
|
||||
{
|
||||
const char* dataPath[ROD_POSITION_TEST_GROUP] = {
|
||||
"F:/ShangGu/项目/冠钦项目/矩森棒材抓取/", //0
|
||||
"F:/ShangGu/项目/冠钦项目/矩森棒材抓取/测试数据/", //0
|
||||
"F:/ShangGu/项目/冠钦项目/胶布圆棒抓取/模拟测试数据/", //1
|
||||
"F:/ShangGu/项目/冠钦项目/胶布圆棒抓取/模拟测试数据2/", //1
|
||||
};
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
//version 1.2.10 : 改进螺杆定位取点算法
|
||||
//version 1.2.11 : 根据现场数据调整特征生长参数
|
||||
//version 1.3.0 : 新的定位盘中心测量功能
|
||||
std::string m_strVersion = "1.3.0";
|
||||
//version 1.3.1 : 定位盘中心测量功能添加了噪声过滤
|
||||
std::string m_strVersion = "1.3. ";
|
||||
const char* wd_rodAndBarDetectionVersion(void)
|
||||
{
|
||||
return m_strVersion.c_str();
|
||||
@ -2039,7 +2040,7 @@ SSX_platePoseInfo sx_getLocationPlatePose_new(
|
||||
{
|
||||
int idx_0 = line_verticalSegs[i].start;
|
||||
for (int j = 0; j < line_verticalSegs[i].len; j++)
|
||||
flags[idx_0+j][line] = 1;
|
||||
flags[idx_0 + j][line] = 1;
|
||||
}
|
||||
}
|
||||
//标注
|
||||
@ -2085,6 +2086,8 @@ SSX_platePoseInfo sx_getLocationPlatePose_new(
|
||||
);
|
||||
|
||||
//保留最前面的目标
|
||||
const double topPlateMinW = 150;
|
||||
const double topPlateMinH = 150;
|
||||
std::vector<double> objMeanZ;
|
||||
objMeanZ.resize(objClusters.size());
|
||||
for (int i = 0; i < (int)objClusters.size(); i++)
|
||||
@ -2092,10 +2095,16 @@ SSX_platePoseInfo sx_getLocationPlatePose_new(
|
||||
SSG_ROIRectD a_roi = _getListROI(objClusters[i]);
|
||||
double w = a_roi.right - a_roi.left;
|
||||
double h = a_roi.bottom - a_roi.top;
|
||||
if ((w > topPlateMinW) && (h > topPlateMinH))
|
||||
{
|
||||
|
||||
double meanZ = _getListMeanZ(objClusters[i]);
|
||||
objMeanZ[i] = meanZ;
|
||||
double meanZ = _getListMeanZ(objClusters[i]);
|
||||
objMeanZ[i] = meanZ;
|
||||
}
|
||||
else
|
||||
objMeanZ[i] = 0; 0;
|
||||
}
|
||||
|
||||
//选出z最小的目标作为顶部轮廓
|
||||
int objIdx = -1;
|
||||
double minMeanZ = DBL_MAX;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user