图像连通域

四连通和八连通域

label, num = measure.label(mask_img, neighbors=8, background=0, return_num=True)

参考:
[1] https://blog.csdn.net/weixin_39976081/article/details/112069671
[2] https://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.label
[3] https://blog.csdn.net/longshaonihaoa/article/details/106305748

posted @ 2023-06-05 13:03  xiaoxuxli  阅读(15)  评论(0编辑  收藏  举报