possible bug compare -metric ncc IM 6.8.9.0 Q16 Mac OSX

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug compare -metric ncc IM 6.8.9.0 Q16 Mac OSX

Post by fmw42 »

The NCC metric should report 1 for a perfect match. If the images have an alpha channel, even if fully opaque in both, it fails.

This works fine

Code: Select all

compare -metric ncc rose: rose: null:
1.00031
But this fails

Code: Select all

convert rose: -alpha set rose1.png
compare -metric ncc rose1.png rose1.png null:
0.866294
But if the alpha channel is disabled, then it works again

Code: Select all

compare -metric ncc -alpha off rose1.png rose1.png null:
1.00002
Post Reply