Skip to content

Image Comparison with Image compression

Roman Beskrovnyi edited this page Nov 29, 2019 · 1 revision

Image Comparison with Image Compression.

When someone made changes in the image in programs like Photoshop or Gimp and save image as a jpg file, s/he needs to choose the compression level (good quality and large file weight or visa Versa, from 0 to 100%). The compression algorithm makes some changes in pixels of the original image. When compression is near 60-70 quality lowering not much visible for human eyes tho, but still can be tangible for your algorithm even with a 10% sensitivity threshold.

So the question is will compression be a problem? Will high compression prevent your library work as expected?

Yes, image-comparison can help with it. Configuration pixelToleranceLevel can resolve this issue.

Above pdf file show tests with images with compression and how image-comparison handle it: for big images 0.3 tolerance + 100-60%quality -> stable result

test jpeg with compression (1)-01 test jpeg with compression (1)-02 test jpeg with compression (1)-03 test jpeg with compression (1)-04 test jpeg with compression (1)-05 test jpeg with compression (1)-06 test jpeg with compression (1)-07 test jpeg with compression (1)-08 test jpeg with compression (1)-09 test jpeg with compression (1)-10 test jpeg with compression (1)-11

Thanks, @Hexronimo for it! She provided an idea, test images and the results of the tests!

Clone this wiki locally