Class MssimCalculator
- java.lang.Object
-
- com.google.android.exoplayer2.transformer.MssimCalculator
-
@Deprecated public final class MssimCalculator extends Object
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Image comparison tool that calculates the Mean Structural Similarity (MSSIM) of two images, developed by Wang, Bovik, Sheikh, and Simoncelli.MSSIM divides the image into windows, calculates SSIM of each, then returns the average.
See the SSIM paper.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static double
calculate(byte[] referenceBuffer, byte[] distortedBuffer, int width, int height)
Deprecated.Calculates the Mean Structural Similarity (MSSIM) between two images with window skipping.static double
calculate(byte[] referenceBuffer, byte[] distortedBuffer, int width, int height, boolean enableWindowSkipping)
Deprecated.Calculates the Mean Structural Similarity (MSSIM) between two images.
-
-
-
Method Detail
-
calculate
public static double calculate(byte[] referenceBuffer, byte[] distortedBuffer, int width, int height)
Deprecated.Calculates the Mean Structural Similarity (MSSIM) between two images with window skipping.
-
calculate
public static double calculate(byte[] referenceBuffer, byte[] distortedBuffer, int width, int height, boolean enableWindowSkipping)
Deprecated.Calculates the Mean Structural Similarity (MSSIM) between two images.The images are split into a grid of windows. For each window, the structural similarity (SSIM) is calculated. The MSSIM returned from this method is the mean of these SSIM values. If window skipping is enabled, only every other row and column are considered, thereby only one in four windows are evaluated.
- Parameters:
referenceBuffer
- The luma channel (Y) buffer of the reference image.distortedBuffer
- The luma channel (Y) buffer of the distorted image.width
- The image width in pixels.height
- The image height in pixels.enableWindowSkipping
- Whether to skip every other row and column when evaluating windows for SSIM calculation.- Returns:
- The MSSIM score between the input images.
-
-