segment_rigid_motions — 3D motion_segment op

데이터 종류: points × pointslabels

호출: import fullseye as fs; fs.ledger.segment_rigid_motions(pts0, pts1, thresh, max_bodies: 'int' = 5, min_inliers=None, n_iter: 'int' = 100, k_sample: 'int' = 6, seed: 'int' = 0) -> 'dict'(구현을 직접 호출하려면 import motion_seg3d; motion_seg3d.segment_rigid_motions(pts0, pts1, thresh, max_bodies: 'int' = 5, min_inliers=None, n_iter: 'int' = 100, k_sample: 'int' = 6, seed: 'int' = 0) -> 'dict', 원장에서 가져오려면 ops3d.get("segment_rigid_motions"))

원장 경유의 반환값: fullseye.ledger.segment_rigid_motions(...) 는 **선언된 out 형 labels 의 값만** 반환합니다(실제 함수는 보조 정보도 반환). 버려진 쪽이 필요하면 fullseye.ledger.segment_rigid_motions.raw(...) 를 쓰거나 motion_seg3d.segment_rigid_motions 를 직접 호출하세요.

• 실제 반환: {"labels", "motions"} → labels

사용법

두 점군을 운동이 일치하는 강체마다 분할(반복 RANSAC 에 의한 multi-body 분할).

> 아래 상세 설명은 원문입니다 —— 요약과 제목은 번역되어 있습니다.

まず :func:estimate_flow で観測フロー(各 pts0 点 -> pts1 最近傍)を取り、

`target = pts0 + flow` を対応先として固定する。以後、残り点集合に対して:

1. 空間的に近い `k_sample` 点(seed + その最近傍)を種に Kabsch で剛体仮説を立て、

2. フロー整合 `|| (R·s + t) - target(s) || < thresh` を満たす inlier を数え、

3. `n_iter` 試行で 有意性ゲートを満たす 最良仮説を選び(inlier 残差中央値が

`thresh` の一定割合未満 = 真の剛体らしく残差が 0 近傍に集中。無相関/ノイズの

偶然適合は許容球を満たし残差 ≈ 0.6*thresh なので弾かれる)、その inlier で Kabsch

再フィット(refine)、

4. inlier 数が `min_inliers` 以上 かつ refine 後も有意性を保つならそれを 1 剛体

として確定・除去。満たさなければ body を作らず残余は -1 のまま終了(偽の剛体を捏造

しない)。

を `max_bodies` 個または残り点が閾値を下回るまで繰り返す。どの剛体にも属さない残り点は

`labels = -1`(outlier / 未対応、詐称しない)。近傍種サンプリングは空間的に連続な物体を

まとめて掴むための locality prior で、閾値ではなく相対順位だけを使うためスケール不変。

Args:

pts0: (N, 3) 時刻 0 の点群。

pts1: (M, 3) 時刻 1 の点群(N と一致不要)。

thresh: フロー整合の inlier 距離しきい値。座標スケール相対で与えること

(絶対 epsilon をモジュール内に持たないため、呼び手が座標系に合わせる)。

max_bodies: 抽出する剛体数の上限(>= 1)。

min_inliers: 1 剛体と認める最小 inlier 数。None なら `max(3, round(0.1*N))`。

outlier の塊を偽の剛体にしないための下限。

n_iter: 剛体 1 個あたりの RANSAC 試行回数。

k_sample: 1 仮説を作る種サンプルの点数(seed + 最近傍、>= 3)。

seed: RANSAC 乱数シード(再現性)。

Returns:

dict: ``{"labels": (N,) int(各点の剛体 id、0..K-1 / outlier=-1),

"motions": [(R, t), ...] (id 順の剛体変換、K 個)}``。

Raises:

ValueError: 形状不正 / 非有限 / pts1 空 / thresh <= 0 / max_bodies < 1 /

k_sample < 3。

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

motion_segpy -3.11 examples_3d/motion_seg.py

타입이 이어지는 다음 연산자(labels 를 입력으로 받는 것)

fuse_to_voxel · vol_region_props

같은 카테고리(motion_segment)

estimate_flow · fit_rigid


*Provenance: motion_seg3d.py — 3D 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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