If I've got an image which look, for example, like this:
0101001
1101101
0101001
Is there any method I can use which will find both of those disconnected blobs? For example, producing something like this:
0102003
1102203
0102003
Like scipy.ndimage.label.