Message Boards Message Boards


Segment noisy microscope image into cell boundaries via valleys

Posted 5 years ago
2 Replies
13 Total Likes

Recently we had a question about a noisy microscope image of animal tissue, see image below. The goal was to get the contours for all biological cells boundaries. At the bottom image fades significantly but the human eye can still detect some contours. One trick that generally works is to attempt to find the valleys instead of the lines and then segment the image to find the lines separating the valleys. Let's import image first:

i = Import[""]

enter image description here

Here is one way you can fairly robustly find the centers of the cells:

marker = MaxDetect[ImageAdjust@LaplacianGaussianFilter[i, 50], .05];
HighlightImage[i, marker]

enter image description here

Once you have a good estimate of the cell centers, you can run a segmentation algorithm like watershed using the markers. Here I am segmenting a slightly smoothed version of the image using MedianFilter:

ws = WatershedComponents[MedianFilter[i, 4], marker];

enter image description here

And, then extract the edges separating detected components:

boundaries = ColorNegate[Image[ws, "Bit"]];
HighlightImage[i, boundaries]

enter image description here

2 Replies

Wow! great answer!

enter image description here - you have earned "Featured Contributor" badge, congratulations !

This is a great post and it has been selected for the curated Staff Picks group. Your profile is now distinguished by a "Featured Contributor" badge and displayed on the "Featured Contributor" board.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract