Background Correction Help

Hi guys,

I’m trying to create an automated CellProfiler pipeline that can successfully identify, segment, and count cells. I have been struggling to get a pipeline and set of parameters that works consistently, which I believe is due to background variation between images. I have tried illumination correction, enhancing speckles, closing, and a median filter. Here is the pipeline for reference: Method_2.cppipe (37.3 KB).

This works decently for images that have a darker background:

Original image: RAT1_VMS2R_RESULTS_CH3.tiff (675.3 KB)

But when there is a lighter background, the brighter background regions are recognized as objects as well:

Original image: RAT1_VMS2R_RESULTS_CH2.tiff (675.3 KB)

Across my image set, there are both kinds of backgrounds. I was hoping to devise a pipeline that could work consistently for both. Any advice for anything more I can do to correct for this? If not, do you have any suggestions for other software that might be able to handle this better?

Thank you!

In your pipeline you have ColorToGray module, but the images attached here are separated channels! I’m assuming you are feeding a color image to the pipeline which is not attached here.

What’s the goal of IdentifyObjectsManually, what is an ROI? How large should it be?
Are you trying to detect the same object in CH2 and CH3?
Could you annotate an image and let us know what you are trying to detect in each channel?

In general, you may need to choose a different Thresholding strategy in your IPOs depend on what you are trying to detect.

Here are some of the recent video tutorials about segmentation.

Hi Nasim,

Yes, my bad! All my original images are RGB (Sample: RAT1_VMS2R_RESULTS.TIF). The IdentifyObjectsManually module and subsequent mask modules allow me to specify a hand-drawn region of interest (ROI) and apply it to each channel image. It usually encompasses about a third of the image.

In CH2 and CH3, I am trying to identify neurons stained with CTb bound to either a green or red fluorescent dye, respectively. The stain should accumulate in the cytoplasm, and not the nucleus, so the objects I am trying to identify are generally elliptical with little donut holes in them.

Here is an example of an already isolated channel image in grayscale (green CTb stain):
RAT1_VMS2R_RESULTS_CH2.tiff (675.3 KB)

And here is a manual identification of the same image, with a region of interest already isolated, to show some of the cellular objects I would like identified:

I have tried the Otsu thresholding method as well and it generally produced pretty similar results. Do you have a recommendation for a certain thresholding method?

Thank you for your response, as well as the tutorials link!

Yeah, that’s challenging! The problem is that some parts of your image has higher pixel intensities than the objects you’re interested in CH2.

I think you could try ImageMath module and if there are overlaps between CH2 and CH3/4 try to subtract the channels or use other operation on the image to see if you could reduce the background.
Alternatively, you could try ilastik, pixel based classifier to detect the regions you’re interested in and bring the mask to CP and then mask your image, detect the areas and make tons of measurement. There was a ilastik tutorial on our youtube channel.