Compare two images without a region

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
Freddie20000
Posts: 4
Joined: 2018-08-05T05:50:09-07:00
Authentication code: 1152

Compare two images without a region

Post by Freddie20000 »

Hi,

I'm using IM 7 and don't understand the command line of compare for two images ... but without a special region ( rectangle ).
I can use crop, but this actually defines a rectangle to compare... but I need the entire picture without a special rectangle that is not as high as the height ... hope you understand ...

Thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Compare two images without a region

Post by snibgo »

With the built-in IM operations, you can't exclude a region from the comparison. But you can paint that region with a colour that isn't in the reference image, eg pure red.

I don't really understand what you want. Can you link to some sample images?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compare two images without a region

Post by fmw42 »

I do not understand your request either.

See
https://imagemagick.org/script/compare.php
https://www.imagemagick.org/Usage/compare/

For IM 7 add magick before compare

Code: Select all

magick compare image1 image2 difference
or

Code: Select all

magick compare imag1 image2 null:
_____________


Please, always provide your IM version and platform when asking questions, since syntax may differ. Also provide your exact command line and if possible your images.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at http://www.imagemagick.org/discourse-se ... f=1&t=9620

If using Imagemagick 7, then see http://imagemagick.org/script/porting.php#cli


For novices, see

http://www.imagemagick.org/discourse-se ... f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
https://github.com/ImageMagick/usage-markdown
Freddie20000
Posts: 4
Joined: 2018-08-05T05:50:09-07:00
Authentication code: 1152

Re: Compare two images without a region

Post by Freddie20000 »

Hey, snibgo has absolutely right... I want to exclude a region like the following one with the plus signs:

************************************++
************************************++
************************************++
************************************++
************************************++
***************************************
***************************************

Sorry... I don't know how to upload my image, but I think you know what I mean. So If there's no way to exclude an rectangle... what would be the command line to create colored regions that aren't compared ?

Thanks....
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Compare two images without a region

Post by fmw42 »

You can do that with a mask image in IM 7 only. See viewtopic.php?f=4&t=31053.

You can upload image to some free hosting service that will not change the format such as dropbox.com and put the URLs here. This forum does not allow image upload directly.
Post Reply