Biology Stack Exchange is a question and answer site for biology researchers, academics, and students. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there any software that could be used to rapidly (quicker than humans) count the eggs laid by Drosophila on a substrate by placing them under a microscope with a camera attached? The eggs are laid on the surface of the food and have a fairly uniform shape - we regularly have to count the number of eggs in >200 vials, which can take a over 4-5 hours per 100 vials.

I wonder if there is some software which could be linked to a microscope with mounted camera connected to a computer, the software could then count from the live feed or a quickly taken photograph. It wouldn't have to be perfect but as long as it could be as accurate as humans (which is surprisingly low from our experience - we count up to a set amount then remove the rest, e.g. if I was aiming to leave 180 eggs I would be quite happy to get anywhere between 150-200 eggs). It would be using a stereo-microscope (aka dissection microscope) with a mounted camera.

The surface of the food with eggs looks something like this -> enter image description here purely for illustration, taken with iPhone - real images on microscope would be able to get closer (food surface could fill screen) and have more uniform lighting to give better contrast (this was taken to show in a talk so I wanted pretty rather than practical). The bottom two quarters of the food in this picture would be similar to the real result, just much closer...

share|improve this question
Matlab allows image analysis like this. Check the matlab image analysis toolbox. – WYSIWYG Apr 16 '13 at 8:55
@WYSIWYG I'll give it a look, do you know if it would be able to do this live? (i.e. put the vial under the scope, focus it, click a button & get a count, then I remove some eggs & put it back under for a recount?) – rg255 Apr 16 '13 at 9:05
I am sure it can be configured for a direct data acquisition and counting. I remember someone telling me about counting fluorescent puncta in cells, under confocal microscope, using matlab. That is, however, beyond the scope of my existent skills and you can talk to any instrumentation engineer in your university – WYSIWYG Apr 16 '13 at 9:09
another software called LabView by national instruments can also do such a job. It's not that difficult to use. – WYSIWYG Apr 16 '13 at 9:10
here's another image analysis package that may do what you want – Michael Kuhn Apr 16 '13 at 10:02

ImageJ is a multi platform piece of software that has a cell counter module that might be of some use, and hey its free! Its easy to use and so ludicrously crude that it is very versatile. I remember using it in undergrad to count cells under the microscope automatically after a few image contrast tweaks. I don't see why this couldn't be reapplied to count eggs.


Cell Counter documentation:

share|improve this answer
excellent, I'll try to find time to try it out in the new year and let you know how I get on! – rg255 Dec 17 '14 at 16:10
Mathematica, if your institution has it as a bulk license option that you can get for free, is also a decent competitor to ImageJ for image analysis, assuming you do not know either program. A bonus is that you can hop over to Mathematica SE if you run into problems. I have used it for fluorescent microscopy counting and imaging as seen in… – March Ho Dec 17 '14 at 16:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.