Fluorescence Droplets Analysis Problem in CellProfiler

Hi everyone,

I am trying to analyze my microfluidics droplets image.
It’s been a few weeks of tweaking CellProfiler features and resulted in few things.
The goal is to count how many droplets within a capture of an image.
The problem is the image is too dark and when I did try to IdentifyPrimaryObject with global thresholding, it works fine only with a manual threshold. Even with manual threshold, I still have some droplets which are not counted. I also tried several different program including hough circles from opencv and etc. But, CellProfiler still works better. Therefore, I want to improve the counting and hope I could find a better solution to​ my problem here. Pictures of the original and uncounted droplet are attached. I also attached my pipeline.

Look forward to any reply and thank you very much!

droplet.cppipe (8.1 KB) image image.tif (8.0 MB)

Before trying to improve the analysis, maybe a silly question but do you have any way to improve the signal intensity at acquisition ? Like higher illumination power or exposure time ?

If not I can recommend some things to try:

  • Normalise the pixel intensities with a fraction of pixel saturated (like 10%).
    Such that the dimmer object will become brighter and the brighter object will just reach the maximal pixel intensitiy. In ImageJ you can use the command Process>Enhance contrast…
    This might help for the segmentation.

  • Maybe a seeded watershed would actually work. For that you need to find seeds point (center of droplets) as local maxima for instance and then the segmentation extends from those seeds based on the instensity.

  • Enhancing the contrast with some method like CLAHE, which does that for separate patches of the image. In Fiji Process> Enhance local contrast

  • Finally possibly using MSER (available in OpenCV). It is similar to segmentation but it is using several threshold levels to find the object regions

Good luck !

1 Like

Thanks @LThomas for the suggestions.
Haven’t try to do that, actually (or I might not know exactly how).

But, I will try to do what you recommend.
If you have more thought, please do let me know :smiley:


So when you talk about missed droplets do you mean the ones with the yellow outlines? Those are excluded based on touching the border, you can read about this in the below excerpt from the manual.


So if you change the “Discard objects touching the border of the image” option from ‘Yes’ to ‘No’ those droplets will be included.

If you want to move away from using a manual threshold, I got the below result from setting the strategy to adaptive with a 200 block size (about the size of a box that would contain one of your droplets) and setting the correction factor to 0.5 to make the threshold more lenient. Maybe not perfectly what you want but hopefully a start?

Good luck!



Hi Laura,

Thanks a lot for the reply.
Yes, I actually knew about the border’s rule. The thing is, some of the droplets are not touching the wall (IMO) but still, some are not counted. That’s the reason why I try to find a better method to improve the counting. And, with the adaptive/ or other threshold method, the separation may give me some weird form (not only circle). But, I may try to test more with the one you suggested. It’s getting closer than another threshold method.
If you have another suggestion, I’d like to hear it!


Can you show an example of one that’s not counted in Laura’s new pipeline?


I got this problem sorted by trying the features of each of the thresholding algorithm.
Thanks a lot CellProfiler team!


1 Like