Commit Graph

100 Commits

Author SHA1 Message Date
Paul Ivanov b4b090271d complete singularization of scikit-image
I've updated references in the code and documentation to the new name.
2012-10-08 16:29:55 -07:00
Tony S Yu ad53159d60 STY: Rename highlight_boundaries to mark_boundaries 2012-10-07 19:23:38 -04:00
Tony S Yu 694ac11f93 STY: Rename visualize_boundaries to highlight_boundaries
Add @deprecated decorator to ease the transition.
2012-10-07 15:43:28 -04:00
Tony S Yu 500b1c507c ENH: Add grayscale support and color adjustment to visualize_boundaries 2012-10-07 15:33:03 -04:00
cgohlke e9790800d3 Fix ValueError: Buffer dtype mismatch on 64 bit platforms 2012-09-29 15:36:55 -07:00
Andreas Mueller 6c59e04714 MISC remove unused imports, some pep8 corrections. 2012-09-27 20:01:45 +01:00
Stefan van der Walt 03a701c831 Merge pull request #323 from emmanuelle/bug_rw
BUG: Correct a newly appeared bug in the random walker.
2012-09-19 17:53:25 -07:00
Emmanuelle Gouillart 6635cf16db [BUG] Corrected a bug in the random walker that appeared
* when returning the full probability instead of the segmentation
    * for three or more labels (two was OK)
2012-09-18 19:56:52 +02:00
Johannes Schönberger 9cc77d1138 Merge pull request #317 from tonysyu/testing-compatibility
Add `assert_greater` compatibility function.
2012-09-17 22:34:26 -07:00
JDWarner ee2092c6fa Documentation fix for labels input in random_walker.
This fix was needed because `labels` claimed it should be "of same
shape as `data`", but this is no longer always the case. When
multichannel=True, `labels` should be shaped like a SINGLE channel
of `data`, i.e. without the final dimension denoting channels.
2012-09-17 16:38:59 -05:00
Tony S Yu f2d5b109e9 Add assert_greater compatibility function.
Fix tests to work with nose < 1.1.3. Compatibility functions borrowed from scikit-learn.
2012-09-13 22:17:24 -04:00
Tony S Yu 7134a2609f DOC: Fix array formatting in doctest 2012-09-11 23:37:07 -04:00
Tony S Yu dfbbb4d766 Merge pull request #279 from emmanuelle/fix_doc
Fix doc
2012-09-02 17:13:24 -07:00
Emmanuelle Gouillart b1098f69f8 DOC: removed unused import in docstring 2012-09-02 23:21:13 +02:00
Emmanuelle Gouillart 58a57238cc Merge pull request #282 from JDWarner/multispectral_random_walker
Multispectral random walker
2012-09-02 06:23:58 -07:00
JDWarner e8ddcefae3 PEP8 compliance, removed scaling, different data parsing.
This commit represents all recommended changes since the last
commit, notably:

* PEP8 compliance (in new sections; a few old ones still
  noncompliant w/indentations)

* Moved `depth` kwarg to end of list and in docstring.
  Clarified `depth` docstring, and added section in Notes
  further explaining this parameter.

* Added section in Notes warning that for multichannel inputs,
  all channels are combined during scaling.  The user must
  separately normalize each channel prior to calling
  random_walker()

* New method for parsing data, allowing more elegant gradient
  calculation code. Probably also more extensible. The 2D
  multispectral case forced this change.

* New test: `test_multispectral_2d()`
2012-08-31 14:14:46 -05:00
Johannes Schönberger dd45f15ced Use explicit keyword for dtype 2012-08-30 09:40:54 +02:00
Johannes Schönberger bbeaec6b3f Add examples to doc string of clear_border 2012-08-30 09:36:28 +02:00
JDWarner 99238c44a5 sqrt(gradients) line removed 2012-08-29 17:07:13 -05:00
JDWarner 61320957eb Changes based on PR review recommendations: input format, scaling, and bugfix.
In this new version, all instances of 'spectrum' have been replaced with 'channel'.  The documentation also reflects this change, and the new multichannel kwarg used to indicate multichannel input is named appropriately.

New boolean multichannel kwarg added, which controls if the input has multiple channels or not.  Input 'data' is now array_like for both gray-level and multichannel.  This kwarg is needed mainly because a 3-D array could be either 3 spatial dimensions or a set of different 2-D channels.

New scaling kwarg added (may be removed in future), controlling if data scaling is applied to ALL channels or each channel individually, if multichannel=True. No effect for gray-level data.

Removed np.sqrt(gradients) in _compute_weights_3d(), which was a bug. Tests now pass consistently.

