Hi, 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? Thank you in advance.
Hi Valeriy, As far as I know there is no chain code implementation in scikit-image. (In fact I'd never heard of chain codes until today!) I personally would find it a valuable addition to the scikit if you came up with a good implementation. Juan. On Sat, Jul 13, 2013 at 7:58 PM, Valeriy Sokolov <sokolov.valeri@gmail.com>wrote:
Hi,
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?
Thank you in advance.
-- 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. For more options, visit https://groups.google.com/groups/opt_out.
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.
Hi Valeriy On Sat, 13 Jul 2013 02:58:33 -0700, Valeriy Sokolov wrote:
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?
Unfortunately, we do not currently have any chain codes. If you'd like to write it yourself, we could give a hand with that (depending on the speed you need, it should not be too hard). Otherwise, a longer term plan would be to implement the connectivity graph Marianne referred to. St�fan
Hello, Chain code extraction would be quite a cool feature for SunPy as well. We have a basic implementation for handling specified chain codes, though it needs work!! https://github.com/sunpy/sunpy/tree/master/sunpy/roi Stuart
participants (5)
-
Chintak Sheth
-
Juan Nunez-Iglesias
-
Stuart Mumford
-
Stéfan van der Walt
-
Valeriy Sokolov