Commit Graph

4237 Commits

Author SHA1 Message Date
Johannes Schönberger 4e9cb03aeb Add missing perimeter function to __all__ 2013-10-11 17:37:26 +02:00
Johannes Schönberger f10c362b1a Fix euler number bug for scipy-0.13 2013-10-11 17:34:47 +02:00
Johannes Schönberger 547c0bb7d8 Merge pull request #752 from sciunto/pep
Pep8 and other misc cosmetics.
2013-10-02 09:30:01 -07:00
François Boulogne a1373269e6 DOC: fix indent 2013-10-02 18:28:14 +02:00
François Boulogne 4a7d2e8429 PEP8 2013-10-02 18:14:21 +02:00
François Boulogne 8f20fff3f8 PEP8: fix indentation 2013-10-02 18:14:21 +02:00
François Boulogne 90db96f3eb DOC: add missing import 2013-10-02 18:14:21 +02:00
François Boulogne 628d484942 DOC: no import numpy in doc 2013-10-02 18:14:21 +02:00
François Boulogne 2e2a82ab30 MAINT: matplotlib is in requierements.txt 2013-10-02 18:14:20 +02:00
François Boulogne f82db28565 MAINT: unused import 2013-10-02 18:14:20 +02:00
François Boulogne 741d6fda95 PEP8: comparison 2013-10-02 18:14:20 +02:00
Stefan van der Walt 27d1a5e70a Merge pull request #750 from ahojnnes/misc
Misc cleanups.
2013-10-02 08:57:33 -07:00
Johannes Schönberger 2459ca14a0 Fix deprecated function name in example 2013-10-02 17:57:20 +02:00
Johannes Schönberger ee24f1c2c5 Improve example of warp function to show all available options 2013-10-02 17:45:05 +02:00
Johannes Schönberger 40f5e78353 Add support for matrix as inverse_map 2013-10-02 17:33:17 +02:00
Johannes Schönberger 9741bfda15 Add note about internal usage of transformation matrix 2013-10-02 17:17:03 +02:00
Johannes Schönberger beeb597ddf Only clip for ndimage.map_coordinates case 2013-10-02 17:10:46 +02:00
Johannes Schönberger 3e3a52331d Misc doc string fixes 2013-10-02 17:07:23 +02:00
Johannes Schönberger c3d40447f8 Remove call to deprecated is_gray function 2013-10-02 16:58:32 +02:00
Juan Nunez-Iglesias 5ea79d4301 Merge pull request #748 from ahojnnes/regionprops-dtype
- Fix for regionprops dtype error (#747) and additional tests.
 - Some docstring improvements.
2013-10-02 05:55:56 -07:00
Johannes Schönberger 78a849cc37 Fix dtype bug in perimeter 2013-10-02 14:16:24 +02:00
Johannes Schönberger d7824000fe Raise error for non 2-D images 2013-10-02 14:14:29 +02:00
Johannes Schönberger c1ea012c9b Add support for unsigned integer label images 2013-10-02 14:05:30 +02:00
Johannes Schönberger 99fb8b992e Some improvements for perimeter 2013-10-02 13:55:52 +02:00
Johannes Schönberger c414e96fcc Merge pull request #746 from luispedro/master
ENH Faster perimeter computation
2013-10-01 12:49:44 -07:00
Luis Pedro Coelho ff0b315110 RFCT Simpler code for initializing array
Also, replaced skimage.measures.histogram by np.bincount.

Both changes were suggested in the pull request discussion by Juan
Nunez-Iglesias (jni):

https://github.com/scikit-image/scikit-image/pull/746
2013-10-01 15:19:42 +02:00
Luis Pedro Coelho f81fbf5b25 ENH Faster perimeter computation
Measured a 30% speedup on a 640x640 image. Fundamentally, this makes
fewer passes over the image; so it should never be worse that the
previous implementation.
2013-10-01 13:07:17 +02:00
Tony S Yu 4ab166bba4 Merge pull request #726 from jni/fix-relabel-doc
Fix errors in relabel_from_one docs; PEP8
2013-09-29 16:03:56 -07:00
Juan Nunez-Iglesias 477c80d409 Merge pull request #740 from ahojnnes/warp-fix
Fix doc string of warp functions
2013-09-28 06:24:14 -07:00
Johannes Schönberger c01e7c9b10 Fix various doc strings using the warp function 2013-09-28 14:39:40 +02:00
Johannes Schönberger a17a1395c3 Fix doc string of warp functions 2013-09-28 14:25:45 +02:00
Juan Nunez-Iglesias 610b22b4a9 Merge pull request #719 from ahojnnes/slic
This PR:
 - speeds up SLIC while reducing memory usage,
 - closes #717,
 - adds support for a voxel spacing argument for anisotropic images,
 - removes default gaussian blurring,
 - removes "magic" guessing whether input was multichannel.
2013-09-27 04:46:59 -07:00
Johannes Schönberger 8fb6fd02a0 Scale sigma only in scalar case 2013-09-26 16:52:58 +02:00
Johannes Schönberger 845d083470 Define 1d arrays as contiguous 2013-09-22 07:22:09 +02:00
Juan Nunez-Iglesias 54530d16f6 Update snippets in notes to use double backticks 2013-09-22 13:37:04 +10:00
Johannes Schönberger d194118766 Merge pull request #733 from riaanvddool/contribution-riaanvddool
Forgotten contribution by riaanvddool: skimage.io plugin - GDAL
2013-09-20 10:48:01 -07:00
Riaan van den Dool c540ef11c9 Forgotten contribution by riaanvddool: skimage.io plugin - GDAL 2013-09-20 19:14:10 +02:00
Johannes Schönberger b3d4409be9 Merge pull request #7 from jni/slic-cython-docstring
Slic cython docstring
2013-09-20 07:55:33 -07:00
Juan Nunez-Iglesias e17e7699b3 Add note about (z, y, x) order in slic cython doc 2013-09-21 00:12:12 +10:00
Johannes Schönberger a086f03f39 Document default value API change 2013-09-19 08:36:56 +02:00
Johannes Schönberger 52f01d1f85 Merge pull request #731 from ankit-maverick/SimilarityTransform
Correcting a bug in SimialarityTransform
2013-09-18 22:57:05 -07:00
Ankit Agrawal 0ed1e22034 Correcting bug in SimialarityTransform 2013-09-19 10:23:03 +05:30
Johannes Schönberger 607ac235af Merge pull request #6 from jni/slic-speed-spacing
Slic speed spacing
2013-09-16 10:00:18 -07:00
Juan Nunez-Iglesias 05fbc3fbfc Bug fix: typo: wrote spacing instead of sigma 2013-09-16 22:42:48 +10:00
Juan Nunez-Iglesias 00e5ff263b Add spacing descriptions; use np.double
Implement @ahojnnes's comments on pull request. Use `np.double` as
dtype for arrays because in Cython, `float` is not `np.double`. And
add further clarification about the `spacing` parameter.
2013-09-16 21:26:44 +10:00
Juan Nunez-Iglesias 846765e5f9 Add spacing support for new, speeded-up SLIC 2013-09-16 17:52:25 +10:00
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
Juan Nunez-Iglesias 9d86c9a1e1 Ignore convert2lab keyword if not multichannel 2013-09-16 17:33:08 +10:00
Juan Nunez-Iglesias bf5f08e894 Update SLIC docstring to remove deprecated example
The `ratio` keyword has been deprecated but it was still being used in
the example in the SLIC docstring. This replaces that usage by the new
`compactness` keyword.
2013-09-16 17:30:48 +10:00
Johannes Schönberger 88d84c720a Raise warning for sigma parameter and add to TODO for next release 2013-09-16 08:48:46 +02:00