ButtonDefinitions.py
def mse(imageA, imageB):
    '''the 'Mean Squared Error' between the two images is the sum of the squared
        difference between the two images; NOTE: the two images must have the
        same dimension'''
    err = np.sum((imageA.astype("float") - imageB.astype("float")) ** 2)
    err /= float(imageA.shape[0] * imageA.shape[1])

    #return mse, the lower the error, the more similar the images are
    return err
the 'Mean Squared Error' between the two images is the sum of the squared
        difference between the two images; NOTE: the two images must have the
        same dimension
the 'Mean Squared Error' between the two images is the sum of the squared
difference between the two images; NOTE: the two images must have the
same dimension
the ' Mean Squared Error ' between the two images is the sum of the squared difference between the two images ; NOTE : the two images must have the same dimension
def mse(imageA, imageB):
    err = np.sum((imageA.astype("float") - imageB.astype("float")) ** 2)
    err /= float(imageA.shape[0] * imageA.shape[1])
    return err
def mse ( imageA , imageB ) : err = np . sum ( ( imageA . astype ( "float" ) - imageB . astype ( "float" ) ) ** 2 ) err /= float ( imageA . shape [ 0 ] * imageA . shape [ 1 ] ) return err
the 'Mean Squared Error' between the two images is the sum of the squared
difference between the two images; NOTE: the two images must have the
same dimension
the ' Mean Squared Error ' between the two images is the sum of the squared difference between the two images ; NOTE : the two images must have the same dimension
'''the 'Mean Squared Error' between the two images is the sum of the squared
        difference between the two images; NOTE: the two images must have the
        same dimension''' #return mse, the lower the error, the more similar the images are

imageA
imageB