Is there a bug in polygon?

Adam Hughes hughesadam87 at gmail.com
Wed Jan 1 23:46:48 EST 2014


Hmm, nevermind.  It looks like the x,y coordinates were implicitly reversed
in the call to polygon (which takes y coordinates first).  Sorry

rr, cc = polygon(poly*[:, 0**]*, *poly[:, 1**]*, img.shape)



On Wed, Jan 1, 2014 at 11:40 PM, Adam Hughes <hughesadam87 at gmail.com> wrote:

> I'm implementing draw.polygon from this example (
> http://scikit-image.org/docs/dev/auto_examples/plot_shapes.html)
>
> I connected the dots to the verticies provided in poly and plotted over
> the imshow result:
>
> In [105]: plt.imshow(poly)
>
>
> In [107]: plt.plot(*zip(*poly), ls='--')
>
>
> In [108]: plt.scatter(*zip(*poly))
>
>
>
> Which results in the attatched image.  This is unexpected, no?
>
> --
> 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/HWuYnK3eIUM/unsubscribe.
> To unsubscribe from this group and all of its topics, send an email to
> scikit-image+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20140101/d3f6e069/attachment.html>


More information about the scikit-image mailing list