I implemented some preprocessing stuff on the image of the blood sample.
· Threshold
· Filter – Median Filter
Threshold value is decided by taking the average of the pixel values of blood cells provided by the user. Median Filter is used to filter the image after applying the threshold. From that we can remove most of the dust particles and the back ground, but not the air bubbles.
The problem is how to remove air bubbles? Air bubbles are big but have the same pixel values as blood cells.
As Omega suggested, I tried to get the contour areas and remove the bigger ones. But to have them removed I have to get their coordinates or any other method to locate them.
So I took an easier approach. First I dilate the image. This will remove the remaining dust particles. Then I erode the image…
Then only blood cells and air bubbles will remain in the image. So I count contours which have area less than a value which is I get from trial and error. These will be the blood cells. There are some errors though. Some blood cells splits and appear as two contours.
I have to check it for several other real images as well. Let’s see how it will behave for other images.
No comments:
Post a Comment