Rename rmsdiff
to rmsDiffPil
This commit is contained in:
@@ -3,7 +3,7 @@ import math
|
||||
import operator
|
||||
import functools
|
||||
|
||||
def rmsdiff(im1, im2):
|
||||
def rmsDiffPil(im1, im2):
|
||||
"Calculate the root-mean-square difference between two images"
|
||||
|
||||
h = ImageChops.difference(im1, im2).histogram()
|
||||
@@ -12,3 +12,4 @@ def rmsdiff(im1, im2):
|
||||
return math.sqrt(functools.reduce(operator.add,
|
||||
map(lambda h, i: h*(i**2), h, range(256))
|
||||
) / (float(im1.size[0]) * im1.size[1]))
|
||||
|
Reference in New Issue
Block a user