label_boundaries problem with ndim = label_img.ndim

Eyal Saiet ejsaiet at alaska.edu
Wed Dec 2 01:33:06 EST 2015


Stefan,
I do not understand what is not true about the label_image object.
bellow is the code, in addition I added a plot of the label_image object.



   1. label_image=measure.label(g_median_bin, background=0)
   2. label_image +=1
   3. plt.figure()
   4. plt.imshow(label_image,cmap=plt.cm.gray,interpolation='nearest',origin
   ='lower')
   5. plt.title('label_image')
   6. plt.show()
   7. props = measure.regionprops(label_image,intensity_image=g_median_bin)
   8. label_bound=segmentation.find_boundaries(props,connectivity=1,mode=
   'thick',background=0)
   9. boundaries=segmentation.mark_boundaries(g_median,label_bound)




[image: Inline image 1]

On Tue, Dec 1, 2015 at 8:09 PM, Stefan van der Walt <stefanv at berkeley.edu>
wrote:

> On 2015-12-01 21:00:16, Arctic_python <ejsaiet at alaska.edu> wrote:
> >     ndim = label_img.ndim
> > AttributeError: 'list' object has no attribute 'ndim'
> >
> >    1. label_image=measure.label(g_median_bin, background=0) #
> g_median_bin
> >    is a binary image
>
> That does not seem to be true, given the error message.
>
> Stéfan
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "scikit-image" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/scikit-image/PwmizxFahYE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> scikit-image+unsubscribe at googlegroups.com.
> To post to this group, send an email to scikit-image at googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/scikit-image/87zixt8mie.fsf%40berkeley.edu
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Eyal Saiet

Project manager
Remote sensing and in-situ measurements

Geophysical Institute
University of Alaska Fairbanks
Fairbanks, AK 99775
(907) 750 6555 (cell)

ejsaiet at alaska.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20151201/a73970cc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 20790 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20151201/a73970cc/attachment.png>


More information about the scikit-image mailing list