From a95c0bdddcc385052e31a56e88c5769616b0f773 Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Thu, 17 Dec 2015 01:05:07 -0500 Subject: [PATCH] passing selem argument --- skimage/future/graph/rag.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/skimage/future/graph/rag.py b/skimage/future/graph/rag.py index 51019798..8cd09106 100644 --- a/skimage/future/graph/rag.py +++ b/skimage/future/graph/rag.py @@ -345,8 +345,10 @@ def rag_boundary(labels, edge_map, connectivity=2): """ graph = RAG() - eroded = morphology.erosion(labels) - dilated = morphology.dilation(labels) + fp = ndi.generate_binary_structure(labels.ndim, connectivity) + print(fp) + eroded = morphology.erosion(labels, selem=fp) + dilated = morphology.dilation(labels, selem=fp) boundaries = eroded != dilated small_labels = eroded[boundaries]