Professional Documents
Culture Documents
Red Blood Cells and White Blood Cells using Canny Edge Detection
and Circular Hough Transform in Urine Sample
Ramon G. Garcia#1, Jennifer C. Dela Cruz#2
Mikko Ivan D. Avilledo#3, John Christopher M. Buera #4, Rom Vincent S. Chan#5, Paul Gian T. España#6
School of Electrical, Electronics, and Computer Engineering
Mapúa University
Manila, Philippines
1rggarcia@mapua.edu.ph 2jennycdc69@gmail.com
Abstract— Nowadays, counting of red blood cells (RBC) and image processing [6] [7]. From the study of Xu Ma, Gang An,
white blood cells (WBC) in a urine sample is done manually and Bin Li, it was found out that autofocus feature was not
by a medical technologist through use of the naked eye. applied [8]. Compared to this study, the variance of Laplacian
However, this makes the blood cell count subjective to the method will be used for autofocusing of the microscope. Image
skill of the lab technician and will take much longer time in stitching will also be applied using the Scale Invariant Feature
doing the task. This paper proposes the use of image Transform algorithm [9]. As for the work of Navea, Dupo and
processing in counting the RBCs and WBCs in a urine Bacudio image stitching was not considered. Also, blob
sample through use of various algorithms. The process of detection algorithm was used for the cell detection and
consists of three (3) main parts. First is the autofocusing counting [5]. Combination of Canny Edge Detection and
using the variance of Laplacian method. Next is the use of Circular Hough Transform on the other hand will be used for
Scale Invariant Feature Transform (SIFT) as the image this study.
stitching algorithm. Last is the automatic detection and
counting of blood cells using the Canny Edge Detection and The main objective of this to count and display the number
Circular Hough Transform algorithms. This study aims to of blood cells present in a urine sample using microscope
provide faster blood count results with accuracy as the image processing Specific objectives are: (a) To create a device
manual counting or even better. that will capture segmented images of the urine sample using
varisance of Laplacian method for auto-focus feature, (b) To
Keywords— Microscopic, Urine, RBC, WBC, SIFT, use Scale Invariant Feature Transform for image stitching, (c)
Canny Edge Detection, Circular Hough, Image Stitching To use Canny Edge Detection and Circular Hough Transform
as algorithms for detection and automatic counting of blood
cells, and (d) To test the accuracy of the device by comparing
I. INTRODUCTION its output with the manual testing results from laboratories.
In the field of biomedical science, urinalysis plays a basic
part in terms of health diagnosis. It is a laboratory test of urine This study will be beneficial to the field of medicine
that can assess presence of blood in urine (hematuria) through particularly in urinalysis. The classical method of detecting
the sediment microscopic examination. One way of conducting disease using urinalysis is by manual counting of red blood
the hematuria test is by simply using a microscope to evaluate cells, and white blood cells [3]. Knowing the presence of the
presence of blood on the urine sample – manually counting the blood cells can determine if a patient has urinary tract infection
number of red blood cells (RBC) and white blood cells (WBC) or kidney stones [10]. For the manual counting and focusing, it
present on the sample [1]. Manual counting is not reliable will be subjective to the skill of the technician doing the task
seeing that this is subjective to the skill of a lab technician unlike in automatic counting and focusing which is consistent
performing the action [2]. To solve this problem, an image all throughout the process; thus, making it a scientific
processing method in RBC and WBC counting is proposed. On approach. For the image stitching, it will remove the
these terms, immediate results can be expected. overlapping which may improve the output accuracy.
Moreover, faster results will be obtained.
Difficulty in counting the blood cells automatically is likely
to happen and this is due to its complex nature in segmentation. The scope of this study is it only focuses on the detection
Various methods from past studies that address the same issue and counting of blood cells, RBC and WBC, which are present
already existed [3] [4]. Using K-mean clustering was once in a pre-centrifuged urine sample. Other urine content such as
applied for segmentation purposes on an enhanced color image bacteria, casts, epithelial cells and fat are not considered by the
[5]. Another is the use of the Circular Hough Transform which device. Hence, there’s a probability of UTI and kidney stone
has a feature of detecting the boundaries of the circles; are the only diseases to be identified by the process. The result
applying it to cells. The use of dynamic appearance model such of this device will be stored in cloud storage.
as circular shape counter has been applied in RBC
segmentation before [6].
II. METHODOLOGY
Based from the previous studies using microscopic The study makes use of pre-centrifuged urine sample as the
images in analysing urine, researchers focused on the detection input to the image processing algorithms such as Variance of
of red blood cells in urine image captured under microscope by Laplacian, Scale Invariant Feature Transform, Canny Edge
Detection, and Circular Hough Transform. Upon undergoing point will be done. The captured image in this process is for the
these processes, the result shall be the count of detected blood auto-focus feature only. This method works to measure the
cells, both red blood cells (RBC) and white blood circles second derivative of an image. The Laplacian highlights
(WBC), present in the urine sample. regions of an image containing rapid intensity changes.
Likewise, the method is often used for edge detection.
The assumption here is that if an image contains high
variance then there is a wide spread of responses, both edge-
like and non-edge like, representative of a normal, in-focus
image. But if there is very low variance, then there is a tiny
spread of responses, indicating there are very little edges in the
image. The more an image is blurred, the less edges there are.
To meet this objective, sixty captured images from
different altitudes of microscope’s tube, through use of a DC
gear motor connected to the coarse adjustment knob, will be
used. The variance of Laplacian of the image samples will be
computed, and the altitude of the tube where the sample image
has the highest value will be used for the next process –
automated microscope slide adjuster with image capture.
Figure 1. Conceptual Framework of Methodology
V.REFERENCES
[1] Tangsuksant, W., Pintavirooj, C., Taertulakarn, S., &
Daochai, S. (2013, October). Development algorithm to count
blood cells in urine sediment using ANN and hough transform.
In Biomedical Engineering International Conference
(BMEiCON), 2013 6th (pp. 1-4). IEEE.
[2] Ma, X., An, G., & Li, B. (2009, May). Design and
Implementation of an Automated Microscope Stage. In
Information Technology and Applications, 2009. IFITA'09.
International Forum on (Vol. 1, pp. 603-605). IEEE.
[5] Navea, R. F., Dupo, V., & Bacudio, L. (2015). Red Blood
Cells and White Blood Cells Detection, Differentiation and
Counting using Image Processing.
Figure 7. Urine Sample After WBC Detection [6] Lin, Z., Yu, Y., & Chen, T. (2012, March). An auto-focus
algorithm based on image processing. In Automatic Control
For this part, comparison between the counts using and Artificial Intelligence (ACAI 2012), International
manual counting versus the automatic counting is exhibited Conference on (pp. 394-397). IET.
on Table 2. Subsequently, the percentage error is shown on
Table 3 using the percentage error formula that is defined Trial T(sec)
as 1
2
𝑀𝑎𝑛𝑢𝑎𝑙 𝐶𝑜𝑢𝑛𝑡−𝐴𝑢𝑡𝑜𝑚𝑎𝑡𝑖𝑐 𝐶𝑜𝑢𝑛𝑡
% 𝐸𝑟𝑟𝑜𝑟 = |
𝑀𝑎𝑛𝑢𝑎𝑙 𝐶𝑜𝑢𝑛𝑡
| 𝑥 100 3
4
The average percentage error (Mean of Error %) of 5
RBC and WBC counting are 5.28 and 9.65, respectively.
6
TABLE 2. Comparison between manual and automatic 7
blood cell counting 8
9
10
TABLE 3. Average percentage error of RBC and WBC [7] Obara, T., Igarashi, Y., & Hashimoto, K. (2011,
counting September). Fast and adaptive auto-focusing algorithm for
microscopic cell observation. In Intelligent Robots and Systems
(IROS), 2011 IEEE/RSJ International Conference on (pp. 7-
12). IEEE.
IV. CONCLUSION
The study has successfully developed a device that uses a [8] Zhu, Q., & Li, K. (2010, June). Image stitching using
Raspberry Pi Camera for image acquisition and performs the simplified SIFT. In Information and Automation (ICIA), 2010
image processing algorithms such as Variance of Laplacian, IEEE International Conference on (pp. 1134-1137). IEEE.
Scale Invariant Feature Transform, Canny Edge Detection, and
[9] Mazalan, S. M., Mahmood, N. H., & Razak, M. A. A.
(2013, December). Automated red blood cells counting in
peripheral blood smear image using circular Hough transform.
In Artificial Intelligence, Modelling and Simulation (AIMS),
2013 1st International Conference on (pp. 320-324). IEEE.
[10] Song, Y., Li, M., & Sun, L. (2006, December). A new
auto-focusing algorithm for optical microscope based
automated system. In Control, Automation, Robotics and
Vision, 2006. ICARCV'06. 9th International Conference on
(pp. 1-5). IEEE.