Image Segmenting a Cell Cluster

12 views (last 30 days)
Aurik Sarker
Aurik Sarker on 28 Jul 2016
Commented: Image Analyst on 28 Jul 2016
Im building a program which will take in images, such as the one attached below (original.jpg), and identify individual cells. So far it has been relatively successful, and through image segmentation I can get something like this (orignal segmentation.jpg).
What my program seems to have trouble with are cell clusters. The function recognizes a large group of cells as one object, but I would like to be able to outline accurately all the individual cells within it. So far I am able to isolate a cluster (cluster original.jpg), erode the image, binarize it through thresholding (cluster binary.jpg), and obtain rough boundaries of most of the cells (cluster clean.jpg).
Some primary issues
  • Because I isolate each cluster through a BoundaryBox, other stray cells may be included in the picture as well
  • Image erosion causes some cells to have a dark circle at its end, which, after binarization, looks like a separate cell.
  • I need to set a threshold factor for each cluster, even within the same image
How can I go about tackling these remaining issues? Is there a better method of segmentation here?

Answers (1)

Image Analyst
Image Analyst on 28 Jul 2016
  1. Don't use a bounding box. Use the actual pixels, like what you get from PixelIdxList or the labeled image.
  2. Why are you eroding anyway?
  3. This is not a question
What do you really want to know about the image? Surely not a list of (x,y) boundary coordinates. What to you want really? Count? Area? Something else?
  2 Comments
Aurik Sarker
Aurik Sarker on 28 Jul 2016
So far subtraction of the eroded image from the original has been the most effective method for background subtraction, which makes it easier for me to threshold the image and convert it into binary. It worked well on the original image, but on this small cluster the circular structuring element is more visible, so I'm asking if there is a better way for me binarize the image so that the boundaries are more clearly visible and oversegmentation does not occur
The resulting image taken from pixelidxlist is the same as the image using only the bounding box, but with the background pixels set to 0. This doesnt work well with my current method of segmentation because there is an artificially large gradient at the boundary, which is not necessarily the boundary of the cell. Again, if there is a better way of binarization then I may be able to avoid this issue.
I mean obviously I want to avoid having to test different parameters for thresholding every time I want to segment a different cell cluster. Im trying to use graythresh, but even then I need to multiply the level with a factor. Are there methods of image preprocessing that could effectively emphasize the boundaries so that thresholding/binarization can be done easier?
Yes, I do need the boundary coordinates of the cells. We have videos of cells and particles. Another group at the lab has a method of being tracking cell movement/growth through multiple images, but to do that they need my function which will mark where the cells actually are, particularly if cells are in the middle of dividing. The more accurately we can identify cells which have divided and avoid oversegmentation (the main issue right now) the better.
Image Analyst
Image Analyst on 28 Jul 2016
Sounds like what you really need is the count and the tracking of the centroid. Sounds like you were trying to do what a tophat or bottom hat filter does, but you didn't know of the existence of imtophat() or imbothat(). You can flatten the field by using adapthisteq() or by fitting a 2-D polynomial to the image and dividing by that. You can enhance edges with a linear filter using conv2(). Just make a kernel with a positive center and negative values around it. This is equivalent to doing a dog (difference of Gaussians) filter.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!