Get border pixels of labelled region

1,258 views
Skip to first unread message

Robin Wilson

unread,
Jul 2, 2013, 4:59:40 PM7/2/13
to scikit...@googlegroups.com
Hi all,

Is there a way to get the pixels on the border of a labelled region in an image using skimage? I've done edge detection, and then filled the resulting shapes (after some edge linking), and would now like to be able to get the pixels on the border of each of these shapes. I would have thought that getting borders would be an option in regionprops, but it doesn't seem to be.

Any ideas?

Cheers,

Robin

Johannes Schönberger

unread,
Jul 2, 2013, 5:10:46 PM7/2/13
to scikit...@googlegroups.com
Hi,

Do you mean the functionality provided by `skimage.measure.find_contours`?

Johannes Schönberger
> --
> 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...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Payal Gupta

unread,
Sep 2, 2013, 7:07:23 AM9/2/13
to scikit...@googlegroups.com
but this function not working... how to use it.
reply me

Payal Gupta

unread,
Sep 2, 2013, 10:48:54 AM9/2/13
to scikit...@googlegroups.com
but this syntax segmentation.find_boundaries(img) not work
where img is an image 


--
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...@googlegroups.com.

Stéfan van der Walt

unread,
Sep 2, 2013, 10:57:00 AM9/2/13
to scikit-image
On Mon, Sep 2, 2013 at 4:48 PM, Payal Gupta <erpay...@gmail.com> wrote:
> but this syntax segmentation.find_boundaries(img) not work
> where img is an image

Unless you send us a code snippet (e.g. on https://gist.github.com),
there is nothing we can do to help.

Stéfan

Payal Gupta

unread,
Sep 2, 2013, 12:25:47 PM9/2/13
to scikit...@googlegroups.com

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



Guillaume Gay

unread,
Sep 2, 2013, 2:28:53 PM9/2/13
to scikit...@googlegroups.com
You should use `io.imread('IMG_1.jpg')` instead of `Image.open`, which returns an `Image` object, not a numpy array.
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...@googlegroups.com.

Payal Gupta

unread,
Sep 3, 2013, 3:02:44 AM9/3/13
to scikit...@googlegroups.com
hello..
thanks it working bt result not correct.
see the attachment. i want to find the boundary of this fig bt find_boundary not work and do you know which function work as same bwboundaries in matlab
please reply 
figure_1.png
IMG_1.JPG

Guillaume Gay

unread,
Sep 3, 2013, 3:15:07 AM9/3/13
to scikit...@googlegroups.com
Ok, I responded a bit quickly yesterday,

So here's the doc from find_boundaries (you can get that by running
`find_boundaries?` in an ipython)

Definition:find_boundaries(label_img)
Docstring:Return bool array where boundaries between labeled regions are True.


So you see that find_boundaries work on a labeled image, so my guess is
you first need to threshold your image, and only then find the boundaries.

It's not clear from what you say what exactly you want to segment out of
the image, but maybe your work flow would include some colorspace
conversion (for exemple RGB to HSV), then a thresholding, and then
find_boundaries)...

Hope this helps,
Guillaume

Payal Gupta

unread,
Sep 3, 2013, 5:45:39 AM9/3/13
to scikit...@googlegroups.com
thanks it working but i confused when i use function of skimage library. i want to change rgb image to a graylevel image but inbuilt function rgb2gray not convert gray level image.
reply.


--
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.

Stéfan van der Walt

unread,
Sep 3, 2013, 10:12:40 AM9/3/13
to scikit-image


On 3 Sep 2013 11:45, "Payal Gupta" <erpay...@gmail.com> wrote:
>
> thanks it working but i confused when i use function of skimage library. i want to change rgb image to a graylevel image but inbuilt function rgb2gray not convert gray level image.
> reply.

If you want help on this list, please provide code examples of what you are attempting.

Stéfan

Payal Gupta

unread,
Sep 4, 2013, 11:31:36 AM9/4/13
to scikit...@googlegroups.com
hello everyone...
i will try this code,in this  i want to do read a image then do edge detection after that find the boundaries of image object. but find_boundaries return me a bool array but i need a integer array. is it any solution of this.


code::

import Image

from skimage import segmentation as seg,io,filter

imge = io.imread("IMG_1.jpg")

thresh = filter.threshold_otsu(imge)

binary = imge> thresh

edge_canny = filter.canny(binary)

bimg =seg.find_boundaries(binary)

print(bimg)

fig, (ax0, ax1) = plt.subplots(ncols=2)

ax0.imshow(bimg,cmap=plt.cm.gray)

ax1.imshow(binary,cmap=plt.cm.gray) 


--
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...@googlegroups.com.

Juan Nunez-Iglesias

unread,
Sep 5, 2013, 2:49:40 AM9/5/13
to scikit...@googlegroups.com
Hi Payal,

I think you're misunderstanding the purpose of "find_boundaries"... Not quite your fault since the documentation is pretty sparse there.

I'll use my favourite fuzzball as an example:

Inline image 1

"find_boundaries" is meant to take in a segmentation, which is an image in which each region has a different integer label, like this one:

Inline image 2

Then, find_boundaries merely looks for pixels where the neighbouring labels are different:

Inline image 3

It's not doing any edge detection per se, it's just a tool for displaying segmentations when it is easier to look at edges than at regions (above). I think what you are after is edge detection? Maybe an image like this one:

Inline image 4
?

For that, you should directly use the edge detection algorithms, such as Sobel or Canny, without previously thresholding your image. Have a close look at the examples gallery to figure out if any are close to what you are after, and try to apply the code there to your own image:


Some of the more pertinent ones, I think:

Note that in the edge detection examples, Canny/Sobel is applied to the image *before* any thresholding — unlike the example code you provided.

Juan.


--
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...@googlegroups.com.
boundary_im.png
label_im.png
Screen Shot 2013-09-05 at 4.09.48 PM.png
159022.jpg

Payal Gupta

unread,
Sep 11, 2013, 4:19:35 AM9/11/13
to scikit...@googlegroups.com
hello everyone...
i used find_contour function which returns a 2D ndarray . i can't understand the return array so any body help me.
program :

image = io.imread("IMG_2.jpg")

thresh = filter.threshold_otsu(image)

binary = image > thresh

imag= color.colorconv.rgb2grey(binary)

img = array(imag)

edge_canny = canny(img)

edge_sobel = sobel(img)

contours = measure.find_contours(imag,0.9,'high')

print contours

fig, (ax0, ax1) = plt.subplots(ncols=2)

ax0.imshow(imag ,cmap=plt.cm.gray)

ax0.set_title('Roberts Edge Detection')

ax0.axis('off')

ax1.imshow(edge_canny, cmap=plt.cm.gray)

ax1.set_title('Sobel Edge Detection')

ax1.axis('off')



returns array:


[array([[ 135.        ,   72.9       ],
       [ 134.        ,   72.9       ],
       [ 133.        ,   72.9       ],
       ..., 
       [   1.        ,   21.52941176],
       [   0.47058824,   21.        ],
       [   0.        ,   20.9       ]]), array([[   0.        ,  104.35137034],
       [   1.        ,  104.35137034],
       [   1.64862966,  105.        ],
       [   2.        ,  105.1       ],
       [   3.        ,  105.35137034],
       [   3.1       ,  105.        ],
       [   3.1       ,  104.        ],
       [   3.1       ,  103.        ],
       [   4.        ,  102.1       ],
       [   4.1       ,  102.        ],
       [   5.        ,  101.1       ],
       [   5.9       ,  102.        ],
       [   6.        ,  102.1       ],
       [   7.        ,  102.1       ],
       [   8.        ,  102.1       ],
       [   8.1       ,  102.        ],
       [   9.        ,  101.1       ],
       [   9.1       ,  101.        ],
       [  10.        ,  100.1       ],
       [  11.        ,  100.1       ],
       [  11.1       ,  100.        ],
       [  12.        ,   99.1       ],
       [  13.        ,   99.1       ],
       [  13.9       ,  100.        ],
       [  13.9       ,  101.        ],
       [  13.89222977,  102.        ],
       [  13.        ,  102.89222977],
       [  12.        ,  102.89222977],
       [  11.10777023,  102.        ],
       [  11.        ,  101.9       ],
       [  10.9       ,  102.        ],
       [  10.9       ,  103.        ],
       [  10.9       ,  104.        ],
       [  10.9       ,  105.        ],
       [  10.        ,  105.9       ],
       [   9.9       ,  106.        ],
       [  10.        ,  106.1       ],
       [  11.        ,  106.1       ],
       [  12.        ,  106.1       ],
       [  13.        ,  106.1       ],
       [  14.        ,  106.1       ],
       [  15.        ,  106.1       ],
       [  16.        ,  106.35137034],
       [  16.64862966,  107.        ],
       [  17.        ,  107.1       ],
       [  18.        ,  107.1       ],
       [  18.1       ,  107.        ],
       [  19.        ,  106.1       ],
       [  19.1       ,  106.        ],
       [  20.        ,  105.1       ],
       [  20.1       ,  105.        ],
       [  20.        ,  104.9       ],
       [  19.        ,  104.9       ],
       [  18.        ,  104.9       ],
       [  17.9       ,  105.        ],
       [  17.        ,  105.9       ],
       [  16.        ,  105.9       ],
       [  15.1       ,  105.        ],
       [  15.        ,  104.9       ],
       [  14.1       ,  104.        ],
       [  14.        ,  103.9       ],
       [  13.1       ,  103.        ],
       [  14.        ,  102.1       ],
       [  14.1       ,  102.        ],
       [  14.1       ,  101.        ],
       [  15.        ,  100.1       ],
       [  15.1       ,  100.        ],
       [  16.        ,   99.1       ],
       [  16.1       ,   99.        ],
       [  17.        ,   98.1       ],
       [  18.        ,   98.10777023],
       [  18.89222977,   99.        ],
       [  18.        ,   99.89222977],
       [  17.9       ,  100.        ],
       [  17.9       ,  101.        ],
       [  18.        ,  101.1       ],
       [  18.9       ,  102.        ],
       [  18.9       ,  103.        ],
       [  19.        ,  103.1       ],
       [  19.1       ,  103.        ],
       [  19.1       ,  102.        ],
       [  19.1       ,  101.        ],
       [  19.1       ,  100.        ],
       [  19.35137034,   99.        ],
       [  20.        ,   98.35137034],
       [  20.64862966,   99.        ],
       [  21.        ,   99.1       ],
       [  22.        ,   99.1       ],
       [  23.        ,   99.1       ],
       [  23.9       ,  100.        ],
       [  24.        ,  100.1       ],
       [  25.        ,  100.1       ],
       [  26.        ,  100.1       ],
       [  27.        ,  100.1       ],
       [  27.9       ,  101.        ],
       [  28.        ,  101.1       ],
       [  29.        ,  101.1       ],
       [  30.        ,  101.1       ],
       [  31.        ,  101.1       ],
       [  32.        ,  101.1       ],
       [  32.9       ,  102.        ],
       [  33.        ,  102.1       ],
       [  34.        ,  102.1       ],
       [  34.9       ,  103.        ],
       [  35.        ,  103.1       ],
       [  36.        ,  103.1       ],
       [  37.        ,  103.1       ],
       [  37.9       ,  104.        ],
       [  38.        ,  104.1       ],
       [  39.        ,  104.1       ],
       [  40.        ,  104.47058824],
       [  40.52941176,  105.        ],
       [  41.        ,  105.1       ],
       [  42.        ,  105.1       ],
       [  43.        ,  105.47058824],
       [  43.52941176,  106.        ],
       [  44.        ,  106.1       ],
       [  45.        ,  106.1       ],
       [  45.9       ,  107.        ],
       [  46.        ,  107.1       ],
       [  47.        ,  107.1       ],
       [  48.        ,  107.1       ],
       [  48.9       ,  108.        ],
       [  49.        ,  108.1       ],
       [  50.        ,  108.1       ],
       [  51.        ,  108.1       ],
       [  52.        ,  108.1       ],
       [  53.        ,  108.35137034],
       [  53.64862966,  109.        ],
       [  54.        ,  109.1       ],
       [  55.        ,  109.1       ],
       [  56.        ,  109.1       ],
       [  56.9       ,  110.        ],
       [  57.        ,  110.1       ],
       [  58.        ,  110.1       ],
       [  59.        ,  110.1       ],
       [  60.        ,  110.1       ],
       [  60.9       ,  111.        ],
       [  61.        ,  111.1       ],
       [  62.        ,  111.1       ],
       [  63.        ,  111.1       ],
       [  64.        ,  111.1       ],
       [  64.9       ,  112.        ],
       [  65.        ,  112.1       ],
       [  66.        ,  112.1       ],
       [  67.        ,  112.1       ],
       [  68.        ,  112.1       ],
       [  68.9       ,  113.        ],
       [  69.        ,  113.1       ],
       [  70.        ,  113.1       ],
       [  70.9       ,  114.        ],
       [  70.        ,  114.9       ],
       [  69.9       ,  115.        ],
       [  70.        ,  115.1       ],
       [  70.9699321 ,  116.        ],
       [  71.        ,  116.0300679 ],
       [  72.        ,  116.1       ],
       [  73.        ,  116.1       ],
       [  74.        ,  116.35137034],
       [  74.64862966,  117.        ],
       [  75.        ,  117.1       ],
       [  76.        ,  117.1       ],
       [  77.        ,  117.1       ],
       [  78.        ,  117.1       ],
       [  78.9699321 ,  118.        ],
       [  79.        ,  118.0300679 ],
       [  80.        ,  118.1       ],
       [  81.        ,  118.1       ],
       [  82.        ,  118.1       ],
       [  83.        ,  118.1       ],
       [  83.9699321 ,  119.        ],
       [  84.        ,  119.0300679 ],
       [  85.        ,  119.1       ],
       [  86.        ,  119.1       ],
       [  87.        ,  119.1       ],
       [  88.        ,  119.1       ],
       [  89.        ,  119.1       ],
       [  90.        ,  119.1       ],
       [  91.        ,  119.1       ],
       [  92.        ,  119.1       ],
       [  92.9699321 ,  120.        ],
       [  93.        ,  120.0300679 ],
       [  93.13129412,  120.        ],
       [  94.        ,  119.35137034],
       [  95.        ,  119.1       ],
       [  96.        ,  119.35137034],
       [  97.        ,  119.35137034],
       [  98.        ,  119.35137034],
       [  99.        ,  119.1       ],
       [ 100.        ,  119.1       ],
       [ 101.        ,  119.1       ],
       [ 102.        ,  119.1       ],
       [ 103.        ,  119.0300679 ],
       [ 103.13129412,  119.        ],
       [ 103.        ,  118.9699321 ],
       [ 102.        ,  118.9       ],
       [ 101.        ,  118.9       ],
       [ 100.        ,  118.9       ],
       [  99.        ,  118.9       ],
       [  98.        ,  118.9       ],
       [  97.        ,  118.9       ],
       [  96.        ,  118.9       ],
       [  95.        ,  118.64862966],
       [  94.        ,  118.64862966],
       [  93.        ,  118.9       ],
       [  92.1       ,  118.        ],
       [  93.        ,  117.1       ],
       [  94.        ,  117.35137034],
       [  95.        ,  117.35137034],
       [  96.        ,  117.1       ],
       [  97.        ,  117.1       ],
       [  98.        ,  117.1       ],
       [  99.        ,  117.1       ],
       [ 100.        ,  117.1       ],
       [ 101.        ,  117.1       ],
       [ 102.        ,  117.1       ],
       [ 103.        ,  117.1       ],
       [ 104.        ,  117.1       ],
       [ 105.        ,  117.1       ],
       [ 106.        ,  117.1       ],
       [ 107.        ,  117.1       ],
       [ 108.        ,  117.1       ],
       [ 109.        ,  117.1       ],
       [ 109.1       ,  117.        ],
       [ 110.        ,  116.1       ],
       [ 110.1       ,  116.        ],
       [ 110.        ,  115.9       ],
       [ 109.        ,  115.9       ],
       [ 108.        ,  115.9       ],
       [ 107.1       ,  115.        ],
       [ 107.        ,  114.9       ],
       [ 106.        ,  114.9       ],
       [ 105.9       ,  115.        ],
       [ 105.        ,  115.9       ],
       [ 104.        ,  115.9       ],
       [ 103.        ,  115.9       ],
       [ 102.1       ,  115.        ],
       [ 102.        ,  114.9       ],
       [ 101.1       ,  114.        ],
       [ 101.1       ,  113.        ],
       [ 101.        ,  112.89222977],
       [ 100.10777023,  112.        ],
       [ 101.        ,  111.10777023],
       [ 101.1       ,  111.        ],
       [ 101.47058824,  110.        ],
       [ 102.        ,  109.47058824],
       [ 102.1       ,  109.        ],
       [ 103.        ,  108.1       ],
       [ 103.1       ,  108.        ],
       [ 104.        ,  107.1       ],
       [ 105.        ,  107.1       ],
       [ 105.1       ,  107.        ],
       [ 106.        ,  106.1       ],
       [ 107.        ,  106.1       ],
       [ 108.        ,  106.1       ],
       [ 109.        ,  106.1       ],
       [ 110.        ,  106.1       ],
       [ 110.1       ,  106.        ],
       [ 111.        ,  105.1       ],
       [ 112.        ,  105.10777023],
       [ 112.89222977,  106.        ],
       [ 112.9       ,  107.        ],
       [ 112.9       ,  108.        ],
       [ 113.        ,  108.47058824],
       [ 113.47058824,  108.        ],
       [ 113.47058824,  107.        ],
       [ 113.10777023,  106.        ],
       [ 113.10777023,  105.        ],
       [ 113.47058824,  104.        ],
       [ 113.47058824,  103.        ],
       [ 113.47058824,  102.        ],
       [ 114.        ,  101.47058824],
       [ 115.        ,  101.47058824],
       [ 115.52941176,  102.        ],
       [ 115.52941176,  103.        ],
       [ 116.        ,  103.47058824],
       [ 116.52941176,  104.        ],
       [ 116.        ,  104.52941176],
       [ 115.52941176,  105.        ],
       [ 115.52941176,  106.        ],
       [ 116.        ,  106.47058824],
       [ 116.52941176,  107.        ],
       [ 117.        ,  107.47058824],
       [ 117.52941176,  108.        ],
       [ 117.52941176,  109.        ],
       [ 117.52941176,  110.        ],
       [ 117.        ,  110.52941176],
       [ 116.52941176,  111.        ],
       [ 117.        ,  111.47058824],
       [ 118.        ,  111.47058824],
       [ 118.52941176,  112.        ],
       [ 118.        ,  112.52941176],
       [ 117.52941176,  113.        ],
       [ 118.        ,  113.47058824],
       [ 119.        ,  113.47058824],
       [ 119.52941176,  114.        ],
       [ 119.52941176,  115.        ],
       [ 119.        ,  115.52941176],
       [ 118.52941176,  116.        ],
       [ 119.        ,  116.47058824],
       [ 119.52941176,  117.        ],
       [ 119.52941176,  118.        ],
       [ 119.        ,  118.52941176],
       [ 118.47058824,  118.        ],
       [ 118.        ,  117.52941176],
       [ 117.52941176,  118.        ],
       [ 118.        ,  118.47058824],
       [ 118.52941176,  119.        ],
       [ 119.        ,  119.47058824],
       [ 119.52941176,  120.        ],
       [ 119.52941176,  121.        ],
       [ 119.52941176,  122.        ],
       [ 120.        ,  122.47058824],
       [ 120.52941176,  123.        ],
       [ 120.52941176,  124.        ],
       [ 120.52941176,  125.        ],
       [ 120.52941176,  126.        ],
       [ 120.52941176,  127.        ],
       [ 120.        ,  127.52941176],
       [ 119.        ,  127.52941176],
       [ 118.        ,  127.52941176],
       [ 117.52941176,  128.        ],
       [ 118.        ,  128.47058824],
       [ 118.52941176,  129.        ]]), array([[  3. ,  27.9],
       [  2.1,  27. ],
       [  3. ,  26.1],
       [  3.9,  27. ],
       [  3. ,  27.9]]), array([[ 13.        ,  34.52941176],
       [ 12.        ,  34.9       ],
       [ 11.        ,  34.9       ],
       [ 10.        ,  34.9       ],
       [  9.        ,  34.9       ],
       [  8.        ,  34.9       ],
       [  7.        ,  34.9       ],
       [  6.        ,  34.9       ],
       [  5.        ,  34.9       ],
       [  4.1       ,  34.        ],
       [  5.        ,  33.1       ],
       [  6.        ,  33.1       ],
       [  7.        ,  33.1       ],
       [  8.        ,  33.1       ],
       [  9.        ,  33.1       ],
       [ 10.        ,  33.1       ],
       [ 11.        ,  33.1       ],
       [ 12.        ,  33.1       ],
       [ 13.        ,  33.47058824],
       [ 13.52941176,  34.        ],
       [ 13.        ,  34.52941176]]), array([[  7. ,  89.9],
       [  6.1,  89. ],
       [  7. ,  88.1],
       [  7.9,  89. ],
       [  7. ,  89.9]]), array([[   9.1       ,  104.        ],
       [   9.        ,  103.9       ],
       [   8.        ,  103.9       ],
       [   7.9       ,  104.        ],
       [   7.        ,  104.9       ],
       [   6.9       ,  105.        ],
       [   7.        ,  105.1       ],
       [   8.        ,  105.1       ],
       [   8.47058824,  105.        ],
       [   9.        ,  104.47058824],
       [   9.1       ,  104.        ]]), array([[  8. ,  90.9],
       [  7.1,  90. ],
       [  8. ,  89.1],
       [  8.9,  90. ],
       [  8. ,  90.9]]), array([[ 10. ,  91.9],
       [  9. ,  91.9],
       [  8.1,  91. ],
       [  9. ,  90.1],
       [ 10. ,  90.1],
       [ 10.9,  91. ],
       [ 10. ,  91.9]]), array([[  10.35137034,  108.        ],
       [  10.        ,  107.9       ],
       [   9.9       ,  108.        ],
       [  10.        ,  108.1       ],
       [  10.35137034,  108.        ]]), array([[ 12. ,  92.9],
       [ 11. ,  92.9],
       [ 10.1,  92. ],
       [ 11. ,  91.1],
       [ 12. ,  91.1],
       [ 12.9,  92. ],
       [ 12. ,  92.9]]), array([[ 15.        ,  97.64862966],
       [ 14.9       ,  98.        ],
       [ 14.        ,  98.9       ],
       [ 13.        ,  98.9       ],
       [ 12.        ,  98.9       ],
       [ 11.1       ,  98.        ],
       [ 12.        ,  97.1       ],
       [ 13.        ,  97.1       ],
       [ 13.1       ,  97.        ],
       [ 14.        ,  96.1       ],
       [ 15.        ,  96.35137034],
       [ 15.64862966,  97.        ],
       [ 15.        ,  97.64862966]]), array([[  17.1       ,  109.        ],
       [  17.        ,  108.9       ],
       [  16.        ,  108.64862966],
       [  15.35137034,  108.        ],
       [  15.        ,  107.9       ],
       [  14.        ,  107.9       ],
       [  13.        ,  107.9       ],
       [  12.        ,  107.9       ],
       [  11.64862966,  108.        ],
       [  12.        ,  108.1       ],
       [  12.9699321 ,  109.        ],
       [  13.        ,  109.0300679 ],
       [  14.        ,  109.1       ],
       [  15.        ,  109.1       ],
       [  16.        ,  109.1       ],
       [  17.        ,  109.1       ],
       [  17.1       ,  109.        ]]), array([[ 14. ,  93.9],
       [ 13. ,  93.9],
       [ 12.1,  93. ],
       [ 13. ,  92.1],
       [ 14. ,  92.1],
       [ 14.9,  93. ],
       [ 14. ,  93.9]]), array([[ 16. ,  94.9],
       [ 15. ,  94.9],
       [ 14.1,  94. ],
       [ 15. ,  93.1],
       [ 16. ,  93.1],
       [ 16.9,  94. ],
       [ 16. ,  94.9]]), array([[ 19.        ,  35.52941176],
       [ 18.        ,  35.52941176],
       [ 17.        ,  35.52941176],
       [ 16.        ,  35.9       ],
       [ 15.1       ,  35.        ],
       [ 16.        ,  34.1       ],
       [ 17.        ,  34.47058824],
       [ 18.        ,  34.47058824],
       [ 19.        ,  34.47058824],
       [ 19.52941176,  35.        ],
       [ 19.        ,  35.52941176]]), array([[ 18. ,  95.9],
       [ 17. ,  95.9],
       [ 16.1,  95. ],
       [ 17. ,  94.1],
       [ 18. ,  94.1],
       [ 18.9,  95. ],
       [ 18. ,  95.9]]), array([[ 21.        ,  96.64862966],
       [ 20.        ,  96.9       ],
       [ 19.        ,  96.9       ],
       [ 18.1       ,  96.        ],
       [ 19.        ,  95.1       ],
       [ 20.        ,  95.1       ],
       [ 21.        ,  95.35137034],
       [ 21.64862966,  96.        ],
       [ 21.        ,  96.64862966]]), array([[ 23. ,  97.9],
       [ 22. ,  97.9],
       [ 21.1,  97. ],
       [ 22. ,  96.1],
       [ 23. ,  96.1],
       [ 23.9,  97. ],
       [ 23. ,  97.9]]), array([[  25.0300679 ,  103.        ],
       [  25.1       ,  102.        ],
       [  25.        ,  101.9       ],
       [  24.9       ,  102.        ],
       [  24.        ,  102.9       ],
       [  23.9       ,  103.        ],
       [  23.64862966,  104.        ],
       [  23.        ,  104.64862966],
       [  22.9       ,  105.        ],
       [  22.        ,  105.9699321 ],
       [  21.9699321 ,  106.        ],
       [  22.        ,  106.0300679 ],
       [  22.0300679 ,  106.        ],
       [  23.        ,  105.1       ],
       [  23.35137034,  105.        ],
       [  24.        ,  104.35137034],
       [  24.1       ,  104.        ],
       [  25.        ,  103.0300679 ],
       [  25.0300679 ,  103.        ]]), array([[ 26. ,  98.9],
       [ 25. ,  98.9],
       [ 24.1,  98. ],
       [ 25. ,  97.1],
       [ 26. ,  97.1],
       [ 26.9,  98. ],
       [ 26. ,  98.9]]), array([[  27.0300679,  103.       ],
       [  27.       ,  102.9699321],
       [  26.9699321,  103.       ],
       [  27.       ,  103.0300679],
       [  27.0300679,  103.       ]]), array([[ 30.        ,  99.52941176],
       [ 29.        ,  99.9       ],
       [ 28.        ,  99.9       ],
       [ 27.1       ,  99.        ],
       [ 28.        ,  98.1       ],
       [ 29.        ,  98.1       ],
       [ 30.        ,  98.47058824],
       [ 30.52941176,  99.        ],
       [ 30.        ,  99.52941176]]), array([[ 31.        ,  69.9       ],
       [ 30.        ,  69.9       ],
       [ 29.        ,  69.52941176],
       [ 28.47058824,  69.        ],
       [ 29.        ,  68.47058824],
       [ 29.1       ,  68.        ],
       [ 30.        ,  67.1       ],
       [ 31.        ,  67.1       ],
       [ 31.9       ,  68.        ],
       [ 31.9       ,  69.        ],
       [ 31.        ,  69.9       ]]), array([[  76.        ,   94.9       ],
       [  75.9       ,   95.        ],
       [  75.9       ,   96.        ],
       [  75.9       ,   97.        ],
       [  75.9       ,   98.        ],
       [  75.9       ,   99.        ],
       [  75.9       ,  100.        ],
       [  75.9       ,  101.        ],
       [  75.9       ,  102.        ],
       [  75.        ,  102.9       ],
       [  74.9       ,  103.        ],
       [  74.9       ,  104.        ],
       [  74.9       ,  105.        ],
       [  74.9       ,  106.        ],
       [  74.        ,  106.9       ],
       [  73.9       ,  107.        ],
       [  73.9       ,  108.        ],
       [  73.9       ,  109.        ],
       [  73.        ,  109.9       ],
       [  72.9       ,  110.        ],
       [  72.9       ,  111.        ],
       [  72.        ,  111.9       ],
       [  71.        ,  111.9       ],
       [  70.        ,  111.9       ],
       [  69.        ,  111.9       ],
       [  68.        ,  111.89222977],
       [  67.10777023,  111.        ],
       [  67.        ,  110.9       ],
       [  66.        ,  110.9       ],
       [  65.        ,  110.9       ],
       [  64.1       ,  110.        ],
       [  64.        ,  109.9       ],
       [  63.        ,  109.9       ],
       [  62.        ,  109.9       ],
       [  61.        ,  109.9       ],
       [  60.1       ,  109.        ],
       [  60.        ,  108.9       ],
       [  59.        ,  108.9       ],
       [  58.        ,  108.9       ],
       [  57.        ,  108.9       ],
       [  56.1       ,  108.        ],
       [  56.        ,  107.9       ],
       [  55.        ,  107.9       ],
       [  54.        ,  107.9       ],
       [  53.        ,  107.9       ],
       [  52.1       ,  107.        ],
       [  52.        ,  106.9       ],
       [  51.        ,  106.9       ],
       [  50.        ,  106.9       ],
       [  49.1       ,  106.        ],
       [  49.        ,  105.9       ],
       [  48.        ,  105.9       ],
       [  47.        ,  105.9       ],
       [  46.        ,  105.52941176],
       [  45.47058824,  105.        ],
       [  45.        ,  104.9       ],
       [  44.        ,  104.9       ],
       [  43.        ,  104.9       ],
       [  42.1       ,  104.        ],
       [  42.        ,  103.9       ],
       [  41.        ,  103.9       ],
       [  40.        ,  103.9       ],
       [  39.1       ,  103.        ],
       [  39.        ,  102.9       ],
       [  38.        ,  102.9       ],
       [  37.        ,  102.89222977],
       [  36.10777023,  102.        ],
       [  36.        ,  101.9       ],
       [  35.        ,  101.9       ],
       [  34.1       ,  101.        ],
       [  34.        ,  100.9       ],
       [  33.        ,  100.52941176],
       [  32.        ,  100.9       ],
       [  31.1       ,  100.        ],
       [  32.        ,   99.1       ],
       [  33.        ,   99.47058824],
       [  34.        ,   99.1       ],
       [  34.1       ,   99.        ],
       [  34.1       ,   98.        ],
       [  35.        ,   97.1       ],
       [  35.1       ,   97.        ],
       [  35.1       ,   96.        ],
       [  35.1       ,   95.        ],
       [  35.1       ,   94.        ],
       [  35.1       ,   93.        ],
       [  35.1       ,   92.        ],
       [  35.47058824,   91.        ],
       [  36.        ,   90.47058824],
       [  36.1       ,   90.        ],
       [  36.1       ,   89.        ],
       [  36.1       ,   88.        ],
       [  36.1       ,   87.        ],
       [  36.1       ,   86.        ],
       [  36.1       ,   85.        ],
       [  36.1       ,   84.        ],
       [  36.1       ,   83.        ],
       [  36.1       ,   82.        ],
       [  36.1       ,   81.        ],
       [  36.1       ,   80.        ],
       [  36.1       ,   79.        ],
       [  36.1       ,   78.        ],
       [  36.1       ,   77.        ],
       [  36.1       ,   76.        ],
       [  36.1       ,   75.        ],
       [  36.1       ,   74.        ],
       [  36.1       ,   73.        ],
       [  36.1       ,   72.        ],
       [  36.1       ,   71.        ],
       [  36.1       ,   70.        ],
       [  36.1       ,   69.        ],
       [  36.1       ,   68.        ],
       [  36.1       ,   67.        ],
       [  36.1       ,   66.        ],
       [  36.1       ,   65.        ],
       [  36.1       ,   64.        ],
       [  36.1       ,   63.        ],
       [  36.1       ,   62.        ],
       [  36.1       ,   61.        ],
       [  36.1       ,   60.        ],
       [  36.1       ,   59.        ],
       [  36.1       ,   58.        ],
       [  36.1       ,   57.        ],
       [  36.1       ,   56.        ],
       [  36.1       ,   55.        ],
       [  36.1       ,   54.        ],
       [  36.1       ,   53.        ],
       [  36.        ,   52.52941176],
       [  35.47058824,   52.        ],
       [  35.47058824,   51.        ],
       [  35.1       ,   50.        ],
       [  35.1       ,   49.        ],
       [  35.1       ,   48.        ],
       [  35.1       ,   47.        ],
       [  35.1       ,   46.        ],
       [  35.1       ,   45.        ],
       [  35.1       ,   44.        ],
       [  35.        ,   43.9       ],
       [  34.1       ,   43.        ],
       [  34.1       ,   42.        ],
       [  34.1       ,   41.        ],
       [  34.1       ,   40.        ],
       [  34.1       ,   39.        ],
       [  34.        ,   38.9       ],
       [  33.1       ,   38.        ],
       [  33.1       ,   37.        ],
       [  33.        ,   36.9       ],
       [  32.        ,   36.9       ],
       [  31.        ,   36.89222977],
       [  30.        ,   36.52941176],
       [  29.47058824,   36.        ],
       [  30.        ,   35.47058824],
       [  31.        ,   35.10777023],
       [  32.        ,   35.1       ],
       [  33.        ,   35.1       ],
       [  34.        ,   35.1       ],
       [  35.        ,   35.1       ],
       [  35.1       ,   35.        ],
       [  36.        ,   34.1       ],
       [  37.        ,   34.1       ],
       [  38.        ,   34.1       ],
       [  39.        ,   34.1       ],
       [  39.1       ,   34.        ],
       [  40.        ,   33.1       ],
       [  41.        ,   33.1       ],
       [  42.        ,   33.1       ],
       [  43.        ,   33.1       ],
       [  44.        ,   33.1       ],
       [  44.47058824,   33.        ],
       [  45.        ,   32.47058824],
       [  46.        ,   32.1       ],
       [  47.        ,   32.1       ],
       [  48.        ,   32.1       ],
       [  49.        ,   32.1       ],
       [  50.        ,   32.1       ],
       [  50.1       ,   32.        ],
       [  51.        ,   31.1       ],
       [  52.        ,   31.1       ],
       [  53.        ,   31.1       ],
       [  54.        ,   31.1       ],
       [  55.        ,   31.1       ],
       [  55.1       ,   31.        ],
       [  56.        ,   30.1       ],
       [  57.        ,   30.1       ],
       [  58.        ,   30.1       ],
       [  59.        ,   30.1       ],
       [  60.        ,   30.1       ],
       [  61.        ,   30.1       ],
       [  62.        ,   30.1       ],
       [  62.1       ,   30.        ],
       [  63.        ,   29.1       ],
       [  64.        ,   29.1       ],
       [  65.        ,   29.1       ],
       [  66.        ,   29.1       ],
       [  67.        ,   29.1       ],
       [  67.47058824,   29.        ],
       [  68.        ,   28.47058824],
       [  69.        ,   28.1       ],
       [  70.        ,   28.1       ],
       [  70.9       ,   29.        ],
       [  70.9       ,   30.        ],
       [  71.        ,   30.1       ],
       [  71.9       ,   31.        ],
       [  71.9       ,   32.        ],
       [  72.        ,   32.1       ],
       [  72.9       ,   33.        ],
       [  72.9       ,   34.        ],
       [  73.        ,   34.47058824],
       [  73.52941176,   35.        ],
       [  73.9       ,   36.        ],
       [  73.9       ,   37.        ],
       [  73.9       ,   38.        ],
       [  74.        ,   38.1       ],
       [  74.9       ,   39.        ],
       [  74.9       ,   40.        ],
       [  74.9       ,   41.        ],
       [  74.9       ,   42.        ],
       [  74.9       ,   43.        ],
       [  74.9       ,   44.        ],
       [  75.        ,   44.47058824],
       [  75.52941176,   45.        ],
       [  75.9       ,   46.        ],
       [  75.9       ,   47.        ],
       [  75.9       ,   48.        ],
       [  75.9       ,   49.        ],
       [  75.9       ,   50.        ],
       [  75.9       ,   51.        ],
       [  75.9       ,   52.        ],
       [  75.9       ,   53.        ],
       [  75.9       ,   54.        ],
       [  75.9       ,   55.        ],
       [  76.        ,   55.47058824],
       [  76.52941176,   56.        ],
       [  76.9       ,   57.        ],
       [  76.9       ,   58.        ],
       [  76.9       ,   59.        ],
       [  76.9       ,   60.        ],
       [  76.9       ,   61.        ],
       [  76.9       ,   62.        ],
       [  76.9       ,   63.        ],
       [  76.9       ,   64.        ],
       [  76.9       ,   65.        ],
       [  76.9       ,   66.        ],
       [  76.9       ,   67.        ],
       [  76.9       ,   68.        ],
       [  76.9       ,   69.        ],
       [  76.9       ,   70.        ],
       [  76.9       ,   71.        ],
       [  76.9       ,   72.        ],
       [  76.9       ,   73.        ],
       [  76.9       ,   74.        ],
       [  76.9       ,   75.        ],
       [  76.9       ,   76.        ],
       [  76.9       ,   77.        ],
       [  76.9       ,   78.        ],
       [  76.9       ,   79.        ],
       [  76.9       ,   80.        ],
       [  76.9       ,   81.        ],
       [  76.9       ,   82.        ],
       [  76.9       ,   83.        ],
       [  76.9       ,   84.        ],
       [  76.9       ,   85.        ],
       [  76.9       ,   86.        ],
       [  76.9       ,   87.        ],
       [  76.9       ,   88.        ],
       [  76.9       ,   89.        ],
       [  76.9       ,   90.        ],
       [  76.9       ,   91.        ],
       [  76.9       ,   92.        ],
       [  76.9       ,   93.        ],
       [  76.9       ,   94.        ],
       [  76.        ,   94.9       ]]), array([[ 40.47058824,  61.        ],
       [ 40.        ,  60.52941176],
       [ 39.47058824,  60.        ],
       [ 39.        ,  59.52941176],
       [ 38.9       ,  60.        ],
       [ 39.        ,  60.47058824],
       [ 39.52941176,  61.        ],
       [ 40.        ,  61.1       ],
       [ 40.47058824,  61.        ]]), array([[ 48.0300679 ,  13.        ],
       [ 48.        ,  12.9699321 ],
       [ 47.        ,  12.9699321 ],
       [ 46.        ,  12.9       ],
       [ 45.        ,  12.9       ],
       [ 44.1       ,  12.        ],
       [ 44.        ,  11.9       ],
       [ 43.        ,  11.9       ],
       [ 42.        ,  11.9       ],
       [ 41.9       ,  12.        ],
       [ 41.        ,  12.9       ],
       [ 40.        ,  12.9       ],
       [ 39.64862966,  13.        ],
       [ 40.        ,  13.1       ],
       [ 41.        ,  13.1       ],
       [ 42.        ,  13.1       ],
       [ 43.        ,  13.1       ],
       [ 44.        ,  13.0300679 ],
       [ 45.        ,  13.1       ],
       [ 46.        ,  13.1       ],
       [ 47.        ,  13.0300679 ],
       [ 48.        ,  13.0300679 ],
       [ 48.0300679 ,  13.        ]]), array([[ 41.1,  22. ],
       [ 41. ,  21.9],
       [ 40. ,  21.9],
       [ 39.9,  22. ],
       [ 40. ,  22.1],
       [ 41. ,  22.1],
       [ 41.1,  22. ]]), array([[ 42.1       ,  79.        ],
       [ 42.1       ,  78.        ],
       [ 42.1       ,  77.        ],
       [ 42.        ,  76.9       ],
       [ 41.1       ,  76.        ],
       [ 41.        ,  75.9       ],
       [ 40.        ,  75.9       ],
       [ 39.9       ,  76.        ],
       [ 39.9       ,  77.        ],
       [ 39.89222977,  78.        ],
       [ 40.        ,  78.47058824],
       [ 41.        ,  78.47058824],
       [ 41.52941176,  79.        ],
       [ 42.        ,  79.1       ],
       [ 42.1       ,  79.        ]]), array([[  49.13129412,  110.        ],
       [  49.        ,  109.9699321 ],
       [  48.9699321 ,  110.        ],
       [  49.        ,  110.0300679 ],
       [  49.13129412,  110.        ]]), array([[ 50.1,  13. ],
       [ 50. ,  12.9],
       [ 49.9,  13. ],
       [ 50. ,  13.1],
       [ 50.1,  13. ]]), array([[  58.0300679 ,  112.        ],
       [  58.        ,  111.9699321 ],
       [  57.86870588,  112.        ],
       [  58.        ,  112.0300679 ],
       [  58.0300679 ,  112.        ]]), array([[  60.1,  113. ],
       [  60. ,  112.9],
       [  59.9,  113. ],
       [  60. ,  113.1],
       [  60.1,  113. ]]), array([[ 64.1,  19. ],
       [ 64. ,  18.9],
       [ 63.9,  19. ],
       [ 64. ,  19.1],
       [ 64.1,  19. ]]), array([[ 70.1       ,  52.        ],
       [ 70.        ,  51.52941176],
       [ 69.52941176,  52.        ],
       [ 70.        ,  52.47058824],
       [ 70.1       ,  52.        ]]), array([[ 72.35137034,  15.        ],
       [ 72.        ,  14.9       ],
       [ 71.        ,  14.9       ],
       [ 70.9       ,  15.        ],
       [ 71.        ,  15.1       ],
       [ 72.        ,  15.1       ],
       [ 72.35137034,  15.        ]]), array([[ 75.47058824,  15.        ],
       [ 75.        ,  14.9       ],
       [ 74.64862966,  15.        ],
       [ 75.        ,  15.1       ],
       [ 75.47058824,  15.        ]]), array([[ 79.0300679,  16.       ],
       [ 79.       ,  15.9699321],
       [ 78.9699321,  16.       ],
       [ 79.       ,  16.0300679],
       [ 79.0300679,  16.       ]]), array([[ 81.        ,  57.89222977],
       [ 80.10777023,  57.        ],
       [ 81.        ,  56.10777023],
       [ 81.89222977,  57.        ],
       [ 81.        ,  57.89222977]]), array([[ 99.10777023,  21.        ],
       [ 99.        ,  20.9       ],
       [ 98.        ,  20.9       ],
       [ 97.        ,  20.52941176],
       [ 96.47058824,  20.        ],
       [ 96.        ,  19.9       ],
       [ 95.        ,  19.9       ],
       [ 94.        ,  19.9       ],
       [ 93.        ,  19.9       ],
       [ 92.        ,  19.9       ],
       [ 91.        ,  19.9       ],
       [ 90.        ,  19.52941176],
       [ 89.        ,  19.9       ],
       [ 88.52941176,  20.        ],
       [ 88.        ,  20.52941176],
       [ 87.        ,  20.9       ],
       [ 86.52941176,  21.        ],
       [ 87.        ,  21.47058824],
       [ 88.        ,  21.47058824],
       [ 88.52941176,  22.        ],
       [ 89.        ,  22.47058824],
       [ 90.        ,  22.47058824],
       [ 91.        ,  22.47058824],
       [ 92.        ,  22.47058824],
       [ 93.        ,  22.47058824],
       [ 93.52941176,  23.        ],
       [ 94.        ,  23.1       ],
       [ 95.        ,  23.1       ],
       [ 95.47058824,  23.        ],
       [ 96.        ,  22.47058824],
       [ 96.52941176,  23.        ],
       [ 97.        ,  23.1       ],
       [ 97.47058824,  23.        ],
       [ 98.        ,  22.47058824],
       [ 98.47058824,  22.        ],
       [ 99.        ,  21.47058824],
       [ 99.10777023,  21.        ]]), array([[ 90.        ,  31.9       ],
       [ 89.1       ,  31.        ],
       [ 89.1       ,  30.        ],
       [ 89.47058824,  29.        ],
       [ 90.        ,  28.47058824],
       [ 90.52941176,  29.        ],
       [ 90.9       ,  30.        ],
       [ 90.9       ,  31.        ],
       [ 90.        ,  31.9       ]]), array([[ 92.        ,  35.9       ],
       [ 91.1       ,  35.        ],
       [ 91.        ,  34.52941176],
       [ 90.47058824,  34.        ],
       [ 90.1       ,  33.        ],
       [ 90.1       ,  32.        ],
       [ 91.        ,  31.1       ],
       [ 91.9       ,  32.        ],
       [ 91.9       ,  33.        ],
       [ 92.        ,  33.1       ],
       [ 92.9       ,  34.        ],
       [ 92.9       ,  35.        ],
       [ 92.        ,  35.9       ]]), array([[ 100.        ,  111.52941176],
       [  99.        ,  111.9       ],
       [  98.9       ,  112.        ],
       [  98.        ,  112.9       ],
       [  97.        ,  112.89222977],
       [  96.10777023,  112.        ],
       [  96.1       ,  111.        ],
       [  96.1       ,  110.        ],
       [  97.        ,  109.1       ],
       [  97.47058824,  109.        ],
       [  97.        ,  108.9       ],
       [  96.9       ,  109.        ],
       [  96.        ,  109.9       ],
       [  95.52941176,  110.        ],
       [  95.        ,  110.52941176],
       [  94.9       ,  111.        ],
       [  94.        ,  111.9       ],
       [  93.9       ,  112.        ],
       [  93.        ,  112.9       ],
       [  92.9       ,  113.        ],
       [  92.9       ,  114.        ],
       [  93.        ,  114.1       ],
       [  93.1       ,  114.        ],
       [  93.1       ,  113.        ],
       [  94.        ,  112.1       ],
       [  94.1       ,  112.        ],
       [  95.        ,  111.1       ],
       [  95.9       ,  112.        ],
       [  95.9       ,  113.        ],
       [  95.52941176,  114.        ],
       [  95.        ,  114.52941176],
       [  94.89222977,  115.        ],
       [  94.        ,  115.89222977],
       [  93.9       ,  116.        ],
       [  93.        ,  116.9       ],
       [  92.9       ,  117.        ],
       [  92.        ,  117.9       ],
       [  91.        ,  117.9       ],
       [  90.1       ,  117.        ],
       [  90.1       ,  116.        ],
       [  90.1       ,  115.        ],
       [  90.1       ,  114.        ],
       [  91.        ,  113.1       ],
       [  91.1       ,  113.        ],
       [  91.47058824,  112.        ],
       [  92.        ,  111.47058824],
       [  92.1       ,  111.        ],
       [  93.        ,  110.1       ],
       [  93.1       ,  110.        ],
       [  94.        ,  109.1       ],
       [  94.1       ,  109.        ],
       [  95.        ,  108.1       ],
       [  95.1       ,  108.        ],
       [  96.        ,  107.1       ],
       [  97.        ,  107.1       ],
       [  98.        ,  107.47058824],
       [  98.52941176,  108.        ],
       [  99.        ,  108.1       ],
       [  99.9       ,  109.        ],
       [ 100.        ,  109.47058824],
       [ 100.52941176,  110.        ],
       [ 100.52941176,  111.        ],
       [ 100.        ,  111.52941176]]), array([[ 100.        ,   41.52941176],
       [  99.        ,   41.9       ],
       [  98.        ,   41.52941176],
       [  97.47058824,   41.        ],
       [  97.        ,   40.9       ],
       [  96.        ,   40.89222977],
       [  95.10777023,   40.        ],
       [  95.        ,   39.9       ],
       [  94.1       ,   39.        ],
       [  94.        ,   38.9       ],
       [  93.1       ,   38.        ],
       [  93.        ,   37.9       ],
       [  92.1       ,   37.        ],
       [  92.1       ,   36.        ],
       [  93.        ,   35.1       ],
       [  93.9       ,   36.        ],
       [  94.        ,   36.1       ],
       [  94.9       ,   37.        ],
       [  95.        ,   37.10777023],
       [  95.89222977,   38.        ],
       [  96.        ,   38.1       ],
       [  96.9       ,   39.        ],
       [  97.        ,   39.1       ],
       [  98.        ,   39.47058824],
       [  98.52941176,   40.        ],
       [  99.        ,   40.1       ],
       [ 100.        ,   40.47058824],
       [ 100.52941176,   41.        ],
       [ 100.        ,   41.52941176]]), array([[  94.0300679,  122.       ],
       [  94.       ,  121.9699321],
       [  93.       ,  121.9699321],
       [  92.9699321,  122.       ],
       [  93.       ,  122.0300679],
       [  94.       ,  122.0300679],
       [  94.0300679,  122.       ]]), array([[ 95.        ,  22.52941176],
       [ 94.47058824,  22.        ],
       [ 95.        ,  21.47058824],
       [ 95.52941176,  22.        ],
       [ 95.        ,  22.52941176]]), array([[ 102.        ,   28.9       ],
       [ 101.        ,   28.9       ],
       [ 100.        ,   28.9       ],
       [  99.        ,   28.52941176],
       [  98.        ,   28.9       ],
       [  97.        ,   28.9       ],
       [  96.        ,   28.52941176],
       [  95.47058824,   28.        ],
       [  96.        ,   27.47058824],
       [  97.        ,   27.1       ],
       [  98.        ,   27.1       ],
       [  99.        ,   27.47058824],
       [ 100.        ,   27.1       ],
       [ 101.        ,   27.1       ],
       [ 102.        ,   27.1       ],
       [ 102.9       ,   28.        ],
       [ 102.        ,   28.9       ]]), array([[ 99.        ,  36.9       ],
       [ 98.        ,  36.52941176],
       [ 97.        ,  36.9       ],
       [ 96.1       ,  36.        ],
       [ 96.1       ,  35.        ],
       [ 96.1       ,  34.        ],
       [ 96.1       ,  33.        ],
       [ 96.1       ,  32.        ],
       [ 96.1       ,  31.        ],
       [ 97.        ,  30.1       ],
       [ 98.        ,  30.1       ],
       [ 98.9       ,  31.        ],
       [ 98.9       ,  32.        ],
       [ 98.        ,  32.9       ],
       [ 97.9       ,  33.        ],
       [ 97.9       ,  34.        ],
       [ 97.9       ,  35.        ],
       [ 98.        ,  35.47058824],
       [ 98.10777023,  35.        ],
       [ 99.        ,  34.10777023],
       [ 99.89222977,  35.        ],
       [ 99.9       ,  36.        ],
       [ 99.        ,  36.9       ]]), array([[  99.        ,  107.52941176],
       [  98.47058824,  107.        ],
       [  99.        ,  106.47058824],
       [  99.52941176,  107.        ],
       [  99.        ,  107.52941176]]), array([[  99.        ,  115.52941176],
       [  98.47058824,  115.        ],
       [  99.        ,  114.47058824],
       [  99.52941176,  115.        ],
       [  99.        ,  115.52941176]]), array([[ 106.        ,   37.9       ],
       [ 105.89222977,   38.        ],
       [ 105.        ,   38.89222977],
       [ 104.10777023,   38.        ],
       [ 104.        ,   37.9       ],
       [ 103.1       ,   37.        ],
       [ 103.        ,   36.9       ],
       [ 102.9       ,   37.        ],
       [ 102.9       ,   38.        ],
       [ 102.        ,   38.9       ],
       [ 101.1       ,   38.        ],
       [ 101.1       ,   37.        ],
       [ 101.        ,   36.9       ],
       [ 100.1       ,   36.        ],
       [ 100.1       ,   35.        ],
       [ 100.1       ,   34.        ],
       [ 101.        ,   33.1       ],
       [ 101.1       ,   33.        ],
       [ 101.1       ,   32.        ],
       [ 102.        ,   31.1       ],
       [ 103.        ,   31.1       ],
       [ 103.1       ,   31.        ],
       [ 104.        ,   30.1       ],
       [ 105.        ,   30.1       ],
       [ 105.9       ,   31.        ],
       [ 106.        ,   31.1       ],
       [ 106.9       ,   32.        ],
       [ 106.        ,   32.9       ],
       [ 105.9       ,   33.        ],
       [ 106.        ,   33.1       ],
       [ 106.9       ,   34.        ],
       [ 106.9       ,   35.        ],
       [ 106.9       ,   36.        ],
       [ 106.9       ,   37.        ],
       [ 106.        ,   37.9       ]]), array([[ 102.        ,   42.52941176],
       [ 101.        ,   42.9       ],
       [ 100.1       ,   42.        ],
       [ 101.        ,   41.1       ],
       [ 102.        ,   41.47058824],
       [ 102.52941176,   42.        ],
       [ 102.        ,   42.52941176]]), array([[ 106.47058824,   21.        ],
       [ 106.        ,   20.9       ],
       [ 105.        ,   20.9       ],
       [ 104.        ,   20.9       ],
       [ 103.        ,   20.9       ],
       [ 102.9       ,   21.        ],
       [ 103.        ,   21.1       ],
       [ 104.        ,   21.47058824],
       [ 104.52941176,   22.        ],
       [ 105.        ,   22.1       ],
       [ 105.47058824,   22.        ],
       [ 106.        ,   21.47058824],
       [ 106.47058824,   21.        ]]), array([[ 103.        ,   29.52941176],
       [ 102.47058824,   29.        ],
       [ 103.        ,   28.47058824],
       [ 103.52941176,   29.        ],
       [ 103.        ,   29.52941176]]), array([[ 107.        ,   43.52941176],
       [ 106.        ,   43.9       ],
       [ 105.        ,   43.9       ],
       [ 104.        ,   43.52941176],
       [ 103.47058824,   43.        ],
       [ 104.        ,   42.47058824],
       [ 105.        ,   42.1       ],
       [ 106.        ,   42.1       ],
       [ 107.        ,   42.47058824],
       [ 107.52941176,   43.        ],
       [ 107.        ,   43.52941176]]), array([[ 107.        ,  105.52941176],
       [ 106.        ,  105.9       ],
       [ 105.1       ,  105.        ],
       [ 105.1       ,  104.        ],
       [ 105.47058824,  103.        ],
       [ 106.        ,  102.47058824],
       [ 106.52941176,  103.        ],
       [ 106.9       ,  104.        ],
       [ 107.        ,  104.47058824],
       [ 107.52941176,  105.        ],
       [ 107.        ,  105.52941176]]), array([[ 108.1       ,  112.        ],
       [ 108.        ,  111.9       ],
       [ 107.89222977,  112.        ],
       [ 107.        ,  112.89222977],
       [ 106.9       ,  113.        ],
       [ 107.        ,  113.1       ],
       [ 107.1       ,  113.        ],
       [ 108.        ,  112.1       ],
       [ 108.1       ,  112.        ]]), array([[ 114. ,   45.9],
       [ 113. ,   45.9],
       [ 112. ,   45.9],
       [ 111.1,   45. ],
       [ 111. ,   44.9],
       [ 110. ,   44.9],
       [ 109. ,   44.9],
       [ 108. ,   44.9],
       [ 107.1,   44. ],
       [ 108. ,   43.1],
       [ 109. ,   43.1],
       [ 110. ,   43.1],
       [ 111. ,   43.1],
       [ 112. ,   43.1],
       [ 113. ,   43.1],
       [ 114. ,   43.1],
       [ 114.9,   44. ],
       [ 114.9,   45. ],
       [ 114. ,   45.9]]), array([[ 108.1,  109. ],
       [ 108. ,  108.9],
       [ 107.9,  109. ],
       [ 108. ,  109.1],
       [ 108.1,  109. ]]), array([[ 110.1       ,   34.        ],
       [ 110.        ,   33.9       ],
       [ 109.9       ,   34.        ],
       [ 110.        ,   34.47058824],
       [ 110.1       ,   34.        ]]), array([[ 111. ,  104.9],
       [ 110. ,  104.9],
       [ 109.1,  104. ],
       [ 110. ,  103.1],
       [ 111. ,  103.1],
       [ 111.9,  104. ],
       [ 111. ,  104.9]]), array([[ 111.1,   37. ],
       [ 111.1,   36. ],
       [ 111. ,   35.9],
       [ 110.9,   36. ],
       [ 110.9,   37. ],
       [ 111. ,   37.1],
       [ 111.1,   37. ]]), array([[ 114.1       ,  115.        ],
       [ 114.10777023,  114.        ],
       [ 114.        ,  113.52941176],
       [ 113.47058824,  113.        ],
       [ 113.47058824,  112.        ],
       [ 113.47058824,  111.        ],
       [ 113.        ,  110.52941176],
       [ 112.47058824,  110.        ],
       [ 112.        ,  109.52941176],
       [ 111.9       ,  110.        ],
       [ 112.        ,  110.47058824],
       [ 112.52941176,  111.        ],
       [ 112.9       ,  112.        ],
       [ 112.9       ,  113.        ],
       [ 112.9       ,  114.        ],
       [ 112.9       ,  115.        ],
       [ 112.52941176,  116.        ],
       [ 112.        ,  116.52941176],
       [ 111.9       ,  117.        ],
       [ 112.        ,  117.1       ],
       [ 112.47058824,  117.        ],
       [ 113.        ,  116.47058824],
       [ 113.47058824,  116.        ],
       [ 114.        ,  115.47058824],
       [ 114.1       ,  115.        ]]), array([[ 113.        ,  101.52941176],
       [ 112.47058824,  101.        ],
       [ 113.        ,  100.47058824],
       [ 113.52941176,  101.        ],
       [ 113.        ,  101.52941176]]), array([[ 115.47058824,  119.        ],
       [ 115.47058824,  118.        ],
       [ 115.        ,  117.52941176],
       [ 114.52941176,  118.        ],
       [ 114.52941176,  119.        ],
       [ 114.        ,  119.52941176],
       [ 113.9       ,  120.        ],
       [ 113.9       ,  121.        ],
       [ 113.9       ,  122.        ],
       [ 113.9       ,  123.        ],
       [ 114.        ,  123.47058824],
       [ 114.1       ,  123.        ],
       [ 114.1       ,  122.        ],
       [ 114.10777023,  121.        ],
       [ 114.47058824,  120.        ],
       [ 115.        ,  119.47058824],
       [ 115.47058824,  119.        ]]), array([[ 135.        ,   65.9       ],
       [ 134.        ,   65.9       ],
       [ 133.        ,   65.9       ],
       [ 132.        ,   65.9       ],
       [ 131.        ,   65.9       ],
       [ 130.        ,   65.52941176],
       [ 129.47058824,   65.        ],
       [ 129.        ,   64.9       ],
       [ 128.        ,   64.9       ],
       [ 127.        ,   64.9       ],
       [ 126.        ,   64.52941176],
       [ 125.47058824,   64.        ],
       [ 125.        ,   63.9       ],
       [ 124.        ,   63.9       ],
       [ 123.        ,   63.89222977],
       [ 122.        ,   63.9       ],
       [ 121.        ,   63.52941176],
       [ 120.        ,   63.9       ],
       [ 119.        ,   63.9       ],
       [ 118.        ,   63.9       ],
       [ 117.9       ,   64.        ],
       [ 117.        ,   64.9       ],
       [ 116.        ,   64.52941176],
       [ 115.47058824,   64.        ],
       [ 115.        ,   63.9       ],
       [ 114.9       ,   64.        ],
       [ 114.9       ,   65.        ],
       [ 115.        ,   65.1       ],
       [ 116.        ,   65.1       ],
       [ 116.9       ,   66.        ],
       [ 117.        ,   66.1       ],
       [ 118.        ,   66.1       ],
       [ 119.        ,   66.1       ],
       [ 119.9       ,   67.        ],
       [ 120.        ,   67.1       ],
       [ 121.        ,   67.1       ],
       [ 122.        ,   67.1       ],
       [ 123.        ,   67.47058824],
       [ 123.52941176,   68.        ],
       [ 124.        ,   68.1       ],
       [ 125.        ,   68.1       ],
       [ 126.        ,   68.1       ],
       [ 127.        ,   68.1       ],
       [ 128.        ,   68.47058824],
       [ 128.52941176,   69.        ],
       [ 129.        ,   69.1       ],
       [ 130.        ,   69.1       ],
       [ 131.        ,   69.1       ],
       [ 132.        ,   69.1       ],
       [ 133.        ,   69.47058824],
       [ 133.52941176,   70.        ],
       [ 134.        ,   70.1       ],
       [ 135.        ,   70.1       ]]), array([[ 115.        ,   92.52941176],
       [ 114.47058824,   92.        ],
       [ 114.47058824,   91.        ],
       [ 115.        ,   90.47058824],
       [ 115.52941176,   91.        ],
       [ 115.52941176,   92.        ],
       [ 115.        ,   92.52941176]]), array([[ 115.        ,   97.52941176],
       [ 114.47058824,   97.        ],
       [ 114.47058824,   96.        ],
       [ 115.        ,   95.47058824],
       [ 115.52941176,   96.        ],
       [ 115.52941176,   97.        ],
       [ 115.        ,   97.52941176]]), array([[ 123.        ,   53.64862966],
       [ 122.35137034,   53.        ],
       [ 123.        ,   52.35137034],
       [ 123.64862966,   53.        ],
       [ 123.        ,   53.64862966]]), array([[ 135.        ,   47.64862966],
       [ 134.35137034,   47.        ],
       [ 134.1       ,   46.        ],
       [ 134.1       ,   45.        ],
       [ 134.1       ,   44.        ],
       [ 134.1       ,   43.        ],
       [ 134.0300679 ,   42.        ],
       [ 134.        ,   41.9699321 ],
       [ 133.1       ,   41.        ],
       [ 133.1       ,   40.        ],
       [ 133.1       ,   39.        ],
       [ 133.        ,   38.9       ],
       [ 132.1       ,   38.        ],
       [ 132.1       ,   37.        ],
       [ 132.1       ,   36.        ],
       [ 132.0300679 ,   35.        ],
       [ 132.        ,   34.9699321 ],
       [ 131.1       ,   34.        ],
       [ 131.1       ,   33.        ],
       [ 131.        ,   32.9       ],
       [ 130.1       ,   32.        ],
       [ 130.        ,   31.52941176],
       [ 129.        ,   31.9       ],
       [ 128.1       ,   31.        ],
       [ 128.1       ,   30.        ],
       [ 129.        ,   29.1       ],
       [ 129.1       ,   29.        ],
       [ 129.        ,   28.9       ],
       [ 128.9       ,   29.        ],
       [ 128.        ,   29.9       ],
       [ 127.        ,   29.9       ],
       [ 126.        ,   29.9       ],
       [ 125.9       ,   30.        ],
       [ 126.        ,   30.1       ],
       [ 127.        ,   30.1       ],
       [ 127.9       ,   31.        ],
       [ 128.        ,   31.1       ],
       [ 128.9       ,   32.        ],
       [ 129.        ,   32.1       ],
       [ 129.9       ,   33.        ],
       [ 129.9       ,   34.        ],
       [ 129.9       ,   35.        ],
       [ 129.9       ,   36.        ],
       [ 130.        ,   36.1       ],
       [ 130.9       ,   37.        ],
       [ 130.9       ,   38.        ],
       [ 130.9       ,   39.        ],
       [ 131.        ,   39.1       ],
       [ 131.9       ,   40.        ],
       [ 131.9       ,   41.        ],
       [ 131.9       ,   42.        ],
       [ 131.9       ,   43.        ],
       [ 131.9       ,   44.        ],
       [ 132.        ,   44.35137034],
       [ 132.64862966,   45.        ],
       [ 132.9       ,   46.        ],
       [ 132.        ,   46.9699321 ],
       [ 131.1       ,   46.        ],
       [ 131.        ,   45.9       ],
       [ 130.1       ,   45.        ],
       [ 130.        ,   44.9       ],
       [ 129.        ,   44.9       ],
       [ 128.0300679 ,   44.        ],
       [ 128.        ,   43.9699321 ],
       [ 127.        ,   43.9       ],
       [ 126.        ,   43.9       ],
       [ 125.9       ,   44.        ],
       [ 125.9       ,   45.        ],
       [ 125.9       ,   46.        ],
       [ 125.9       ,   47.        ],
       [ 126.        ,   47.1       ],
       [ 127.        ,   47.1       ],
       [ 127.9       ,   48.        ],
       [ 128.        ,   48.1       ],
       [ 129.        ,   48.1       ],
       [ 130.        ,   48.1       ],
       [ 131.        ,   48.13129412],
       [ 132.        ,   48.13129412],
       [ 132.64862966,   49.        ],
       [ 132.9       ,   50.        ],
       [ 133.        ,   50.1       ],
       [ 134.        ,   50.1       ],
       [ 135.        ,   50.1       ]])]
>>>  
Click here to Reply or Forward
Why this ad?Ads –
Classroom Coaching by Experts with Study Material & Mock Tests. Apply
2.15 GB (14%) of 15 GB used
©2013 Google - Terms & Privacy
Last account activity: 41 minutes ago
Details
scikit-image
Add to circles
Show details
Ads
Download Android Apps
Largest Collection of Android Apps. Save Data Cost. Try Mobogenie Now!
Tata Housing Premium Home
Ariana,Bhubneswar
Prosperity in the Canopy of Nature
Test Your Aptitude
with NIIT BJ Scholarship Test. Boost up your IT Career. Apply!
Embedded Linux 3.8 Kernal
256 MB with i.MX287 Processor LOW Price, Ships Same Day!
Government Job
Apply for Jobs in the Government Sector. 100% Free, Register Now!
Buy 1 Get 1 Free
Comfortable & Stylish Women Shoes. Free Shipping, COD, Shop Now!
ICICI™ Car Insurance
Free Quick Quotes In 30 secs .Now, Also Use Fb to login & Insure
Jobs In TCS
Apply today - Upload your profile A Unique 4th Generation Job Portal
label_im.png
159022.jpg
boundary_im.png
Screen Shot 2013-09-05 at 4.09.48 PM.png

Juan Nunez-Iglesias

