Realm

oa::image::ssim

Global structural similarity per image plane through a serial per-plane reduction of means, variances, and covariance with the standard K1=0.01, K2=0.03 constants over a [0, 1] dynamic range, following the SSIM index of Wang et al. rather than OpenCV’s windowed map. The result Matrix carries the image’s leading plane dimensions. Errors Returns an error unless both images are nonempty FP32 NCHW/CHW images with identical shape, layout, and format.

FnRust public API

Function Documentation

pub fn ssim( first: &Image, second: &Image ) -> Result<Matrix>
Global structural similarity per image plane through a serial per-plane reduction of means, variances, and covariance with the standard K1=0.01, K2=0.03 constants over a [0, 1] dynamic range, following the SSIM index of Wang et al. rather than OpenCV’s windowed map. The result Matrix carries the image’s leading plane dimensions. Errors Returns an error unless both images are nonempty FP32 NCHW/CHW images with identical shape, layout, and format.