open3d::pipelines::registration::GlobalOptimization 是 Open3D 中用于多视角点云配准(multi-view point cloud registration)的后端全局优化模块,主要用于消除配准累积误差(accumulated error),优化多个帧之间的姿态变换。
其核心在于构建合适的关键帧图(PoseGraph),PoseGraph 就是一个图结构,其中每个“节点”代表一帧点云的 姿态(位姿),每条“边”代表两个帧之间的 相对变换(约束)。其中“关键帧选取”与“回环边构建”至关重要。
目的:减少冗余帧,降低累计误差,提高优化效率。
| 策略类型 | 描述 | 常用参数 |
|---|---|---|
| 时间间隔法 | 每隔固定帧数选取关键帧 | 如:每 10 帧选 1 帧 |
| 距离法 | 位姿变换超过阈值时选择 | 平移 > 0.2m,旋转 > 10° |
| 信息熵法 | 视角/特征显著变化时选取 | 视角差、特征熵 |
| 匹配质量法 | 与上一帧匹配效果显著变差 | RMSE > 阈值 |
1. 第 0 帧默认作为关键帧;
2. 当前帧与上一关键帧:
- 平移距离 > 0.15m 或
- 旋转角度 > 10°;
3. 满足条件则添加为关键帧。
目的:通过检测回环关系来抑制漂移,提升全局一致性。
if (abs(i - j) > min_keyframe_interval) {
auto result = RANSACMatch(source, target, source_fpfh, target_fpfh);
auto refined = ICPMatch(source, target, result.transformation);
if (refined.fitness > 0.3 && refined.rmse < 0.02) {
PoseGraphEdge edge(i, j, refined.transformation, info_matrix, true);
pose_graph.edges.push_back(edge);
}
}
uncertain=true,降低错误边对全局的影响 (Keyframe 0)
|
|
(Keyframe 1)
|
|
(Keyframe 2)
|
/ \
(loop edge) (loop edge)
| |
(Keyframe N-2) (Keyframe N)