Compares a candidate Image against a reference Image and emits full-reference quality metrics, either as a {psnr: Double, ssim: Double, mse: Double} record or as [Analytics.Metric].
Typical backends
Compare two image sources and log the quality metrics.
Compare an image against a denoised version of itself to measure how much an enhancement step changed it.
Caveats
- I/O contractThe two inputs are aligned pairwise; the metrics measure pixel-level agreement between a candidate and its reference, not perceptual or semantic similarity.
- I/O contractA size mismatch is reconciled by resizing the candidate to the reference geometry before scoring, so a mismatched pair never stops the stream; feed images that already share dimensions for the truest per-pixel comparison.
- AccuracyIdentical inputs report a maximal PSNR sentinel rather than infinity, so a perfect-match score is a capped value, not an unbounded one.
- LimitationThe metrics are full-reference and require a known good reference image; use a single-image quality estimator when no reference is available.