From bc11ca8a246bed2bd7c2c4247f9019756edcc68d Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Mon, 23 May 2016 10:39:06 -0400 Subject: [PATCH 1/4] Improved region boundary RAG docs --- doc/examples/segmentation/plot_boundary_merge.py | 10 +++++++++- doc/examples/segmentation/plot_rag_boundary.py | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/doc/examples/segmentation/plot_boundary_merge.py b/doc/examples/segmentation/plot_boundary_merge.py index e7cd89ce..13a0fd83 100644 --- a/doc/examples/segmentation/plot_boundary_merge.py +++ b/doc/examples/segmentation/plot_boundary_merge.py @@ -3,7 +3,15 @@ Hierarchical Merging of Region Boundary RAGs ============================================ -TODO: Description +This examples demonstrates how to perform hierarchical merging on region +boundary Region Adjacency Grapghs (RAGs). Region boundary RAGs can be +contructed with the :py:func:`skimage.future.graph.rag_boundary` function. +The regions with the lowest edge weights are successively merged until there +is no edge with weight less than ``thresh``. The hierarchical merging is done +through the :py:func:`skimage.future.graph.merge_hierarchical` function. +For an example of how to contruct region boundary based RAGs, see +:any:`plot_rag_boundary` + """ from skimage import data, segmentation, filters, color diff --git a/doc/examples/segmentation/plot_rag_boundary.py b/doc/examples/segmentation/plot_rag_boundary.py index 18ef4898..c841ebef 100644 --- a/doc/examples/segmentation/plot_rag_boundary.py +++ b/doc/examples/segmentation/plot_rag_boundary.py @@ -4,7 +4,12 @@ Region Boundary based RAGs ========================== This example demonstrates construction of region boundary based RAGs with the -`rag_boundary` function. +:py:func:`skimage.future.graph.rag_boundary` function. The function taken an +``edge_map`` argument, which gives the significance of a feature (such as +edges) being present at each pixel. In a region boundary RAG, the edge between +two regions is the average value of the corresponding pixels in ``edge_map`` +along their shared boundary. + """ from skimage.future import graph from skimage import data, segmentation, color, filters, io From 5a78719a40e5aeff192b038cc0a995f41c694d06 Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Tue, 28 Jun 2016 21:34:35 -0400 Subject: [PATCH 2/4] Change how the docstring is worded. --- doc/examples/segmentation/plot_boundary_merge.py | 2 +- doc/examples/segmentation/plot_rag_boundary.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/examples/segmentation/plot_boundary_merge.py b/doc/examples/segmentation/plot_boundary_merge.py index 13a0fd83..bcfd7e06 100644 --- a/doc/examples/segmentation/plot_boundary_merge.py +++ b/doc/examples/segmentation/plot_boundary_merge.py @@ -10,7 +10,7 @@ The regions with the lowest edge weights are successively merged until there is no edge with weight less than ``thresh``. The hierarchical merging is done through the :py:func:`skimage.future.graph.merge_hierarchical` function. For an example of how to contruct region boundary based RAGs, see -:any:`plot_rag_boundary` +:any:`plot_rag_boundary`. """ diff --git a/doc/examples/segmentation/plot_rag_boundary.py b/doc/examples/segmentation/plot_rag_boundary.py index c841ebef..257d67d9 100644 --- a/doc/examples/segmentation/plot_rag_boundary.py +++ b/doc/examples/segmentation/plot_rag_boundary.py @@ -3,12 +3,12 @@ Region Boundary based RAGs ========================== -This example demonstrates construction of region boundary based RAGs with the -:py:func:`skimage.future.graph.rag_boundary` function. The function taken an +Construct a region boundary RAG with the ``rag_boundary`` function. The +function :py:func:`skimage.future.graph.rag_boundary`, takes an ``edge_map`` argument, which gives the significance of a feature (such as -edges) being present at each pixel. In a region boundary RAG, the edge between -two regions is the average value of the corresponding pixels in ``edge_map`` -along their shared boundary. +edges) being present at each pixel. In a region boundary RAG, the edge weight +between two regions is the average value of the corresponding pixels in +``edge_map`` along their shared boundary. """ from skimage.future import graph From 48daa261cf4c247d218764977be0f65552cc2bf2 Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Mon, 11 Jul 2016 20:48:29 -0400 Subject: [PATCH 3/4] Typo and grammar corrections --- doc/examples/segmentation/plot_boundary_merge.py | 4 ++-- doc/examples/segmentation/plot_rag_boundary.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/examples/segmentation/plot_boundary_merge.py b/doc/examples/segmentation/plot_boundary_merge.py index bcfd7e06..b5a1c3a2 100644 --- a/doc/examples/segmentation/plot_boundary_merge.py +++ b/doc/examples/segmentation/plot_boundary_merge.py @@ -3,8 +3,8 @@ Hierarchical Merging of Region Boundary RAGs ============================================ -This examples demonstrates how to perform hierarchical merging on region -boundary Region Adjacency Grapghs (RAGs). Region boundary RAGs can be +This example demonstrates how to perform hierarchical merging on region +boundary Region Adjacency Graphs (RAGs). Region boundary RAGs can be contructed with the :py:func:`skimage.future.graph.rag_boundary` function. The regions with the lowest edge weights are successively merged until there is no edge with weight less than ``thresh``. The hierarchical merging is done diff --git a/doc/examples/segmentation/plot_rag_boundary.py b/doc/examples/segmentation/plot_rag_boundary.py index 257d67d9..99211a14 100644 --- a/doc/examples/segmentation/plot_rag_boundary.py +++ b/doc/examples/segmentation/plot_rag_boundary.py @@ -4,7 +4,7 @@ Region Boundary based RAGs ========================== Construct a region boundary RAG with the ``rag_boundary`` function. The -function :py:func:`skimage.future.graph.rag_boundary`, takes an +function :py:func:`skimage.future.graph.rag_boundary` takes an ``edge_map`` argument, which gives the significance of a feature (such as edges) being present at each pixel. In a region boundary RAG, the edge weight between two regions is the average value of the corresponding pixels in From 8998d466ad8cad70e7cc5d28aecb2c5ba214412a Mon Sep 17 00:00:00 2001 From: Vighnesh Birodkar Date: Thu, 14 Jul 2016 11:14:12 -0400 Subject: [PATCH 4/4] Fixed typos --- doc/examples/segmentation/plot_boundary_merge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/examples/segmentation/plot_boundary_merge.py b/doc/examples/segmentation/plot_boundary_merge.py index b5a1c3a2..be07d068 100644 --- a/doc/examples/segmentation/plot_boundary_merge.py +++ b/doc/examples/segmentation/plot_boundary_merge.py @@ -5,11 +5,11 @@ Hierarchical Merging of Region Boundary RAGs This example demonstrates how to perform hierarchical merging on region boundary Region Adjacency Graphs (RAGs). Region boundary RAGs can be -contructed with the :py:func:`skimage.future.graph.rag_boundary` function. +constructed with the :py:func:`skimage.future.graph.rag_boundary` function. The regions with the lowest edge weights are successively merged until there is no edge with weight less than ``thresh``. The hierarchical merging is done through the :py:func:`skimage.future.graph.merge_hierarchical` function. -For an example of how to contruct region boundary based RAGs, see +For an example of how to construct region boundary based RAGs, see :any:`plot_rag_boundary`. """