Area ratio for brightfield image

Hi all.

We want to measure the area that occupies the light blue area with regard to the whole tissue area. Could I process brightfield image with a program? I suppose it’s no need for scale, if I need a area ratio.

Thanks in advance.


Indeed, yes you can do this easily enough. The attached pipeline

  • Unmixes the colors (but you didn’t say what the stains were, so I guessed)
  • Segments the blue regions
  • Measures the area occupied by the blue objects, in pixels
  • Calculates the percentage of pixels in the whole image

Hope that helps!
DL_area_ratio.cppipe (8.42 KB)

Thanks a lot David.
Please, could you modify your pipeline to get red and white areas also measured? I suppose, the white one could be calculated as a difference between all area and (blue+red) areas. Of course if no any other colors is presented.
Thanks in advance,


Did you make any progress with this? I haven’t tried, but it ought to be easy enough to segment the red area analogous to the blue. And yes, the white might be simply the rest of the area.


Yes, it works OK. Thanks a lot.

1 Like

Dear David. I’d prefer don’t make updates on PC, but nevertheless it happens. Some Java or some Windows updates made CellProfiler inusable. So, I had to install the new version you have for download. But the pipeline you prepared presents some problem. I put them in

Could you, please, correct it. If it is possible, please, could you add the red and white areas estimated also.

Bu the way, why the data stored as a csv file? The problem is when I open them in Excel all they appeared in a only one table cell and I have to divide in column trying not to make an error. Could the data be stored as a Excel format file directly?

Previous versions of CellProfiler are available on the download website. CP 2.2.1 should work – Windows updates shouldn’t bother it, though check your Java version as noted on the CP download site. If an older version was working before, you should be able to just stick with the old configuration.

Re: CSV, you can choose to export separate tables for each object in your Export module. It’s best if you post your pipeline, so the folks here can help you more easily. CSV is an acceptable (an preferable IMHO!) way to input data into Excel.

Note: I don’t work for the CellProfiler project any more, just checking in occasionally!

That Excel issue sometimes happens in European versions of excel- try swapping the delimiter in CP to “Tab” rather than “Comma”. You may also need to swap how Excel handles decimals- see this tutorial from our Swedish collaborators for more information.

Hi again.
We readjusted the colour threshold values for dyes and eliminated innecesary data columns. And included a step to recognize total tissue slice area. Nevetheless, the sum of red and blue areas is not a 100%. Why it could be possible?

On the other hand, how could be add some steps to create a new image in which both colour channels are combined after the thresholding and assigning selected colour, in order to compare with an original image?

Thanks in advance,

AreaQuant end.cppipe|attachment (12.5 KB) MUS%20345%20CONTROL%20BASE004%202|471x500