import { S as SsimOptions } from './types-ClU9XBY2.js'; /** * SSIM (Structural Similarity Index) with automatic downsampling * * Reference: * Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, * "Image quality assessment: From error visibility to structural similarity," * IEEE Transactions on Image Processing, vol. 13, no. 4, pp. 600-612, Apr. 2004. * * This implementation matches the MATLAB ssim.m reference implementation. */ /** * SSIM options */ interface SsimOptionsExtended extends SsimOptions { /** Dynamic range of the images (default: 255) */ L?: number; } /** * Compute SSIM between two images with automatic downsampling * * @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 (RGBA format) * @param width - Image width in pixels * @param height - Image height in pixels * @param options - SSIM computation options * @returns SSIM score (0-1, where 1 is identical) * * @example * ```typescript * // Basic usage * const score = ssim(img1, img2, undefined, width, height); * * // With SSIM map output * const output = new Uint8ClampedArray(width * height * 4); * const score = ssim(img1, img2, output, width, height); * ``` */ declare function ssim(image1: Uint8ClampedArray | Uint8Array | Buffer, image2: Uint8ClampedArray | Uint8Array | Buffer, output: Uint8ClampedArray | Uint8Array | Buffer | undefined, width: number, height: number, options?: SsimOptionsExtended): number; export { type SsimOptionsExtended, ssim as default, ssim };