unread,
Sep 11, 2013, 10:04:49 AM9/11/13
to scikit...@googlegroups.com
Hi Payal,

Please explain clearly what you are trying to do. We can't help you without that. For example, what are the images you're using? What are you trying to find within them? Your code is very confused:

image = io.imread("IMG_2.jpg")

What is this image?
 
thresh = filter.threshold_otsu(image)
binary = image > thresh

Why are you thresholding here?
 
imag= color.colorconv.rgb2grey(binary)
img = array(imag)

Converting a binary image using rgb2grey makes no sense. 
 
edge_canny = canny(img)
edge_sobel = sobel(img)
contours = measure.find_contours(imag,0.9,'high')

I don't think this function is what you want. If I'm not mistaken, find_countours is used for isocline contour plots, such as this:

print contours
fig, (ax0, ax1) = plt.subplots(ncols=2)
ax0.imshow(imag ,cmap=plt.cm.gray)
ax0.set_title('Roberts Edge Detection')
ax0.axis('off')
ax1.imshow(edge_canny, cmap=plt.cm.gray)
ax1.set_title('Sobel Edge Detection')
ax1.axis('off')

Did you attach the images produced by this plot?

Juan. 

Payal Gupta

unread,
Sep 11, 2013, 12:58:45 PM9/11/13
to scikit...@googlegroups.com
hello...
i m also use this prog to count white pixel and black pixel bt i cant save an image and cant count the pixel.
can you help me.


