我想比较两个位图或位图的一部分,看看它们有多相似。
我遇到过一些字符串数据的相似算法,例如 Levenshtein 距离和 Jaro-Winkler 距离。显然,这些对于位图数据没有帮助。
谁能建议一种算法来比较位图的相似程度?
编辑
感谢您的想法、链接等。
虽然所有信息都有助于熟悉这个主题,但我想知道如何生成图像,以及更多类似的内容:
I'd like to compare two bitmaps or parts of bitmap and see how alike they are.
I've came across some likeness algorithms for string data, like Levenshtein distance, and Jaro–Winkler distance. these, obviously, do not help when it comes to bitmap data.
Can anyone suggest an algorithm for comparing how alike bitmaps are?
EDIT
Thanks for the ideas,links etc.
While all information is helpful in familiarizing with this topic, I'm wondering how to generate images, something more along the lines of this:
发布评论
评论(4)
您可以使用 Hausdorff 图像比较,但请注意,这需要二进制图像。
值得注意的是,视觉上相似的图像可能具有截然不同的底层像素表示。人类的感知使得计算视觉相似度变得相当困难。豪斯多夫很好地解决了这个问题,它允许两个不同的图像在总体相似性相同时获得高分。
如果您想计算数据距离,您可以使用您喜欢的任何距离度量,并直接在像素上执行此操作。我特别喜欢使用马哈拉诺比斯距离进行此类比较。
You could use Hausdorff image comparison, but be aware that this expects binary images.
Of note, visually similar images may have vastly different underlying pixel representations. Human perception makes computing visual similarity quite difficult. Hausdorff deals well with this by allowing two different images to score highly when the general similarity is the same.
If you want to compute data distances, you can use any distance metric you like and do so directly on the pixels. I'm particularly fond of Mahalanobis distance for these kind of comparisons.
这是来自 有趣的链接 .com/questions/75891/algorithm-for-finding-similar-images">类似问题。使用自训练神经网络来识别相似图像。
Here's an interesting link from a similar question. Using a self training neural net to recognize similar images.
您想要使用希尔伯特曲线来细分图像并读取 RGB 值。然后,您可以使用快速傅立叶变换将图像记录为离散模拟信号。然后您可以将其存储到数据库中并将其与其他结果进行比较。结果应该是非常好的。事实上,这类似于 JPEG 压缩(希尔伯特曲线)中的量化器步骤,只不过 JPEG 压缩使用莫顿曲线。
You want to use a Hilbert Curve to subdivide the image and read the rgb values. Then you can use a Fast Fourier Transformation to record the image into a discrete analog signal. Then you can store this into a database and compare it with other results. The results should be very good. In fact this is like the Quantiziser step in the JPEG compression (hilbert curve) except that the JPEG compression uses a Morton Curve.
神经网络也带来了解决方案。您可以使用 Kohonen 网络(它将您的图像分组并给出它们的拓扑图)或使用 Hopfield 网络(提供一些代表性图像,学习过程后图像将通过网络分类为学习模式中提供的图像)。
Kohonen 网络:http://en.wikipedia.org/wiki/Self-organizing_map
Hopfield网络 http://en.wikipedia.org/wiki/Hopfield_network
Neural networks also bring solution. You can use Kohonen network (it will group your images into classes and give topological map of them) or use Hopfield network (provide some representative images and after learning procedure images will be classified by network to images provided in learning mode).
Kohonen networks: http://en.wikipedia.org/wiki/Self-organizing_map
Hopfield network http://en.wikipedia.org/wiki/Hopfield_network