update erase_reg() - use scipy.ndimage functions, more efficient