img_to_counts — 2D bridge op

Data kinds: imagecounts

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

img_to_counts: input → output

*The figure is the actual output on a synthetic 128×128 input. Left: input, right: output. Point clouds are drawn as a top-down scatter (brightness = z), 1-D series as a line plot, volumes as the maximum-intensity projection along z, videos as the middle frame, complex images as magnitude; return values that are not pictures are shown as the values themselves.*

Sweeping knob a (0.1 / 0.5 / 0.9, the other knob at its default):

img_to_counts: knob a sweep (docs site)

Sweeping knob b (0.1 / 0.5 / 0.9, the other knob at its default):

img_to_counts: knob b sweep (docs site)

On other images (synthetic scene / photo / coins. Top row: inputs, bottom row: their outputs. Knobs at default):

img_to_counts: other inputs (docs site)

*The 4th column is a colour (H,W,3) input. This op handles colour without crossing channels (it does not convolve the colour channel as a third spatial axis).*

Usage

Read one row (or column) of the image as expected photon numbers and draw a Poisson-sampled 1-D count series.

> The detailed description below is the original text — the summary and the headings are translated.

`expected = profile * n_max` を期待値とする Poisson 乱数(固定 seed 20260907)。

光子計数の族(`tb_counts_to_countrate / tb_spad_deadtime_apply` /

`tb_tcspc_background_subtract` …)が受ける 非負整数の 1-D 列 の合成器で、

`tcspc_simulate` と同じく「期待値が既知」なのが検算の根拠になる。

• `a → 行/列の位置(img_to_signal と同じ規則。b` が向きも決める)。

• `bb < 0.5 で行、b ≥ 0.5` で列。加えて 1 画素あたりの最大光子数

`n_max = 10 ** (1 + 2 * b)`(b=0 で 10、b=0.5 で 100、b=1 で 1,000)。

少ないほど散布雑音が目立つ。

• 返り値: 1-D `int64`、非負。長さは行なら W、列なら H。

• 決定的(seed 固定)。同じ入力・同じノブなら同じ列。

注意: 期待値 0 の画素はカウント 0 になる(Poisson(0) は常に 0)。

Detailed usage guide

gallery2d_bridge family guide

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.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Try it in Studio

The program below has been verified to run (same input as the figure). In Studio's help this block becomes buttons that load and run it on the spot.

img_to_counts 0.50 0.50

▸ Load this pipeline  ·  Load & run

Runnable examples (verified samples that actually call this op)

gallery2d_bridgepy -3.11 examples/gallery2d_bridge.py

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

identity · tb_spad_deadtime_apply · tb_spad_deadtime_correct · tb_tcspc_coates_correct · tb_tcspc_irf_convolve · tb_tcspc_background_subtract · tb_dtof_depth · tb_countrate_to_counts

Same category (bridge)

img_to_points · img_to_keypoints · img_to_signal · img_to_projection_profile · img_to_matrix · img_to_video · img_to_volume · img_to_lightfield


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