Remove Non-Cell Area from Plated Images through Batch Processing

Hi all, I’m doing several experiments that require analysis of hundreds of individual cell plates for total area of cells. Doing this by hand has been rather tedious, so I was hoping to automate the whole process using batch processing. I was ultimately able to automate everything, except the part where I clear out the area of the plate that does not contain the cells. I was wondering if there was any specific plugin within or outside of Fiji I could use to do this, or if it was possible to potentially code a macro or at least python script to do this process. I’m very new to Image-J, Fiji, macros, and coding in general, so any insight would be a lot of help! :smiley:

Here are a few pictures to help elucidate my problem.
Original Photo:

Processed Image:

Final Image Before Analysis:

So essentially I was wondering how to automatically white out the background area without having to manually do it for each area. I assumed this would be done in the binary image but if anyone has any idea for how to do it earlier that could also be great.

Thank you all so much !

Hi @lankaraniamir,

I validated a solution from your image. I hope this will work for every image, since all acquisition conditions are the same.

  • I used the blue component and performed a MaxEntropy threshold. This gave me the inner edges of your plate and a few cells.

  • The edges of your plate should be the biggest object in Analyse Particles. You can select it and clear outside.

  • If you select small objects (and fill them with black), you should get only the inner edge of you plate in white (maybe an opening of your image could help to remove cells touching the edge).

  • Invert your image. You’ll get white areas touching the edges of the image.

  • Perform Analyse Particles with edge exlusion, you should get only the “working area” of your plate. You can use this image as a mask to remove the unwanted parts of your detection image.