Shape properties from bright-field images

I’m trying to analyse shape properties of cells recorded in this image:

The pipeline I managed to construct, cpCountCells.cp (8.13 KB)

produces following cell outlines:

It seems difficult to follow all the protrusions and cell structure. Is there any better way of extracting cell contours given the image recorded in visible light?



I would actually say that your pipeline is doing almost as well as can be expected for an image of this type; identifying cells from transmitted light images is notoriously difficult, for any biological image analysis software. You use the modules pretty well as-is.

The one addition I would make is to add an IdentifySecondary module after the IdentifyPrimary one, and use the primary objects as the input objects and the dark hole image as the input image. Change the thresholding method to Otsu, 3-class with the middle class set to “Background” and it seems to do a decent job of detecting the entire cell. This approach is contingent on there being one blob per cell from the IdentifyPrimary module, though; you may need to do some additional tweaking to insure that this is the case.


I totally agree with Mark for a CP-only solution. But another approach is to try ilastik and train a pixel classifier to learn your bright-field objects! Please see Mark’s nice description here of ilastik and how to use it with CP: Select Region Based on Texture

Here’s a sample training set using your image (which took all of 5 minutes to generate):
And here is the ilastik segmentation output:

You can then input the ilastik probability maps into CP’s ClassifyPixels (in Windows only) and use it to seed a better segmentation in CP’s standard Identify* modules.

Side-note: Your image is 32-bit RGB, which is likely unnecessarily big. This will slow down CP and ilastik (or anything else). Try saving at a bit depth of 16 (max), as well as grayscale unless you’re sure there really is some color info or extremely fine intensity gradients of biological relevance here.