Commit Graph

5928 Commits

Author SHA1 Message Date
Guillem Palou Visa e2724d32c9 Merge branch 'slic-connectivity' of https://github.com/guillempalou/scikit-image into slic-connectivity 2013-12-24 16:19:02 +01:00
Guillem Palou Visa 64d945da71 fixing tests 2013-12-24 16:18:57 +01:00
Guillem Palou Visa 9178e77aef Changed variable names for readbility, fixed PEP8 compliance 2013-12-24 13:25:48 +01:00
Guillem Palou Visa a50b05eeb8 Fixing some code, minor revision 2013-12-24 12:00:21 +01:00
Guillem Palou Visa 08dc3a33d0 Changed coding style to be compliant with PEP8 2013-12-24 11:35:21 +01:00
Guillem Palou 53a4388e26 Changed tests to begin segment label at 1 instead of 0 2013-12-23 14:44:23 +01:00
Guillem Palou e68ab76b24 Added max_size as a parameter 2013-12-23 01:17:51 +01:00
Guillem Palou 0d6540a82c Changed SLIC superpixels so that connectivity is enforced optionally.
A separate, private function is created that implements the postprocessing step
2013-12-23 00:49:06 +01:00
Guillem Palou 8db9096b20 Enforce SLIC superpixels connectivity 2013-12-20 09:18:14 +01:00
Johannes Schönberger be3752e922 Use 2 empty lines between functions 2013-12-19 06:05:26 +01:00
Johannes Schönberger 0bf905ad22 Readd note about overflow 2013-12-18 16:36:54 +01:00
Johannes Schönberger 90ca50d7db Clarify that it is the local histogram 2013-12-18 16:34:47 +01:00
Johannes Schönberger f1839e685a Fix pop_bilateral doc test 2013-12-18 16:34:03 +01:00
Johannes Schönberger f8099fa6ac Improve doc strings of percentile rank filters 2013-12-18 14:48:59 +01:00
Johannes Schönberger db048d3675 Improve doc strings of bilateral rank filters 2013-12-18 14:43:08 +01:00
Johannes Schönberger 0a46f5f8de Improve doc strings of generic rank filters 2013-12-18 14:37:24 +01:00
Johannes Schönberger 900b35fbc5 Merge pull request #844 from odebeir/add_rank_sum
Add sum filter to rank filters (minor increment)
2013-12-18 01:11:01 -08:00
Johannes Schönberger 9a280fd524 Merge pull request #852 from jni/rgrid-int-steps
Explicity cast start and step to int in `regular_grid`
2013-12-18 01:03:24 -08:00
Almar Klein 9113d5a08b update-mcp: add tests for MCP_Flexible 2013-12-15 13:32:15 +01:00
Almar Klein fc90a164fe update-mcp: improvements to docstrings. 2013-12-15 12:44:53 +01:00
Almar Klein 789ade3ca2 update-mcp: added tests for newly added features.
Also fix in existing test related to how the traceback arrays is initialized:
first it was initialized with all -1, now with -2, and -1 at the seed points.
2013-12-15 00:37:27 +01:00
Almar Klein fdd880aa7f update-mcp: add new MCP classes to skimage.graph namespace 2013-12-14 23:58:45 +01:00
Almar Klein 2ebeee2df4 update-mcp: Change when examine_neighbors is called.
Also renamed Mcp_Connect to MCP_Connect.

Makes more sense to call it when the neighbor is frozen. In that
way the method is called exactly once for each pair of neighbours.
Plus the costs and paths are known and fixed.
2013-12-14 23:55:48 +01:00
Stefan van der Walt 7ecd6946e8 Merge pull request #800 from orieux/wiener-deconvolution
Add Wiener deconvolution
2013-12-13 18:42:41 -08:00
François Orieux 9eb878e440 Remove credit field (and others). Pep8 small fix. 2013-12-14 01:31:00 +01:00
Almar Klein f7416507fa update-mcp: Small fix.
Need _start and _end attributes for the MCP class.
It worked for my own tests because I overloaded the MCP class.
2013-12-13 16:37:36 +01:00
Almar Klein 32c4a80b32 update-mcp: Add MCP_Flexible subclass.
This class adds a public def-method for the private cdef-method hooks.
This allows users to influence the behavior of the MCP algorithm by
subclassing it in pure Python.
2013-12-13 15:13:24 +01:00
Almar Klein 8fe7416d41 update-mcp: Add MCP_Connect class
This class finds the connections between the given seed points. This is
a bit similar to finding connections between start and end points, except
now start- and endpoints are the same.
2013-12-13 15:13:24 +01:00
Almar Klein 798bea7251 update-mcp: Refactor MCP algorithm in prep for MCP subclasses
Installed a few hooks to allow more flexibility in subclasses, refactored
traceback() to allow obtaining tracebacks fast during front evolution, and
moved some initializations to reset().

