Extra objects identification on binary images

Hi everyone,

I need some help with Cell Profiler. I have used this software a few years ago for a basic application, counting cell nuclei stained with DAPI on fluorescence images: it was easy to set up and worked well. I downloaded yesterday the tutorial presenting such an application for the latest software version, it worked perfectly with the test images and all modules looked familiar.

However, the images I have to analyse now are a bit different because they have a “dirty” background: heterogeneous light intensity, artifacts from other focus plans, etc. Here is an example. The objects I want to identify are the cell spheroids inside the capsules.

At first I thought it would be easy to convert the image to grayscale then perform a threshold to have a binary image showing only the spheroids. That’s what I have tried, either directly in Cell Profiler or by using ImageJ first. The final binary image looks as expected:

There are still a few artifacts but I expected the “typical diameter of objects” in the IdentifyPrimaryObjects module to exclude them.

Now here is the problem: IdentifyPrimaryObjects detects a lot of extra invisible objects on the binary image, and doesn’t actually detect the spheroids. I don’t understand how it can detect objects on what I understand to be a “pure” white background after binarization.

I am probably missing/misunderstanding something, but I was really expecting this application to be as straightforward as counting nuclei on a fluorescence image, so I don’t get it.

Thank you very much for your help. Here is the (very simple) pipeline I am using so far: Pipeline gates.cpproj (429.2 KB)

Hi @Timothee

It looks like you’re starting from what appears to be a brightfield image where your ‘signal’ is dark rather than light. If I understand you correctly the resulting threshold selected everything but the nuclei, so it’s trying to segment that rather than the objects of interest. I’d try running SpheroidsBinary through the ImageMath module using the invert operation before trying IdentifyPrimaryObjects.

Hope that helps!

This makes sense! And indeed it is now detecting the objects correctly. Thank you very much for your reply!