mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-05 19:06:06 +08:00
Raise warning for sigma parameter and add to TODO for next release
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
Version 0.10
|
||||
------------
|
||||
* Remove deprecated functions:
|
||||
- ``skimage.filter.rank.*``
|
||||
* Remove deprecated parameter ``epsilon`` of ``skimage.viewer.LineProfile``
|
||||
* Remove backwards-compatability of ``skimage.measure.regionprops``
|
||||
* Remove deprecated functions in `skimage.filter.rank.*`
|
||||
* Remove deprecated parameter `epsilon` of `skimage.viewer.LineProfile`
|
||||
* Remove backwards-compatability of `skimage.measure.regionprops`
|
||||
* Remove {`ratio`, `sigma`} deprecation warnings of `skimage.segmentation.slic`
|
||||
|
||||
Version 0.9
|
||||
-----------
|
||||
* Remove deprecated functions
|
||||
- ``skimage.filter.denoise_tv_chambolle``
|
||||
- ``skimage.morphology.is_local_maximum``
|
||||
- ``skimage.transform.hough``
|
||||
- ``skimage.transform.probabilistic_hough``
|
||||
- ``skimage.transform.hough_peaks``
|
||||
- `skimage.filter.denoise_tv_chambolle`
|
||||
- `skimage.morphology.is_local_maximum`
|
||||
- `skimage.transform.hough`
|
||||
- `skimage.transform.probabilistic_hough`
|
||||
- `skimage.transform.hough_peaks`
|
||||
|
||||
@@ -10,7 +10,7 @@ from skimage.segmentation._slic import _slic_cython
|
||||
from skimage.color import rgb2lab
|
||||
|
||||
|
||||
def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=0,
|
||||
def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None,
|
||||
multichannel=True, convert2lab=True, ratio=None):
|
||||
"""Segments image using k-means clustering in Color-(x,y,z) space.
|
||||
|
||||
@@ -80,9 +80,13 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=0,
|
||||
>>> segments = slic(img, n_segments=100, ratio=20)
|
||||
"""
|
||||
|
||||
if sigma is None:
|
||||
warnings.warn('Default value of keyword `sigma` changed from ``1`` '
|
||||
'to ``0``.')
|
||||
sigma = 0
|
||||
if ratio is not None:
|
||||
msg = 'Keyword `ratio` is deprecated. Use `compactness` instead.'
|
||||
warnings.warn(msg)
|
||||
warnings.warn('Keyword `ratio` is deprecated. Use `compactness` '
|
||||
'instead.')
|
||||
compactness = ratio
|
||||
|
||||
image = img_as_float(image)
|
||||
|
||||
Reference in New Issue
Block a user