image-js
Version:
Image processing and manipulation in JavaScript
14 lines • 524 B
JavaScript
import { computeSsim } from "./compute_ssim.js";
/**
* Compute the Structural Dissimilarity (DSSIM) of two GREY images.
* @see {@link https://en.wikipedia.org/wiki/Structural_similarity}
* @param image - First image.
* @param otherImage - Second image.
* @param options - Options.
* @returns SSIM of the two images.
*/
export function computeDssim(image, otherImage, options = {}) {
const ssim = computeSsim(image, otherImage, options).mssim;
return (1 - ssim) / 2;
}
//# sourceMappingURL=compute_dssim.js.map