fidelity op• Data kinds: image2d × image2d → image2d
• Call: import fullseye as fs; fs.ledger.ssim_map(a, b, data_range=None, win_size=11, sigma=1.5, K1=0.01, K2=0.03, channel_axis=None, crop_border=True) (to call the implementation directly, import imgmetrics; imgmetrics.ssim_map(a, b, data_range=None, win_size=11, sigma=1.5, K1=0.01, K2=0.03, channel_axis=None, crop_border=True); from the registry, opsimgmetrics.get("ssim_map"))
The SSIM map (before averaging) — to see *where* the two differ, as a picture.
> The detailed description below is the original text — the summary and the headings are translated.
`channel_axis` を指定するとチャネルごとに計算し、その平均マップを返す。
計算: 局所平均 `mu と分散・共分散を、幅 win_size に切った σ = sigma` の
ガウシアン窓(境界は鏡像)で取り、画素ごとに
`((2 mu_a mu_b + C1)(2 s_ab + C2)) / ((mu_a^2 + mu_b^2 + C1)(s_a + s_b + C2))`。
`C1 = (K1 dr)^2、C2 = (K2 dr)^2、dr は data_range`。分散は母分散
(`n/(n-1) 補正なし)。この平均が ssim`。
• `data_range: 整数 dtype は自動、float は [0, 1]` のときだけ 1.0 と推定し、
それ以外は明示必須(`data_range_of の契約、外れると MetricContractError`)。
• `win_size`: 3 以上の奇数。各空間軸はこれ以上の長さが必要。
• `crop_border=True(既定)は窓半径 (win_size-1)//2` ぶんの縁を落とすので、
返り値は `(H - 2p, W - 2p)`。落とした後に何も残らない小画像は例外。
`False` なら入力と同形だが、縁は鏡像埋めの影響を含む。
• 返り値: float64 マップ。1 が局所的に一致、負にもなりうる(構造が反転)。
• 失敗: 形の不一致 / 空 / 非有限 / `sigma <= 0 / 偶数か 3 未満の win_size`。
• image_difference_metrics family guide
• 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.
• image_quality_metrics — py -3.11 examples/image_quality_metrics.py
image2d as input)mse · rmse · psnr · ssim · ms_ssim · image_entropy · joint_entropy · mutual_information
fidelity)mse · rmse · psnr · ssim · ms_ssim
*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.