Please help me with Image processing using "water algorithm"

2 vues (au cours des 30 derniers jours)
Youtao Liu
Youtao Liu le 16 Mar 2017
Commenté : Youtao Liu le 18 Avr 2018
Hey Guys:
I am a researcher in cancer research. I am quite new to Matlab actually. Recently I found a Nature paper described a so-called "water algorithm" to segment images. This method is perfect for my purpose (segment focal adhesions of cancer cells). Unfortunately, the authors give nothing but the interpretation of "water algorithm". Therefore, I'd like to ask you guys to help me out creating the codes base on this algorithm. I know its not easy, but if I'd do it myself, its gonna take ages.
The "water algorithm" is implemented for 2-D and 3-D images for any desired pixel connectivity, but was applied here in 2-D with 4-neighbors connectivity (i.e. each pixel has 4 touching neighbors: up, down, right and left; all the other diagonal pixels are not considered connected).
The protocol of "water algorithm" is:
1. The image is smoothed with a boxcar average;
2. The image is subtracted background;
3. Pixels below a user defined threshold are set to zero, typically 5% of the maximum intensity are set to zero;
4. The remaining pixels are then sorted by brightness to form a descending list. Isolation of individual focal adhesions (FA: is the part of cells adhesion to plate) are accomplished with the following set of rules while going through the list:
Case 1: If the selected pixel has no neighbouring pixels assigned to a FA, assign the
pixel to a new FA.
Case 2:Case 2: If the selected pixel has neighbouring pixels assigned to a single FA, assign
the pixel to that FA.
Case 3:Case 3: If the selected pixel has neighbouring pixels assigned to multiple FAs,
merge the connected FAs to one new FA if the size of at least one of the connected FAs is
less than a critical size for merger (merger size). If mergers do not occur, assign the pixel to the
brightest neighbouring FA.
Typical parameters are found to be 25 pixels for the length scale of the box filter and 9-
12 pixels for a minimum merger size. Setting a minimum area of 3-5 pixels removed
falsely identified FAs.
I enclose the images of original and the mask after applying "water algorithm".
Thanks very very very much guys!!!, appreciated~!
  2 commentaires
satya kothapalli
satya kothapalli le 8 Jan 2018
Modifié(e) : Walter Roberson le 8 Jan 2018
HI Youtao,
Thank you for a detailed description of your question. I wonder if you find the solution to this particular question. If so, can you please share here...
Youtao Liu
Youtao Liu le 18 Avr 2018
Pity that i have not found the solution yet,

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 18 Avr 2018

Steps 1 and 2 are done using conv2() or imfilter().

kernel = [1,1,1; 1, -8, 1; 1,1,1]/9;
filteredImage = conv2(double(grayImage), kernel, 'same');

Step 3 is just something like

mask = filteredImage > 0.95 * max(filteredImage(:));

Step 4 is just the connected components labeling algorithm, done by bwlabel().

labeledImage = bwlabel(mask);
  1 commentaire
Youtao Liu
Youtao Liu le 18 Avr 2018
Big thanks! I am gonna give a try, thanks a lot!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by