def rg_dilation(image,size,origin=0): """Grayscale dilation with maximum/minimum filters.""" return filters.maximum_filter(image,size,origin=origin)