bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / graph / _rag / rag_boundary
function
skimage.graph._rag:rag_boundary
source: /dev/scikit-image/src/skimage/graph/_rag.py :398
Signature
def rag_boundary ( labels , edge_map , connectivity = 2 ) Summary
Comouter RAG based on region boundaries
Extended Summary
Given an image's initial segmentation and its edge map this method constructs the corresponding Region Adjacency Graph (RAG). Each node in the RAG represents a set of pixels within the image with the same label in labels. The weight between two adjacent regions is the average value in edge_map along their boundary.
labels
labels
edge_map
edge_map
connectivity
connectivity
Examples
from skimage import data, segmentation, filters, color, graph img = data.chelsea() labels = segmentation.slic(img) edge_map = filters.sobel(color.rgb2gray(img)) rag = graph.rag_boundary(labels, edge_map)✓
Aliases
-
skimage.graph.rag_boundary