public class SSIM extends Object
The SSIM is run on 2D or 3D images. Because padding is applied to avoid edge effects in all dimensions, the minimum dimension size must be big enough to prevent negative dimensions. Depending on sigma, different algorithms are called to perform the Gaussian convolutions (Gauss3 or FastGauss). Which yields the following constraints:
sigma > 2: d > 2 * floor( 3.7210 * sigma + 0.20157 + 0.5 )
0.5 <= sigma <= 2: d > 2 * floor( 3 * sigma + 0.5)
sigma < 0.5: d > 4
For sigma = 1.5, the minimum dimension depth is then 11.
Note that the SSIM metrics throws an exception if the images have singular dimensions for the aforementioned reason.
| Constructor and Description |
|---|
SSIM() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends RealType<T>> |
computeMetrics(RandomAccessibleInterval<T> reference,
RandomAccessibleInterval<T> processed,
double sigma)
Compute the SSIM metrics.
|
public static final double K1
public static final double K2
public static <T extends RealType<T>> double computeMetrics(RandomAccessibleInterval<T> reference, RandomAccessibleInterval<T> processed, double sigma)
T - Pixel type of the imagesreference - Reference imageprocessed - Processed imagesigma - Standard deviation of the Gaussian filterCopyright © 2009–2024 ImgLib2. All rights reserved.