A
A
Andrey Galko2015-11-10 19:19:06
PHP
Andrey Galko, 2015-11-10 19:19:06

How to get the percentage by which images are similar or different from each other using Imagic::compareImages?

I have two pictures which I am trying to compare like this:

$result = $image1->compareImages($image2, Imagick::METRIC_MEANSQUAREERROR);
$result[0]->setImageFormat("png");

this returns me an array:
Array ( [0] => Imagick Object ( ) [1] => 3.5163383008121E-5 )

Is it possible to get a percentage of how similar / different these pictures are?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question