Page 1 of 1
Posted: 2006-11-15T20:44:26-07:00
by anthony
Currently Im comparsions only work with two images at a time. If fact attempting multi-image iages would probably result in the first time images of the first file being compared, not the first image from each file.
I do have some plans for a future -layers function that merges pairs of 'shuffled' images using alpha composition as a means of merging GIF animations. This could be used get convert two multi-image files into a single multi-image 'difference' file. however I have been busy with other things, and have not gotten back to creating the shuffle, or the mutli-composition layers function. no ETA either, sorry.
Re: Compare multipage tiff
Posted: 2013-05-21T14:17:07-07:00
by ZAB
Did multipage images comparison ever worked in imagemagick?
Re: Compare multipage tiff
Posted: 2013-05-21T23:05:27-07:00
by anthony
actually yes...
Though not as I envisioned then above.
The operation is
-layers composition
See IM examples, Animation Modifications, Multi-Image Composition
http://www.imagemagick.org/Usage/anim_mods/#composite
For comparing images you would use 'difference' on the two sets of images.
For an example of that look at. the first example in
IM examples, Animation Modifications, Splitting up an Animation
http://www.imagemagick.org/Usage/anim_mods/#split
This compares a sequence of images with itself (shifted by one), and merged results.
That is create a mask of any difference between any image in the list.
Re: Compare multipage tiff
Posted: 2013-05-21T23:39:33-07:00
by ZAB
I do not want to split animation into frames. I just want to compare two multipage tiffs. I tried to run "compare -metric PSNR multipage1.tif multipage2.tif diff.tif" and it fails. Even though both tiffs are equal IM shows 11.7 PSNR and diff.tif contains only one meaningless page.
Re: Compare multipage tiff
Posted: 2013-05-21T23:56:01-07:00
by anthony
The pointer was not to what was being done, but to the compare (difference composite) aspect of that example.
Re: Compare multipage tiff
Posted: 2013-05-22T00:06:54-07:00
by ZAB
Ok. Is there any way to compare multipage tiffs on a page by page basis? With a one line command.
Re: Compare multipage tiff
Posted: 2013-05-22T23:30:20-07:00
by anthony
compare image_set_1.tiff null: image_set_2.tiff -compose differance -layers composite difference_image_set.tiff
Now the next step in how you want to 'examine the differences' is where metrics come in.
Re: Compare multipage tiff
Posted: 2013-05-23T01:26:21-07:00
by ZAB
I am getting this error "compare.exe: unrecognized option `-layers' @ error/compare.c/CompareImageCommand/707."
But even if I remove -layers from command line, say "compare -metric psnr multipage.tif null: multipage.tif diff.tif", IM prints 11.0495 PSNR to standard output. I'ts not how it should work on identical multipage files. For identical files it should print 1.#INF. Or throw an error that multipage files are unsupported....
Re: Compare multipage tiff
Posted: 2013-05-23T09:45:44-07:00
by fmw42
compare image_set_1.tiff null: image_set_2.tiff -compose differance -layers composite difference_image_set.tiff
I think Anthony may have meant
convert image_set_1.tiff null: image_set_2.tiff -compose differance -layers composite difference_image_set.tiff
Then you must analyze the difference image to get some metric for the difference such as the average or mean or rmse over the image
Re: Compare multipage tiff
Posted: 2013-05-23T10:52:25-07:00
by ZAB
Ok... It will be a second command line but how to calc PSNR of this diff image using only IM?
Comparing multipage images is a real usecase! Now IM silently compare first two pages of a first tiff file... or last two pages of a second file... whatever... it is a bug. Should I fill an issue in the issue tracker?
Re: Compare multipage tiff
Posted: 2013-05-23T22:49:04-07:00
by anthony
fmw42 wrote:I think Anthony may have meant
convert image_set_1.tiff null: image_set_2.tiff -compose differance -layers composite difference_image_set.tiff
Yes.. Applogies. Brain thinking one thing, fingers typing another.
Re: Compare multipage tiff
Posted: 2018-10-10T02:57:11-07:00
by vinayzz
Any Update on the solution here?
Re: Compare multipage tiff
Posted: 2018-10-10T09:48:36-07:00
by fmw42
vinayzz wrote: ↑2018-10-10T02:57:11-07:00
Any Update on the solution here?
This is an old post and a solution was given.
Please elaborate on your specific issue with examples and code. Or open a new topic.