import { S as SsimOptions } from './types-ClU9XBY2.js'; /** * MS-SSIM (Multi-Scale Structural Similarity Index) * * Reference: * Z. Wang, E. P. Simoncelli and A. C. Bovik, "Multi-scale structural similarity * for image quality assessment," Invited Paper, IEEE Asilomar Conference on * Signals, Systems and Computers, Nov. 2003 * * This implementation matches the original MATLAB implementation exactly. */ /** * MS-SSIM options extending base SSIM options */ interface MsssimOptions extends SsimOptions { /** Number of scales (default: 5) */ level?: number; /** Weights for each scale (default: [0.0448, 0.2856, 0.3001, 0.2363, 0.1333]) */ weight?: number[]; /** Combination method: 'product' or 'wtd_sum' (default: 'product') */ method?: "product" | "wtd_sum"; } /** * Compute MS-SSIM between two images * * @param image1 - First image data (RGBA format, 4 bytes per pixel) * @param image2 - Second image data (RGBA format, 4 bytes per pixel) * @param output - Optional output buffer for SSIM map visualization at finest scale (RGBA format) * @param width - Image width in pixels * @param height - Image height in pixels * @param options - MS-SSIM computation options * @returns MS-SSIM score (0-1, where 1 is identical) * * @example * ```typescript * // Basic usage * const score = mssim(img1, img2, undefined, width, height); * * // With SSIM map output * const output = new Uint8ClampedArray(width * height * 4); * const score = mssim(img1, img2, output, width, height); * // output now contains grayscale SSIM map at the finest scale * ``` */ declare function msssim(image1: Uint8ClampedArray | Uint8Array | Buffer, image2: Uint8ClampedArray | Uint8Array | Buffer, output: Uint8ClampedArray | Uint8Array | Buffer | undefined, width: number, height: number, options?: MsssimOptions): number; export { type MsssimOptions, msssim as default, msssim };