Background Particles


Hi everyone! Thank you so much for everything that you do and all of your help. For my project, I am taking images of FISH-stained brain samples and segmenting them with the Weka Segmentation tool. I have developed a Macro that counts and characterizes the particles, which works well. However, I would like to add the feature of counting all background particles outside of the cells to be able to subtract this background staining from my average particle density. I have tried using Speckle Inspector and various image manipulation techniques, but I have been unable to separate the particles inside the cells from outside. As I limit the size of cells in which particles can be counted, I can’t simply subtract the total particles found from the total particles in the image. Any help is greatly appreciated!

Image of a cell with inside and outside particles:


Can’t you just use Trainable Weka Segmentation to detect background, cells and particles and then mask the particles inside cells?


That absolutely sounds like something that would work! How do I go about doing that? I apologize, I am fairly new to ImageJ and image processing software as a whole. Thank you very much for your help!_



To get you started… just check out the Trainable Weka Segmentation (TWS) plugin page on the ImageJ wiki. This is the best place to start… there is also a Segmentation workshop (with corresponding slides) that explains a basic example using TWS.

Hope this helps get you started!

eta :slight_smile:


Thank you both again for your help! I guess I should have been more specific with my question. I have been using Trainable Weka Segmentation to separate out the background, particles, and cells, but am unsure how to do the masking of the particles inside the cells that iarganda mentioned. Is this something that can be done inside the Weka window, or an additional step through the main menu?

Thank you again!



So… you can generate the probability maps for the cells and then the particles… Then outside of the plugin - use those maps to threshold/create binary masks … and then you can count the particles in/out of the cell areas. For this - you may need to Script a bit… Here are some helpful links to get you started:

This other forum post is similar to what you are asking… so take a look.

If you need more help in this - once you have your masks generated… just post again. We are here to help! But read up a bit and try on your own first…

eta :slight_smile: