watershed algorithm for segmentation

amit bhatkal amitbhatkal12 at gmail.com
Fri Apr 4 04:55:42 EDT 2014


Thanks a lot for the explanation Juan .
I am infact working with FIBSEM image which basically consists of only
black pores in grey solid matter. So what would be suitable as an "image"
for my case?   a *gradient image* or *distance transformed image*?
And , I feel I have got a better understanding of the watershed() method
thanks to your explanation.

With regards,
Amit


On Fri, Apr 4, 2014 at 11:23 AM, Juan Nunez-Iglesias <jni.soma at gmail.com>wrote:

> Amit,
>
> The confusion here is just semantics. A gradient is an image. In our
> context, any two-dimensional boolean or numeric array is an image. The
> watershed algorithm works by flooding a landscape from the bottom up, so
> you want your input to be an image where your regions will have low
> intensity and the boundaries between them will have high intensity. In the
> example, the distance transformed image satisfies this property, while the
> original does not. In other cases, your input image may satisfy the
> property without requiring a transform (for example, electron microscopy
> data).
>
> Juan.
>
>
> On Fri, Apr 4, 2014 at 3:09 PM, amit bhatkal <amitbhatkal12 at gmail.com>wrote:
>
>> Thank you Tony and Ronnie for your timely inputs.
>> I was going through the link provided by Tony
>> "http://scikit-image.org/docs/dev/auto_examples/plot_marked_watershed.html<http://scikit-image.org/docs/dev/auto_examples/plot_marked_watershed.html>" . Here in line 16 of the code
>>
>> # process the watershedlabels = watershed(gradient, markers)
>>
>> Also I came across this code : http://scikit-image.org/docs/dev/auto_examples/plot_watershed.html
>>
>> Which uses distance map in the place of image.
>>
>>
>> The actual sytax is :
>> watershed(*image*, *markers*, *connectivity=None*, *offset=None*, *mask=None*)
>>
>> The "image" parameter of the watershed function is fed with "gradient" instead of actual image. This is the point of confusion. So thats what I wanted to clarify. Should I be providing the actual image data or some edge detected or gradient image for the watershed.
>>
>>
>>
>> Thank you
>>
>> Amit
>>
>>
>>
>> On Thu, Apr 3, 2014 at 8:04 PM, Tony Yu <tsyu80 at gmail.com> wrote:
>>
>>>
>>>
>>>
>>> On Thu, Apr 3, 2014 at 4:46 AM, <amitbhatkal12 at gmail.com> wrote:
>>>
>>>> Hi everyone,
>>>> I was trying to segment a greyscale 8 bit image using the watershed
>>>> algorithm present in skimage.morphology but I am confused as to what should
>>>> I provide as inputs to the watershed().
>>>> Can anyone please help me in this regard.
>>>> This is what I gathered from the documentation.
>>>>
>>>> *image: ndarray (2-D, 3-D, ...) of integers* :
>>>>
>>>> Data array where the lowest value points are labeled first.
>>>>
>>>> *markers: ndarray of the same shape as `image`* :
>>>>
>>>> An array marking the basins with the values to be assigned in the label
>>>> matrix. Zero means not a marker. This array should be of an integer type.
>>>>
>>>> Here "image" refers to original image or something else?
>>>> How do I obtain the markers ?
>>>>
>>>>
>>> Hi, you should take a look at the gallery examples. Here's a
>>> particularly relevant one:
>>>
>>> http://scikit-image.org/docs/dev/auto_examples/plot_marked_watershed.html
>>>
>>>
>>> Cheers,
>>> -Tony
>>>
>>>  --
>>> 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/d/optout.
>>>
>>
>>  --
>> 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/d/optout.
>>
>
>  --
> 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/d/optout.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20140404/e7a39959/attachment.html>


More information about the scikit-image mailing list