OpenCV: Enumerate shapes in binary image?
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 blo开发者_如何学Gobs? For example, producing something like this:
0102003
1102203
0102003
Like scipy.ndimage.label.
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.
精彩评论