compare images with tolerance at specific regison

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
manmanda
Posts: 17
Joined: 2014-04-16T13:34:38-07:00
Authentication code: 6789

compare images with tolerance at specific regison

Post by manmanda »

I want to automate compare images at specific region but with a user specified tolerance (ex. 20% diff is accepted).If my comparison result is within that tolerance then i will make my comparison pass otherwise fail. How to achieve that?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: compare images with tolerance at specific regison

Post by snibgo »

With a script. You can crop two image with "convert", compare these with "compare", and do whatever you want with the result.

You can crop and compare in a single "convert". However, the result can't (as far as I know) be used in an fx: expression, so you still need the script for your 20% pass/fail decision.
snibgo's IM pages: im.snibgo.com
Post Reply