我不确定“匹配”是否真的是正确的词,但我必须散布以下形式的图。


我想要比较这两个,但我真的不确定如何做到这一点。当我说比较时,我的意思是我想知道这两个图有多相似。因此,第一个问题是您可以使用什么方法来实现这一点,第二个问题是我如何实现这一点。
这些图是用this代码的修改版本(没有关于强度的信息)生成的。
那么,在python中有没有办法做到这一点呢?
谢谢你,西托。
发布于 2018-01-22 03:42:26
在评论中,我声称两个地块之间的相似度为42。原因如下:
import numpy as np
import matplotlib.pyplot as plt
# read in the two images
a = plt.imread("data/sim1.png")
b = plt.imread("data/sim2.png")
# define a similarity measure,
# here we take the sum of the squares of the distances between pixels
similarity = np.ceil(np.sum((a-b)**2)/1000.)
print(similarity)
# this prints 42.0https://stackoverflow.com/questions/48369936
复制相似问题