tb_keypoints_to_image2d — 2D typed op

• Data kinds: keypoints → image

• Call: fullseye.apply(img, "tb_keypoints_to_image2d", a=0.5, b=0.5) (the 2-D model is one image plus two scalar knobs a,b∈[0,1])

*No figure: the type is reachable, but the generic synthetic input is outside this op's domain — 橋渡しで束縛した raster が 64×64 固定で、128×128 の点は外に落ちる. See the runnable examples below for usage.*

Usage

Image coordinates (N,2) = (u, v) -> a count image (H, W). The second exit of keypoints.

Adds 1 at row round(v), column round(u). Quantisation onto the pixel grid is the loss: a round trip with keypoints_from_image2d shifts positions by up to 0.5 pixel (measured on 225 well-separated points: per axis RMS 0.2835 px = matching the theoretical value of uniform quantisation 1/sqrt(12) = 0.2887. As a 2-D distance it is sqrt(2) times that, 0.4009 px, against the theoretical sqrt(2/12) = 0.4082). ★We got this wrong once too: we nearly read the measured 2-D distance against the 1-D theoretical value as "it should be 0.29 but it is 0.40" —— mixing per-axis quantities with distance quantities makes a correct implementation look wrong. Nearby points merge as a connected component, so the number of points can also drop in a round trip (measured: placing 60 points at random gives 54 points).

Out-of-range points are not silently discarded —— discarding them would make it impossible to tell whether "the detections decreased" or "the image was too small".

Args:

keypoints: (N, 2) of (u, v).

shape: (H, W).

Returns:

(H, W) float64 count image.

Raises:

ValueError: invalid shape / non-finite / out-of-range points present / shape above the limit.

The reprconv op keypoints_to_image2d bridged into the 2-D evolution registry. The implementation is the same; only the calling convention is adapted to op(v, a, b). This op has no tunable parameters; neither a nor b is used.

References (sample data, literature)

• 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.

Runnable examples (verified samples that actually call this op)

The examples below call the underlying ledger op keypoints_to_image2d. This bridge op is the same implementation adapted to the fn(v, a, b) convention, so the behaviour carries over unchanged (only the call form differs).

• representation_roundtrip — py -3.11 examples/representation_roundtrip.py

Ops the type connects to (they accept image as input)

identity · gaussian · mean_box · bilateral · unsharp · median · min_filter · max_filter

Same category (typed)

tb_points_to_voxel · tb_estimate_point_normals · tb_iss_keypoints · tb_project_points · tb_render_point_depth · tb_statistical_outlier_removal · tb_radius_outlier_removal · tb_voxel_grid_downsample


*Provenance: ops.py — 2D 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.