用法:
__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__。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。