Secondary object boundary for overlapping images

How to draw boundaries between 2 cells that overlap each other?

For example, in the below image, I have used four oval shaped cells but the boundaries dividing them is not accurate. What should I do?
Nucleus is Primary object, Cell is secondary object.

The screen shot of my Identify Secondary Object is attached as well.

HI yashkhemka,

Are your inputs for both IdentifyPrimaryObjects and IdentifySecondaryObjects binary images? Because if so, and you do not have any intensity information to guide the propagation in IDSecondary, then the boundary can only be specified by the distance between the two touching cells’ nuclei.

But I have two other thoughts:
(1) If you do have raw images with intensity information and not binarized, then IDSecondary should work. I would bring your attention to the “Regularization Factor” in IDSecondary which defaults to 0.05, but adjusting this setting, as the Help says:

But you will note that if there is no intensity info to distinguish the touching cells, as in the binary case, then all you have to go on is the distance from the two nuclei, OR one could use shape information (which is what I assume you are doing by eye to say that the boundaries are incorrect). IDSecondary does not take shape into account, however…

(2) You could also use IdentifyPrimaryObjects directly on the larger, touching cells. Use the declumping settings of Method to distinguish… = “Shape” and Method to raw dividing… = “Shape”. This should draw more veridical boundaries, though if the cells are too close together this may still not work. Then you could use RelateObjects to relate the nuclei and the cells, if needed.


David Sir,

Thank you for your reply. Your ideas were extremely helpful and I was able to obtain better results.

I added intensity variation to my cells. In propagation technique, I even reduced the regularization factor from 0.05 to 0.001 to reduce the impact of distance between nuclei and focus more on intensity variation while defining boundaries.

However, the results were not perfectly accurate. Is there something more I can do to improve it? Or some extra error will always be there when working with overlapping images?

Thanks & Regards,

Yash Khemka
4th yr UG, ChemE, IIT Bombay

Hi Yash,

If you invert the intensity variation you added, it would help. That is, make the center the brightest part of the circle, if you can, rather than a slight darkening. The Propagation method will look for the darkest regions to draw the boundaries between the objects, and yours does not exactly have those properties.

Also, did you try my method #2, using IdentifyPrimaryObjects directly on the large, overlapping objects? If you use the two “Shape” declumping methods, that may work as well.



Sorry for the late reply.
Your ideas were immensely helpful. I didn’t have to try method #2, using IdentifyPrimaryObjects directly on the large, overlapping object. I got the job done without it by reversing the intensity gradient.

Thanks again!

Yash Khemka
IIT Bombay

Very well!