This is an example boolean matrix I'm talking about. I have already compute a concave hull shown below:
[[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,1,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,1,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,1,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,1,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0],
[0,0,0,1,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0]]
How can I generate a "continuous" border according to concave hull shown above, which is another boolean matrix like this:
[[0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,1,0,0,0,0,0],
[0,0,0,1,0,1,0,0,0,0],
[0,0,1,0,0,0,1,0,0,0],
[0,0,1,0,0,0,0,1,0,0],
[0,0,1,0,0,1,0,0,0,0],
[0,0,0,1,1,0,0,0,0,0],
[0,0,0,1,0,0,0,0,0,0],
[0,0,0,1,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0]]
The concave hull may be more complicated: