curvature op• Data kinds: curvature → pairs
• Call: import reprconv; reprconv.curvature_to_shape_index(curvature) (or opsreprconv.get("curvature_to_shape_index"))
Principal curvatures `(N,2) → shape index and curvedness, as pairs (N,2). The exit from curvature`.
> The detailed description below is the original text — the summary and the headings are translated.
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) (曲がりの大きさ)
除算でなく atan2 で書いてあるのが要点で、球状臍点 (k1 == k2) でも
平面 (k1 == k2 == 0) でもゼロ除算にならず、:func:shape_index_to_curvature
との往復が全域で厳密になる(実測 max|Δ| = 4.6e-16)。教科書の
`atan((k1+k2)/(k1-k2))` をそのまま実装すると臍点で NaN が出て、
その NaN が下流で「暗い画素」に化ける。
S = -1 は杯、0 は鞍、+1 は帽子。C は形と独立な「どれだけ曲がっているか」。
入力順の情報だけは戻らない: (k2, k1) の順で渡しても内部で k1 >= k2 へ
並べ替えるので、往復すると必ず降順で返る(向きの規約であり、値の損失ではない)。
Args:
curvature: (N, 2) の `[k1, k2]`、または 2 本の等長 1-D のタプル
(`principal_curvatures` の素の返りがこれ)。
Returns:
(N, 2) float64。列 0 = S in [-1, 1]、列 1 = C >= 0。
Raises:
ValueError: 形状不正 / 非有限。
• 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.