Watershed algorithm

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Watershed algorithm

Erika
Hello,

I am interested in how the watershed code in ImageJ works. I understand it uses the EDM to help determine how to separate the particles, but I'm not too sure on the process.
Is it possible to replicate the process through a multi-step process of clicking various functions on ImageJ or with the help from a macro?
I would appreciate it if someone could show me a pseudo-code of the process.

Thanks,
Erika

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Watershed algorithm

Gabriel Landini
On Monday 16 Jul 2012 20:42:43 you wrote:
> I am interested in how the watershed code in ImageJ works. I understand it
> uses the EDM to help determine how to separate the particles, but I'm not
> too sure on the process. Is it possible to replicate the process through a
> multi-step process of clicking various functions on ImageJ or with the help
> from a macro?

I do not think you can do this comfortably by clicking because it is an
iterative process.
Watershed separation is basically: delete to ultimate points, then conditional
dilate without merging until idempotence, using the original as mask.

A dilatate-no-merge in a mask (BinaryGeodesicDilateNoMerge8) plugin is
available here.
http://www.dentistry.bham.ac.uk/landinig/software/software.html

So you could find the ultimate points, threshold for greyscale>0 and apply
that plugin for a similar effect.

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Watershed algorithm

Jacqueline Ross
Hi Erika,

If you want to see the Watershed algorithm in action, you can do this by using the Debugger. You then get a movie that shows you the process step by step.

When you have your image ready to apply the watershed, go to Edits - Options - Misc. Select Debug mode and then run Watershed. You will then get a short animation, which you step through and save as a movie if you want to do that. I find it really useful for explaining to students how it works.

Kind regards,

Jacqui

Jacqueline Ross
Biomedical Imaging Microscopist
Biomedical Imaging Research UnitĀ 
School of Medical SciencesĀ 
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland 1142, NEW ZEALAND

Tel: 64 9 923 7438
Fax: 64 9 373 7484

http://www.fmhs.auckland.ac.nz/sms/biru/

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Gabriel Landini
Sent: Tuesday, 17 July 2012 9:14 a.m.
To: [hidden email]
Subject: Re: Watershed algorithm

On Monday 16 Jul 2012 20:42:43 you wrote:
> I am interested in how the watershed code in ImageJ works. I
> understand it uses the EDM to help determine how to separate the
> particles, but I'm not too sure on the process. Is it possible to
> replicate the process through a multi-step process of clicking various
> functions on ImageJ or with the help from a macro?

I do not think you can do this comfortably by clicking because it is an iterative process.
Watershed separation is basically: delete to ultimate points, then conditional dilate without merging until idempotence, using the original as mask.

A dilatate-no-merge in a mask (BinaryGeodesicDilateNoMerge8) plugin is available here.
http://www.dentistry.bham.ac.uk/landinig/software/software.html

So you could find the ultimate points, threshold for greyscale>0 and apply that plugin for a similar effect.

Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html