From f261e51faa0ff75d70832eb635481363e2a71aac Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Thu, 24 Jul 2014 00:01:56 +0530 Subject: [PATCH] rename method to cut_normalized --- doc/examples/plot_ncut.py | 2 +- skimage/graph/graph_cut.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/examples/plot_ncut.py b/doc/examples/plot_ncut.py index 941ef014..3160f710 100644 --- a/doc/examples/plot_ncut.py +++ b/doc/examples/plot_ncut.py @@ -22,7 +22,7 @@ labels1 = segmentation.slic(img, compactness=30, n_segments=400) out1 = color.label2rgb(labels1, img, kind='avg') g = graph.rag_mean_color(img, labels1, mode='similarity') -labels2 = graph.cut_n(labels1, g) +labels2 = graph.cut_normalized(labels1, g) out2 = color.label2rgb(labels2, img, kind='avg') plt.figure() diff --git a/skimage/graph/graph_cut.py b/skimage/graph/graph_cut.py index a5a54141..d02dde3a 100644 --- a/skimage/graph/graph_cut.py +++ b/skimage/graph/graph_cut.py @@ -65,7 +65,7 @@ def cut_threshold(labels, rag, thresh): return map_array[labels] -def cut_n(labels, rag, thresh=0.001, num_cuts=10): +def cut_normalized(labels, rag, thresh=0.001, num_cuts=10): """Perform Normalized Graph cut on the Region Adjacency Graph. Given an image's labels and its similarity RAG, recursively perform @@ -96,7 +96,7 @@ def cut_n(labels, rag, thresh=0.001, num_cuts=10): >>> img = data.lena() >>> labels = segmentation.slic(img, compactness=30, n_segments=400) >>> rag = graph.rag_mean_color(img, labels, mode='similarity') - >>> new_labels = graph.cut_n(labels, rag) + >>> new_labels = graph.cut_normalized(labels, rag) References ----------