Thresholding with a degrading background

I’ve got translucent particles I want to analyze and add to ROI Manager but I have difficulties with thresholding as my background degrades from dark to bright colors and “matches” the color of the particle. Is there any way of selecting the particle other than doing it manually?


Here’s an example:



Detecting edges then in the filling holes is one way.

the following works on this image:

run("Find Edges");

setAutoThreshold("Li dark");
//setThreshold(41, 255);
setOption("BlackBackground", true);
run("Convert to Mask");

// Do one or more dilate/erode pairs to connect edges 
// run("Dilate")
run("Fill Holes");
// run("Erode")

If the edge binary image is not closed the “fill holes” won’t work. To connect a broken edge you can run N-dilation operations, fill the holes, the N-erosions .



Ok, that works!

Thanks a lot!