tags:

views:

23

answers:

1

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.

+2  A: 

What you need is blob library. There was cvblobslib, it seems outdated. Try cvBlob — looks great.

Also, there is related function in OpenCV cvFloodFill, though you'll have to write code to find and manage connected components.

Cfr