Home > Back-end >  How to seperate a 2d mask array into the individual segments within it?
How to seperate a 2d mask array into the individual segments within it?

Time:07-07

Context

Im trying to take an array which consists of 1s and 0s in random locations and then seperate clusters of 1s within this array and label them seperately. I think it is best explained with an example.

enter image description here

Output:

enter image description here

  • Related