Help with Retinal Imaging Pipeline with Speckles


Hello there!
The project at hand is trying to count the “specks” within different retina images of patients. The speckles do not have a secondary object to help filter then and I have tried multiple different pipelines and I am not able to accurately count all of the dots in the various images. One potential problem that we are running into is that CP might be counting the blood vessels as part of the dots. I have been trying to remove the blood vessels from the image to see if this would help but I am at a loss for this. Is this project something that can be accomplished on CP?
I have attached multiple images and the different crop images from CP to help show the area where we are looking to count. I have also attached the pipeline I have tried to make to help out with this project.
Thank you very much for any help!


Retina_Test.cpproj (398.4 KB)


Hi, can you re-upload the other 2 images, I could only see the first one.

It seems that you can tell the difference between vessels and specks by eyes. So, can you share what are the features that help you differentiate them?

You may try to first let CP collect everything, measure everything, then later use “FilterObjects” to collect the objects of interest.

For example:

  • Is it because vessels are brighter? <<< filter by intensity
  • Is it because vessels are bigger <<< filter by size
  • Is it because vessels are long thin objects <<< filter by shape
  • Is it because vessels have lumens and specks don’t <<< filter by texture or intensity etc…



I have tried the suggestions above in the past but the issue I run into is that the blood vessels end up connecting and CP makes varies structures and fills in the space. I am also trying to work the cropped image with just the specks.

It will not let me upload the crop image from CP but I am just cropping the area around the specks.


Forgive me if this isn’t directly related to your project but take a look at this paper, perhaps? It gives a CellProfiler pipeline for working w retinal cells at least.

Dordea AC, Bray M-A, Allen K, Logan D, Fei F, Malhotra R, Gregory M, Carpenter AE, Buys ES (2016). An open-source computational tool to automatically quantify immunolabeled retinal ganglion cells. Experimental Eye Research / doi: 10.1016/j.exer.2016.04.012. PMID: 27119563. PMCID: PMC4903927


That is a great article and tool! Unfortunately the specks that we are trying to count do not have nuclei or a cell shape as they used in this paper.


Hi again,

Let’s try to figure out how to separate vessels from the specks.
My current suggestion is to “mask out” the region where there are vessels.

(you may notice there’s some masks nearby speckles. Don’t worry, those are the areas between speckles, not the speckles themselves)

And only then, enhance the speckles as you did in your pipeline.

So now there’re less vessels to confuse. However, I notice that in-between vessels, there’re some bright areas (calcified regions?). They are mostly in the peripherals. Should those bright areas be counted as “speckles” or you want to exclude them as well?

If you know in advance where the region of speckles is (center about macula?), then the best strategy is to use “Crop” as you did.
I attach here a modified pipeline.Retina_Test_masked_vessels.cpproj (642.5 KB)

Hope it helps a little.

How to quantify spots from in situ?