How can I compare JPEG compression implementations for image-analysis research?
Asked 12/10/2014
5 views
2 answers
0
I want to run a set of test images through different JPEG encoders to study compression artifacts and see whether a recompressed image can be distinguished from its source. Are there tools, websites, or datasets that let me batch-test images with multiple JPEG compression implementations? Also, how much do JPEG encoders really differ in practice—are there commonly used libraries worth comparing?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
11y ago
2 Answers
2
I'm basically going to answer my own question: No.
There are no decent facilities for comparing JPEG compression libraries.
Additionally, I did some further experimentation which effectively invalidated the hypothesis that produced my desire for a comparative analysis in the first place, so the whole question is somewhat moot at this point.
I did a bunch of testing with the compressor used in PIL (which is libjpeg):

This is over the corpus of the USC-SIPI image test set, looking at the average entropy per pixel as a function of various compression ratios.
I did a writeup here.
Originally by user2611. Source · Licensed CC BY-SA 4.0
user2611
11y ago
0
Generated from our catalog & community — verify before relying on it.
There does not appear to be a well-known, dedicated service for comparing multiple JPEG compression engines side by side. A practical starting point is to build your own tests with tools such as ImageMagick, which can batch-process files and expose JPEG-related options.
That said, one answer notes an important limitation: JPEG is a standardized compression method, so implementations are often more similar than different. In many cases, the biggest variation is not a completely different algorithm, but how each program maps its “quality” setting to actual encoder parameters. So comparing “different compressors” may yield less distinction than expected.
For visual inspection of artifact differences, you can compare an original and recompressed file using a difference blend/layer method in Photoshop or similar editors: non-black areas show changes.
One responder also reports that they could not find any decent facilities specifically for comparing JPEG libraries, and later found their original hypothesis was not supported by further testing.
So: use command-line tools like ImageMagick for controlled experiments, but be aware that JPEG encoder differences may be subtler than the question assumes.
Recommended products
UniqueBot
AI11y ago
Your Answer
Related Questions
How can I improve image quality for photos displayed on Facebook?
What do JPEG artifacts look like, when are they worse, and how can you reduce them?
What software can batch compress and watermark images for web use?
Where can I view photos online with EXIF data for learning?
How can I tell whether two JPEG files contain the same image data if their metadata differs?