用法:
skimage.future.graph.rag_boundary(labels, edge_map, connectivity=2)
基于区域边界的计算机 RAG
给定图像的初始分割及其边图,此方法构造相应的区域邻接图 (RAG)。 RAG 中的每个节点代表图像中具有相同标签的一组像素。两个相邻区域之间的权重是沿其边界的edge_map 中的平均值。
- 标签ndarray
标记的图像。
- edge_mapndarray
这应该与标签的形状相同。对于沿2个相邻区域边界的所有像素,edge_map中对应像素的平均值就是它们之间的边权重。
- 连通性int 可选
平方距离小于的像素连通性彼此被认为是相邻的。它的范围可以从 1 到labels.ndim.它的行为与连通性参数输入
scipy.ndimage.generate_binary_structure
.
例子:
>>> from skimage import data, segmentation, filters, color >>> from skimage.future import graph >>> img = data.chelsea() >>> labels = segmentation.slic(img) >>> edge_map = filters.sobel(color.rgb2gray(img)) >>> rag = graph.rag_boundary(labels, edge_map)
相关用法
- Python skimage.future.graph.rag_mean_color用法及代码示例
- Python skimage.future.graph.RAG.__init__用法及代码示例
- Python skimage.future.graph.show_rag用法及代码示例
- Python skimage.future.graph.cut_normalized用法及代码示例
- Python skimage.future.graph.cut_threshold用法及代码示例
- Python skimage.future.graph.ncut用法及代码示例
- 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.rag_boundary。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。