开发者

OpenCV: Enumerate shapes in binary image?

开发者 https://www.devze.com 2023-01-08 03:20 出处:网络
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, produci

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消