Page 1 of 1

Compare specific region in two images

Posted: 2014-04-17T04:04:26-07:00
by manmanda
Hello,
My question what is wrong with this command to compare specific region in both the images

convert pic1.bmp pic2.bmp -crop 40x30+10+10 +repage miff:- | compare pic1.bmp pic2.bmp compare.bmp

When i used above command crop didn't happen and compare.bmp is created which compared the whole image not specific resion.

One more question can i used composite command with convert command also?

Re: Compare specific region in two images

Posted: 2014-04-17T10:21:17-07:00
by fmw42
your pipe needs to us "-" to receive the miff:- data. The "-" will have two channels from miff:- and they will be treated as two images. Try

Code: Select all

convert pic1.bmp pic2.bmp -crop 40x30+10+10 +repage miff:- | compare - compare.bmp
But it is usual to specify a -metric for compare. I do not know what the default metric is.

Code: Select all

convert pic1.bmp pic2.bmp -crop 40x30+10+10 +repage miff:- | compare -metric rmse - compare.bmp