用法:
skimage.future.graph.cut_threshold(labels, rag, thresh, in_place=True)
合并按权重小于阈值的区域。
给定图像的标签及其 RAG,通过组合节点之间的权重小于给定阈值的区域来输出新标签。
- labels:ndarray
标签数组。
- rag:RAG
区域邻接图。
- thresh:浮点数
门槛。由具有较小权重的边连接的区域被组合起来。
- in_place:bool
如果设置,修改
rag
到位。该函数将删除权重小于脱粒.如果设置为False该函数复制rag
在继续之前。
- out:ndarray
新标记的数组。
参数:
返回:
参考:
- 1
Alain Tremeau and Philippe Colantoni “Regions Adjacency Graph Applied To Color Image Segmentation” DOI:10.1109/83.841950
例子:
>>> from skimage import data, segmentation >>> from skimage.future import graph >>> img = data.astronaut() >>> labels = segmentation.slic(img) >>> rag = graph.rag_mean_color(img, labels) >>> new_labels = graph.cut_threshold(labels, rag, 10)
相关用法
- Python skimage.future.graph.cut_normalized用法及代码示例
- Python skimage.future.graph.RAG.__init__用法及代码示例
- Python skimage.future.graph.show_rag用法及代码示例
- Python skimage.future.graph.ncut用法及代码示例
- Python skimage.future.graph.rag_boundary用法及代码示例
- Python skimage.future.graph.rag_mean_color用法及代码示例
- Python skimage.future.manual_polygon_segmentation用法及代码示例
- Python skimage.future.manual_lasso_segmentation用法及代码示例
- Python skimage.feature.graycomatrix用法及代码示例
- Python skimage.feature.blob_doh用法及代码示例
- Python skimage.feature.blob_dog用法及代码示例
- Python skimage.filters.unsharp_mask用法及代码示例
- Python skimage.filters.rank.noise_filter用法及代码示例
- Python skimage.filters.gaussian用法及代码示例
- Python skimage.feature.graycoprops用法及代码示例
- Python skimage.feature.corner_orientations用法及代码示例
- Python skimage.filters.threshold_otsu用法及代码示例
- Python skimage.feature.structure_tensor用法及代码示例
- Python skimage.filters.rank.sum用法及代码示例
- Python skimage.filters.window用法及代码示例
注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.future.graph.cut_threshold。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。