Class SKPixelComparisonResult
Holds the results of a pixel-by-pixel image comparison.
public class SKPixelComparisonResult
- Inheritance
-
SKPixelComparisonResult
- Inherited Members
Constructors
- SKPixelComparisonResult(int, int, int)
Initializes a new instance of SKPixelComparisonResult.
- SKPixelComparisonResult(int, int, int, long)
Initializes a new instance of SKPixelComparisonResult.
- SKPixelComparisonResult(int, int, int, long, int)
Initializes a new instance of SKPixelComparisonResult.
Properties
- AbsoluteError
Gets the sum of per-channel absolute differences across all pixels.
- ChannelCount
Gets the number of channels compared (3 for RGB, 4 for RGBA).
- ErrorPixelCount
Gets the number of pixels that differ between the two images.
- ErrorPixelPercentage
Gets the ratio of differing pixels to total pixels (0.0 to 1.0). Returns 0 if TotalPixels is 0.
- MeanAbsoluteError
Gets the mean absolute error per channel, computed as AbsoluteError / (TotalPixels × ChannelCount). Range: 0 (identical) to 255 (maximum difference). Returns 0 if TotalPixels is 0.
- MeanSquaredError
Gets the mean squared error per channel, computed as SumSquaredError / (TotalPixels × ChannelCount). Range: 0 (identical) to 65025 (maximum difference). Returns 0 if TotalPixels is 0.
- NormalizedRootMeanSquaredError
Gets the normalized root mean squared error, computed as RootMeanSquaredError / 255. Range: 0 (identical) to 1 (maximum difference). Useful for threshold-based pass/fail testing.
- PeakSignalToNoiseRatio
Gets the peak signal-to-noise ratio in decibels, computed as 10 × log₁₀(255² / MeanSquaredError). Returns PositiveInfinity for identical images.
- RootMeanSquaredError
Gets the root mean squared error, computed as the square root of MeanSquaredError. Range: 0 (identical) to 255 (maximum difference).
- SumSquaredError
Gets the sum of per-channel squared differences across all pixels.
- TotalPixels
Gets the total number of pixels compared.