mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-23 13:10:18 +08:00
Minor fixes and improvements: PEP8, appearance, etc.
Removed a clumsy workaround (about paths) Fixed links to image files to fix sphinx warning. Removed non-ascii character Another non ascii character And another non-ascii character... (to be squashed later on) Corrected some typos in the docstrings of sphinx-gallery files These corrections have also been submitted as a patch to the original sphinx-gallery project (#121) Corrected the appearance of two examples of the gallery Tweaked CSS for larger images Added sphinx-gallery's license and a README.txt about the origin of this directory. Edited gabor_from_astronaut example for nicer popup PEP 8 + minor fixes Removed commented lines of code
This commit is contained in:
@@ -31,7 +31,6 @@ extensions = ['sphinx.ext.autodoc',
|
||||
'sphinx.ext.imgmath',
|
||||
'numpydoc',
|
||||
'sphinx.ext.autosummary',
|
||||
#'plot2rst',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.linkcode',
|
||||
'sphinx_gallery.gen_gallery'
|
||||
|
||||
@@ -81,7 +81,7 @@ disk: ::
|
||||
... (nrows / 2)**2)
|
||||
>>> camera[outer_disk_mask] = 0
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_camera_numpy_001.png
|
||||
.. image:: ../auto_examples/numpy_operations/images/sphx_glr_plot_camera_numpy_001.png
|
||||
:width: 45%
|
||||
:target: ../auto_examples/numpy_operations/plot_camera_numpy.html
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ using an array of labels to encode the regions to be represented with the
|
||||
same color.
|
||||
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_join_segmentations_001.png
|
||||
.. image:: ../auto_examples/segmentation/images/sphx_glr_plot_join_segmentations_001.png
|
||||
:target: ../auto_examples/segmentation/plot_join_segmentations.html
|
||||
:align: center
|
||||
:width: 80%
|
||||
@@ -159,7 +159,7 @@ image with :func:`equalize_adapthist`, in order to correct for exposure
|
||||
gradients across the image. See the example
|
||||
:ref:`sphx_glr_auto_examples_color_exposure_plot_equalize.py`.
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_equalize_001.png
|
||||
.. image:: ../auto_examples/color_exposure/images/sphx_glr_plot_equalize_001.png
|
||||
:target: ../auto_examples/color_exposure/plot_equalize.html
|
||||
:align: center
|
||||
:width: 90%
|
||||
|
||||
@@ -11,7 +11,7 @@ the coins cannot be done directly from the histogram of grey values,
|
||||
because the background shares enough grey levels with the coins that a
|
||||
thresholding segmentation is not sufficient.
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_coins_segmentation_001.png
|
||||
.. image:: ../auto_examples/xx_applications/images/sphx_glr_plot_coins_segmentation_001.png
|
||||
:target: ../auto_examples/xx_applications/plot_coins_segmentation.html
|
||||
:align: center
|
||||
|
||||
@@ -26,7 +26,7 @@ Simply thresholding the image leads either to missing significant parts
|
||||
of the coins, or to merging parts of the background with the
|
||||
coins. This is due to the inhomogeneous lighting of the image.
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_coins_segmentation_002.png
|
||||
.. image:: ../auto_examples/xx_applications/images/sphx_glr_plot_coins_segmentation_002.png
|
||||
:target: ../auto_examples/xx_applications/plot_coins_segmentation.html
|
||||
:align: center
|
||||
|
||||
@@ -53,7 +53,7 @@ boundary of the coins, or inside the coins.
|
||||
>>> from scipy import ndimage as ndi
|
||||
>>> fill_coins = ndi.binary_fill_holes(edges)
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_coins_segmentation_003.png
|
||||
.. image:: ../auto_examples/xx_applications/images/sphx_glr_plot_coins_segmentation_003.png
|
||||
:target: ../auto_examples/xx_applications/plot_coins_segmentation.html
|
||||
:align: center
|
||||
|
||||
@@ -62,7 +62,7 @@ we fill the inner part of the coins using the
|
||||
``ndi.binary_fill_holes`` function, which uses mathematical morphology
|
||||
to fill the holes.
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_coins_segmentation_004.png
|
||||
.. image:: ../auto_examples/xx_applications/images/sphx_glr_plot_coins_segmentation_004.png
|
||||
:target: ../auto_examples/xx_applications/plot_coins_segmentation.html
|
||||
:align: center
|
||||
|
||||
@@ -83,7 +83,7 @@ has not been segmented correctly at all. The reason is that the contour
|
||||
that we got from the Canny detector was not completely closed, therefore
|
||||
the filling function did not fill the inner part of the coin.
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_coins_segmentation_005.png
|
||||
.. image:: ../auto_examples/xx_applications/images/sphx_glr_plot_coins_segmentation_005.png
|
||||
:target: ../auto_examples/xx_applications/plot_coins_segmentation.html
|
||||
:align: center
|
||||
|
||||
@@ -128,7 +128,7 @@ separate the coins from the background.
|
||||
|
||||
and here is the corresponding 2-D plot:
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_coins_segmentation_006.png
|
||||
.. image:: ../auto_examples/xx_applications/images/sphx_glr_plot_coins_segmentation_006.png
|
||||
:target: ../auto_examples/xx_applications/plot_coins_segmentation.html
|
||||
:align: center
|
||||
|
||||
@@ -139,7 +139,7 @@ extreme parts of the histogram of grey values::
|
||||
>>> markers[coins < 30] = 1
|
||||
>>> markers[coins > 150] = 2
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_coins_segmentation_007.png
|
||||
.. image:: ../auto_examples/xx_applications/images/sphx_glr_plot_coins_segmentation_007.png
|
||||
:target: ../auto_examples/xx_applications/plot_coins_segmentation.html
|
||||
:align: center
|
||||
|
||||
@@ -148,7 +148,7 @@ Let us now compute the watershed transform::
|
||||
>>> from skimage.morphology import watershed
|
||||
>>> segmentation = watershed(elevation_map, markers)
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_coins_segmentation_008.png
|
||||
.. image:: ../auto_examples/xx_applications/images/sphx_glr_plot_coins_segmentation_008.png
|
||||
:target: ../auto_examples/xx_applications/plot_coins_segmentation.html
|
||||
:align: center
|
||||
|
||||
@@ -165,7 +165,7 @@ We can now label all the coins one by one using ``ndi.label``::
|
||||
|
||||
>>> labeled_coins, _ = ndi.label(segmentation)
|
||||
|
||||
.. image:: ../../_images/sphx_glr_plot_coins_segmentation_009.png
|
||||
.. image:: ../auto_examples/xx_applications/images/sphx_glr_plot_coins_segmentation_009.png
|
||||
:target: ../auto_examples/xx_applications/plot_coins_segmentation.html
|
||||
:align: center
|
||||
|
||||
|
||||
Reference in New Issue
Block a user