How to set "setAutoThreshold()" manually?

The image that I have has grey areas that are not detected by setAutoThreshold() function and I want to lower the criteria for threshold to be able to capture very low pixels (almost black, sth around 10). How can I do that?
Here is the to find the edges and it does not work well when the image’s pixels are close to zero (black) e.g. the pixel value=20

run("Duplicate...", "title=2");
setAutoThreshold("Percentile dark");
//run("Threshold...");
setOption("BlackBackground", true);
run("Convert to Mask");
run("Gaussian Blur...", "sigma=5");
setAutoThreshold("Percentile dark");
//run("Threshold...");
run("Convert to Mask");
run("Analyze Particles...", "display add");```

It sounds like you want setThreshold.
Some examples when searching for manual thresholding.



1 Like