Closed hongweipeng closed 8 years ago
pHash.py的计算系数矩阵函数get_coefficient中
sqr = math.sqrt(1/n) value = [] for i in range(0,n): value.append(sqr)
应为
sqr = math.sqrt(2.0 / n) * math.sqrt(1/n)
DCT算法是参考这篇文章完成的
其中,其指出了系数矩阵为:
第一行把系数乘进去后,为sqrt(2/N)*sqrt(1/2) = sqrt(1/N)
sqrt(2/N)*sqrt(1/2) = sqrt(1/N)
那没错,是我看错了,可耻的匿了
pHash.py的计算系数矩阵函数get_coefficient中
应为