joint_histogram — IMGMETRICS information op

Data kinds: image2d × image2dimage2d

Call: import fullseye as fs; fs.ledger.joint_histogram(a, b, bins=64, data_range=None) (to call the implementation directly, import imgmetrics; imgmetrics.joint_histogram(a, b, bins=64, data_range=None); from the registry, opsimgmetrics.get("joint_histogram"))

Usage

Joint histogram of two images (the normalised joint probability).

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

ビン幅は `data_range` から決める ―― 画像ごとに min/max で伸縮させると、

一様に暗い絵と一様に明るい絵の相互情報量が同じになるので。

手順: 2 枚を平坦化し、両方に 同じ ビン境界 `[lo, lo + data_range]`

(`lo = 2 枚の最小値の小さいほう、bins 等分)で numpy.histogram2d` を取り、

総数で割って同時確率にする。

• `a, b`: 同じ形(次元は問わない)、有限。dtype は同じでなければ

`data_range` を明示する(混在 dtype からの推定は拒否)。

• `bins`: 2 以上の整数。

• `data_range: 整数 dtype は自動(uint8 = 255 など)、float は [0, 1]` の

ときだけ 1.0、それ以外は明示必須。

• 返り値: `(bins, bins) の float64、和は 1。行が a のビン、列が b` のビン。

`lo + data_range` を超える値はビンに入らない(数えられない)。

• 失敗(`MetricContractError): 形が違う / 空 / 非有限 / bins < 2` /

範囲に入る標本が 0。

`joint_entropy / mutual_information / image_entropy` はこの表から計算する。

Detailed usage guide

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

Runnable examples (verified samples that actually call this op)

image_quality_metricspy -3.11 examples/image_quality_metrics.py

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

mse · rmse · psnr · ssim · ms_ssim · ssim_map · image_entropy · joint_entropy

Same category (information)

image_entropy · joint_entropy · mutual_information · normalized_mutual_information


*Provenance: imgmetrics.py — IMGMETRICS 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.