From c08a6876d647448d520ad8893065a8baac4be46c Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Thu, 26 Jun 2014 02:05:20 +0530 Subject: [PATCH] Added comment about footprint --- skimage/graph/rag.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/skimage/graph/rag.py b/skimage/graph/rag.py index 8017f1f6..4943cf4a 100644 --- a/skimage/graph/rag.py +++ b/skimage/graph/rag.py @@ -136,6 +136,13 @@ def rag_meancolor(image, labels, connectivity=2): fp[0, ...] = 0 fp = fp.swapaxes(0, d) + # For example + # if labels.ndim = 2 and connectivity = 1 + # fp = [[0,0,0],[0,1,1],[0,1,0]] + # + # if labels.ndim = 2 and connectivity = 2 + # fp = [[0,0,0],[0,1,1],[0,1,1]] + filters.generic_filter( labels, function=_add_edge_filter,