from skimage import measure

from numpy import array

import skimage.io as io

from skimage import data_dir

from skimage.data import coins,camera

import matplotlib.pyplot as plt

import skimage.color as color

from skimage.data import camera

from skimage.filter import canny, sobel

import Image

from skimage import data,filter

image = io.imread("IMG_1.jpg")

thresh = filter.threshold_otsu(image)

binary = image > thresh

imag= color.colorconv.rgb2grey(binary)

img = array(imag)

print img

x = np.array((255, 255))

x = np.array((255, 255), dtype=np.uint8)

#x[:] = np.arange(255)

io.imsave('imag.png', x)

#im = Image.open()

white_points = 0

black_points=0

for row in range(0,244):

for col in range(0, 461):

if(img(row,col)==1):

white_points = white_points+1

else:

black_points = black_points+1

print white_points

Screen Shot 2013-09-05 at 4.09.48 PM.png
label_im.png
159022.jpg
boundary_im.png

Juan Nunez-Iglesias

unread,
Sep 11, 2013, 11:49:36 PM9/11/13
to scikit...@googlegroups.com
On Thu, Sep 12, 2013 at 2:58 AM, Payal Gupta <erpay...@gmail.com> wrote:
hello...
i m also use this prog to count white pixel and black pixel bt i cant save an image and cant count the pixel.
can you help me.

