Too many falsely identified cells by IdentiyPrimaryObject


I only want brown cells. I unmixed the image by DAB, enhanced circles and applied Otsu, global to identify nuclei.
I’ve tried every possible combination of enhancing and suppressing something, but this was the best option. I think Otsu is the best option I can have, since other algorithms missed too much cells.

I guess more pre-processing is needed, but have no idea any more. any kind of help would be greatly appreciated!



You can try to add another layer in the same UnmixColor module, for example “Eosin” after “Hematoxylin” and see if one of the extracted layer shows cleaner object-of-interest.

If you still face difficulty, can you please upload the original image so we can try to help you unmix the color.



You can also try doing an initial permissive identification strategy (essentially what you already have) followed by measuring the objects and/or images in the DAB channel and doing a FilterObjects step to only get the cells with the most DAB signal.

ETA: You also mention you’ve tried Otsu; have you tried 3 class Otsu with sending the middle class to the background to get only the very brightest cells?


this is the original image,

and this is the result of unmixing DAB after hematoxylin and applying Otsu three class, sending the middle class to the background.

apparently additional unmixing made some progress, but not enough…


Hi there,

In such complex histology slide, we really encourage users to explore the combination of Morph, Smooth, ImageMath, UnmixColors and MaskImage to reach a good segmentation. The best practice is to identify distinct structures in the mixtures, mask them out as separate regions, then fine tune IdentifyPrimaryObjects in each of these regions.

For your image, you should first notice that I mentioned using “Hematoxylin and Eosin” in UnmixColors , not Hematoxylin and DAB.

Then use Smooth to facilitate the segmentation of the Epithelial regions:

Then mask these region out, the remaining area is relatively clean for segmenting the brown objects:

Example pipeline maskEpi.cpproj (643.2 KB)