[
About ImageMagick
] [ Command-line Tools Processing Options Usage Program Interfaces MagickWand MagickCore PerlMagick Magick++ Architecture ] [ Install from Source Unix Windows Binary Releases Unix Mac OS X Windows Resources ] [ Download ] [ Site Map Links ] [ Sponsors: ] |
Use the compare program to mathematically and visually annotate the difference between an image and its reconstruction. See Command Line Processing for advice on how to structure your compare command or see below for example usages of the command. We list a few examples of the compare command here to illustrate its usefulness and ease of use. To get started, lets compare an image to one thats been sharpened: convert rose.jpg -sharpen 0x1 reconstruct.jpg compare rose.jpg reconstruct.jpg difference.png compare -compose src rose.jpg reconstruct.jpg difference.png The red areas of the difference image emphasizes (highlight) pixels that are affected by the image sharpening, whereas white de-emphasizes (lowlight) pixels that are untouched by the sharpening process. In addition to the visual interpretation of the difference in an image and its reconstruction, we report a mathematical measure of the difference: compare verbose -metric mae rose.jpg reconstruct.jpg difference.png Image: rose.jpg Channel distortion: MAE red: 2282.91 (0.034835) green: 1853.99 (0.0282901) blue: 2008.67 (0.0306503) all: 1536.39 (0.0234439) Or, if you just want the red channel distortion, use this command: compare -channel red -metric PSNR rose.jpg reconstruct.jpg difference.png 19.63 Or, if you just want the overall image distortion, use this command: compare -metric PSNR rose.jpg reconstruct.jpg difference.png 28.31 You can find additional examples of using compare in Graphics from the Command Line. Further discussion is available in More Graphics from the Command Line and Examples of ImageMagick Usage. The compare command recognizes these options. Click on an option to get more details about how that option works.
|