How to get a region chain code?

Valeriy Sokolov sokolov.valeri at gmail.com
Tue Jul 16 05:06:34 EDT 2013


I would like to help with the implementation.

I am going to make draft which will work for my current case. But I will
need some guidance and review to add it to the skimage code base.

It would be helpful if you have some approach in mind... I am going to get
shape boundary pixels (with morphology) and then apply something like pixel
grid graph traverse of the boundary with Cython.


On Tue, Jul 16, 2013 at 12:46 PM, Stéfan van der Walt <stefan at sun.ac.za>wrote:

> This is the third time in about a month that we have the need to determine
> geometric properties of regions. The right solution here is to build a
> region graph, like I described in the ticket (sorry, I can't check the
> number from my phone right now). Would anyone be interested in helping to
> implement that?
>
> In the meantime we can implement the border finding manually, and later
> just slot in the new structure.
>
> Stéfan
> On 16 Jul 2013 07:03, "Chintak Sheth" <chintaksheth at gmail.com> wrote:
>
>> Hi Valeriy,
>>
>> Wow a compression technique! That would surely be a great addition.
>>
>> > I am studying a shape descriptors and would like to compute a chain
>> code description of a labeled shape. I was trying to look into docs but
>> have not find a direct way to get this region property with skimage. Is
>> there any way to do it in a few calls which I missed?
>> >
>>
>> - Extract the boundary. `skimage.morphology.erosion` using
>> `skimage.morphology.disk` structuring element with radius 1. Then subtract
>> this from the original image.
>>
>> - Label the boundaries. If you already have a labeled image, then that
>> saves you a function call else there is `label` function in
>> `skimage.morphology`.
>>
>> - Use `np.transpose(np.where(label == 1))` to generate the indices of
>> pixels marked as label 1. This will return a `list` of indices. You can
>> simply use the first as the starting point.
>>
>> This should help set up the stage for the traversal. Hope this helps a
>> bit.
>>
>> Chintak.
>>
>> --
>> 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 at googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>  --
> 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 at googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Best regards,
Valeriy Sokolov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20130716/3e15743b/attachment.html>


More information about the scikit-image mailing list