I'm performing a image analysis and generated seeds in the form of a boolean array
:
import numpy as np
# Example output array
a = np.array([[False, False, False], [False, True, False], [False, False, False]])
>>> a
array([[False, False, False],
[False, True, False],
[False, False, False]])
As I want to do a subsequent analysis on the area surrounding the True
value, I want to expand it (by a certain number, say pixels). This would result in the following:
>>> a
array([[False, True, False],
[True, True, True],
[False, True, False]])
Is there any function
or simple way of solving my 'radial expansion' problem?
Thanks in advance, BBQuercus