New method for maintaining shape from input to output, where dims = data.shape prior to np.atleast_3d().  A theoretical (70,100,1) array passed should now result in a (70,100,1) shaped output, for example.

Updated and fixed multispectral test script to work with new version.  TODO: Additional test(s) likely needed to cover code branches from new kwargs.
2012-08-29 16:33:56 -05:00
JDWarner 682d0535cd Added multispectral random walker test.
Since the multispectral path is equivalent except for gradient calcs,
only one test case is needed.  This test is modeled on the 3-D
non-multispectral version.  If deemed necessary, adding a 2-D case
would be simple.
2012-08-27 13:41:41 -05:00
Johannes Schönberger 1177cf1393 Move clear_border to segmentation package 2012-08-27 18:56:05 +02:00
JDWarner feca48cc49 Added return_full_prob kwarg to solve call if pyamg not present. 2012-08-27 11:48:32 -05:00
JDWarner 8955dad32e Multispectral modifications applied to random walker. 2012-08-27 11:42:30 -05:00
Emmanuelle Gouillart 06065f640a PEP 8: _quickshift module 2012-08-27 16:23:11 +02:00
Emmanuelle Gouillart 0293403b68 DOC: example in slic segmentation docstring 2012-08-27 12:57:24 +02:00
Stefan van der Walt 8d54380dc0 Merge pull request #259 from emmanuelle/fix_random_walker
ENH: Fix random walker.
2012-08-27 02:40:56 -07:00
Emmanuelle Gouillart 9d29d5df78 PEP8: indentation in random_walker_segmentation 2012-08-27 11:26:11 +02:00
Emmanuelle Gouillart 28161eaee6 ENH: better handling of labels that need to be reordered
(this is now done automatically)
2012-08-24 15:09:46 +02:00
Johannes Schönberger a08779e06a Use predefined header files from Cython 2012-08-21 15:15:27 +02:00
Stefan van der Walt 1c3aeec2a8 BUG: Remove uses of xrange for py3 compatibility. 2012-08-20 15:25:40 -07:00
Andreas Mueller 6b1dab9f9a MISC move felzenszwalb_cy.pyx to _felzenszwalb_cy.pyx, don't use xrange when not necessary 2012-08-20 22:30:58 +01:00
Andreas Mueller fe2a4334fa ENH addressed (hopefully all) of Tony's and Stefan's comments. 2012-08-20 20:22:06 +01:00
Andreas Mueller 37c0ffe072 cosmit: changed the names of x and y to r and c. that was no fun, i tell you. 2012-08-20 20:01:41 +01:00
Andreas Mueller 8d769a4cd9 ENH Felzenszwalbs segmentation somewhat faster 2012-08-10 10:48:38 +01:00
Andreas Mueller 312b03d1b1 ENH more speeeeed 2012-08-10 10:35:23 +01:00
Andreas Mueller 8f5337a2bf ENH added some cdefs 2012-08-10 10:31:23 +01:00
Andreas Mueller f88a29b091 ENH minor speedups. 2012-08-10 10:03:20 +01:00
Andreas Mueller f560346309 Trying to avoid name collisions. 2012-08-05 21:31:24 +01:00
Andreas Mueller f421587aa4 ENH renamed "felzenszwalb_segmentation" to "felzenszwalb", remove debug output from slic 2012-08-05 21:10:29 +01:00
Andreas Mueller 73dd46019b FIX width/height trouble, add non-regression test 2012-08-05 21:06:37 +01:00
Andreas Mueller e0034e384a Minor fixes addressing @tonysyu's comments. 2012-08-05 20:30:43 +01:00
Andreas Mueller 530f2c31c4 pep8 2012-08-05 20:25:34 +01:00
Andreas Mueller 8098718036 Fixup tests, add test for slic. 2012-08-05 14:33:30 +01:00
Andreas Mueller b1eb4265ed Post-processing for felzenszwalbs algorithm. 2012-08-05 13:52:15 +01:00
Andreas Mueller e65d6f6635 Added smoothing option to quickshift 2012-08-04 20:27:31 +01:00
Andreas Mueller 10934cfaff Fixed bug in SLIC smoothing 2012-08-04 20:27:18 +01:00
Andreas Mueller d770fc714d quickshift: convert to lab in function, some comments in code. 2012-08-04 19:56:22 +01:00
Andreas Mueller 1746d2c38c Some scaling issues to be closer to reference implementation 2012-08-04 18:03:03 +01:00
Andreas Mueller b6059b5672 Put RGB2Lab into slic as it seems to be essential. 2012-08-03 12:00:39 +01:00