mse — IMGMETRICS fidelity op

Data kinds: image2d × image2dscalar

Call: import fullseye as fs; fs.ledger.mse(a, b) (to call the implementation directly, import imgmetrics; imgmetrics.mse(a, b); from the registry, opsimgmetrics.get("mse"))

Usage

Mean squared error. A raw quantity that does not depend on `data_range`.

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

式: `mean((a - b)^2)`(全要素、float64 で計算)。

• `a, b: 同じ形なら次元は問わない(2-D グレー、(H, W, 3)`、3-D 体積)。

dtype も問わないが 画素値の尺度をそのまま引き継ぐ ―― uint8 の 2 枚と、

それを `/255 した float の 2 枚では値が 255^2` 倍違う。尺度を揃えて比べたい

なら `psnr(data_range` で正規化)を使う。

• 返り値: Python の `float。0 が完全一致、上限は data_range^2`。

• 失敗(`MetricContractError`): 形が違う / 空 / NaN・Inf を含む(黙って伝播させない)。

平方根が要るなら `rmse。まとめて測るなら compare_images`。

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 scalar as input)

Same category (fidelity)

rmse · psnr · ssim · ms_ssim · ssim_map


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