Commit Graph

3708 Commits

Author SHA1 Message Date
Johannes Schönberger 71862f1b36 Merge pull request #843 from tonysyu/refactor/io
Refactor `io` package
2014-01-13 03:53:44 -08:00
Johannes Schönberger bc8c11933f Fix input test of template matching 2014-01-13 06:50:19 -05:00
Juan Nunez-Iglesias c305a8b583 Merge pull request #856 from ahojnnes/rank-sum
Improve doc strings of rank filters
2014-01-12 18:21:24 -08:00
Johannes Schönberger 0f6cb6f1f9 Add note about dtype overflow 2014-01-12 19:48:52 -05:00
Guillem Palou Visa f461d76004 Fixed minor documentation issues 2014-01-12 17:03:10 +00:00
radioxoma 0079e8de5c Adding comments 2014-01-12 18:18:50 +03:00
radioxoma cd01bad721 fix tests 2014-01-11 02:00:03 +03:00
radioxoma 4d5889964b Unit-tests and small fixes 2014-01-10 22:32:34 +03:00
radioxoma 2c197846f9 Add ISODATA threshold with tests 2014-01-10 22:32:34 +03:00
radioxoma dfa2ba7bcd fix yen blank image bug 2014-01-10 22:32:34 +03:00
radioxoma 7fec88fc82 fix threshold_yen import 2014-01-10 22:32:34 +03:00
Stefan van der Walt 09f9a92ccd Merge pull request #854 from almarklein/update-mcp
Updates to MCP algorithm.

Improves speed, adds anisotropy, more flexibility in general, and a new MCP class to find connections between seed points.
2014-01-10 04:22:49 -08:00
Almar Klein 14288e1f1e PEP8 stuff. 2014-01-06 12:39:13 +01:00
Jaidev Deshpande fe94914874 Fix typo in docstring 2014-01-06 12:47:47 +05:30
Almar Klein 3cb5a19479 Update MCP: Put back the traceback() method.
I initially changed it to allow faster (flat) tracebacks *during*
front evolution, but it turned out not to be necessary. Putting back
to minimize the changes of this PR.
2014-01-03 15:09:06 +01:00
Guillem Palou Visa 4982b00f0c Labels start at 0, for backward compatibility
Code is PEP8 compliant
2013-12-24 18:45:55 +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
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