scikit.measure.label
Kevin Keraudren
kevin.keraudren at googlemail.com
Tue Jul 14 10:17:58 EDT 2015
Le 14/07/2015 11:59, Shameem A Puthiya Parambath a écrit :
> Hi,
>
> I pass a 3D integer matrix to the label function in scikit.measure
>
> My original matrix contains integers in the range {-1..4}. But he
> output matrix from label function contains label from {1..199}. I am
> expecting it to be between {-1 .. 4}. Why so ?
> --
Hi Shameem,
scikit.measure.label labels the connected components in your data (from
the documentation):
"""
*Two pixels are connected when they are neighbors and have the same value.*
"""
If you look at the first example in the documentation:
http://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.label
you'll notice that the input array contains integers in the range {0..1}
but the output labels are in the range {0...4}.
Otherwise what would you expect from the label function?
Kind Regards,
Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20150714/65f2abbd/attachment.html>
More information about the scikit-image
mailing list