You should use `io.imread('IMG_1.jpg')` instead of `Image.open`, which returns an `Image` object, not a numpy array.
Le 02/09/2013 18:25, Payal Gupta a écrit :
You received this message because you are subscribed to the Google Groups "scikit-image" group.code:
import Image
from skimage import segmentation as seg,io
img = Image.open("IMG_1.jpg" , 'r')
bimg =seg.find_boundaries(img)
io.imshow(bimg)
error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 523, in runfile
execfile(filename, namespace)
File "C:\Users\Dell\Documents\Python Scripts\final_try.py", line 12, in <module>
bimg =seg.find_boundaries(img)
File "C:\Anaconda\lib\site-packages\skimage\segmentation\boundaries.py", line 10, in find_boundaries
boundaries = np.zeros(label_img.shape, dtype=np.bool)
File "C:\Anaconda\lib\site-packages\PIL\Image.py", line 512, in __getattr__
raise AttributeError(name)
AttributeError: shape
--
On Mon, Sep 2, 2013 at 8:27 PM, Stéfan van der Walt <stefan@sun.ac.za> wrote:
On Mon, Sep 2, 2013 at 4:48 PM, Payal Gupta <erpayal2010@gmail.com> wrote:Unless you send us a code snippet (e.g. on https://gist.github.com),
> but this syntax segmentation.find_boundaries(img) not work
> where img is an image
there is nothing we can do to help.
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/rXRS0KT2PdU/unsubscribe.
To unsubscribe from this group and all of its topics, send an email to scikit-image+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com.
--
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/rXRS0KT2PdU/unsubscribe.
To unsubscribe from this group and all of its topics, send an email to scikit-image+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.