watershed algorithm for segmentation

amit bhatkal amitbhatkal12 at gmail.com
Fri Apr 4 00:09:49 EDT 2014


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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20140404/3b6f9904/attachment.html>


More information about the scikit-image mailing list