Automated cell measurements identification from binary images

Tags: #<Tag:0x00007fb87b715fa8> #<Tag:0x00007fb87b715e68>


Hello there,I am a PhD student who is having a lot of problems trying to automate cell counting and measuring from wheat endosperm images. I have used a nice stain that outlines the cells nicely when transformed to a binary image. However I cannot for the life of me configure the analyze particles tool correctly so that it is just the dark areas within the lighter borders that are counted and measured rather than the cell walls themselves. In addition when I try to use the find edge tool fill tool from the binary menu I still don’t have much luck. I have posted the original image and any help or advice would be most appreciated.

Kind regards



Good day Richard,

what may appear beeing nice for the eye need not be nice for machines!

With respect to your image, I fear that the contrast of the cell contours vary too much over the image to give a satisfying binary version where fill holes etc. can successfully be applied.



Maybe color information may be used.


Hi Herbie, Thanks for the reply. I see. The thing is tho is that I have come awfully close to having it done where I duplicate the image and then refer the thresholded duplicate to the original when performing the analyze particle function. However it seems to identify the cell walls in the measurement rather than the space in between! I’m sure it must be a simple modification although I’m just not finding it at the moment! I’m afraid I am a bit of a novice at imageJ and haven’t used the colour information tool.


Sorry Robert,

but there is no “colour information tool”. I just wanted to know whether there is any perhaps helpful color information (staining) in your original image data.

Furthermore, I fear that “filling” the cells in the image requires perfectly closed cell contours and presently I don’t see how to achieve this.

If you are “awfully close”, then “Binary >> Fill Holes” should work. I doubt that you are “awfully close” in this very sense.




Hi Herbie,
Ahh ok. I will keep trying. Feel free to have a stab at it if you fancy an attempt! No worries obvs. if not! :stuck_out_tongue_winking_eye:



I wont try any further for good reasons: The problem is with tissue preparation and image acquisition.

Please note that image processing can sometimes remedy such deficiencies but only at very high costs and sometimes it is even impossible. That said, it is of utmost importance to optimize object preparation and imaging conditions.



Automatic recognition/quantifying area to replace freehand tracing

Hi Herbie,
No worries! Thanks for all your assistance any way!


Boom! What do you think of this??? :raised_hands: Problem with Tissue preparation! Purlease!!! :sunglasses::stuck_out_tongue_winking_eye:


Glad to see that you’ve found a solution for the sample image and hopefully your approach generalizes!

Good luck



Great! To help others who read this thread later, could you please describe how you accomplished this? Ideally as a script?


great idea ctrueden!
Richard, would really appreiate if you would describe how you have accomplished this!


Hey sorry for the delayed response! I’m not aware how to record actions as a script on imageJ. I can describe how I produced that. I’m currently busy however will try and post a description of the steps I took as soon as possible.



Just use the Macro Recorder:slight_smile: Would be great for the community to see your solution.

eta :slight_smile: