bundle_adjust — 3D bundle_adjust op

• 数据种类:pose × points → table

• 调用: import fullseye as fs; fs.ledger.bundle_adjust(cameras, points, obs_cam, obs_pt, obs_uv, K, fix_first=True, max_iter=200)(要直接调用实现,import bundle3d; bundle3d.bundle_adjust(cameras, points, obs_cam, obs_pt, obs_uv, K, fix_first=True, max_iter=200);从台账取用则 ops3d.get("bundle_adjust"))

用法

以重投影误差最小同时优化相机位姿与 3D 点。→ dict{cameras, points, rmse, cost}。

cameras (nc,6)=[rvec(3)|t(3)] 的初始值、points (m,3) 的初始值、观测 obs_cam/obs_pt/obs_uv。fix_first=True 时将第一个相机固定为相当于 [I|0] 的状态(保持初始值),以消除 gauge。

scale gauge:重投影误差在“以相机 0 的中心为基准将整个场景做相似放大”时严格不变,因此仅凭它无法确定解的 scale,LM 会滑向任意倍率(实测 ×0.7〜×213,rmse≈0 不变)。本函数添加 1 个使结构到相机 0 中心的 RMS 距离(scale_anchor)保持初始值的残差 w·(rms/rms0 − 1) 来固定它。重投影代价在 scale 方向上梯度为零,因此该残差在最优解处严格为 0, 返回的 scale 与初始结构的一致(与用基线长度 ‖t₁‖ 固定相比,由于按点数取平均,初始扰动的影响更小)。若初始结构退化(所有点都与相机 0 的中心重合),则不施加约束。所采用的 RMS 距离记录在返回 dict 的 scale_anchor 中。

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

可运行的示例(实际调用该算子并已验证的样例)

• bundle_adjust — py -3.11 examples_3d/bundle_adjust.py

类型可衔接的下一个算子(可接受 table 作为输入)

fuse_to_voxel · mesh_select_lod

同类别(bundle_adjust)

mean_reprojection_error · project


*Provenance: bundle3d.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.