curvature op• Data kinds: curvature → pairs
• Call: import fullseye as fs; fs.ledger.curvature_to_shape_index(curvature) (to call the implementation directly, import reprconv; reprconv.curvature_to_shape_index(curvature); from the registry, opsreprconv.get("curvature_to_shape_index"))
Principal curvatures (N,2) → shape index and curvedness, as pairs (N,2). The exit from curvature.
The (S, C) of Koenderink & van Doorn, *Surface shape and curvature scales*, Image and Vision Computing 10(8) 1992:
S = (2/pi) * atan2(k1 + k2, k1 - k2) (k1 >= k2, S in [-1, 1])
C = sqrt((k1^2 + k2^2) / 2) (amount of bending)
The key point is that it is written with atan2, not a division: neither at a spherical umbilic (k1 == k2) nor on a plane (k1 == k2 == 0) does a division by zero occur, and the round trip with shape_index_to_curvature is exact over the whole domain (measured max|Δ| = 4.6e-16). Implementing the textbook atan((k1+k2)/(k1-k2)) as is gives NaN at umbilics, and that NaN turns into "dark pixels" downstream.
S = -1 is a cup, 0 a saddle, +1 a cap. C is "how much it bends", independent of shape.
Only the information about input order does not come back: even if passed in the order (k2, k1), they are internally reordered to k1 >= k2, so a round trip always returns them in descending order (a convention on orientation, not a loss of values).
Args:
curvature: (N, 2) [k1, k2], or a tuple of 2 equal-length 1-D arrays
(this is the raw return of principal_curvatures).
Returns:
(N, 2) float64. Column 0 = S in [-1, 1], column 1 = C >= 0.
Raises:
ValueError: invalid shape / non-finite.
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• representation_roundtrip — py -3.11 examples/representation_roundtrip.py
pairs as input)angles_to_normals · shape_index_to_curvature · pairs_to_signal · pairs_to_image2d · pairs_to_table · polar_to_cscalar
curvature)shape_index_to_curvature · curvature_to_table
*Provenance: reprconv.py — REPRCONV operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.