Detecting image equality at different resolutions

前端 未结 3 668
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-03 11:49

I\'m trying to build a script to go through my original, high-res photos and replace the old, low-res ones I uploaded to Flickr before I had a pro account.

For many of t

3条回答
  •  攒了一身酷
    2021-02-03 12:05

    I'd recommend scripting a solution off of ImageMagick. The following (from the documentation on comparing images with IM) would output a comparative value that you can use.

    convert image1 image2 \
            -compose difference -composite -colorspace gray miff:- |\
      identify -verbose - |\
        sed -n '/^.*Mean: */{s//scale=2;/;s/(.*)//;s/$/*100\/32768/;p;q;}' | bc
    

提交回复
热议问题