Get border pixels of labelled region

Payal Gupta erpayal2010 at gmail.com
Sat Sep 28 03:43:55 EDT 2013


hello everyone...

i have problem to install skimage library on raspberry pi.
how can i solve this problem.... please tell me...
reply soon....


On Fri, Sep 13, 2013 at 2:19 PM, Juan Nunez-Iglesias <jni.soma at gmail.com>wrote:

> 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:
>
> http://scikit-image.org/docs/dev/auto_examples/plot_contours.html#example-plot-contours-py
>
>  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)
>
>
> On Fri, Sep 13, 2013 at 5:26 PM, Payal Gupta <erpayal2010 at gmail.com>wrote:
>
>> 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.
>>
>>
>> On Fri, Sep 13, 2013 at 6:07 AM, Juan Nunez-Iglesias <jni.soma at gmail.com>wrote:
>>
>>>  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<http://www.mathworks.com.au/help/images/ref/bwboundaries.html>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.
>>>
>>>
>>> On Thu, Sep 12, 2013 at 8:24 PM, Payal Gupta <erpayal2010 at gmail.com>wrote:
>>>
>>>> hi Juan...
>>>> i have done it.... :) :)
>>>> plz solve the contour problem. :( :(
>>>> reply me
>>>>
>>>> On Thursday, September 12, 2013 9:19:36 AM UTC+5:30, Juan
>>>> Nunez-Iglesias wrote:
>>>>
>>>>> On Thu, Sep 12, 2013 at 2:58 AM, Payal Gupta <erpay... at 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?
>>>>>
>>>>  --
>>>> 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 at googlegroups.com.
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>  --
>>> 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 at googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
>> 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 at googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> 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 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/20130928/88248f01/attachment.html>


More information about the scikit-image mailing list