Thresholding for Counting Small Speckles

Hi there!
I’m looking to count speckles in my cells. The speckles are quite small - about 5 pixels in diameter and the thresholding I’m using seems to recognize many negative areas, without recognizing the actual speckles. I’ve played around quite a lot with the thresholding (as some of the forum suggested) and such but haven’t had any success with identifying them.
I was wondering if there was a thresholding that someone could recommend or perhaps a mask that would work for this case.

Counting PBs pipeline.cppipe (16.0 KB)

Here’s an example of the files - I define the cells and nuclei with the blue file and count the speckles with the green file.


The problem was your second “CorrectIlluminationCalculate” module- I’m not sure why it (or the other one earlier in the pipeline) is being included since you’re not applying it or using it for smoothing (which you could do more easily in the Smooth module) but since you had rescaling turned on it was rescaling your image from 1-255. IdentifyPrimaryObjects expects a value between 0-1, so every pixel that wasn’t masked out was therefore being recognized as >1 and identified. Omitting the CorrectIlluminationCalculate modules, or at a minimum not setting them to rescale, will fix your issue.

Good luck!

Wonderful, thanks you so much! I’ve looked into the CorrectIllumination modules a bit more and understand them better now.