"white pixels" and "black pixels" will mean different things with different images. Can you send us a sample image?

Payal Gupta

unread,
Sep 12, 2013, 5:30:36 AM9/12/13
to scikit...@googlegroups.com

hi Juan..
image = io.imread("IMG_2.jpg")
i attach a image.
 
thresh = filter.threshold_otsu(image)
binary = image > thresh

 thresholding do b'coz of i want binary image.
 
imag= color.colorconv.rgb2grey(binary)
img = array(imag)

it done b'coz after thresholding image have some rgb component but after do rgb2grey no rgb component so i do this.
 
 

contours = measure.find_contours(imag,0.9,'high')

i want close contour array like in matlab bwboundaries  works. do you know it?
print contours
fig, (ax0, ax1) = plt.subplots(ncols=2)
ax0.imshow(imag ,cmap=plt.cm.gray)
ax0.set_title('Roberts Edge Detection')
ax0.axis('off')
ax1.imshow(edge_canny, cmap=plt.cm.gray)
ax1.set_title('Sobel Edge Detection')
ax1.axis('off')

see the attachment ...
reply me

figure_2.png
IMG_1.JPG

Payal Gupta

unread,
Sep 12, 2013, 6:24:21 AM9/12/13
to scikit...@googlegroups.com
hi Juan...
i have done it.... :) :)
plz solve the contour problem. :( :(
reply me

Juan Nunez-Iglesias

unread,
Sep 12, 2013, 8:37:59 PM9/12/13
to scikit...@googlegroups.com
Hi Payal,

I think we're getting somewhere. =) Thanks for the image.

Questions:
1) Are you looking to segment out different cars? That is, do you want each car to have its own contour? With your current thresholding, you can see that the four cars on the right are all connected, so you would get a single contour of the whole blob, rather than a contour of each car.
2) I just saw the doc for bwboundaries. Do you want the interior holes of the objects to have its own contour, or do you want just a contour *around* each object and don't care about the interior? Also, do you care about parent/child object relationships? My guess is no to both these questions. For example, do you want a contour around the windshield of each car?

