How to better reduce staining background when count cells

Hello everyone,
I am new to this community and am writing for great help in my project.
We want to compare the structural change of the retinal pigmented epithelial cells (RPE) after drug treatment. We try to analyze the difference in some parameters, e.g., form factor, solidity, roundness, eccentricity, neighbors, nuclear number within the cells. Hence we stained RPE cells with ZO1 antibody for the tight junction protein and DAPI for nucleus. Because the staining is very dirty, there are a lot of staining debris within the cells. I have to remove the dirt within the cells using Photoshop before I can run in Cellprofiler, which is very time-consuming and frustrated. After I ran the files into Cellprofiler, most of the cells can be counted correctly, but there are about 1-2% cells were recognized as two cells as indicated in my files. You can access my original confocal images, edited files and pipeline file in my Dropbox ( The cells which were recognized as two cells were labeled with blue or black dots in the .png files. I have the following questions for help from experts working in Cellprofiler.

  1. How can use the documents directly without editing within Photoshop.
  2. How can I avoid cells being split.
  3. Is there any other parameters can be used for distinguishing the structural difference amount these cells? A recent paper ( indicated that the method in the paper maybe better than the parameters (e.g., form factor, eccentricity, solidity and roundness) listed in Cellprofiler. But I have no idea on how to use the method in Cellprofiler.
    Any help and recommendation from the forum would be greatly appreciated!
1 Like
  1. I EXTREMELY strongly advise you not to manually pre-process your images. In addition to not being a great use of your time, it will introduce artifacts in a way that will be hard to track down later. You haven’t described what sorts of mistakes you got in trying to process without removing the debris, but I think probably at least one of 3 things would work-
  • Just smooth the image with a Gaussian of a couple of pixels using the Smooth module to decrease the prominence of the debris
  • Use the EnhanceOrSuppressFeatures-Neurites option to enhance your edges
  • Use the EnhanceOrSuppressFeatures-Speckles option to enhance just the debris, then ImageMath to subtract it out.
  1. If you’re getting 98% accuracy, that’s probably about the best you can expect from any algorithm, so nice job. If you for some reason absolutely needed 100% accuracy, you could use the EditObjectsManually module to reunify the ones that need to be split, but I don’t think the time invested will be worth the only marginal increase in data quality.

  2. There are lots of parameters you could choose- for example, that paper seems to also include Texture, which you could measure with the MeasureTexture module. As to what’s best for you to use though, I’d say measure (or combination of measurements) gives you the biggest distance between your negative control and your positive control/strongest treatment.


Hi Bcimini,
Thank you so much for your great advice!
Would you mind provide some pipeline for this project? I am still very new for this program, it take a lot of effort for testing. If you don’t have time, please just give a list of the modules will be used. Then, I can adjust it based on your input. Appreciate your ideas!
Best regards,

Sorry, I can’t at the moment, hopefully someone else can! I did in fact include the names of the modules you need in part 1 of my previous answer though (Smooth, EnhanceOrSuppressFeatures, ImageMath), so hopefully that should be enough to get you started on your own!

1 Like

Hello Beth,

Thank you so much! I think you already help me a lot! I am trying to use Ilastik to smooth the images first before I start using CP which will save me tones of time.

Kind regards,


Hi Beth,

I follow your recommendation of using the EditObjectsManually module to reunify the ones has been split. It works fine, but the merged cells will not be counted in the following step. How can I count the cells that have been reunited? It is better to calculate these merged cells for statistics.

Thank you again.


1 Like

It should export the count under the new object name.