curvature_to_shape_index — REPRCONV curvature op

• Data kinds: curvature → pairs

• Call: import fullseye as fs; fs.ledger.curvature_to_shape_index(curvature) (implementation को सीधे call करना हो तो import reprconv; reprconv.curvature_to_shape_index(curvature), registry से लेना हो तो opsreprconv.get("curvature_to_shape_index"))

• GPU: नहीं (केवल CPU reference implementation)

उपयोग

principal curvature (N,2) → shape index और curvedness, (N,2) के pairs। curvature से निकास।

Koenderink & van Doorn, *Surface shape and curvature scales*, Image and Vision Computing 10(8) 1992 का (S, C):

S = (2/pi) * atan2(k1 + k2, k1 - k2) (k1 >= k2, S in [-1, 1])

C = sqrt((k1^2 + k2^2) / 2) (मुड़ने की मात्रा)

मुख्य बात यह है कि इसे division से नहीं, atan2 से लिखा गया है: spherical umbilic (k1 == k2) पर भी और plane (k1 == k2 == 0) पर भी zero से भाग नहीं होता, और shape_index_to_curvature के साथ round trip पूरे domain में सटीक होता है (measured max|Δ| = 4.6e-16)। textbook के atan((k1+k2)/(k1-k2)) को जस का तस implement करने पर umbilic पर NaN आता है, और वह NaN downstream में "अंधेरे pixel" बन जाता है।

S = -1 cup है, 0 saddle, +1 cap। C shape से स्वतंत्र "कितना मुड़ा है" है।

केवल input क्रम की जानकारी वापस नहीं आती: (k2, k1) क्रम में देने पर भी भीतर k1 >= k2 में फिर से क्रमित किया जाता है, इसलिए round trip के बाद हमेशा घटते क्रम में लौटता है (यह दिशा की परंपरा है, मान का loss नहीं)।

Args:

curvature: (N, 2) का [k1, k2], या समान लंबाई वाले 2 1-D array का tuple

(principal_curvatures का कच्चा return यही है)।

Returns:

(N, 2) float64। column 0 = S in [-1, 1], column 1 = C >= 0।

Raises:

ValueError: shape ग़लत / non-finite।

संदर्भ (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 के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

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

• representation_roundtrip — py -3.11 examples/representation_roundtrip.py

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

angles_to_normals · shape_index_to_curvature · pairs_to_signal · pairs_to_image2d · pairs_to_table · polar_to_cscalar · pairs_peak_x

इसी category के (curvature)

shape_index_to_curvature · curvature_to_table


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

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