I know that similar questions have been asked many times, but still I have not found a satisfactory answer for what I am looking for. I want to be able to compare two versions of the same image, in order to detect the amount of perceptual artifacts resulting from JPEG compression, without any further changes (i.e., no crops, no rotation...). I mean, not just the histogram or the number of pixels that are different (those would be probably easy to get from Pillow), but instead I would like to be able to obtain some kind of measure of their overall visual impact.
Reading through some articles in SO and in other places, I have found multiple references to SSIM algorithm, that seems to do precisely what I am looking for. There is even a Python (https://github.com/jterrace/pyssim), but the problem is that all those implementations seem to depend on packages that can't be installed in some of my target devices. I am using Pythonista 3 on iOS, which includes Pillow 2.9.0
and numpy
, but scipy
(required by pysimm
) is not compatible.
Is there any other viable way to calculate SIMM or a similar comparison value that does not require anything more that Python 3.6, Pillow and/or Numpy 1.8.0?