remove self loops in rag

This commit is contained in:
Vighnesh Birodkar
2014-08-18 18:42:23 +05:30
parent f7a7c1baa2
commit 12b1a91c70
3 changed files with 13 additions and 2 deletions
+2
View File
@@ -104,5 +104,7 @@ def test_cut_normalized():
def test_rag_error():
img = np.zeros((10, 10, 3), dtype='uint8')
labels = np.zeros((10, 10), dtype='uint8')
labels[:5, :] = 0
labels[5:, :] = 1
testing.assert_raises(ValueError, graph.rag_mean_color, img, labels,
2, 'non existant mode')