(img, size=3)
return l_mean
Compute a image of the local average
Compute a image of the local average
Compute a image of the local average
def local_mean(img, size=3):
    """ Compute a image of the local average
    """
    structure_element = np.ones((size, size), dtype=img.dtype)
    l_mean = signal.correlate(img, structure_element, mode='same')
    l_mean /= size**2
    return l_mean
def local_mean ( img , size = 3 ) : structure_element = np . ones ( ( size , size ) , dtype = img . dtype ) l_mean = signal . correlate ( img , structure_element , mode = 'same' ) l_mean /= size ** 2 return l_mean