当前位置:主页 > 软件编程 > Python代码 >

python skimage 连通性区域检测方法

时间:2021-04-28 08:07:41 | 栏目:Python代码 | 点击:

涉及到的函数为

import matplotlib.pyplot as plt
from skimage import measure, color
labels = measure.label(img4[:,:,0], connectivity=2)
dst = color.label2rgb(labels)
plt.imshow(dst)

labels为整个灰度图像的坐标的类别标签,值为[0, max_label], 一个连通区域为一个 lable .

您可能感兴趣的文章:

相关文章