keypoint op• 数据种类:keypoints → image2d
• 调用: import fullseye as fs; fs.ledger.keypoints_to_image2d(keypoints, shape=(64, 64))(要直接调用实现,import reprconv; reprconv.keypoints_to_image2d(keypoints, shape=(64, 64));从台账取用则 opsreprconv.get("keypoints_to_image2d"))
图像坐标 (N,2) = (u, v) → 计数图像 (H, W)。keypoints 的第二个出口。
以 round(v) 为行、round(u) 为列,逐个加 1。到像素网格的量化就是损失,与 keypoints_from_image2d 往返时位置最多偏移 0.5 像素(在相互远离的 225 点上实测: 每个轴 RMS 0.2835 px = 与均匀量化的理论值 1/sqrt(12) = 0.2887 一致。按 2-D 距离为 sqrt(2) 倍的 0.4009 px,理论 sqrt(2/12) = 0.4082)。
★这里也曾经弄错过: 把 2-D 距离的实测与 1-D 的理论值放在一起,差点读成"应该是 0.29 却是 0.40" —— 把逐轴的量与距离的量混在一起,正确的实现看起来也像是错的。相邻的点会作为连通分量融合,所以往返后点数也可能减少(实测: 随机放置 60 点得到 54 点)。
范围外的点不会默默丢弃 —— 丢弃的话就无法区分是 "检测变少了"还是"图像太小了"。
Args:
keypoints: (N, 2) 的 (u, v)。
shape: (H, W)。
Returns:
(H, W) float64 的计数图像。
Raises:
ValueError: 形状不正 / 非有限 / 有范围外的点 / shape 超过上限。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• 算法的正典(作者、年份)与用途见上面的族使用指南。
• representation_roundtrip — py -3.11 examples/representation_roundtrip.py
image2d 作为输入)keypoint)keypoints_uv_to_points · points_zyx_to_keypoints_uv · keypoints_from_image2d · position_to_points · points_to_position
*Provenance: reprconv.py — REPRCONV 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.