Minor Foramtting

This commit is contained in:
Vighnesh Birodkar
2014-06-19 02:50:24 +05:30
parent 3ea78096e7
commit c08d96d2b5
2 changed files with 0 additions and 4 deletions
-1
View File
@@ -34,7 +34,6 @@ def threshold_cut(label, rag, thresh):
"""
to_remove = [(x, y) for x, y, d in rag.edges_iter(data=True)
if d['weight'] >= thresh]
rag.remove_edges_from(to_remove)
comps = nx.connected_components(rag)
-3
View File
@@ -16,10 +16,7 @@ def test_threshold_cut():
labels[50:, :50] = 2
labels[50:, 50:] = 3
# print labels
rag = graph.rag_meancolor(img, labels)
# print "no of edges",rag.number_of_edges()
new_labels = graph.threshold_cut(labels, rag, 10)
assert new_labels.max() == 2
# assert False