obb — 3D bounds op

数据种类:pointsprimitive

调用: import fullseye as fs; fs.ledger.obb(points) -> 'dict'(要直接调用实现,import pcseg; pcseg.obb(points) -> 'dict';从台账取用则 ops3d.get("obb"))

用法

用 PCA 求有向包围盒。

> 以下的详细说明为原文 —— 摘要与标题已翻译。

Returns ``{center, axes (3,3 columns = box axes), extents (3, half-widths),

corners (8,3)}``. The tight-fitting box a manipulator uses to reason about an

object's size and grasp width once it has been segmented out.

手順: 重心 `c を引いた点群の SVD(full_matrices=False)で主軸 axes`(列 = 特異値の降順、

第 1 列が最も広がる方向)を取り、点を主軸座標に写して各軸の min/max から半幅 `extents` と

箱中心 `center(重心とは一般に異なる)を求める。cornerscenter + (±extents) @ axes.T`

の 8 点で、符号の組合せは `meshgrid([-1,1],[-1,1],[-1,1])` の順。

• `points: (N,3) 以外は ValueError、2 点未満も ValueError`。

• PCA の主軸は「最小体積の箱」を保証しない(点の分布に沿うだけ)。主軸の符号は SVD の任意性で

決まり、点の分布が等方に近い(特異値が縮退する)と軸の向きは不安定になる。

• `extents は半幅なので辺長は 2 * extents`。単位は座標の単位。

背景知识指南(该算子背后的物理与约定)

blender_interop — Blender との併用 — 形を作って fullseye で測る(軸・単位・正解データの罠)

参考(示例数据・文献)

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

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

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

hull_boundspy -3.11 examples_3d/hull_bounds.py

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

fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment

同类别(bounds)

convex_hull · aabb · min_enclosing_sphere


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

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