motion_segment op• Data kinds: points × points → labels
• Call: 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' (implementation को सीधे call करना हो तो 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', registry से लेना हो तो ops3d.get("segment_rigid_motions"))
• Ledger के ज़रिए return value: fullseye.ledger.segment_rigid_motions(...) केवल घोषित out type labels का value लौटाता है (मूल function सहायक जानकारी भी लौटाता है)। जो हिस्सा छोड़ दिया गया है उसकी ज़रूरत हो तो fullseye.ledger.segment_rigid_motions.raw(...) का उपयोग करें, या motion_seg3d.segment_rigid_motions को सीधे call करें।
• मूल function का return: {"labels", "motions"} → labels
2 point clouds को उन rigid bodies में बाँटता है जिनकी motion मेल खाती है (बार-बार RANSAC से multi-body segmentation)।
पहले estimate_flow से observed flow (हर pts0 point -> pts1 में nearest neighbour) लेता है, और target = pts0 + flow को correspondence के रूप में स्थिर करता है। इसके बाद बचे हुए points के समूह पर:
1. spatially पास के k_sample points (seed + उसके nearest neighbours) को seed बनाकर Kabsch से rigid body hypothesis बनाता है,
2. flow consistency || (R·s + t) - target(s) || < thresh पूरी करने वाले inliers गिनता है,
3. n_iter trials में significance gate पास करने वाली सबसे अच्छी hypothesis चुनता है (inlier residual का median thresh के एक निश्चित अनुपात से कम = असली rigid body की तरह residuals 0 के पास केंद्रित। uncorrelated/noise का संयोगवश fit tolerance sphere भर देता है और residual ≈ 0.6*thresh होता है, इसलिए हटा दिया जाता है), और उसके inliers से Kabsch दोबारा fit करता है (refine),
4. inliers की संख्या min_inliers या अधिक हो और refine के बाद भी significance बनी रहे, तो उसे 1 rigid body के रूप में तय करके हटाता है। ऐसा न हो तो body नहीं बनाता और बचे points को -1 पर छोड़कर समाप्त करता है (नकली rigid body नहीं गढ़ता)।
यह max_bodies bodies मिलने तक या बचे points के threshold से कम होने तक दोहराया जाता है। किसी rigid body में न आने वाले बचे points को labels = -1 मिलता है (outlier / बिना correspondence, दिखावा नहीं)। neighbourhood seed sampling spatially लगातार objects को एक साथ पकड़ने के लिए locality prior है; यह threshold नहीं बल्कि केवल relative rank का उपयोग करता है, इसलिए scale invariant है।
Args:
pts0: (N, 3) समय 0 का point cloud।
pts1: (M, 3) समय 1 का point cloud (N के बराबर होना ज़रूरी नहीं)।
thresh: flow consistency की inlier distance threshold। इसे coordinate scale के सापेक्ष दें
(module के अंदर कोई absolute epsilon नहीं है, इसलिए caller इसे coordinate system के अनुसार रखता है)।
max_bodies: निकाले जाने वाले rigid bodies की अधिकतम संख्या (>= 1)।
min_inliers: 1 rigid body मानने के लिए न्यूनतम inliers। None हो तो max(3, round(0.1*N))।
outliers के ढेर को नकली rigid body बनने से रोकने वाली निचली सीमा।
n_iter: हर 1 rigid body के लिए RANSAC trials की संख्या।
k_sample: 1 hypothesis बनाने वाले seed sample के points की संख्या (seed + nearest neighbours, >= 3)।
seed: RANSAC random seed (reproducibility)।
Returns:
dict: {"labels": (N,) int (rigid-body id of each point, 0..K-1 / outlier=-1), "motions": [(R, t), ...] (rigid transforms in id order, K of them)}।
Raises:
ValueError: गलत shape / non-finite / pts1 खाली / thresh <= 0 / max_bodies < 1 /
k_sample < 3।
• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।
• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।
• motion_seg — py -3.11 examples_3d/motion_seg.py
labels को input के रूप में लेते हैं)fuse_to_voxel · vol_region_props
motion_segment)*Provenance: motion_seg3d.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.