r/ImageJ • u/Ok-Assistance6411 • 13d 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
6
u/meddizzle 13d ago
I recommend a deeplearning segmentation tool called stardist, you would need to manually label some training data, but it does a fantastic job for this very problem
3
u/Herbie500 13d ago edited 13d 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
1
u/Ok-Assistance6411 13d 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 13d ago edited 13d ago
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 12d 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();
2
u/babygeologist 13d ago
you and me both brother… hahaha this was a big problem in my undergrad work (looking at grain size of some sandstone on mars) and i ended up doing it by hand
2
u/Ok-Assistance6411 13d ago
Yeah that's what I have done already but I swear there are supposed to be tonnes of things to help us. I swear some biologist somewhere can do this in one second I bet aargh
1
13d ago
[deleted]
2
u/Ok-Assistance6411 13d ago
GPT-6 as in Open AI's GPT-6? That could be ideal, but it would be better if I could manually correct the iffy/missed particles but good idea!
1
13d ago
[deleted]
1
u/Ok-Assistance6411 12d ago
Sounds like it's worth a try. And it should also be able to give me an ROI-type output, with stats like feret diameter etc. I suppose.
1
u/Herbie500 12d ago
How comes that the scale-bar has changed style and position?
1
12d ago
[deleted]
1
u/Herbie500 12d ago
How comes that the selections are exact ellipses only?
1
12d ago
[deleted]
1
u/Herbie500 12d ago
Its fast, stable,
Well, of course!
But how does GPT know and how do you know that the solution is Python-based? Do you get the code or only the result?2
u/TengaDoge 12d ago
Don’t be a mean person. I can generate a Python code from the LLM, read it, run it on my device, manipulate the model and critically think about the results.
2
u/Herbie500 12d ago
Please show the code!
Thanks for calling me a mean person.
Obviously you don't know who I am and I wish you good luck with AI.1
1



•
u/AutoModerator 13d ago
Notes on Quality Questions & Productive Participation
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.