curvature op• 数据种类:curvature → pairs
• 调用:import reprconv; reprconv.curvature_to_shape_index(curvature)(或 opsreprconv.get("curvature_to_shape_index"))
主曲率 `(N,2) → 形状指数与弯曲度 (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) (曲がりの大きさ)
除算でなく 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: 形状不正 / 非有限。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者・年份)与用途见上面的族使用指南。
• representation_roundtrip — py -3.11 examples/representation_roundtrip.py
pairs 作为输入)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 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.