Primary and Secondary Object Divisions




Recently I posted about a pipeline that filled gaps between nuclei as primary objects. I was able to fix that issue by using an adaptive threshold which helped a lot, but I still have a small problem with my pipeline dividing nuclei into several objects. Definitely part of this is due to blurry images where sometimes I can’t even make a distinction looking at it, but it seems to happen even in some more defined cases (best example is in the middle right of this image where what looks to be two adjacent nuclei are counted as three with one cut in half, they are all shades of green if that helps you find them). If anyone has any suggestions to reduce this I would really appreciate any help.

Also, I have an additional channel that I’m using to find secondary objects that I’ve posted below. It had been recommended to me that, because the surface of the cell is higher intensity, I should run my IdentifySecondaryObject on an inverted image. The problem that arises is in the corners and along the edge of the image where no cells appear I get large areas of high intensity, which are counted as large secondary objects. I don’t know if there’s anything that can be done about this, but if anyone has any suggestions I would love to hear them.


Thank you for any help, I’m still pretty new to CP so if you see anything basic that I am doing wrong please point it out!


Hello Nick,
Typically for this kind of picture it’ll help to first do an illumination correction:
-CorrectIlluminationCalculate with Gaussian filter for exemple
-CorrectIlluminationApply (divide)
Then to help further in Nuclei identification, to avoid undersegmentation or oversegmentation, you can optimize the settings of expected object diameter + set manually (if not the case yet) the minimum distance allowed between local maxima.
As for the Ecadherin picture for secondary object identification, not sure the inverted image is mandatory… A good illumination-corrected + intensity rescaled version should be sufficient to find the cell’s edges…
Good luck,


Thank you so much for your suggestions, they were incredibly helpful!