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?
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@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@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
participants (1)
-
Adam Hughes