用法:
__init__(label_image=None, connectivity=1, data=None, **attr)
使用边、名称或图形属性初始化图形。
- incoming_graph_data:输入图(可选,默认值:无)
用于初始化图形的数据。如果 None (默认)创建一个空图。数据可以是边列表,也可以是任何NetworkX 图形对象。如果安装了相应的可选 Python 包,则数据也可以是 NumPy 矩阵或 2d ndarray、SciPy 稀疏矩阵或 PyGraphviz 图。
- attr:关键字参数,可选(默认=无属性)
要作为键=值对添加到图形的属性。
参数:
例子:
>>> G = nx.Graph() # or DiGraph, MultiGraph, MultiDiGraph, etc >>> G = nx.Graph(name="my graph") >>> e = [(1, 2), (2, 3), (3, 4)] # list of edges >>> G = nx.Graph(e)
可以分配任意图形属性对(key=value)
>>> G = nx.Graph(e, day="Friday") >>> G.graph {'day': 'Friday'}
相关用法
- 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.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.RAG.__init__。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。