fix(ssim-cie94): increase SSIM window radius (#19343)

While migrating Playwright tests from pixelmatch comparator to the
ssim-cie94 comparator, we noticed a rendering artifact that happens
on playwright screenshot tests on WebKit Linux.

This PR adds a set of cropped-down examples and tunes the ssim-cie94
comparator to accept these rendering artifacts.
This commit is contained in:
Andrey Lushnikov 2022-12-07 16:25:16 -08:00 committed by GitHub
parent 59a41f6051
commit 6139b432fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 3 additions and 1 deletions

View File

@ -18,7 +18,7 @@ import { blendWithWhite, colorDeltaE94, rgb2gray } from './colorUtils';
import { ImageChannel } from './imageChannel';
import { ssim, FastStats } from './stats';
const SSIM_WINDOW_RADIUS = 5;
const SSIM_WINDOW_RADIUS = 15;
const VARIANCE_WINDOW_RADIUS = 1;
function drawPixel(width: number, data: Buffer, x: number, y: number, r: number, g: number, b: number) {

View File

@ -0,0 +1,2 @@
A set of examples with rendering artifacts that happen when running Playwright
screenshot tests on WebKit linux.

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B