On Tue, Apr 23, 2013 at 2:42 PM, Juan Nunez-Iglesias <jni.soma@gmail.com> wrote:
Got it. Slightly more space, slightly faster. I imagine you stored repeated row indices if the object was not convex?
Perhaps it will be a bit painful to extend to N-d, but it is doable.
You don't even need to. Have a look at section 3.1 of https://scholar.sun.ac.za/handle/10019.1/4883 Either way, I'm not sure I like how this generalized to N-d space--I'd rather work with a graph. So, when it comes down to that, it looks like we have two choices: implement a memory efficient and slightly more computationally expensive implementation, or simply pre-calculate all the neighbor indices and store that. Hrm, that reminds me of the solution we used for ImageCollection--let's just set a memory_efficient flag. If True, we only store the last flood fill result, if False, we store all flood fill results as they are computed. Easy to implement, and gives the user control of memory growth. What do you think? Stéfan
participants (1)
-
Stéfan van der Walt