为什么 imagicmagick 比较给出无法识别的指标 'phash' 错误?

Why imagicmagick compare giving unrecognized metric 'phash' error?

我运行在ubuntu终端

中按照命令比较两个图像的phash
compare -metric phash 01.png 02.png compare.png

但它给出的错误是:

compare.im6: unrecognized metric type `phash' @error/compare.c/CompareImageCommand/728

我的识别版本是:

Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org

您收到此错误是因为 6.8.8-2 版中添加了 phash 指标。如果您需要此功能,我建议您升级到最新版本。