Functions or routines for "block diffs" of images
Posted: 2017-02-08T21:28:06-07:00
I'm looking to see what built-in tools ImageMagick might have for creating a "block diff" of images.
My use case is comparing before and after images of a webpage, after a site-update is made. When we do style sheet updates, or other changes, we want to make sure that we see the changes that we expect, and don't see changes that we don't expect. When we make changes to the global styles, there is a chance of side effects affecting pages that we aren't spot-checking after the update. If I could easily get a diff of images from a before and after site-scrape, that would help us determine correctness.
So basically I am looking to do something like this:
http://softwarerecs.stackexchange.com/q ... image-diff
In an updated web page, the images are going to be mostly the same, except for ranges of the image where the update has changed something.
I was starting to design out different algorithms to do comparison of the images, but then started to wonder if ImageMagick didn't have some built in tools to do this or something very close to this. So I'm posting this question.
I looked at the coalesce and other frame functions, but those only seem to apply to animations.
I looked at compare, but that only compares images of the same dimensions. If, say, we add a new section to a page, the before and after images might have the same "top" and "bottom", but the after image will be longer and have a new middle section inserted between the top and bottom of the before image.
Are there programs, utilities or apps that already do this work? Or should I forge ahead with rolling my own?
My use case is comparing before and after images of a webpage, after a site-update is made. When we do style sheet updates, or other changes, we want to make sure that we see the changes that we expect, and don't see changes that we don't expect. When we make changes to the global styles, there is a chance of side effects affecting pages that we aren't spot-checking after the update. If I could easily get a diff of images from a before and after site-scrape, that would help us determine correctness.
So basically I am looking to do something like this:
http://softwarerecs.stackexchange.com/q ... image-diff
In an updated web page, the images are going to be mostly the same, except for ranges of the image where the update has changed something.
I was starting to design out different algorithms to do comparison of the images, but then started to wonder if ImageMagick didn't have some built in tools to do this or something very close to this. So I'm posting this question.
I looked at the coalesce and other frame functions, but those only seem to apply to animations.
I looked at compare, but that only compares images of the same dimensions. If, say, we add a new section to a page, the before and after images might have the same "top" and "bottom", but the after image will be longer and have a new middle section inserted between the top and bottom of the before image.
Are there programs, utilities or apps that already do this work? Or should I forge ahead with rolling my own?