x,y coordinates of all the shape outlines
Hi, I wish to get the x,y coordinates of all the shape outlines in this image http://break2012.weebly.com/uploads/1/3/5/8/13582971/682025_orig.gif Is it possible to do it using scikit-image? Thanks.
Hi Dan, The following snippet(not tested) should work to get all the coordinates of outline pixels for this specific image. import numpy as np from skimage.io import imread from skimage.color import rgb2gray img = imread('path_to_image.gif') img = rgb2gray(img) threshold = 0.1 # Adjust this threshold so that it only allows the dark outlines in the grayscale image. 0.1 corresponds to 255/10 y_coord, x_coord = np.where(img < threshold) In case you wanted the outline pixel coordinates separately for separate objects, you might need to first do some masking so as to allow only one object to appear in the image at a time. Regards, Ankit Agrawal, Communication and Signal Processing, IIT Bombay. On Tue, Feb 11, 2014 at 11:40 PM, Dan <dkin@walla.co.il> wrote:
Hi,
I wish to get the x,y coordinates of all the shape outlines in this image http://break2012.weebly.com/uploads/1/3/5/8/13582971/682025_orig.gif
Is it possible to do it using scikit-image?
Thanks.
-- You received this message because you are subscribed to the Google Groups "scikit-image" group. To unsubscribe from this group and stop receiving emails from it, send an email to scikit-image+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
participants (2)
-
Ankit Agrawal
-
Dan