I am working in python analyzing 2D arrays and I am looking for a filter or some other routine that would provide a linear expansion of an region boundaries in a 2D array with binary regions (i.e. a black/white image). For example given this star image:
I would like to apply a filter that expands a region's borders with a radial, linear decrease from a maximal value (i.e. black) to the surrounding value. Graphically represented as:
So that the resulting image/array is something like: