i means that how to calculate the db value two different versions of the "same image" indicate how big is difference. Given that compare is used to compare two different versions of the *same image*, and produces a number not only a different image that represents what changed from version to version of the same image,
following is the log info :
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png tmp.png
compare: image size differs `0b-36643.png'.
bash-3.2# compare -metric MAE 0b-36643.png 0b-36643.png tmp.png
0 (0)
bash-3.2# compare -channel red -metric MAE 0b-36643.png 3a-33504.png tmp.png
compare: image size differs `0b-36643.png'.
the tmp.png can be created but the db value cann't be retrieved in the Solaris
thanks
how to display db value of ImageMagick 6.3.4's compare
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to display db value of ImageMagick 6.3.4's compare
if the images have the same width and height, values are returned to the terminal if tmp.png is replaced with null:joel_tan wrote:i means that how to calculate the db value two different versions of the "same image" indicate how big is difference. Given that compare is used to compare two different versions of the *same image*, and produces a number not only a different image that represents what changed from version to version of the same image,
following is the log info :
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png tmp.png
compare: image size differs `0b-36643.png'.
bash-3.2# compare -metric MAE 0b-36643.png 0b-36643.png tmp.png
0 (0)
bash-3.2# compare -channel red -metric MAE 0b-36643.png 3a-33504.png tmp.png
compare: image size differs `0b-36643.png'.
the tmp.png can be created but the db value cann't be retrieved in the Solaris
thanks
compare -metric MAE 0b-36643.png 3a-33504.png null:
see Comparison Statistics section on page http://www.imagemagick.org/Usage/compare/#compare
Re: how to display db value of ImageMagick 6.3.4's compare
following is the output in command line :
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png null
compare: image size differs `0b-36643.png'.
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png x:
compare: image size differs `0b-36643.png'.
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png miff:- | display
display: unable to open X server `'.
compare: image size differs `0b-36643.png'.
i also don't get the db value using the compare command . how can i do this ?
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png null
compare: image size differs `0b-36643.png'.
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png x:
compare: image size differs `0b-36643.png'.
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png miff:- | display
display: unable to open X server `'.
compare: image size differs `0b-36643.png'.
i also don't get the db value using the compare command . how can i do this ?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: how to display db value of ImageMagick 6.3.4's compare
joel_tan wrote:following is the output in command line :
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png null
compare: image size differs `0b-36643.png'.
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png x:
compare: image size differs `0b-36643.png'.
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png miff:- | display
display: unable to open X server `'.
compare: image size differs `0b-36643.png'.
i also don't get the db value using the compare command . how can i do this ?
You left off the colon ":" at the end of null:
I do not know what db means for you? Do you mean decibels? MAE only give mean absolute error. If you want decibels, you need to use PSNR
Also are you sure the images are exactly the same size in width and height (and also the same number of channels --- is one grayscale and the other truecolor?)
convert 0b-36643.png -format "%w x %h" info:
convert 3a-33504.png -format "%w x %h" info:
check to be sure they both give the same result for width x height
Re: how to display db value of ImageMagick 6.3.4's compare
thanks for your help
db value means decibels value
following is the output from compare command:
bash-3.2# convert 0b-36643.png -format "%w x %h" info:
414 x 297
bash-3.2# convert 3a-33504.png -format "%w x %h" info:
417 x 297
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png null:
compare: image size differs `0b-36643.png'.
do you mean that the images compared must have the exactly same width and height?
if not , can i get the decibels value?, if so , how can i do this ?
thanks a lot
db value means decibels value
following is the output from compare command:
bash-3.2# convert 0b-36643.png -format "%w x %h" info:
414 x 297
bash-3.2# convert 3a-33504.png -format "%w x %h" info:
417 x 297
bash-3.2# compare -metric MAE 0b-36643.png 3a-33504.png null:
compare: image size differs `0b-36643.png'.
do you mean that the images compared must have the exactly same width and height?
if not , can i get the decibels value?, if so , how can i do this ?
thanks a lot
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: how to display db value of ImageMagick 6.3.4's compare
As the pixels are compared directly, IM must know which pixels match which pixels. It can only do this if the images are the same size.joel_tan wrote:do you mean that the images compared must have the exactly same width and height?
if not , can i get the decibels value?, if so , how can i do this ?
thanks a lot
So...
Either you crop a image from identical marker points
Or you size the two images to identically sized images (typically smaller thumbnails for speed of comparing LOTS of images).
PSNR does produce a decibell output. with 0 bein identical and a large number being very different. However as the average of each image is subtracted from each pixel before they are compared, two solid color images of different colors will match identically.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: how to display db value of ImageMagick 6.3.4's compare
thanks, i can do it by this way
bash-3.2# convert 3a-33504.png -resize 414x297! 3a-33504-tmp.png
bash-3.2# compare -metric PSNR 0b-36643.png 3a-33504-tmp.png tmp2.png
23.6006
bash-3.2# convert 3a-33504.png -resize 414x297! 3a-33504-tmp.png
bash-3.2# compare -metric PSNR 0b-36643.png 3a-33504-tmp.png tmp2.png
23.6006