Cancer has been and always will be the scariest disease
without a direct cure in modern times. Cancer or more specifically, cancer cells
are cells in our body that has malfunctioned. They have malfunctioned in the
sense that they don’t want to die. They continue to divide and grow in abnormal
proportions. Typically cells in the body self destruct when they arrived at
their limit or when it is not functioning properly. What’s scary about this disease
is that symptoms are usually undetected until the disease has spread in a wide
area of the body. Therefore it is necessary to be able to detect the existence
of these cells and kill them immediately.
There are many ways to detect cancer cells and today, I will
show you one way to do it. This method is through image processing. Two images
will be processed. The first image consists of normal cells. From these, the
mean size of normal cells and its standard deviation will be determined. With
these information at hand, abnormally large cells can be isolated and be tagged
as cancer cells. So let’s try doing this method using Scilab’s SIVP and IPD
modules.
To start of, figure 1 shows the photo of the "control" cells. To determine the mean and the standard deviation of the cells, its area must be known first. To do that, I segmented this image into 12 subregions with dimension of 256x256. The segmented image is shown in figure 2.
 |
| Figure 1. Original image of normal cells. |
 |
| Figure 2. Segmented images of Figure 1. Each segment has a dimension of 256x256 pixels. |
The next process is to convert this image to binary. There are two ways to do this. Fist is by using the functions im2bw(). This function converts an image to binary and the threshold can be specified. The threshold value ranges from 0 to 1. For my code, I used a threshold of 0.84. The second method is by using the function SegmentByThreshold(). This function is similar to im2bw() since the threshold can also be specified but the threshold values range from 0-255. The threshold can be determined using the function CalculateOtsuThreshold(). The Otsu method is a clustering based image thresholding method. Using these two functions for each of the subimages produced results as shown in figure 3. From here, we can see that images after using im2bw() is free of noise but the structures of interest are not fully formed. Using the function SegmentByThreshold() produced sfully formed structures but the background noise was not removed. The Otsu method showed that the 12 images have different threshold value. These values range from 177 to 199. Therefore what I did next was to place a threshold value higher than everyone else, the value I used is 206. As we can see, the image noise was reduced but still it is still present in some images.
I now use morphological operations, which was the activity last time, to fully clean up the image. There are three functions that I chose from: OpenImage(), CloseImage() and TopHat(). The function OpenImage() applies an opening filter to the image. This means that the image is first eroded and is subsequently dilated. Therefore this process retains and remove light objects where the structuring element does not fit. The function CloseImage() is just the inverse. The image is first dilated and then eroded. Lastly, the TopHat() function that emphasizes light objects where the structure element does not fit. Since the image is just cells, the structure element I used was a circle. What I did to clean the image is to use OpenImage() and then CloseImage(). I thought that TopHat() was unnecessary. The cleaned images are also shown in figure 3.
 |
| Figure 3. Segmented image converted to binary and cleaned. |
With clean images, the next thing is to determine the area of each clusters. To do this, I used the function SearchBlobs() to tag each cluster to a separate number. What this function do is to change the value of the matrix to the designation number. Therefore the image matrix is converted from binary (1 and 0) to values of 0 to the max number of blobs. Figures 4 to 15 shows each of the blobs per image. As it can be seen, some blob number doesn't contain blobs. Technically, this function "searches the number of connected regions in a binary image. All pixels
belonging to the same connected region are assigned the same number.
All pixels that do not belong to a region are background pixels and
have the number 0." So maybe the blob numbers that doesn't contain elements are regions that are surrounded by blobs. It is not really connected to the background but it is not also connected to the clusters.
To determine the area, I took the length where the matrix has a certain value. Taking the length means determining how many matrix element has this value which is basically the area. For example, looking at the fifth blob, I took the length in which the image matrix has a value of 5. I did this to all the blobs in all the images and they are shown from figures 4 to 15.
 |
| Figure 4. Blobs and their corresponding areas for subimage 1. |
 |
| Figure 5. Blobs and their corresponding areas for subimage 2. |
 |
| Figure 6. Blobs and their corresponding areas for subimage 3. |
 |
| Figure 7. Blobs and their corresponding areas for subimage 4. |
 |
| Figure 8. Blobs and their corresponding areas for subimage 5. |
 |
| Figure 9. Blobs and their corresponding areas for subimage 6. |
 |
| Figure 10. Blobs and their corresponding areas for subimage 7. |
 |
| Figure 11. Blobs and their corresponding areas for subimage 8. |
 |
| Figure 12. Blobs and their corresponding areas for subimage 9. |
 |
| Figure 13. Blobs and their corresponding areas for subimage 10. |
 |
| Figure 14. Blobs and their corresponding areas for subimage 11. |
 |
| Figure 15. Blobs and their corresponding areas for subimage 12. |
To get the mean, I took all the blob areas of the 12 subimages taking note that some blobs are connected to other blobs in another images. Also some of this blobs are repeated since the image cannot be divided exactly by the specified dimensions. Dividing this the sum of all the areas by the total number of blobs, I was able to determine its mean to be 439.42 pixels. The standard deviation was determined to be 69.28. Now that these values are known, I was able to isolate cancer cells to an image of mixed normal and cancer cells. The image I used for this second part is shown below. Again I repeated all the process I did until the area determination. Figure 17 shows the cleaned image. Using the SearchBlobs() function, 76 blobs were found.
 |
| Figure 16. Image of normal cells mixed with cancer cells. |
 |
| Figure 17. binary converted and cleaned image of figure 16. |
Again, all blob numbers don't contain blobs of interest. Figure 18 shows each blob with their corresponding areas. To isolate abnormally large cells, I made a circular structure element with radius of that corresponding to the mean+standard deviation. I used 3 structure elements, the first is for the mean + 1StDev value, the second is the mean + 2 StDev value and the third is for mean + 3 StDev value. These values are 12.72, 13.56 and 14.35 respectively. Again I used the OpenImage() followed by CloseImage() as filters. Both of them used the same structure element. The filtered images for 1, 2 and 3 standard deviations are shown in figures 19 to 21.
 |
| Figure 18. Blobs and their corresponding areas of figure 16. |
 |
| Figure 19. Filtered cells whose areas are above the mean + 1 standard deviation. |
 |
| Figure 20. Filtered cells whose areas are above the mean + 2 standard deviation. |
 |
| Figure 21. Filtered cells whose areas are above the mean + 3 standard deviation. |
For this activity, I give myself a grade of 12/10. This activity, after a long time, was on time. (Yey!) I was able to do everything that was asked. I think I did all of it properly. I thank Ma'am Jing's activity manual, Wikepedia and Scilab Help for giving me the information needed to do this activity.