Local threshold of objects, any better tool?

Dear ImageJ community,

I’m facing a little limitation in imageJ analysis.
I’m trying to threshold the following image. In this image I have very bright spots (in the red square) and very faint ones (in the white square - that I can only see when I increase my image brightness balance).
-> My objective is to threshold in the same image the bright and dim spots.

The bright ones are easy to threshold but to get the dim ones it’s another story because if I use a general threshold like Huang I can get the dim spots but then I loose the size of the bright ones that appear bigger.
I usually use a local threshold to solve this problem, like the Bernsen but this time it doesn’t work, as you can see. And I tried to play with all the parameters of the local threshold without much success.

Does anyone know a better local thresholding method with imageJ?

Thanks a lot in advance for your help.
Have a good day.

If auto-local threshold does not work for you, it may be that you need some machine learning like the: https://imagej.net/Trainable_Weka_Segmentation
There you can annotate spots (bright and dim) and background at train a classifier to distinguish them.


Ok thank you, I’ll read about it and give it a try :slight_smile:

Hello Guillaume,
If all your dots are in the same range of size, you may try to filter the image with a bandpass on a FFT? Or a TopHat filtering? Before the auto-local threshold.
Best regards,

Hi Frédéric,
Thank you for your advices. I gave a try to the bandpass filter by defining the size of my particles but unfortunately it doesn’t work as I would expect.
I’ll read about the Top-hat filters, maybe this one would help :slight_smile: