cutout — 3D augment op

• 数据种类:points → points

• 调用: import fullseye as fs; fs.ledger.cutout(points, extent: 'Union[float, np.ndarray]', seed: 'int' = 0) -> 'Tuple[np.ndarray, np.ndarray]'(要直接调用实现,import pcl_augment; pcl_augment.cutout(points, extent: 'Union[float, np.ndarray]', seed: 'int' = 0) -> 'Tuple[np.ndarray, np.ndarray]';从台账取用则 ops3d.get("cutout"))

• 经台账调用的返回值: fullseye.ledger.cutout(...) 只返回声明的 out 类型 points 的值(底层函数还会返回辅助信息)。需要被丢弃的部分时,使用 fullseye.ledger.cutout.raw(...),或直接调用 pcl_augment.cutout。

用法

去除空间中一个轴对齐盒区域,返回 (kept, kept_idx)(模拟局部缺失)。

从已有的点中均匀采样 1 个作为中心,删除边长为 extent(标量 = 立方体,或 (3,) = 各轴边长)的盒子内的所有点。中心点自身必定在内,因此至少删除 1 个点。被删除的点必定落在边长 extent 的盒子内(空间上局部 = 可与随机散布区分)。kept == points[kept_idx],extent > 0。

extent 传入非正值或 (3,) 以外的形状时抛出 ValueError。空输入返回空和空索引。中心是由 rng.integers(n) 选出的点,因此即使 seed 相同,点的排列一变,被挖掉的位置也会不同。盒子判定为闭区间 |P - center| <= extent/2。删除点数取决于密度,若 extent 大于点云尺寸则所有点都会消失。返回值为 (kept float64 (M,3), kept_idx int64 (M,)),保持原顺序。均匀缺失请用 random_dropout。

参考(示例数据、文献)

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

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

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

• sensor_seg — py -3.11 examples_3d/sensor_seg.py

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

points_to_voxel · gaussians_to_voxel · estimate_point_normals · to_points · match_points_ncc · match_pca · moment_axes · icp_point2point_3d

同类别(augment)

jitter · random_rotation · random_scale · random_dropout · elastic_deform


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

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