Comments:

Note that when you do rgb2gray on a thresholded RGB image, you no longer have a binary image, but a grayscale image with levels 0, 0.333, 0.667, and 1.0. I think you probably mean to do rgb2gray followed by threshold.

Either way, my suspicion is that you want to segment the cars first (get one binary blob object per car), then find their contours. Am I right?

Juan.


--

Payal Gupta

unread,
Sep 13, 2013, 3:26:21 AM9/13/13
to scikit...@googlegroups.com
hi juan....

i can't understand array after using find_contour which return a ndarray. it is main prob i wanna find out contour array.   


--
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...@googlegroups.com.

Juan Nunez-Iglesias

unread,
Sep 13, 2013, 4:49:30 AM9/13/13
to scikit...@googlegroups.com
The input is a grayscale image, not a binary image. It finds contours of a given intensity threshold.

The output is a list of arrays. Each array has shape (Q, 2), and it is a set of x, y coordinates of the points in the contour. If you want to look at the contours, you need to convert this to an image somehow. This example uses matplotlib's `plot` function to draw the contours on the image:

Alternately, you can round the contour coordinates to int and use those to make a new image:

conts = find_contours(image, threshold)
contour_image = zeros_like(image)
for c in conts:
    c = np.round(c).astype(int)
    coords = (c[:, 0], c[:, 1])
    contour_image[coords] = 1
imshow(contour_image)

Payal Gupta

unread,
Sep 28, 2013, 3:43:55 AM9/28/13
to scikit...@googlegroups.com
hello everyone...

i have problem to install skimage library on raspberry pi.
how can i solve this problem.... please tell me...
reply soon....
Reply all
Reply to author
Forward
0 new messages