Describing superpixels

Juan Nunez-Iglesias jni.soma at gmail.com
Mon Apr 22 05:55:17 EDT 2013


This kind of graph is called a region adjacency graph in the literature. I
thought I would share a lesson that I learned from my highly inefficient,
NetworkX-based implementation.

It's very convenient to have direct access back to the pixels/voxels making
up each superpixel. Therefore, I stored on each node an array containing
all the linear indices into the `ravel`ed version of the image. This is
pretty expensive, though, so if could do it over, I would store the index
of a single pixel belonging to that superpixel and pair it with a flood
fill algorithm, so that a function `g.get_pixel_indices(superpixel_id)`
would transparently return the pixel list, but in O(superpixel_size) time
while only using up a singe int of space.

Related note: does skimage have an nd implementation of flood fill?

On Mon, Apr 22, 2013 at 7:37 PM, Guillaume Gay <
guillaume at mitotic-machine.org> wrote:

> Sure, it is definitely a big stand alone package.
>
> Maybe it can provide some inspiration though, notably, the graphml output
> format is really nice and cross-library  so maybe a simple first step is to
> write a simple I/O from labeled images to graphml?
>
> Guillaume
>
> Le 22/04/2013 10:58, Stéfan van der Walt a écrit :
>
>  On Mon, Apr 22, 2013 at 10:54 AM, Guillaume Gay
>> <guillaume at mitotic-machine.org**> wrote:
>>
>>> If you look for a numpy friendly gtraph library, I would strongly
>>> recommend
>>> graph-tool
>>>
>> Thanks for the pointer; graph-tools does look like a fantastic tool.
>> I don't think we're quite ready for the dependency on Boost, though.
>>
>> Stéfan
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "scikit-image" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to scikit-image+unsubscribe@**googlegroups.com<scikit-image%2Bunsubscribe at googlegroups.com>
> .
> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20130422/9a254f2c/attachment.html>


More information about the scikit-image mailing list