Juan Nunez-Iglesias 610a0d1793 Add support for list sigma input in SLIC
Previously, having a different `sigma` for different dimensions
required an array input. This allows the user to use a simple list,
which gets converted to an array internally.

Importantly, it removes a very unhelpful error:

```python
>>> im = np.random.rand(10, 20)
>>> from skimage import segmentation as seg
Exception AttributeError: "'UmfpackContext' object has no attribute '_symbolic'" in <bound method UmfpackContext.__del__ of <scipy.sparse.linalg.dsolve.umfpack.umfpack.UmfpackContext object at 0x1045ff5d0>> ignored

>>> s = seg.slic(im, 2, sigma=[2, 1])
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-689b36a2f0ef> in <module>()
----> 1 s = seg.slic(im, 2, sigma=[2, 1])

/Users/nuneziglesiasj/venv/skimdev2/lib/python2.7/site-packages/scikit_image-0.9dev-py2.7-macosx-10.5-x86_64.egg/skimage/segmentation/slic_superpixels.pyc in slic(image, n_segments, compactness, max_iter, sigma, multichannel, convert2lab, ratio)
    106     if not isinstance(sigma, coll.Iterable):
    107         sigma = np.array([sigma, sigma, sigma])
--> 108     if (sigma > 0).any():
    109         sigma = list(sigma) + [0]
    110         image = ndimage.gaussian_filter(image, sigma)

AttributeError: 'bool' object has no attribute 'any'
```
2013-09-16 17:49:07 +10:00
2012-10-29 18:07:46 +01:00
2013-09-01 16:03:14 +02:00
2013-08-15 14:59:52 +05:30
2012-11-02 16:02:06 -07:00

Image Processing SciKit

Source

https://github.com/scikit-image/scikit-image

Mailing List

http://groups.google.com/group/scikit-image

Installation from source

Refer to DEPENDS.txt for a list of dependencies.

The SciKit may be installed globally using

$ python setup.py install

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 the extensions:

$ python setup.py build_ext -i

License

Please read LICENSE.txt in this directory.

S
Description
Image Processing SciKit (Toolbox for SciPy)
Readme 42 MiB
Languages
Python 71.7%
Cython 17.9%
C 8.3%
C++ 1.6%
PowerShell 0.2%
Other 0.2%