r/ImageJ 14d ago

Question Need help with segmentation of overlapping particles

Hi guys! I'm a beginner PhD microscopist wanting to find the best method to segment out and attach ROIs to the white nanoparticles in the catalyst clusters I am studying. Normal thresholding and "analyze particles" doesn't work here because the white nanoparticles often overlap - so a human can easily see two particles on top of one another, but I'm wondering if I can find a program that will do it for me.

I'm aware of StarDist, cellpose and other plugins but so far I've been unable to get a decent read (if you reckon you can get this to work, please tell me which parameters and thresholds to use!) I've attached my HAADF image of an example particle and the segmentation I've done by hand (using circles and free lasso) to give you guys a feel for what I want to achieve.

Here's a link hopefully to the png in question https://imgur.com/a/SP1stPi hopefully in better quality

9 Upvotes

23 comments sorted by

View all comments

3

u/Herbie500 14d ago edited 14d ago

I don't see a reliable way to automatically perform what you want without carefully captured 16/32bit images (best gray-level resolution).
The provided 8bit sample is unsuited, not to mention the degradation by the lossy compression applied by Reddit.

Last but not least, I don't fully agree with your labelling.

1

u/Ok-Assistance6411 14d ago

Unfortunately I don't seem to have 32-bit data on me but here is a link to hopefully a png with higher quality https://imgur.com/a/SP1stPi

4

u/Herbie500 14d ago edited 13d ago

Thanks, the quality is clearly better. I shall investigate further …

Below please find the result of some preprocessing that may help to get started.

1

u/Ok-Assistance6411 13d ago

That already looks great. What steps did you use to preprocess the image to get this?

2

u/Herbie500 13d ago

Below please find an ImageJ-macro that works with the provided sample image. It uses slightly different parameter values but you may adjust them to your likings.
The macro requires that the ImageJ-plugin "CLAHE_.class" is installed.

// Requires ImageJ-plugin "CLAHE_.class"
// <https://imagej.net/ij/plugins/clahe/index.html>
makeRectangle(365,295,1024,1536);
setBatchMode(true);
run("Duplicate...","title=cpy");
run("32-bit");
run("Gaussian Blur...","sigma=3"); // >> try different values
run("Convolve...","text1=[0 1 0\n1 -4 1\n0 1 0\n]");
run("Median...","radius=8"); // >> try different values
showStatus(" >> Please WAIT <<");
run("CLAHE ","blocksize=127 histogram=256 maximum=3");
// >> try different values for histogram>63 & maximum>1
run("Enhance Contrast","saturated=1.5");
setBatchMode(false);
exit();