Page 1 of 1
Compare - scaled highlight
Posted: 2014-04-15T11:25:55-07:00
by oddeven21
Hi all,
Using the compare tool, i'm wondering if there is a way to have the highlight color scale based on the delta? For example, the larger the difference is between two pixels, the darker the highlight color is.
compare -metric ae a.png b.png diff.png
Thanks!
Re: Compare - scaled highlight
Posted: 2014-04-15T15:35:55-07:00
by fmw42
Not with compare. But you can do it with -compose difference. try this
Code: Select all
convert image1 image2 \
\( -clone 0 -function polynomial "0.5 0.5" \) \
\( -clone 0 -fill red -colorize 100 \) \
\( -clone 0 -clone 1 -compose difference -composite -colorspace gray -write show: \) \
-delete 0,1 -compose over -composite result
Adjust -function polynomial to make the background image fade as desired so that you can see the red colorization or make the background image black to just show the difference.
Code: Select all
convert image1 image2 \
\( -clone 0 -fill black -colorize 100 \) \
\( -clone 0 -fill red -colorize 100 \) \
\( -clone 0 -clone 1 -compose difference -composite -colorspace gray -write show: \) \
-delete 0,1 -compose over -composite show:
or to see the color differences in each channel
Code: Select all
convert logo: logo_blur.png -compose difference -composite -auto-level show:
see
http://www.imagemagick.org/Usage/compare/#difference