Automatic Cell Counter Algorithm
The aim of this algorithm will be to first detect cells (or groups of cells), count them and find cells containing a micronucleus. Theoretically this would be easy as the micronuclei would also be as colored as the nucleus. But other elements, bacteria for instance, can also be colored. The big deal seems to be to distinguish between micronuclei and those other elements which could also be colored.
Background and Material Used
Biological background: methylene blue is known as a DNA dye. It this enable to discriminate the nucleus from the rest of the cell. This method is widely used and allow a quite good visual recognition. Micronuclei, which is also composed of, will also be colored by this dye.
Pictures used to build the algorithm are taken using the Raspberry Pi Camera connected to the microscope. This way seems much more reproductible than directly connecting a phone to the objective.
Picture Procedure
First, we took photos while zooming on the cells of interest. As cells are quite translucent, the cells were quite difficult to detect. In addition, we realized that the microscope was so dirty that the durst was detected as and it may be difficult to distinguish it from interesting things. It was thus decided to apply some preprocessing instead of directly searching for cells contour.
In order to apply the background removal, we took a picture of the background without focusing on anything. In order to remove also the noise due to the difference in luminosity, we took it was better to take a picture of the whole field of view.
Cell Detection
Then several methods were tried to remove the background from the image of interest. First a simple subtraction of the background image was done. Unfortunately, this method results in strange horizontals lines which may be due to the actualisation of the camera. For some images it was not a problem but for others the cell was very difficult to detect due to those lines.
Another method was then tested, mainly the difference between the image representing the cell and the background image was computed. Then the cell is much more easily selected.
Cell selection is done as followed:
- First contours on the difference image are computed.
- Then a thresholding step is done in order to keep only larger contours (larger area), the ones that may represent cells.
- Finally, the nucleus detection (next step) will be done on those larger contours only.
Results: The developed algorithm is able to find isolated cells as well as groups of cells. Then a mask is applied in order to keep only what is inside the cells. This would simplify the next step which is finding the nucleus.