Comparing different-sized images
Re: Comparing different-sized images
It doesn't seem to work fully in IM v6.6.3-5.
The "-subimage-search" option now gets recognized. But "compare" still does the subimage-search per default. So, it seems that there's no difference at the moment with or without that option?
The "-subimage-search" option now gets recognized. But "compare" still does the subimage-search per default. So, it seems that there's no difference at the moment with or without that option?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Comparing different-sized images
Drarakel wrote:It doesn't seem to work fully in IM v6.6.3-5.
The "-subimage-search" option now gets recognized. But "compare" still does the subimage-search per default. So, it seems that there's no difference at the moment with or without that option?
Works for me on IM 6.6.3.4 Q16 (HDRI) Mac OSX Tiger
compare -metric rmse mandril3.png mandril3_156_22.png mandril_sim.png
compare: image size differs `mandril3.png' @ error/compare.c/CompareImageChannels/155.
compare -metric rmse -subimage-search mandril3.png mandril3_156_22.png mandril_sim.png
0 (0) @ 156,22
Re: Comparing different-sized images
Ah, now I see. It seems that the subimage-search is still done partially - but at the end, there's the "image size differs" message instead of the 'normal' results. Was this the intended behaviour?
Can you try it with the bigger images from my first post?
Here, I can't wait for the "image size differs" message to come and have to abort the process.
Running with IM v6.6.3-5 Q16, Windows XP. (With the Windows binary of v6.6.3-4, the new option wasn't recognized yet.)
Can you try it with the bigger images from my first post?
Code: Select all
convert -depth 8 -size 1000x1000 xc:yellow2 y2.png
convert -depth 8 -size 502x505 xc:yellow3 y3.png
compare -metric RMSE y2.png y3.png test.png
Running with IM v6.6.3-5 Q16, Windows XP. (With the Windows binary of v6.6.3-4, the new option wasn't recognized yet.)
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Comparing different-sized images
Drarakel wrote:Ah, now I see. It seems that the subimage-search is still done partially - but at the end, there's the "image size differs" message instead of the 'normal' results. Was this the intended behaviour?
Can you try it with the bigger images from my first post?Here, I can't wait for the "image size differs" message to come and have to abort the process.Code: Select all
convert -depth 8 -size 1000x1000 xc:yellow2 y2.png convert -depth 8 -size 502x505 xc:yellow3 y3.png compare -metric RMSE y2.png y3.png test.png
Running with IM v6.6.3-5 Q16, Windows XP. (With the Windows binary of v6.6.3-4, the new option wasn't recognized yet.)
Sorry I had not gone back to the previous page to see your messages. But running your command, it does seem like the test is delayed til the end and should test for image sizes right at the beginning before starting the compare process. This is on Mac OSX Tiger G4 PowerPC (kind of old).
Sorry I aborted after 35 minutes waiting to finish or give error message.
Re: Comparing different-sized images
We can reproduce the problem. Look for a patch in ImageMagick 6.6.3.6 Beta by sometime tomorrow.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Comparing different-sized images
In IM 6.6.3.6 Q32 HDRI Mac OSX Tiger, the following does not give an error message as was intended about the sizes being dissimilar, but does not produce the output either.magick wrote:We can reproduce the problem. Look for a patch in ImageMagick 6.6.3.6 Beta by sometime tomorrow.
convert -depth 8 -size 1000x1000 xc:yellow2 y2.png
convert -depth 8 -size 502x505 xc:yellow3 y3.png
compare -metric RMSE y2.png y3.png test.png
Same result in Q16 non-hdri
Re: Comparing different-sized images
I can't test it on Windows - as the Windows binaries contain version 6.6.3-5 at the moment.
Re: Comparing different-sized images
Correct, we'll release the updated Windows binaries in a day or two.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Comparing different-sized images
Not sure you saw my message above, but there are no error messages. Will that be fixed in 6.6.3.7?magick wrote:Correct, we'll release the updated Windows binaries in a day or two.
Re: Comparing different-sized images
We can reproduce the problem you posted and will have a patch in ImageMagick 6.6.3-7 Beta by sometime tomorrow. Thanks.
Re: Comparing different-sized images
On my system (IM v6.6.3-7, Windows XP), compare works good now - with and without the new option.
Thanks!
Thanks!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Comparing different-sized images
Same for me on Mac OSX Tiger IM 6.6.3.7 (HDRI)
compare -metric RMSE y2.png y3.png test.png
compare: image widths or heights differ `y2.png' @ error/compare.c/CompareImageCommand/950.
Aborts right away now with the error message.
HOWEVER, now I need to modify my scripts that use it to do subimage searches. If I have an old release that was prior to the change, what will happen if I include -subimage-search in the command line? Will it just ignore it or will it abort with an error about unknown command?
I don't have a handy old release to test, but if this cannot be answered without, I will go back to the archives and get one.
If it needs trapping, then there were several releases where it was implemented and did not work correctly. Is there some better way to trap on this command than using the IM version number or testing for the existence of the command -subimage-search?
compare -metric RMSE y2.png y3.png test.png
compare: image widths or heights differ `y2.png' @ error/compare.c/CompareImageCommand/950.
Aborts right away now with the error message.
HOWEVER, now I need to modify my scripts that use it to do subimage searches. If I have an old release that was prior to the change, what will happen if I include -subimage-search in the command line? Will it just ignore it or will it abort with an error about unknown command?
I don't have a handy old release to test, but if this cannot be answered without, I will go back to the archives and get one.
If it needs trapping, then there were several releases where it was implemented and did not work correctly. Is there some better way to trap on this command than using the IM version number or testing for the existence of the command -subimage-search?
Re: Comparing different-sized images
I can't help you there - but just to confirm your thoughts:
With my older IM versions, it's like that (and returns with an exitcode of 1 - at least on Windows). So, the normal behaviour with "unrecognized" options.fmw42 wrote:will it abort with an error about unknown command?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Comparing different-sized images
I will just go with using the IM version and ignore those interim releases.Drarakel wrote:I can't help you there - but just to confirm your thoughts:With my older IM versions, it's like that (and returns with an exitcode of 1 - at least on Windows). So, the normal behaviour with "unrecognized" options.fmw42 wrote:will it abort with an error about unknown command?