Difference between revisions of "Automatic Cell Counter Algorithm"
Line 39: | Line 39: | ||
<gallery perrow="4" mode="packed" widths="px" heights="px"> | <gallery perrow="4" mode="packed" widths="px" heights="px"> | ||
File:Screen Shot 2018-08-09 at 10.18.07.png|Single Cell Detection | File:Screen Shot 2018-08-09 at 10.18.07.png|Single Cell Detection | ||
− | File: | + | File:Screen Shot 2018-09-03 at 17.19.26.png|Groups of Cells Detection |
</gallery> | </gallery> | ||
==Nucleus Detection== | ==Nucleus Detection== |
Revision as of 15:20, 3 September 2018
The aim of this algorithm is first to detect cells (or groups of cells), to count them and to find cells containing a micronucleus. Theoretically this would be easy as the micronuclei would also be as coloured as the nucleus. But other elements, bacteria for instance, can also be coloured by the dye. The big deal seems to be to distinguish micronuclei from those other elements.
Background and Material Used
Methylene blue is known as a DNA dye. Thus it enable to discriminate the nucleus from the rest of the cell. This dye is widely used and allow a quite good visual recognition. Micronuclei, which is also composed of DNA, will also be coloured by this dye.
Pictures used to build the algorithm are taken using the Raspberry Pi Camera connected to the microscope.
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.