关于Region Boundary based RAGs,我不清楚定义edges_rgb的代码,如果我在灰度图像上执行RAG分析,为什么我需要将边缘转换为RGB色?
edges_rgb = color.gray2rgb(edges)
g = graph.rag_boundary(labels, edges)
lc = graph.show_rag(labels, g, edges_rgb, img_cmap=None, edge_cmap='viridis',
edge_width=1.2)发布于 2019-11-13 10:25:49
事实证明你不需要。这段代码做同样的事情:
g = graph.rag_boundary(labels, edges)
lc = graph.show_rag(labels, g, edges, img_cmap='gray', edge_cmap='viridis',
edge_width=1.2)我猜最初的作者更喜欢使用gray2rgb,而不是色彩映射。但这是一个偏好的问题,而不是必须的!
https://stackoverflow.com/questions/58804279
复制相似问题