Message Boards Message Boards

12
|
9580 Views
|
2 Replies
|
13 Total Likes
View groups...
Share
Share this post:

Segment noisy microscope image into cell boundaries via valleys

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["https://wolfr.am/gqaPy6GP"]

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];
Colorize[ws]

enter image description here

And, then extract the edges separating detected components:

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

enter image description here

POSTED BY: Shadi Ashnai
2 Replies

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.

POSTED BY: Moderation Team

Wow! great answer!

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract