Compare multipage tiff
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Compare multipage tiff
Did multipage images comparison ever worked in imagemagick?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Compare multipage tiff
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Compare multipage tiff
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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Compare multipage tiff
The pointer was not to what was being done, but to the compare (difference composite) aspect of that example.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Compare multipage tiff
Ok. Is there any way to compare multipage tiffs on a page by page basis? With a one line command.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Compare multipage tiff
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.
Now the next step in how you want to 'examine the differences' is where metrics come in.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Compare multipage tiff
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....
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....
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Compare multipage tiff
I think Anthony may have meantcompare image_set_1.tiff null: image_set_2.tiff -compose differance -layers composite difference_image_set.tiff
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
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?
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?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Compare multipage tiff
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Compare multipage tiff
Any Update on the solution here?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Compare multipage tiff
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.