Is there a problem with the function points_in_poly ? measure.points_in_poly

Julien Derr julien.derr at gmail.com
Thu Dec 4 13:05:32 EST 2014


Hi everyone, 

I would like to use the function points_in_poly to test if the point x,y is 
in the contour cont2
x=0 y=0, but I have the problem with any value of x and y:

skimage.measure.points_in_poly(np.array([x,y]),cont2)  where cont2 is a 
contour of type  array :
but I get the following error:  "IndexError: invalid index"

it is a little obscure for me, is there a problem with this function, or is 
it me who don't know how to apply it ?

thanks a lot!

Julien




cont2        ndarray    7879x2: 15758 elems, type `float64`, 126064 bytes 
(123 kb)

In [12]: skimage.measure.points_in_poly(np.array([0,0]),cont2)
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
/home/julien/Dropbox/density_seiche/<ipython-input-12-2271d0f2b0ba> in 
<module>()
----> 1 skimage.measure.points_in_poly(np.array([0,0]),cont2)

/usr/local/lib/python2.7/dist-packages/scikit_image-0.11dev-py2.7-linux-x86_64.egg/skimage/measure/_pnpoly.so 
in skimage.measure._pnpoly.points_in_poly (skimage/measure/_pnpoly.c:2397)()

IndexError: invalid index

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20141204/ef7f410c/attachment.html>


More information about the scikit-image mailing list