Quantify collagen using masson trichrome



We want to measure the area of blue stained collagen in masson trichrome stained tissue.
What we want to get is a percentage of collagen per total area of tissue (so we need to exclude the white background from the results)

We have never used Cellprofiler before so we dont really know how to set up our own pipeline. Could anyone help us?

Here are some examples of how our images look



Please have a look around in the forum first. Especially, this general advice:

On the top right corner, you can also find the search button. As I did just now, typing “trichrome” does give you a few similar topics with example pipelines.

And for a quick tip, you can use UnmixColors module to selectively collect the green/blue stained area.




I tried playing around with some of your suggested pipelines from other discussions in the forum.
The one I found to be most promising for my images was this one:
2012_04_06_Fibrosis.cp (18.7 KB)

However I would like the analysis to be a bit more stringent. I think that too much of the areas around the more intensely coloured blue fibres are included.
How do I change this?

I was using these .tiff files when I tested this pipeline:

Thanks for your feedback!



You’re probably going to want to read the help for the IdentifyPrimaryObjects and ApplyThreshold modules and play with the settings there, as those are the modules that are primarily used for “Signal” vs “Not Signal”

You may also want to check out our website, which has links for Getting Started, Examples, and Tutorials.


I have now tried to make my own pipeline from scratch. I think its working quite well now, but I do have one question.

Collagen_2.cpproj (411.0 KB)

I find that it detects a lot of very small objects (there must be blue staining there that I cant see…). How do I get rid of these


Great !

We’re very glad that you explore the software. That’s actually the best way to use CellProfiler.

Regarding how to get rid of the small objects, in your second IdentifyPrimaryObjects, the range of object is currently from 1 to 10000.

Please change it to something like 5 to 10000, and set the option “Discard objects outside the diameter range” to Yes

Good luck.


Thank you, that works!

By the way, is it possible to measure the area of the objects found with IdentifyPrimaryObjects?
Using the MeasureImageAreaOccupied the “Area Occupied” and the “Perimeter” are the same when measuring from the IdentifyPrimaryObjects. Or is it only possible to measure the area using for example the image from AppliedThreshold as I did in my pipline?


Or can I use the ConvertObjectsTolmage maybe??


You can use MeasureImageAreaOcccupied in “Objects” mode to measure the total area of the objects, or MeasureObjectSizeShape to measure the area of individual objects.


Hello all,

I am trying to download the linked pipelines in this thread to build upon it and tailor it to my analysis.
However, the links are not working.
I tried to build my pipeline from scratch but nothing is working, errors keep aborting my analysis.
I am trying to quantify Masson’s trichrome with svs. files, which are whole slides of rat pancreas.
Any help would be greatly appreciated.
Thank you in advance!




For some reason the attachment function in our forum is currently having issues. Sorry for the inconvenience.

Regarding the errors that keep aborting your analysis, can you specify what that is? Maybe a screenshot or copy/paste the error text would be helpful.