mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-25 13:30:51 +08:00
Merge pull request #565 from ahojnnes/doc-fix
DOC: Documentation fixes.
This commit is contained in:
@@ -361,7 +361,7 @@ The example compares the local threshold with the global threshold
|
||||
Local thresholding is much slower than global one. There exists a function
|
||||
for global Otsu thresholding: `skimage.filter.threshold_otsu`.
|
||||
|
||||
.. [1] http://en.wikipedia.org/wiki/Otsu's_method
|
||||
.. [4] http://en.wikipedia.org/wiki/Otsu's_method
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ mapping for the swirl transformation first computes, relative to a center
|
||||
|
||||
.. math::
|
||||
|
||||
\theta = \arctan(y/x)
|
||||
\\theta = \\arctan(y/x)
|
||||
|
||||
\rho = \sqrt{(x - x_0)^2 + (y - y_0)^2},
|
||||
\\rho = \sqrt{(x - x_0)^2 + (y - y_0)^2},
|
||||
|
||||
and then transforms them according to
|
||||
|
||||
@@ -56,12 +56,12 @@ and then transforms them according to
|
||||
|
||||
s = \mathtt{strength}
|
||||
|
||||
\theta' = \phi + s \, e^{-\rho / r + \theta}
|
||||
\\theta' = \phi + s \, e^{-\\rho / r + \\theta}
|
||||
|
||||
where ``strength`` is a parameter for the amount of swirl, ``radius`` indicates
|
||||
the swirl extent in pixels, and ``rotation`` adds a rotation angle. The
|
||||
transformation of ``radius`` into :math:`r` is to ensure that the
|
||||
transformation decays to :math:`\approx 1/1000^{\mathsf{th}}` within the
|
||||
transformation decays to :math:`\\approx 1/1000^{\mathsf{th}}` within the
|
||||
specified radius.
|
||||
|
||||
"""
|
||||
|
||||
+8
-15
@@ -6,8 +6,9 @@ Pre-built installation
|
||||
are kindly provided by Christoph Gohlke.
|
||||
|
||||
The latest stable release is also included as part of the `Enthought Python
|
||||
Distribution (EPD) <http://enthought.com/products/epd.php>`__ and `Python(x,y)
|
||||
<http://code.google.com/p/pythonxy/wiki/Welcome>`__.
|
||||
Distribution (EPD) <http://enthought.com/products/epd.php>`__, `Python(x,y)
|
||||
<http://code.google.com/p/pythonxy/wiki/Welcome>`__ and
|
||||
`Anaconda <https://store.continuum.io/cshop/anaconda/>`__.
|
||||
|
||||
On systems that support setuptools, the package can be installed from the
|
||||
`Python packaging index <http://pypi.python.org/pypi/scikit-image>`__ using
|
||||
@@ -28,34 +29,26 @@ Installation from source
|
||||
|
||||
Obtain the source from the git-repository at
|
||||
`http://github.com/scikit-image/scikit-image
|
||||
<http://github.com/scikit-image/scikit-image>`_.
|
||||
|
||||
by running
|
||||
|
||||
::
|
||||
<http://github.com/scikit-image/scikit-image>`_ by running::
|
||||
|
||||
git clone http://github.com/scikit-image/scikit-image.git
|
||||
|
||||
in a terminal (You will need to have git installed on your machine).
|
||||
in a terminal (you will need to have git installed on your machine).
|
||||
|
||||
If you do not have git installed, you can also download a zipball from
|
||||
`https://github.com/scikit-image/scikit-image/zipball/master
|
||||
<https://github.com/scikit-image/scikit-image/zipball/master>`_.
|
||||
|
||||
The SciKit can be installed globally using
|
||||
|
||||
::
|
||||
The SciKit can be installed globally using::
|
||||
|
||||
python setup.py install
|
||||
|
||||
or locally using
|
||||
|
||||
::
|
||||
or locally using::
|
||||
|
||||
python setup.py install --prefix=${HOME}
|
||||
|
||||
If you prefer, you can use it without installing, by simply adding
|
||||
this path to your PYTHONPATH variable and compiling extensions
|
||||
this path to your ``PYTHONPATH`` variable and compiling extensions
|
||||
in-place::
|
||||
|
||||
python setup.py build_ext -i
|
||||
|
||||
@@ -41,6 +41,12 @@ h6 {
|
||||
font-size: 13px;
|
||||
line-height: 15px;
|
||||
}
|
||||
blockquote {
|
||||
border-left: 0;
|
||||
}
|
||||
dt {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.logo {
|
||||
float: left;
|
||||
@@ -222,3 +228,8 @@ p.admonition-title {
|
||||
width: 200px;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
/* misc */
|
||||
div.math {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ Contributing examples to the gallery can be done on github (see
|
||||
Search field
|
||||
------------
|
||||
|
||||
The ``quick search`` field located in the sidebar of the html
|
||||
The ``quick search`` field located in the navigation bar of the html
|
||||
documentation can be used to search for specific keywords (segmentation,
|
||||
rescaling, denoising, etc.).
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@ class deprecated(object):
|
||||
|
||||
alt_msg = ''
|
||||
if self.alt_func is not None:
|
||||
alt_msg = ' Use `%s` instead.' % self.alt_func
|
||||
alt_msg = ' Use ``%s`` instead.' % self.alt_func
|
||||
|
||||
msg = 'Call to deprecated function `%s`.' % func.__name__
|
||||
msg = 'Call to deprecated function ``%s``.' % func.__name__
|
||||
msg += alt_msg
|
||||
|
||||
@functools.wraps(func)
|
||||
@@ -48,6 +48,6 @@ class deprecated(object):
|
||||
if wrapped.__doc__ is None:
|
||||
wrapped.__doc__ = doc
|
||||
else:
|
||||
wrapped.__doc__ = doc + '\n\n' + wrapped.__doc__
|
||||
wrapped.__doc__ = doc + '\n\n ' + wrapped.__doc__
|
||||
|
||||
return wrapped
|
||||
|
||||
@@ -9,6 +9,7 @@ from ._denoise_cy import denoise_bilateral, denoise_tv_bregman
|
||||
from ._rank_order import rank_order
|
||||
from ._gabor import gabor_kernel, gabor_filter
|
||||
from .thresholding import threshold_otsu, threshold_adaptive
|
||||
from . import rank
|
||||
|
||||
|
||||
__all__ = ['inverse',
|
||||
@@ -36,4 +37,5 @@ __all__ = ['inverse',
|
||||
'gabor_kernel',
|
||||
'gabor_filter',
|
||||
'threshold_otsu',
|
||||
'threshold_adaptive']
|
||||
'threshold_adaptive',
|
||||
'rank']
|
||||
|
||||
@@ -9,10 +9,10 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0,
|
||||
mode='reflect', param=None):
|
||||
"""Applies an adaptive threshold to an array.
|
||||
|
||||
Also known as local or dynamic thresholding where the threshold value is the
|
||||
weighted mean for the local neighborhood of a pixel subtracted by a
|
||||
constant. Alternatively the threshold can be determined dynamically by a
|
||||
a given function using the 'generic' method.
|
||||
Also known as local or dynamic thresholding where the threshold value is
|
||||
the weighted mean for the local neighborhood of a pixel subtracted by a
|
||||
constant. Alternatively the threshold can be determined dynamically by a a
|
||||
given function using the 'generic' method.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
@@ -26,10 +26,10 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0,
|
||||
weighted mean image.
|
||||
|
||||
* 'generic': use custom function (see `param` parameter)
|
||||
* 'gaussian': apply gaussian filter (see `param` parameter for custom
|
||||
* 'gaussian': apply gaussian filter (see `param` parameter for custom\
|
||||
sigma value)
|
||||
* 'mean': apply arithmetic mean filter
|
||||
* 'median' apply median rank filter
|
||||
* 'median': apply median rank filter
|
||||
|
||||
By default the 'gaussian' method is used.
|
||||
offset : float, optional
|
||||
@@ -42,8 +42,8 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0,
|
||||
param : {int, function}, optional
|
||||
Either specify sigma for 'gaussian' method or function object for
|
||||
'generic' method. This functions takes the flat array of local
|
||||
neighbourhood as a single argument and returns the calculated threshold
|
||||
for the centre pixel.
|
||||
neighbourhood as a single argument and returns the calculated
|
||||
threshold for the centre pixel.
|
||||
|
||||
Returns
|
||||
-------
|
||||
@@ -52,8 +52,7 @@ def threshold_adaptive(image, block_size, method='gaussian', offset=0,
|
||||
|
||||
References
|
||||
----------
|
||||
http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations
|
||||
.html?highlight=threshold#adaptivethreshold
|
||||
.. [1] http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html?highlight=threshold#adaptivethreshold
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
@@ -559,7 +559,7 @@ def ransac(data, model_class, min_samples, residual_threshold,
|
||||
>>> ransac_model, inliers = ransac(data, EllipseModel, 5, 3, max_trials=50)
|
||||
>>> # ransac_model._params, inliers
|
||||
|
||||
Should give the correct result estimated without the faulty data:
|
||||
Should give the correct result estimated without the faulty data::
|
||||
|
||||
[ 20.12762373, 29.73563061, 4.81499637, 10.4743584, 0.05217117]
|
||||
[ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||
|
||||
Reference in New Issue
Block a user