443
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
FPGA REALIZATION OF SOBEL EDGE DETECTION
ALGORITHM FOR BREAST CANCER DETECTION USING
THERMAL IMAGES
D. Selvathi
Senior Professor, Department of Electronics and Communication Engineering,
MEPCO Schlenk Engineering College Sivakasi, (India).
E-mail: dselvathi@mepcoeng.ac.in
ORCID: https://orcid.org/0000-0003-1159-3879
S. Bama
Associate Professor, Department of Electronics and Communication Engineering,
Kalasalingam Academy of Research and Education, (India).
E-mail: bamasrini@yahoo.com
ORCID: https://orcid.org/0000-0002-9450-0692
Recepción: 28/11/2019 Aceptación: 17/12/2020 Publicación: 30/11/2021
Citación sugerida:
Selvathi, D., y Bama, S. (2021). FPGA Realization of sobel edge detection algorithm for breast cancer
detection using thermal images. 3C Tecnología. Glosas de innovación aplicadas a la pyme, Edición Especial,
(noviembre, 2021), 443-457. https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
444 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
ABSTRACT
According to World Health Organization, breast cancer is the most prevailing cancer
among women which claims thousands of lives each year. Mammogram imaging modality
is the popular traditional diagnosing tool used for breast cancer screening. However, one
in 5 breast cancers have been missed in this screening as these machines are incapable of
detecting it in early stage. Hence emerging thermography procedure is also suggested for
clinical records. It produces the skin surface temperature as a thermal pattern imaging. The
aim of this work is to detect breast cancer using thermographic images. Thermal images
available in the DMR database have been employed for this analysis. The color conversion
using YcRcB color model is carried out to extract the features from raw image. Gray tone
images are obtained using thresholding. Sobel edge detection algorithm is used to segment
normal and abnormal images. The image preprocessing and thresholding are done in
MATLAB and segmentation algorithm is implemented in SPARTAN-3 Tyro plus FPGA
kit using EDK. This developed system may help the doctors to give a second opinion.
KEYWORDS
Breast cancer, Thermal Images, FPGA, Segmentation.
445 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
1. INTRODUCTION
Breast cancer in women is the second most occurring cancer because of abnormal growth of
normal cells. International Agency for Research on Cancer (IARC) says that approximately
one among eight ladies is plagued by cancer in life time and over 4,00,000 women are
suering from cancer and is increasing as a result of detecting cancer in its advanced
(American Cancer Society, 2014). It justies the need of research for early diagnosis to
reduce mortality rate, avoid of surgical and increases survival rate. Manual diagnosis is
tedious and time-consuming process (Kukar, 2003). And also, it possesses high degree of
intra and inter observer variation (Eddy, 1990; Lilford et al., 1998). There is a need of
computer aided diagnosis system with expert intelligence which will assist the physicians to
eliminate the diculties in diagnosis (Rodrigues et al., 2014; Übeyli & Güler, 2005a). Several
techniques are developed for automated diagnostic systems to attempt to solve this problem.
Such techniques work for transforming qualitative diagnostic criteria into a more objective
quantitative feature classication problem (Kordylewski, Graupe, & Liu, 2001; Kwak &
Choi, 2002; Übeyli & Güler, 2005b).
Mammography is widely used in clinical applications and mass screening due to its
inexpensiveness, less time consumption and low complexity but fails to detect abnormality
at an early stage because mammogram looks at structural or anatomical parts of the body.
To overcome this disadvantage, diagnosis is done based on metabolic activity, the blood
ow and the temperature on the surface of the skin. A special heat sensing camera is used to
measure and map heat on the surface of breast. The skin temperature reects abnormality
in the tissue such as the presence of a tumor which is used as indicators of a disease.
Breast Thermography is widely used to diagnose the breast cancer. It is a relatively new
screening technique based on temperature sensing. Breast thermography as a diagnostic
tool for tumor detection is based on the fact that cancerous and precancerous tissues have
high metabolic rate. As a consequence, the temperature of that area is higher compared to
normal breast tissues temperature, thus tumors that are small in size can be well identied
using thermography. This technique is entirely non-invasive, fast and painless as it requires
no contact between the patient and instrumentation (Milosevic, Jankovic, & Peulic, 2014).
446 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
Infrared thermography has been proven to be a promising technique on early diagnosis of
breast pathologies (Ankit & Mandal, 2015). Field Programmable Gate Arrays (FPGA) is a
high-speed reprogrammable processor that can store several pieces of software to do dierent
tasks and entirely change its hardware in a matter of milliseconds. The re-programmability
of FPGAs allows them to be used to implement any architecture. “Spartan 3E Tyro Plus”
is a FPGA board produced by Xilinx (XILINX, n.d.). Many works are done for Breast
Cancer Diagnosis (Li et al., 2011; Niwas et al., 2013). The skin tone segmentation and
classication are performed and implemented in FPGA (Niwas et al., 2013). The K means
clustering is used for color-based segmentation of hot region for breast cancer detection
using thermograph (Gayathri, Madhavi, & Bobby, 2015; Hankare et al., 2016; Nausheen et
al., 2018). In this work, Edge based segmentation with preprocessing techniques are done
using FPGA implementation.
2. MATERIALS AND METHODS
The methodology used for FPGA implementation of breast cancer detection using thermal
images is shown in Figure 1. The breast cancer images are obtained from the Database
Mastology Research (DMR) database. The Color conversion is done using the color
models like HSV, YIQ and YcRcB in MATLAB and the best model with high accuracy
is selected. The segmentation is done initially by thresholding using the histogram and
further segmentation is done using the Sobel edge detection algorithm. The thresholding
using histogram is implemented in MATLAB. The Sobel edge detection algorithms are
implemented in FPGA.
Figure 1. Flow diagram of breast cancer detection using thermal medical images.
Source: own elaboration.
447 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
2.1. DMR DATABASE
DMR is an online platform that stores and manages mastological images for early detection
of breast cancer. The database consists of 258 records of thermal images shot by thermal
camera taken from dierent patients.
2.2. COLOUR CONVERSION AND THRESHOLDING
The color analysis is mainly done to separate Red, Green and Blue colors from the base
image and then color models like HSV, ycRcB, etc. are carried out to extract the features
and for further study and analysis of the image. The image is obtained from the database
and the color conversion and color models are applied on it.
The ycRcB color model is used for the color conversion, since the base image is mainly
composed of green, yellow, red and orange. An ecient output of feature is obtained from
the color model where cR – Red chroma, cB – Blue chroma, Y – Luminance. In this,
Luminance mainly represents the Gray scale Information, Red chroma and Blue chroma
components carry color information.
(1)
(2)
(3)
Thresholding is mainly done to separate the obtained feature based on the black scale and
white scale separation. Based on the contrast in the grayscale region (ie), gray scale (white)
and high gray scale (black), the extraction is done. The equation 4 represents the formula
for the histogram-based thresholding.
(4)
The image pre-processing like color conversion and thresholding-based segmentation are
done in MATLAB.
448 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
2.3. EDGE DETECTION ALGORITHM
The Sobel Edge detection algorithm is used for the segmentation. Since edges occur at
image locations to represent object boundaries, edge detection is extensively used in image
segmentation. Representing an image by its edges has the further advantage that the amount
of data is reduced signicantly while retaining most of the image information. Since edges
consist of mainly high frequencies, the edges can be detected by convolving the image with
an appropriate kernel in the spatial domain.
3. HARDWARE IMPLEMENTATION
The block diagram for hardware implementation is shown Figure 2. The image is resized
and a processor is created in FPGA using EDK to implement the image processing
segmentation algorithm.
Figure 2. Block diagram for Hardware Implementation.
Source: own elaboration.
Initially the image is converted into 256 × 256 matrix and further it is converted into text
le. This le is used in the coding for the execution. Figure 3 shows the architecture for the
implementation of Sobel algorithm in FPGA. The equation 5 and 6 is used to obtain the
Gradient Gx and Gy and equation7 is used to obtain the edge. The edge is calculated from
the absolute values of the gradients.
(5)
(6)
(7)
449 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
Figure 3. Architecture for Sobel Algorithm.
Source: own elaboration.
4. RESULTS
The database consists of both cancerous and non-cancerous images. The images are
subjected to pre-processing and thresholding to extract features. Classications are carried
out in the XILINX PLATFORM STUDIO in FPGA SPARTAN-3 TYRO PLUS using
EDK. For giving the input, the images pixels are converted to 1D and stored in the SRAM.
The proposed method is implemented using VHDL code by the structural modeling system.
ISIM simulator tool in the XILINX project navigator 14.6 is used for simulation and the
hardware implementation is done in FPGA using EDK in XILINX 10.1
4.1. SIMULATION RESULTS
Figure 4 shows the raw thermal image samples that are taken from the DMR image
database. Sample 1 is normal image, sample 2 is cancer aected images. Figure 5 and 6
shows the color conversion of the base image taken from the database. The Luminance,
Red chroma and Blue chroma is obtained separately.
450 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
Figure 4. Raw Thermal image sample taken from DMR database.
Source: own elaboration.
4.2. SEGMENTATION
a) Thresholding:
The thresholding is done on the y component of the ycRcB image. Histogram is a graphical
representation of pixels of image based on gray scale separation. The pixels of y component
image are mapped in graph based on intensity. A mean value is taken to separate the low
gray scale and high gray scale. The vertical lines in the graph represent the pixel values
mapping based on intensity. The higher peaks represent the places where the intensity is
very high and smaller peaks represents where the intensity of pixel is less. The low gray
scale separation, high gray separation and pixel separation graph of dierent images are
shown in Figure 7 and 8.
Y component
B component
R component
Figure 5. Flow YcRcB (Sample 1).
Source: own elaboration.
Y component
B component
R component
Figure 6. YcRcB (Sample 2).
Source: own elaboration.
451 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
Low GrayScale High GrayScale Pixel Separation Graph
Figure 7. Thresholding (Sample 1).
Source: own elaboration.
Low GrayScale High GrayScale Pixel Separation Graph
Figure 8. Flow Thresholding (Sample 2).
Source: own elaboration.
b) Edge Detection Algorithm Result in Verilog:
The 256×256 image pixel values are initially stored as 8 bit data in an SRAM. Each 8
bit number represents each pixel value of the 256x256 image. Figure 9 shows the output
waveform of pixel storage in SRAM. After pixels stored in the SRAM, the Sobel edge
detection algorithm is executed.
452 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
Figure 9. Output waveform of pixel storage in SRAM.
Source: own elaboration.
c) Hardware Implementation Results:
The Hardware implementation includes the implementation of Sobel edge detection
algorithm in Spartan-3 Tyro plus FPGA board. The output is seen in a separate virtual image
processing window. Figure 10 shows the overall setup for the hardware implementation of
edge detection algorithm using FPGA.
Figure 10. Output Hardware Implementation Setup.
Source: own elaboration.
453 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
d) Results for Sobel Edge Detection Algorithm (Hardware Implementation):
Figure 11 shows the overall output for the Sobel Edge Detection algorithm implemented
in FPGA using EDK. Table 1 shows the time constrain for debugging, processor clock
frequency and memory constrain for Sobel Edge Detection algorithm.
Table 1. Timing Constraint for Sobel Edge Detection Algorithm (Sample 2).
Post Synthesis Clock Limits
MODULE CLOCK PORT MAX FREQUENCY
debug_module debug_module/update 72.495 MHz
debug_module SPLB_Clk 72.495 MHz
debug_module debug_module/drck_i 72.495 MHz
microblaze_0 DCACHE_FSL_OUT_CLK 81.820 MHz
microblaze_0 DBG_CLK 81.820 MHz
microblaze_0 DBG_UPDATE 81.820 MHz
SRAM_256x32 MCH_PLB_CLK 83.549 MHz
Source: own elaboration.
Figure 11. Output for Sobel Edge Detection Algorithm (Sample 2).
Source: own elaboration.
454 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
5. CONCLUSIONS
In this work, the clinical decision support system to assist the doctor for diagnosis of
breast cancer using thermal image is done. The proposed work has presented the VLSI
architecture-based segmentation. In the proposed method, pre-processing has been done
by using MATLAB, since the cancer region of the image cannot be easily identied without
preprocessing. The Sobel edge detection algorithm is implemented in FPGA using Xilinx
Platform Studio in EDK. The timing constraint shows that the Sobel Edge Detection
algorithm is more ecient and less time consuming. Image morphing process is to be used
to segment the cancer region accurately. The proposed network architecture is modular,
compact and ecient and hence it classies the patients having breast cancer either benign
or malignant based on the segmentation using Sobel edge detection algorithm. The outputs
obtained are veried with doctors and the obtained outputs are 95% accurate.
ACKNOWLEDGMENT
Authors would like to thank their respective management for providing the facilities to
carry out this work.
REFERENCES
American Cancer Society. (2014). Cancer Facts & Figures 2014. https://www.cancer.org/
research/cancer-facts-statistics/all-cancer-facts-gures/cancer-facts-gures-2014.
html
Ankit, A., & Mandal, M. (2015). Novel hybrid hardware architecture for nuclei detection
in skin histopathological images. IEEE International Conference on Signal Processing,
Informatics, Communication and Energy Systems (SPICES), 1-6. https://doi.org/10.1109/
SPICES.2015.7091536
Eddy, D. M. (1990). The challenges in Thermal images. Journal of American Medical
Association, 263, 287–290.
Gayathri, R., Madhavi, V., & Bobby, C. (2015). FPGA Based Diagnosis and Classication
of Breast Disease using Thermographic Images. International Journal of scientic research
455 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
and management (IJSRM), 3(6), 3139-3142. https://www.ijsrm.in/index.php/ijsrm/
article/view/1100
Hankare, P., Shah, K., Nair, D., & Nair, D. (2016). Breast cancer detection using
thermography. International Research Journal of Engineering and Technology (IRJET), 3(4),
2395-2356. https://www.irjet.net/archives/V3/i4/IRJET-V3I4211.pdf
Kordylewski, H., Graupe, D., & Liu, K. (2001). A novel large-memory neural network
as an aid in medical diagnosis applications. IEEE Transactions on Information Technology
in Biomedicine, 5(3), 202– 209. https://ieeexplore.ieee.org/document/945291
Kukar, M. (2003). Transductive reliability estimation in medical diagnosis. Articial Intelligence
in Medicine, 29(1-2), 81–106. https://doi.org/10.1016/S0933-3657(03)00043-5
Kwak, N., & Choi, C.-H. (2002). Input feature selection for classication problems.
IEEE Transactions on Neural Networks, 13(1), 143–159. https://ieeexplore.ieee.org/
document/977291
Li, C., Huang, R., Ding, Z., Gatenby, J. C., Metaxas, D. N., & Gore, J. C. (2011).
A Level Set Method for Image Segmentation in the Presence of Intensity In
homogeneities with application to MRI. IEEE Transactions on Image Processing, 20(7),
2007-2016. https://ieeexplore.ieee.org/document/5754584
Lilford, R. J., Pauker, S. G., Braunholtz, D. A., & Chard, J. (1998). Decision analysis
and the implementation of research ndings. BMJ, 317(7155), 405-409. https://doi.
org/10.1136/bmj.317.7155.405
Milosevic, M., Jankovic, D., & Peulic, A. (2014). Thermography based breast cancer
detection using texture features and minimum variance quantization. EXCLI Journal,
13(1), 1204-1215. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4464488/
Nausheen, N., Seal, A., Khanna, P., & Halder, S. (2018). A FPGA based implementation
of Sobel edge detection. Microprocessors & Microsystem, 56(1), 84-91. https://doi.
org/10.1016/j.micpro.2017.10.011
456 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021
Niwas, S. I., Palanisamy, P., Sujathan, K., & Bengtsson, E. (2013). Analysis of nuclei
textures of ne needle aspirated cytology images for breast cancer diagnosis using
Complex Daubechies wavelets. Signal Processing, 93(10), 2828-2837. https://doi.
org/10.1016/j.sigpro.2012.06.029
Rodrigues, É. O., Conci, A., Borchartt, T. B., Paiva, A. C., Silva, A. C., & MacHenry,
T. (2014). Comparing results of thermographic images based diagnosis for breast
diseases. In IEEE 21st International conference on Systems, Signals and Image Processing
(IWSSIP) Proceedings, 39-42. https://ieeexplore.ieee.org/document/6837625
Übeyli, E. D., & Güler, İ. (2005a). Improving medical diagnostic accuracy of ultrasound
Doppler signals by combining neural network models. Computers in biology and medicine,
35(6), 533-554. https://doi.org/10.1016/j.compbiomed.2004.03.006
Übeyli, E. D., & Güler, İ. (2005b). Feature extraction from Doppler ultrasound signals
for automated diagnostic systems. Computers in Biology and Medicine, 35(9), 735-764.
https://doi.org/10.1016/j.compbiomed.2004.06.006
XILINX. (n.d.). Spartan 3E starter kit. http://www.xilinx.com/products/boards-and-kits/
hwspar3e-sk-us-g.html
457 https://doi.org/10.17993/3ctecno.2021.specialissue8.443-457
3C Tecnología. Glosas de innovación aplicadas a la pyme. ISSN: 2254 – 4143 Edición Especial Special Issue
Noviembre 2021