difference - php скрипт высчитывающий разницу между изображениями
use Undemanding\Difference\Image;
use Undemanding\Difference\Method\EuclideanDistance;
$image1 = new Image("/path/to/image1.png");
$image2 = new Image("/path/to/image2.png");
$difference = $image1->difference($image2, new EuclideanDistance());
$boundary = $difference->boundary(); // ? ["left" => ..., "top" => ...]
$percentage = $difference->percentage(); // ? 14.03...
https://github.com/undemanding/difference