random_scale — 3D augment op

• 数据种类:points → points

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

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

用法

绕原点施加均匀缩放 s ~ U(lo, hi) 并返回 (scaled, s)。

scaled = points * s。bbox 对角线长度恰好变为 s 倍(由于 s > 0, max/min 都变为 s 倍 → 对角线 ‖max-min‖ 也是 s 倍)。将物体尺度的波动(距离/传感器倍率)注入训练。要求 0 < lo <= hi(fail-closed(失败即拒绝))。

lo <= 0 或 hi < lo 抛出 ValueError(允许 lo == hi,此时总是 s = lo)。由于是绕原点放大,点云远离原点时质心也会移到 s 倍的位置(位置和大小同时改变)。若只想改变大小,请事先将质心移到原点。s 是 Python float,返回的点云为 float64。由 seed 决定。空输入返回空。

参考(示例数据、文献)

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

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

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

• augment_pointcloud — py -3.11 examples_3d/augment_pointcloud.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_dropout · elastic_deform · cutout


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

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