5

I'm having trouble separating cells in microscope images. When I apply a watershed transform I end up cutting up cells into many pieces and not merely separating them at the boundary/minimum.

I am using the bpass filter from http://physics.georgetown.edu/matlab/code.html.

bp = bpass(image,1,15);
op = imopen(bp,strel('ball',10,700));
bw = im2bw(bp-op,graythresh(bp-op));
bw = bwmorph(bw,'majority',10);
bw = imclearborder(bw);
D = bwdist(~bw);
D = -D;
D(~bw) = -Inf;
L = watershed(D);
mask = im2bw(L,1/255);

Any ideas would be greatly appreciated! You can see that my cells are being split apart too much in the final mask.

Here is the kind of image I'm trying to watershed. It's a 16bit image so it looks like it is all black.

Starting fluorescent image

Final image mask:

After filters and masking the cells

I separated the cells manually here:

Manually segmented image

Ben
  • 93
  • 1
  • 7
  • 1
    For those of us who aren't biologists, perhaps you could point out where the cells are. I see lots of pieces, but some are separated by only one pixel, and some by several. Are they all the same cell, or are there clusters of cells nearby? – paddy Aug 27 '13 at 00:13
  • @paddy I separated the cells in red. Does that help? – Ben Aug 27 '13 at 00:29

1 Answers1

2

Finding the centers of the cells should be relatively straight-forward: finding a local maxima of the intensity. Using these points as seeds for the watershed, you might find this tutorial useful.

Some morphologcal operations you might find useful are:
- imimposemin - forcing a seed point to be a local min when computing the watershed transform.
- imregionalmax - finding local maxima of intensity image.

Shai
  • 111,146
  • 38
  • 238
  • 371