【发布时间】:2013-08-29 12:22:04
【问题描述】:
我正在寻找一种方法来比较两张图片,看看它们有多相似。谷歌搜索它会产生大量的图像处理结果(裁剪、调整大小等),但无法对图像进行近似比较。有一个 Node.js 库,但它是 0.0.1 版本,并且依赖于各种 3rd 方系统包,因此不稳定或可移植。
类似的东西:
var imgComparator = require('some-awesome-image-comparator-module');
// result would be between 1.0 and 0.0, where 1.0 would mean exact match
var result = imgComparator.compare('/path/to/image/1.png', '/path/to/image/2.png');
【问题讨论】:
标签: node.js image-processing automated-tests image-comparison