shape_index — 3D curvature op

• Data kinds: points → descriptor

• Call: import fullseye as fs; fs.ledger.shape_index(points, k=25, normals=None) (implementation को सीधे call करना हो तो import curvature3d; curvature3d.shape_index(points, k=25, normals=None), registry से लेना हो तो ops3d.get("shape_index"))

उपयोग

Koenderink का shape index s∈[-1,1] (convex sphere +1, cylinder +0.5, saddle 0, concave sphere -1)। → (N,)।

umbilic/plane का निर्णय curvature scale के सापेक्ष है (कोई absolute threshold नहीं)। हल्के convex/concave क्षेत्र (curvature बहुत छोटा होने पर भी) अपना sign = concave/convex बनाए रखते हैं, और plane के रूप में s=0 केवल उन points को मिलता है जिनका curvature पूरे data के curvature scale के सापेक्ष 0 है।

normals (oriented reference normals, (N,3)) न देने पर open surface का concave/convex sign अनिश्चित रहता है (convex magnitude के रूप में report होता है)। oriented normals देने पर परिणाम global orientation के साथ मेल खाता है और सही sign देता है (concave sphere = cup → -1)।

गणना (हर point पर, principal_curvatures जैसा ही fit):

• plane जाँच: अगर curvedness sqrt((k1² + k2²) / 2) सभी points की curvedness के median × 1e-3 से कम है, तो s = 0। अगर median 0 है (कोई curvature signal नहीं), तो सभी points 0।

• umbilic जाँच: अगर |k1 - k2| < 1e-2 × (|k1| + |k2|), तो s = sign(k1 + k2) (ठीक ±1)।

• अन्यथा: s = (2/π) · arctan((k1 + k2) / (k1 - k2))।

• threshold absolute नहीं बल्कि पूरे data के curvature scale के सापेक्ष है, इसलिए एक ही आकार में भी, कौन से points plane माने जाएँगे यह दूसरे points के साथ मिश्रण पर बदलता है। इसे एक ही point cloud के वर्गीकरण की मान्यता के साथ इस्तेमाल करें।

• जिन points का neighbourhood 5 points से कम है उनके लिए k1 = k2 = 0 → plane (0)। k को N-1 तक काटा जाता है।

• normals (N,3) होना चाहिए और हर row finite तथा non-zero हो (ValueError)। न देने पर open surface का sign अनिश्चित है (convex side)।

• मोड़ की तीव्रता शामिल नहीं है। तीव्रता भी चाहिए तो principal_curvatures के 2 मानों को (N,2) में रखकर curvature_to_shape_index से गुज़ारें।

पृष्ठभूमि guides (इस op के पीछे की physics और conventions)

• blas_threads_and_memory — Matrix decompositions धीमे क्यों हैं — BLAS threads, caches, memory layout

संदर्भ (sample data, साहित्य)

• 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 के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• curvature_grasp — py -3.11 examples_3d/curvature_grasp.py

• itokawa_curvature — py -3.11 examples_3d/itokawa_curvature.py

वे अगले ops जिनसे type जुड़ता है (descriptor को input के रूप में लेते हैं)

fuse_to_voxel · shape_distance

इसी category के (curvature)

principal_curvatures · mean_curvature · gaussian_curvature · estimate_normals


*Provenance: curvature3d.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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