Difference between revisions of "Automatic Cell Counter Algorithm"
Line 9: | Line 9: | ||
==Picture Procedure == | ==Picture Procedure == | ||
− | First, we took photos while zooming on the cells of interest. As cells are quite translucent, they were difficult to detect. In addition, we realized that the microscope was so dirty that the durst was detected as well as the cells and it may be difficult to distinguish them. It was thus decided to apply some | + | First, we took photos while zooming on the cells of interest. As cells are quite translucent, they were difficult to detect. In addition, we realized that the microscope was so dirty that the durst was detected as well as the cells and it may be difficult to distinguish them. It was thus decided to apply some pre-processing instead of directly searching for cells contour. |
The pre-processing will mainly remove noise due to the difference in luminosity. In order to apply the background removal, we took a picture of the background without focusing on anything and compare it to the image of interest. The pre-processing would be easier if the field of view is the same on all images. Thus we thought it was better to take a picture of the whole field of view instead of zooming on the thing of interest. | The pre-processing will mainly remove noise due to the difference in luminosity. In order to apply the background removal, we took a picture of the background without focusing on anything and compare it to the image of interest. The pre-processing would be easier if the field of view is the same on all images. Thus we thought it was better to take a picture of the whole field of view instead of zooming on the thing of interest. |
Revision as of 07:43, 4 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 may be easy as the micronuclei should 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 able 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, they were difficult to detect. In addition, we realized that the microscope was so dirty that the durst was detected as well as the cells and it may be difficult to distinguish them. It was thus decided to apply some pre-processing instead of directly searching for cells contour.
The pre-processing will mainly remove noise due to the difference in luminosity. In order to apply the background removal, we took a picture of the background without focusing on anything and compare it to the image of interest. The pre-processing would be easier if the field of view is the same on all images. Thus we thought it was better to take a picture of the whole field of view instead of zooming on the thing of interest.
Cell Detection
Pre-processing
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
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.