I find some difficulty in setting up the threshold of my particles

I want to calculate the overall area of my particles which closed together

Dear @yong

It would seem understandable that you are having difficulties with getting the area of your particles, because the experimental conditions are not optimal

You have a direct light shining on your gray particles on a gray table which cast a gray shadow. This makes it difficult to find out which gray intensity is part of a particle, a shadow or the background.

One way to fix this is to use lighting from BELOW the sample, on a glass table with a sheet of paper or diffusor. Then the particles will stand out very sharply.

For completeness I add what I did to try and get a segmentation, but I do not necessarily believe you should use your images in their current state.

I tried WEKA segmentation on your original image without much success but after cleaning the image a bit, I was able to reach something satisfactory but probably not very reproducible, as it will depend on how consistently you can acquire your images.

I also tried a simple thresholding after cleaning which gives similar results

The cleanup I did was
Crop the area with the ruler out
Convert to LAB Stack and use the first channel (L*)
Subtract background with a size of 25 and sliding paraboloid checked

This is the image I trained on WEKA, using the default features plus Variance and Entropy. I had to play around a bit to get a good distinction between the background and the particles.

For the auto threshold I used a median filter of 2.0 and an Intermodes Threshold

Regarding the area results, there is a 13% difference between WEKA and the Thresholding method, weka having more pixels classified as particles than the threshold.

This difference means little on a single image, and it would be interesting to check if this bias remains constant over multiple images or not.
Again it would be best of you could correct the artifacts in your acquisition rather than try to work with these images if it’s possible.


Hi oburri,

Thanks for your so patient answer. My problem was solved by following your suggestion 2. Could you please tell me how to install the WEKA segmentation? Thank you so much!

Yours sincerely,

Dear @yong,

WEKA is prepackaged when you download Fiji instead of ImageJ.

You can fin it under Plugins > Segmentation > Trainable Weka Segmentation
Otherwise just press L from Fiji to get the Command Finder and type weka, you can then double click on the corresponding line.

Please look at all the great Weka documentation to learn how to use this plugin in the most optimal way, if that is the path you wish to follow.

1 Like