Hi William,
sorry, your question is not clear enough. From it, I can't read what
exactly you are doing.
The best would be a short ImageJ macro with the steps you are doing.
I guess you start with some color threshold or the like? The 'messed up'
image indicates that the threshold was not properly set.
Your 'messed up' image also looks like some kind of watershed has been
applied? If the standard watershed is too aggressive (splitting grains
that should not be splitting), use the adjustable watershed
https://imagej.net/plugins/adjustable-watershed/adjustable-watershed
Michael
________________________________________________________________
On 24.07.25 08:59, William Rust wrote:
Hi all,
I'm processing a series, ~20, slides of wheat kernels in a petri dish. The
objective is to wind up with one kernel per slide for input into an AI
model. So, I am thresholding, using analyze particles, etc. and the process
works reasonably well but I'm occasionally getting extraneous artifacts.
Most of these are on the edge or outside of the petri dish outline. So I
decided to crop the image using a circle centered in the image taking care
not to crop any of the kernels. This works great on 19 out of the 20 input
images. I've attached three images for the "not great" one: the input
image, the result of analyze particles on the uncropped input after
processing showing the outlines or the kernels and the output of the
cropped image after the same processing as the previous image, aka the
mess. Again, the other 19 quite similar images were circle cropped and
processed with no obvious errors.
This is done in a java program running on an i7 machine and windows 11. I'm
using imagej 1.54d in a maven based project (probably a little old but I'm
trying to be consistent with older studies and, it works).
Does anyone have any idea what may be going on here? I'm moving on to
writing code to remove any "kernels" that are located outside the petri
dish but that actually takes effort to write as opposed to the simple crop
code. But it's very annoying to have something like this pop up and not
have a clue as to what is causing it.
Anyways, thanks for your help,
wjr
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html