From 1f4dd28cb801ad16c67981d0333942d8c6125bf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Mon, 11 Jul 2016 22:30:08 +0200 Subject: [PATCH 1/3] Improve docstrings for captions --- .../color_exposure/plot_ihc_color_separation.py | 2 ++ doc/examples/edges/plot_contours.py | 8 ++++---- doc/examples/edges/plot_line_hough_transform.py | 7 +++---- doc/examples/features_detection/plot_glcm.py | 7 +++---- doc/examples/features_detection/plot_hog.py | 10 +++++----- doc/examples/features_detection/plot_template.py | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/doc/examples/color_exposure/plot_ihc_color_separation.py b/doc/examples/color_exposure/plot_ihc_color_separation.py index 2623355c..1a21987b 100644 --- a/doc/examples/color_exposure/plot_ihc_color_separation.py +++ b/doc/examples/color_exposure/plot_ihc_color_separation.py @@ -3,6 +3,8 @@ Immunohistochemical staining colors separation ============================================== +Color deconvolution consists in the separation of features by their colors. + In this example we separate the immunohistochemical (IHC) staining from the hematoxylin counterstaining. The separation is achieved with the method described in [1]_, known as "color deconvolution". diff --git a/doc/examples/edges/plot_contours.py b/doc/examples/edges/plot_contours.py index e686b4ac..35c61804 100644 --- a/doc/examples/edges/plot_contours.py +++ b/doc/examples/edges/plot_contours.py @@ -3,10 +3,10 @@ Contour finding =============== -``skimage.measure.find_contours`` uses a marching squares method to find -constant valued contours in an image. Array values are linearly interpolated -to provide better precision of the output contours. Contours which intersect -the image edge are open; all others are closed. +A marching squares method can be used to find constant valued contours in an +image. Array values are linearly interpolated to provide better precision of +the output contours. Contours which intersect the image edge are open; all +others are closed. The `marching squares algorithm `__ is a special case of diff --git a/doc/examples/edges/plot_line_hough_transform.py b/doc/examples/edges/plot_line_hough_transform.py index 06f23203..e013efb1 100644 --- a/doc/examples/edges/plot_line_hough_transform.py +++ b/doc/examples/edges/plot_line_hough_transform.py @@ -3,12 +3,11 @@ Straight line Hough transform ============================= -The Hough transform in its simplest form is a `method to detect straight lines -`__. +The Hough transform in its simplest form is a method to detect straight lines. In the following example, we construct an image with a line intersection. We -then use the Hough transform to explore a parameter space for straight lines -that may run through the image. +then use the `Hough transform `__. +to explore a parameter space for straight lines that may run through the image. Algorithm overview ------------------ diff --git a/doc/examples/features_detection/plot_glcm.py b/doc/examples/features_detection/plot_glcm.py index a5d17c82..47b17432 100644 --- a/doc/examples/features_detection/plot_glcm.py +++ b/doc/examples/features_detection/plot_glcm.py @@ -3,10 +3,9 @@ GLCM Texture Features ===================== -This example illustrates texture classification using texture -classification using grey level co-occurrence matrices (GLCMs). -A GLCM is a histogram of co-occurring greyscale values at a given -offset over an image. +This example illustrates texture classification using grey level +co-occurrence matrices (GLCMs). A GLCM is a histogram of co-occurring +greyscale values at a given offset over an image. In this example, samples of two different textures are extracted from an image: grassy areas and sky areas. For each patch, a GLCM with diff --git a/doc/examples/features_detection/plot_hog.py b/doc/examples/features_detection/plot_hog.py index e7b524cb..e3c89b63 100644 --- a/doc/examples/features_detection/plot_hog.py +++ b/doc/examples/features_detection/plot_hog.py @@ -3,12 +3,12 @@ Histogram of Oriented Gradients =============================== -The `Histogram of Oriented Gradient -`__ (HOG) feature -descriptor [1]_ is popular for object detection. +The Histogram of Oriented Gradient (HOG) feature descriptor is popular +for object detection [1]_. -In the following example, we compute the HOG descriptor and display -a visualisation. +In the following example, we compute the `HOG descriptor +`__ +and display a visualisation. Algorithm overview ------------------ diff --git a/doc/examples/features_detection/plot_template.py b/doc/examples/features_detection/plot_template.py index c7b4f01a..abf97b4b 100644 --- a/doc/examples/features_detection/plot_template.py +++ b/doc/examples/features_detection/plot_template.py @@ -3,8 +3,8 @@ Template Matching ================= -In this example, we use template matching to identify the occurrence of an -image patch (in this case, a sub-image centered on a single coin). Here, we +We use template matching to identify the occurrence of an image patch +(in this case, a sub-image centered on a single coin). Here, we return a single match (the exact same coin), so the maximum value in the ``match_template`` result corresponds to the coin location. The other coins look similar, and thus have local maxima; if you expect multiple matches, you From 6d3692a70dbc885105efb115968202ef104b172e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Thu, 14 Jul 2016 16:12:13 +0200 Subject: [PATCH 2/3] fix typo --- doc/examples/color_exposure/plot_ihc_color_separation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/examples/color_exposure/plot_ihc_color_separation.py b/doc/examples/color_exposure/plot_ihc_color_separation.py index 1a21987b..23b52cb1 100644 --- a/doc/examples/color_exposure/plot_ihc_color_separation.py +++ b/doc/examples/color_exposure/plot_ihc_color_separation.py @@ -3,7 +3,7 @@ Immunohistochemical staining colors separation ============================================== -Color deconvolution consists in the separation of features by their colors. +Color deconvolution consists of the separation of features by their colors. In this example we separate the immunohistochemical (IHC) staining from the hematoxylin counterstaining. The separation is achieved with the method From ce09059969006182ceee66202b16880498a2eb9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Sat, 16 Jul 2016 12:25:35 +0200 Subject: [PATCH 3/3] Change to active form + reintroduce function name --- doc/examples/edges/plot_contours.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/examples/edges/plot_contours.py b/doc/examples/edges/plot_contours.py index 35c61804..a9eddd60 100644 --- a/doc/examples/edges/plot_contours.py +++ b/doc/examples/edges/plot_contours.py @@ -3,10 +3,10 @@ Contour finding =============== -A marching squares method can be used to find constant valued contours in an -image. Array values are linearly interpolated to provide better precision of -the output contours. Contours which intersect the image edge are open; all -others are closed. +We use a marching squares method to find constant valued contours in an image. +In ``skimage.measure.find_contours``, array values are linearly interpolated +to provide better precision of the output contours. Contours which intersect +the image edge are open; all others are closed. The `marching squares algorithm `__ is a special case of