Full list:
* integer division in calculating indices
* traceback_offsets use -2 for uninitialized, -1 for seed point. In that
  we we can distinguish between these two cases in traceback()
* Clearing of traceback_offset, cumulative_costs, pushing start positions
  into the heap, are now all done in reset()
* Reset is called every time that find_cost is called.
* Add hook _goal_reached()
* Add hook _examine_neighbor()
* Add hook _update_node()
* Replace while loop with a for-loop to prevent infinite looping in case of a bug.
* Split traceback() in two functions to allow getting a flat traceback fast.
  traceback() calles these two private functions and behaves as just before.
2013-12-13 15:13:24 +01:00
Almar Klein 280fadff39 MCP: refactored to use typed memoryviews
The arrays are stored on the mcp object, so that they can
be used in methods as well. Will use that to make MCP more
flexibel.
2013-12-13 15:13:24 +01:00
Almar Klein d1329488e6 MCP: add sampling attribute: deal with anisotropic data. 2013-12-13 15:13:24 +01:00
Almar Klein f5c675b8c6 MCP: turn while loop into for loop to prevent infinite looping.
A nice feature during development :)
2013-12-13 15:13:24 +01:00
Almar Klein 8d09300155 Improve speed of MPC by about 30%
Dear diary, I spend a whole day searching for why this implementation
of the MPC was slower then my own implementation. I checked *everything*.
I rewrote the front evolution to match with mine almost exactly. I was
about to give up. And then I saw this... Arg!
2013-12-13 15:13:24 +01:00
Almar Klein 4b2136bc7d Make mcp evolution algorithm a bit more readable.
In particular, distinguish between cost and cumcost, the same
variable name was used for this.
2013-12-13 15:13:24 +01:00
Juan Nunez-Iglesias a67c5e1e2b Explicity cast start, step to int in regular_grid 2013-12-13 00:54:57 +11:00
Johannes Schönberger 7b098ce35d Fix and improve doc string 2013-12-11 06:48:05 +01:00
François Orieux e0bb826e9e Update test file because of the new clip param default to True 2013-12-10 23:30:46 +01:00
François Orieux cf41cf4521 Remove own licence for skimage licence 2013-12-10 22:45:16 +01:00
François Orieux 44f27e5460 Docstring fix. Clip parameter addition. 2013-12-10 22:45:16 +01:00
François Orieux 15a96d5300 Fix python3 test and real values image. 2013-12-10 22:45:16 +01:00
François Orieux bda9b4fb3c Fix travis test 2013-12-10 22:45:16 +01:00
François Orieux b0b0b112db Add tests, coverage improvement. 2013-12-10 22:45:16 +01:00
François Orieux 4e2a5a9644 Better docstring. Better test coverage. 2013-12-10 22:45:16 +01:00
François Orieux 587ec48874 Better handle of non real case. Some docstring fix. 2013-12-10 22:45:15 +01:00
François Orieux 0fdb5b2e0a Change example scaling. Fix ref in doc. 2013-12-10 22:45:15 +01:00
François Orieux 9849d9d419 Add doctest to uft. 2013-12-10 22:45:15 +01:00
François Orieux 29f953d6a9 Fix iscomplex to iscomplexobj. Replace circshift with numpy roll. 2013-12-10 22:45:15 +01:00
François Orieux e67bdd3471 PR fixs. 2013-12-10 22:45:15 +01:00
François Orieux 8206695afd Remove import numpy from docstring doctest 2013-12-10 22:45:15 +01:00
François Orieux 6c0c4350b1 Docstring convention about "Input image". 2013-12-10 22:45:15 +01:00