0

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:

enter image description here

Carl
  • 109
  • 8

0 Answers0