diff --git a/App/HoleDetection/HoleDetectionApp/Presenter/Src/HoleDetectionPresenter.cpp b/App/HoleDetection/HoleDetectionApp/Presenter/Src/HoleDetectionPresenter.cpp
index e6e8e26..5483f26 100644
--- a/App/HoleDetection/HoleDetectionApp/Presenter/Src/HoleDetectionPresenter.cpp
+++ b/App/HoleDetection/HoleDetectionApp/Presenter/Src/HoleDetectionPresenter.cpp
@@ -205,13 +205,14 @@ int HoleDetectionPresenter::InitAlgoParams()
const VrAlgorithmParams& xmlParams = configResult.algorithmParams;
- LOG_INFO("Loaded XML params - Ransac: distanceThreshold=%.2f, maxIterations=%d, minPlanePoints=%d, maxPlanes=%d, growthZThreshold=%.2f, minPlaneRatio=%.2f\n",
+ LOG_INFO("Loaded XML params - Ransac: distanceThreshold=%.2f, maxIterations=%d, minPlanePoints=%d, maxPlanes=%d, growthZThreshold=%.2f, minPlaneRatio=%.2f, maxNormalAngleDeg=%.1f\n",
xmlParams.ransacParam.distanceThreshold,
xmlParams.ransacParam.maxIterations,
xmlParams.ransacParam.minPlanePoints,
xmlParams.ransacParam.maxPlanes,
xmlParams.ransacParam.growthZThreshold,
- xmlParams.ransacParam.minPlaneRatio);
+ xmlParams.ransacParam.minPlaneRatio,
+ xmlParams.ransacParam.maxNormalAngleDeg);
LOG_INFO("Loaded XML params - Detection: angleThresholdPos=%.1f, angleThresholdNeg=%.1f, angleSearchDistance=%.2f, minPitDepth=%.2f\n",
xmlParams.detectionParam.angleThresholdPos,
diff --git a/App/HoleDetection/HoleDetectionApp/Version.h b/App/HoleDetection/HoleDetectionApp/Version.h
index 3ae7f3d..0437259 100644
--- a/App/HoleDetection/HoleDetectionApp/Version.h
+++ b/App/HoleDetection/HoleDetectionApp/Version.h
@@ -5,7 +5,7 @@
#define HOLEDETECTION_APP_NAME "孔洞检测"
// 版本字符串
-#define HOLEDETECTION_VERSION_STRING "1.1.4"
+#define HOLEDETECTION_VERSION_STRING "1.1.5"
#define HOLEDETECTION_BUILD_STRING "1"
#define HOLEDETECTION_FULL_VERSION_STRING "V" HOLEDETECTION_VERSION_STRING "_" HOLEDETECTION_BUILD_STRING
diff --git a/App/HoleDetection/HoleDetectionApp/Version.md b/App/HoleDetection/HoleDetectionApp/Version.md
index 071fc4d..7a385f0 100644
--- a/App/HoleDetection/HoleDetectionApp/Version.md
+++ b/App/HoleDetection/HoleDetectionApp/Version.md
@@ -1,37 +1,40 @@
-# 1.1.4 2026-04-05
-## build_1
+## 1.1.5 2026-04-05
+* build_1
+1. 更新算法 1.0.2
+
+## 1.1.4 2026-04-05
+* build_1
1. 修复 释放点云内存的问题
-
-# 1.1.3 2026-04-05
-## build_1
+## 1.1.3 2026-04-05
+* build_1
1. 更新算法 1.0.1
-# 1.1.2 2026-04-02
-## build_1
+## 1.1.2 2026-04-02
+* build_1
1. 更新算法
2. 完善算法参数页面参数配置
-# 1.1.1 2026-04-02
-## build_1
+## 1.1.1 2026-04-02
+* build_1
1. 更新算法
-# 1.1.0 2026-03-25
-## build_1
+## 1.1.0 2026-03-25
+* build_1
1. 算法优化
2. 配置结构修改
3. 手眼标定,网络配置公用
-# 1.0.0 2026-03-11
-## build_4
+## 1.0.0 2026-03-11
+* build_4
1. 修复矩阵配置
-## build_3
+* build_3
1. 更新算法库
-## build_2
+* build_2
1. 修复单相机检测结果不全的问题
-## build_1
+* build_1
1. 初始版本
diff --git a/App/HoleDetection/HoleDetectionApp/dialogalgoarg.cpp b/App/HoleDetection/HoleDetectionApp/dialogalgoarg.cpp
index 42e5ea9..bd4b972 100644
--- a/App/HoleDetection/HoleDetectionApp/dialogalgoarg.cpp
+++ b/App/HoleDetection/HoleDetectionApp/dialogalgoarg.cpp
@@ -300,6 +300,7 @@ void DialogAlgoarg::LoadRansacParamToUI(const VrRansacPlaneSegmentationParam& pa
ui->lineEdit_maxPlanes->setText(QString::number(param.maxPlanes));
ui->lineEdit_growthZThreshold->setText(QString::number(param.growthZThreshold));
ui->lineEdit_minPlaneRatio->setText(QString::number(param.minPlaneRatio));
+ ui->lineEdit_maxNormalAngleDeg->setText(QString::number(param.maxNormalAngleDeg));
}
void DialogAlgoarg::LoadDetectionParamToUI(const VrHoleDetectionParam& param)
@@ -377,6 +378,9 @@ bool DialogAlgoarg::SaveRansacParamFromUI(VrRansacPlaneSegmentationParam& param)
param.minPlaneRatio = ui->lineEdit_minPlaneRatio->text().toDouble(&ok);
if (!ok) return false;
+ param.maxNormalAngleDeg = ui->lineEdit_maxNormalAngleDeg->text().toDouble(&ok);
+ if (!ok) return false;
+
return true;
}
diff --git a/App/HoleDetection/HoleDetectionApp/dialogalgoarg.ui b/App/HoleDetection/HoleDetectionApp/dialogalgoarg.ui
index b62760a..5b61f24 100644
--- a/App/HoleDetection/HoleDetectionApp/dialogalgoarg.ui
+++ b/App/HoleDetection/HoleDetectionApp/dialogalgoarg.ui
@@ -168,6 +168,16 @@ QScrollArea { border: none; }
-
+ -
+
+
+ 法向量最大夹角 (度):
+
+
+
+ -
+
+
diff --git a/App/HoleDetection/HoleDetectionApp/mainwindow.ui b/App/HoleDetection/HoleDetectionApp/mainwindow.ui
index 178412e..6086537 100644
--- a/App/HoleDetection/HoleDetectionApp/mainwindow.ui
+++ b/App/HoleDetection/HoleDetectionApp/mainwindow.ui
@@ -97,7 +97,7 @@ background-color: rgba(255, 255, 255, 0);
- 973
+ 1110
21
220
80
@@ -120,7 +120,7 @@ border: none;
- 728
+ 845
21
220
80
@@ -143,7 +143,7 @@ border: none;
- 483
+ 580
21
220
80
@@ -330,7 +330,7 @@ background-color: rgba(255, 255, 255, 0);
0
0
1920
- 21
+ 20
diff --git a/App/HoleDetection/HoleDetectionConfig/Inc/IVrConfig.h b/App/HoleDetection/HoleDetectionConfig/Inc/IVrConfig.h
index a7e2d3e..019a9c6 100644
--- a/App/HoleDetection/HoleDetectionConfig/Inc/IVrConfig.h
+++ b/App/HoleDetection/HoleDetectionConfig/Inc/IVrConfig.h
@@ -23,6 +23,7 @@ struct VrRansacPlaneSegmentationParam
int maxPlanes = 5; // 最大提取平面数量
double growthZThreshold = 1.0; // 区域生长时相邻点 Z 差阈值(mm)
double minPlaneRatio = 0.1; // 平面最小点数占比
+ double maxNormalAngleDeg = 30.0; // 平面法向量与Z轴最大夹角(度),<=0 表示不过滤
};
/**
diff --git a/App/HoleDetection/HoleDetectionConfig/Src/AlgoParamConverter.cpp b/App/HoleDetection/HoleDetectionConfig/Src/AlgoParamConverter.cpp
index 2a21bea..8471250 100644
--- a/App/HoleDetection/HoleDetectionConfig/Src/AlgoParamConverter.cpp
+++ b/App/HoleDetection/HoleDetectionConfig/Src/AlgoParamConverter.cpp
@@ -13,6 +13,7 @@ RansacPlaneSegmentationParams ToAlgoParam(const VrRansacPlaneSegmentationParam&
algo.maxPlanes = param.maxPlanes;
algo.growthZThreshold = static_cast(param.growthZThreshold);
algo.minPlaneRatio = static_cast(param.minPlaneRatio);
+ algo.maxNormalAngleDeg = static_cast(param.maxNormalAngleDeg);
return algo;
}
@@ -65,14 +66,15 @@ void LogAlgoParams(const std::string& logTag,
clibMatrix[8], clibMatrix[9], clibMatrix[10], clibMatrix[11],
clibMatrix[12], clibMatrix[13], clibMatrix[14], clibMatrix[15]);
- LOG_INFO("%s RansacParams: distanceThreshold=%.2f, maxIterations=%d, minPlanePoints=%d, maxPlanes=%d, growthZThreshold=%.2f, minPlaneRatio=%.2f\n",
+ LOG_INFO("%s RansacParams: distanceThreshold=%.2f, maxIterations=%d, minPlanePoints=%d, maxPlanes=%d, growthZThreshold=%.2f, minPlaneRatio=%.2f, maxNormalAngleDeg=%.1f\n",
logTag.c_str(),
ransacParams.distanceThreshold,
ransacParams.maxIterations,
ransacParams.minPlanePoints,
ransacParams.maxPlanes,
ransacParams.growthZThreshold,
- ransacParams.minPlaneRatio);
+ ransacParams.minPlaneRatio,
+ ransacParams.maxNormalAngleDeg);
LOG_INFO("%s DetectionParams: angleThresholdPos=%.1f, angleThresholdNeg=%.1f, angleSearchDistance=%.2f, minPitDepth=%.2f\n",
logTag.c_str(),
diff --git a/App/HoleDetection/HoleDetectionConfig/Src/VrConfig.cpp b/App/HoleDetection/HoleDetectionConfig/Src/VrConfig.cpp
index df7f6e9..ae3c273 100644
--- a/App/HoleDetection/HoleDetectionConfig/Src/VrConfig.cpp
+++ b/App/HoleDetection/HoleDetectionConfig/Src/VrConfig.cpp
@@ -76,6 +76,8 @@ int CVrConfig::LoadConfig(const std::string& filePath, ConfigResult& configResul
configResult.algorithmParams.ransacParam.growthZThreshold = ransacParamElement->DoubleAttribute("growthZThreshold");
if (ransacParamElement->Attribute("minPlaneRatio"))
configResult.algorithmParams.ransacParam.minPlaneRatio = ransacParamElement->DoubleAttribute("minPlaneRatio");
+ if (ransacParamElement->Attribute("maxNormalAngleDeg"))
+ configResult.algorithmParams.ransacParam.maxNormalAngleDeg = ransacParamElement->DoubleAttribute("maxNormalAngleDeg");
}
XMLElement* detectionParamElement = algoParamsElement->FirstChildElement("DetectionParam");
@@ -209,6 +211,7 @@ bool CVrConfig::SaveConfig(const std::string& filePath, ConfigResult& configResu
ransacParamElement->SetAttribute("maxPlanes", configResult.algorithmParams.ransacParam.maxPlanes);
ransacParamElement->SetAttribute("growthZThreshold", configResult.algorithmParams.ransacParam.growthZThreshold);
ransacParamElement->SetAttribute("minPlaneRatio", configResult.algorithmParams.ransacParam.minPlaneRatio);
+ ransacParamElement->SetAttribute("maxNormalAngleDeg", configResult.algorithmParams.ransacParam.maxNormalAngleDeg);
algoParamsElement->InsertEndChild(ransacParamElement);
// 检测参数 DetectionParam 需要覆盖算法库当前全部检测字段。
diff --git a/AppAlgo/holeDetection/arm/debug/libHoleDetectionLib.so.1.0.0 b/AppAlgo/holeDetection/arm/debug/libHoleDetectionLib.so.1.0.0
index 116c3f3..97f283d 100644
Binary files a/AppAlgo/holeDetection/arm/debug/libHoleDetectionLib.so.1.0.0 and b/AppAlgo/holeDetection/arm/debug/libHoleDetectionLib.so.1.0.0 differ
diff --git a/AppAlgo/holeDetection/arm/release/libHoleDetectionLib.so.1.0.0 b/AppAlgo/holeDetection/arm/release/libHoleDetectionLib.so.1.0.0
index d1a56f1..6b7c92b 100644
Binary files a/AppAlgo/holeDetection/arm/release/libHoleDetectionLib.so.1.0.0 and b/AppAlgo/holeDetection/arm/release/libHoleDetectionLib.so.1.0.0 differ
diff --git a/AppAlgo/holeDetection/include/HoleDetectionParams.h b/AppAlgo/holeDetection/include/HoleDetectionParams.h
index 295357e..2ad406a 100644
--- a/AppAlgo/holeDetection/include/HoleDetectionParams.h
+++ b/AppAlgo/holeDetection/include/HoleDetectionParams.h
@@ -14,6 +14,7 @@ struct RansacPlaneSegmentationParams {
int maxPlanes; // 最大提取平面数量, 建议 3-10
float growthZThreshold; // 区域生长时相邻点Z差阈值 (mm), 建议 0.5-2.0
float minPlaneRatio; // 平面最小点数占比 (相对最大平面), 建议 0.05-0.2
+ float maxNormalAngleDeg; // 平面法向量与Z轴最大夹角 (度), 超过则直接丢弃; <=0 表示不过滤
RansacPlaneSegmentationParams()
: distanceThreshold(0.5f)
@@ -22,6 +23,7 @@ struct RansacPlaneSegmentationParams {
, maxPlanes(5)
, growthZThreshold(1.0f)
, minPlaneRatio(0.1f)
+ , maxNormalAngleDeg(30.0f)
{
}
};
diff --git a/AppAlgo/holeDetection/windows/x64/Debug/HoleDetectionLib.dll b/AppAlgo/holeDetection/windows/x64/Debug/HoleDetectionLib.dll
index 8602486..bcb562a 100644
Binary files a/AppAlgo/holeDetection/windows/x64/Debug/HoleDetectionLib.dll and b/AppAlgo/holeDetection/windows/x64/Debug/HoleDetectionLib.dll differ
diff --git a/AppAlgo/holeDetection/windows/x64/Debug/HoleDetectionLib.pdb b/AppAlgo/holeDetection/windows/x64/Debug/HoleDetectionLib.pdb
index 4c6993b..9343507 100644
Binary files a/AppAlgo/holeDetection/windows/x64/Debug/HoleDetectionLib.pdb and b/AppAlgo/holeDetection/windows/x64/Debug/HoleDetectionLib.pdb differ
diff --git a/AppAlgo/holeDetection/windows/x64/Release/HoleDetectionLib.dll b/AppAlgo/holeDetection/windows/x64/Release/HoleDetectionLib.dll
index c940dd6..173f809 100644
Binary files a/AppAlgo/holeDetection/windows/x64/Release/HoleDetectionLib.dll and b/AppAlgo/holeDetection/windows/x64/Release/HoleDetectionLib.dll differ