Module Expr Str ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias identifier Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr
N/A N/A 
================
RAG Thresholding
================

This example constructs a Region Adjacency Graph (RAG) and merges regions
which are similar in color. We construct a RAG and define edges as the
difference in mean color. We then join regions with similar mean color.

 skimage data io segmentation color skimage.future graph matplotlib pyplot plt N/A img N/A N/A data coffee N/A labels1 N/A N/A segmentation slic img compactness 30 n_segments 400 N/A out1 N/A N/A color label2rgb labels1 img kind avg N/A g N/A N/A graph rag_mean_color img labels1 N/A labels2 N/A N/A graph cut_threshold labels1 g 29 N/A out2 N/A N/A color label2rgb labels2 img kind avg N/A N/A N/A plt figure N/A N/A N/A io imshow out1 N/A N/A N/A plt figure N/A N/A N/A io imshow out2 N/A N/A N/A io show