CellProfiler for H&E stained images?

Thanks for developing this wonderful software!
I have used this for fluorescent images but want to apply for my H&E stained images also in order to identify nuclei and individual cells. Is there any sample pipeline that I can start with? Do you have any idea or suggestion?
I really appreciate for your help.


Hi Jinny,

Attached to this post is an example pipeline plus an H&E image to run it on (grabbed from wikipedia). Since several other users have made similar requests, I’d like to post this on our example pipeline page. Let me know if this helps get you started, or if there’s anything I should add.

I should mention that since H&E stained images seems to vary quite a bit from user to user, this pipeline may require some tweaking to work on your images, depending on how your stains turn out.

ExampleHEStain.cp (14.6 KB)

OMG! You answered super-fast! Thanks!
I will try that pipeline! Thanks again!


Dear mbray,

I want to measure individual sizes of nuclei and cells. Probably I have to crop area where cells are reasonably separated in order to quantitate them.
My H&E image doesn’t look good as yours (since my Hematoxylin is faint and pinkish), so I encountered a problem when I applied your pipeline. I couldn’t isolate nuclei particles at all! I have modified your settings to overcome this problem, but have no luck so far.
I wonder if color enhancement for Hematoxylin and Eosin might dissolve this problem. Any other suggestions? Could you take a look at my picture and share your thought?



Hi Jinny,

I think I’ve been able to modify the original pipeline to get things closer. I’ve removed the extraneous modules, and yes, you’re right: the staining quality makes things harder; still, unmixing the colors seems to help. See if the attached pipelines are of use to you; one uses the unmixing module, the other tries to use the individual color channels. However, some tweaking of the second IdentifyPrimaryObjects module is still needed for the first one, and if you use the second, the results will probably change if the color balance changes, which can happen if staining quality or image acquisition is altered.

2010_12_09_Unmix.cp (8.83 KB)
2010_12_09_NoUnmix.cp (8.75 KB)

Dear Mark,
I played with your unmixed pipeline and modified a little bit. I thresholded the hematoxylin image to gray scale and used that image to identify particles. So far this seems be the best setting I have tried.
Thanks very much. I really appreciate for your help.


I am also looking at H&E stained images but they are from muscle sections and I am looking to analyze fiber size and number. Attached are a few images and the pipeline I have right now. I am having a problem analyzing different sections with different size fibers and different amounts of purple fibrosis which I do not want to mistake for fibers. I have played around with smoothing and different thresholding methods but was hoping I could get some suggestions!

fiberAnalysis.cp (5.13 KB)

Hi Sarah,

Your images are more complicated since your stains are not as clear. Still, barring a change in your staining protocol, I’ve attached a pipeline which seems to work on the ones you uploaded. If the color balance in the images change, though, I would not necessarily expect this pipeline to work.

Hope this helps!
2011_06_15.cp (6.68 KB)


Thank you so much! I tried some things with masking but it didn’t work nearly as well. Also, I didn’t realize how much of a difference it makes when you umix different stains with the one you may be looking for. This program is fantastic… it’s made analyzing my images so much less painful.