mse — IMGMETRICS fidelity op

• Data kinds: image2d × image2d → scalar

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

Formula: mean((a - b)^2) (over all elements, computed in float64).

• a, b: any dimensionality as long as the shapes match (2-D grey, (H, W, 3), 3-D volume). The dtype does not matter either, but the scale of pixel values is carried over as is -- 2 uint8 images and the same 2 as float divided by /255 differ in value by a factor of 255^2. If you want to compare on a common scale, use psnr (normalised by data_range).

• Return value: a Python float. 0 is a perfect match; the upper bound is data_range^2.

• Failure (MetricContractError): shapes differ / empty / contains NaN or Inf (never propagated silently).

If you need the square root, rmse. To measure everything at once, 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_metrics — py -3.11 examples/image_quality_metrics.py

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

luma_limited_u8 · rank_data · tid2013_index

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.