[Olena-patches] milena r2745: Generalize erosion in 2d for any accumulator