changed to eosion/dilation logic

This commit is contained in:
Vighnesh Birodkar
2016-01-06 15:07:35 -05:00
parent a95c0bdddc
commit e8f2805d64
2 changed files with 27 additions and 28 deletions
+3 -2
View File
@@ -9,6 +9,7 @@ This example demonstrates construction of region boundary based RAGs with the
from skimage.future import graph
from skimage import data, segmentation, color, filters, io
from matplotlib import colors
import numpy as np
img = data.coffee()
gimg = color.rgb2gray(img)
@@ -19,8 +20,8 @@ edges_rgb = color.gray2rgb(edges)
g = graph.rag_boundary(labels, edges)
cmap = colors.ListedColormap(['#0000ff', '#ff0000'])
out = graph.draw_rag(labels, g, edges_rgb, node_color="#ffff00", colormap=cmap)
out = graph.draw_rag(labels, g, edges_rgb, node_color="#ffff00",
colormap='plasma')
io.imshow(out)
io.show()