SciELO - Scientific Electronic Library Online

 
vol.24 issue2Beyond Desorption Testing on Coal Bed Methane Exploration (CBM). Colombia CaseEnergy consumption during surface texturing of AISI 1080 and AISI 52100 steels using CNC machining author indexsubject indexarticles search
Home Pagealphabetic serial listing  

Services on Demand

Journal

Article

Indicators

Related links

  • On index processCited by Google
  • Have no similar articlesSimilars in SciELO
  • On index processSimilars in Google

Share


Ingeniería y competitividad

Print version ISSN 0123-3033On-line version ISSN 2027-8284

Ing. compet. vol.24 no.2 Cali July/Dec. 2022  Epub May 26, 2022

https://doi.org/10.25100/iyc.v24i2.11352 

Artículo

An approach to edge detection in medical imaging through histogram analysis and morphological gradient

Una aproximación a la detección de bordes en imágenes médicas mediante análisis de histograma y gradiente morfológico

Carlos V. Niño-Rondón1 
http://orcid.org/0000-0002-3781-4564

Diego A. Castellano-Carvajal1 
http://orcid.org/0000-0002-4530-1136

Sergio A. Castro-Casadiego1 
http://orcid.org/0000-0003-0962-9916

Byron Medina-Delgado1 
http://orcid.org/0000-0003-0754-8629

Dinael Guevara-Ibarra1 
http://orcid.org/0000-0003-3007-8354

1 Universidad Francisco de Paula Santander, Facultad de Ingeniería, Programa Académico de Ingeniería Electrónica, San José de Cúcuta, Colombia. Correo electrónico: §carlosvicentenr@ufps.edu.co, diegoandrescc@ufps.edu.co, sergio.castroc@ufps.edu.co, byronmedina@ufps.edu.co, dinaelgi@ufps.edu.co


Abstract

Edge detection takes importance in image processing systems for computer-aided diagnosis, where sharp changes in pixel intensity are analyzed to obtain fast and accurate information about regions of interest to the specialist. A method for feature enhancement and edge detection in medical images was developed using image processing by analyzing the pixel distribution histogram and morphological gradient operation. Images from the MINI MIAS dataset and the COVID-CT dataset were used. The method is based on image processing and is applied to mammography and chest CT images, where blur filtering steps are accompanied by morphological gradient filtering, in addition to obtaining the threshold for edge detection by analyzing the point of maximum pixel concentration according to the distribution histogram. The processing is presented in a graphical user interface developed in Python language. The method is validated by comparison with other edge detection techniques such as the Canny Algorithm, and with deep learning methods such as Holistically-Nested Edge Detection. The proposed method improves image quality in both mammograms and CT scans compared to other techniques. It also presents the best performance considering internal and external edge detection, as well as an average response time of 1.054 seconds and 2.63 % of Central Processing Unit requirement. The developed system is presented as a support tool for use in computer-aided diagnosis processes due to its high efficiency in edge detection.

Keywords: computer aided diagnosis; computerized tomography; edge detection; Image processing; mammography

Resumen

La detección de bordes toma importancia en los sistemas de procesamiento de imágenes para el diagnóstico asistido por ordenador, donde se analizan los cambios bruscos en la intensidad de los píxeles para obtener información rápida y precisa sobre las regiones de interés para el especialista. Se desarrolló un método para el realce de caracteristicas y detección de bordes en imágenes médicas utilizando procesamiento de imágenes analizando el histograma de distribución de píxeles y la operación de gradiente morfológico. Se utilizaron imágenes del conjunto de datos MINI MIAS y del conjunto de datos COVID-CT. El método se basa en procesamiento de imágenes y se aplica a las imágenes de mamografía y TAC de tórax, donde los pasos de filtrado de desenfoque se acompañan de filtrado de gradiente morfológico, además de obtener el umbral para detectar el borde mediante el análisis del punto de máxima concentración de píxeles según el histograma de distribución. El procesamiento se presenta en una interfaz gráfica de usuario desarrollada en lenguaje Python. El método se valida mediante la comparación con otras técnicas de detección de bordes como el Algoritmo Canny, y con métodos de aprendizaje profundo como el Holistically-Nested Edge Detection. El método propuesto mejora la calidad de la imagen tanto en mamografías como en TAC en comparación con otras técnicas. También presenta el mejor rendimiento teniendo en cuenta la detección de bordes internos y externos, así como un tiempo medio de respuesta de 1.054 segundos y 2.63 % de requerimiento de la Unidad Central de Procesamiento. El sistema desarrollado se presenta como una herramienta de apoyo para su uso en procesos de diagnóstico asistido por ordenador debido a su alta eficiencia en la detección de bordes.

Palabras clave: detección de bordes; diagnóstico asistido por computador; mamografía; procesamiento de imágenes; tomografía computarizada

1. Introduction

Computer-aided diagnostics (CAD) refers to the set of processes that support medical specialists in the interpretation of visual content related to patient examinations 1,2. A CAD system is based on image preprocessing, segmentation and structuring for subsequent classification and evaluation 3. In the preprocessing and segmentation stages, imperfections are corrected and structures of interest are searched for and analyzed individually as regions 4, which are inspected in the structuring stage according to size, shape, conformation, etc. CAD processes are developed using software based on algorithms that allow their application on digitized images, which usually correspond to ultrasounds, radiographs, CT scans and mammograms 5,6. Its purpose lies in the detection and identification of suspicious regions, which in some cases is represented as smaller information in the image and may appear as elusive to the human eye 7.

Specific medical areas of application for computer-aided diagnosis include the analysis of mammograms and Chest CT scans. Mammograms are images captured by X-rays applied to the initial search for distinctive features and signs of breast cancer and are generally the first tool available to specialists for the detection of breast cancer or associated diseases 8. Mammograms can be classified as screening, applied to detect alterations in women who have no signs or symptoms of abnormalities or diagnostic focused on the analysis of suspicious changes in the breasts, or findings in screening mammograms. On the other hand, Chest CT scans use computer processing to generate cross-sectional slices of the organ from different angles 9,10. With these, signs of inflammation, injury or disease in the lungs are detected and performed by radiology professionals 11. The quality of the images and the diagnosis generated by the specialist when analyzing mammograms and Chest CT scans become relevant 12, if we take into account that lung cancer and breast cancer were two of the five leading causes of death in the world with 1.8 and 0.685 million deaths, according to figures from the World Health Organization 13.

In image processing systems, edge detection is one of the stages of greatest interest and is performed by analyzing abrupt changes in pixel intensity 14. In medical imaging and for computer-aided diagnosis, the denotation of regions of interest is required, so that only those sectors of the image related to the object of study, such as breasts and lungs, for mammograms and Chest CT scans, are taken into account to start processing 15. As for the internal study, the detection and analysis of breast borders allow the identification of dense breast tissues with particular shapes and borders different from the rest of the tissue. On the other hand, for Chest CT analysis, the size, borders and solid component are some of the characteristics that are taken into account when defining whether a nodule is benign or malignant 16.

In their study, Dhruv et al 17 review the edge detection techniques most commonly used in the medical field, emphasizing the operators based on Roberts, Sobel, Prewitt and Canny, where they highlight for the latter algorithm the use of the Gaussian filter as a method of image defocusing, to subsequently obtain the magnitude and orientation of the gradient of the image. Likewise, Devkota et al 18 developed a method for the detection of early-stage tumors using mathematical morphology reconstruction, where they initially subject the image to preprocessing accompanied by median filtering, and where the morphological operation used is erosion to complement initial segmentation stages. In addition, Manikandan et al 19. show in their study the implementation of a bilateral filter and edge detector based on the Canny algorithm for telemedicine applications. The bilateral filter was used as an edge-preserving alternative to the Gaussian filter since the latter is applied uniformly to the image. In addition, the authors indicate as 5 the maximum kernel size, followed by the application of convolution masks to determine the gradient of the image. Conventionally developed methods and systems for image processing are based on pre-trained algorithms (such as the Canny algorithm, one of the most widely used in the literature), which, like methods based on machine learning and deep learning, require more hardware resources for real-time implementation.

This work presents and develops a method for edge detection in medical images, applicable to computer-aided diagnosis processes using a personal computer with a Core-i7 processor and 4GB of RAM. The method consists of the analysis of pixel distribution histograms accompanied by the morphological gradient operation and is applied to mammography and chest CT images, in the framework of an image processing-based system. The developed method is validated by comparison with other thresholding techniques, as well as with specialized edge detection algorithms such as the Canny algorithm, and with deep learning techniques based on neural networks such as the Holistically-Nested Edge Detection (HED) algorithm. The image processing steps are visualized through a graphical user interface that, together with the processing, were developed in Python programming language. The developed processing system plans to contribute to improvements in the features of medical mammography and CT images through a first approximation of edges and contours, and to reduce the computational requirements for large-scale implementation with respect to specialized edge and contour detection methods. The developed study is presented as the initial stage of a computer-aided diagnostic processing system, that preserves and improves image characteristics and initially approaches image edge detection.

2. Methodology

Figure 1 summarizes the methodology proposed for the research development. In the first stage, the medical images to be used are selected and preprocessing stages are applied by conversion to grayscale and Gaussian smoothing filtering. In the second stage, the gradient morphological filter is used for edge detection by implementing morphological operations accompanied by a structural element. Likewise, in the third stage, pixel distribution histograms are obtained, emphasizing the histogram peaks and defining a threshold variation. Finally, in the fourth stage, the developed method is validated for its implementation in a CAD system by comparing it with algorithms for edge detection. For the implementation of the processing system, a graphical user interface is developed.

Source: own elaboration

Figure 1 Methodology developed.  

2.1. Medical images selection and preprocessing

The images used for testing the edge detection method in medical images by histogram and morphological gradient analysis are from two of the most common medical examinations, mammograms and Chest CT scans 20.

For the mammograms, images from the MINI-MIAS Dataset, a database of the Mammographic Image Analysis Society MIAS were used 21. The dataset contains 322 images and was originally presented with a pixel border of 50 microns, but a modification to the dataset was used that increases the pixel border from 50 to 200 microns. Also, the images are padded so that the image size is 1024 x 1024 pixels. The format of the images is Portable Gray Map (PGM), a special format with image data in the form of grayscale maps 22. Additionally, the dataset contains information about the character of the background tissue, classifying them as fatty, fatty-glandular and dense-glandular, as well as information regarding the type of abnormality such as calcification, well-defined or circumscribed masses, spiculated, ill-defined, architectural distortion, asymmetry or normality.

As for Chest CT scans, we used images belonging to the COVID-CT Dataset 23, a database supported in open source and developed in 2020, as a research strategy in the framework of the COVID-19 pandemic, which, for detection and classification processes, achieved hits of approximately 90 %. The dataset consists of images from 216 patients, with 349 images of COVID-19 positives, and 463 corresponding to NON-COVID, classified manually by visual inspection of the CT images. The images in the dataset present height dimensions from 153 to 1853 pixels, with a mean of 491, while the width dimensions are between 124 and 1485 pixels, with a mean of 383. Additionally, some images in the dataset contain information related to the age and sex of the patients, which is not a parameter of importance when talking specifically about image processing. The images are in Portable Network Graphics (PNG) format. In general terms, the datasets used for both mammography and CT Scan studies are presented as the easiest to use and acquire, since they present labeled, recent data and with files of lower weight than some of the datasets available in Kaggle, medical centers, university centers, among others.

Preprocessing is applied to reduce redundancies in images and facilitate processing 24. The preprocessing stages contribute to the reduction of the amount of intensity variations between nearby pixels, as well as the elimination of those pixels whose intensity is considerably different from that of their neighbors. Among the most important stages of preprocessing are the grayscale conversion and the application of a Gaussian blur filter 25. For the conversion to grayscale, it is necessary to analyze the format in which the images to be processed are found, since for formats such as PGM for mammograms, the image delivered in the dataset is in grayscale, so a grayscale conversion stage is not necessary, while for Chest CT images, which are in PNG format, an initial conversion to grayscale is required. The conversion is performed as shown in Eq.1, where R, G, and B refer to the red, green, and blue color channels, respectively. The second preprocessing stage corresponds to Gaussian blur filtering, in which low-frequency components are added to a previous grayscale image, generating a blurring or smoothing effect to the image. In this case, a Gaussian filter with a mask of size 5x5 is applied. The filter size was defined according to the literature, whereby means of weightings to determine the effect of the kernel size in different applications, it was indicated that good results are obtained with 3x3 kernel, but that in some cases the performance increases when applying filters with 5x5 size. The Gaussian filter with these kernel size values improves the performance behavior of the processes, for example with respect to the Wiener filter, which requires larger kernel sizes to make adaptive changes in the smoothing according to the variance of the pixels 26. Additionally, although the Gaussian smoothing filter is applied uniformly to the image, it manages to blur all sections of the image, while edge-preserving smoothing filters such as anisotropic diffusion filters, besides being iterative (which triggers processing delays), perform adequately only at noise levels that do not exceed 3 % of the image intensity levels 27. Eq.2 presents the mathematical basis of the applied Gaussian filter, where sigma represents the standard deviation, and X,Y represents the size of the mask with a midpoint at coordinates X=0 and Y=0.

Y=0.299*R+0.587*G+0.114*B (1)

Gx, y=12πσ2ex2+y22σ2 (2)

2.2. Morphological gradient for edge detection

Morphological operations are a set of image processing techniques that alter images with shape-based structures. The operation is based on applying a structural element to an input image, generating an output image of the same size by a pixel-to-pixel comparison of the input image with its neighbors 28. The two main morphological operations are dilation and erosion. With dilation, objects are more visible and some object spaces are filled, while with erosion, small objects are removed so that only relevant objects intervene in the image 29. For the specific case of medical image processing, it would not be convenient to apply filtering that fills small image spaces or, failing that, eliminates objects of minimum size, since it would alter the original characteristics of the study. For this reason, we propose the use of the morphological operation of gradient, a modification and combination of the operations of dilation and erosion 30.

The morphological gradient corresponds to the subtraction between dilation and erosion operations and generates an image in which the values of each pixel indicate the contrast intensity with respect to its neighbors. The morphological gradient is useful in edge detection and segmentation processes since the output image refers to the contour or silhouette of the image 31. The structural element used is of rectangular type with a matrix of size 3x3 (the nine positions of the matrix will take a value of 1). The morphological gradient operation is represented mathematically in Eq.3.

G=AB-AB=bBAb-bBA-b (3)

2.3. Obtaining and analyzing distribution histograms

In digitized images, a histogram refers to a graph containing information corresponding to the distribution of the number of pixels according to the gray level. In typical grayscale images, a histogram presents 256 values, ranging from 0 to 255 32. From the histogram of an image, it is possible to modify characteristics such as brightness and contrast, but it does not provide information on the origin of the pixels, i.e., it does not present information on the spatial relationship of the image. The method is based on tracking the point of highest pixel concentration when inspecting the distribution histogram. With this, a threshold value is obtained that functions as an approximation of the image contours, so that those pixels with concentration values that equal or exceed the threshold value are considered as the image contour 33. Also, a variation of up to ±10% of the threshold value obtained by inspecting the histogram is proposed, so that a larger number of image pixels are taken into consideration. This is because, both in mammograms and in Chest CT scans, different sectors of the image may present similar behaviors in the distribution of pixel concentration along with the digitized image.

2.4. Validation for CAD

For the validation of the proposed method for edge detection based on histogram analysis and inspection and morphological gradient operation, 70 random images from MINI MIAS Dataset, without discrimination of tissue characteristics, class and severity of the anomaly, and 70 random images from COVID-CT Dataset, without discriminating whether the images correspond to COVID-19 positive or negative patients, are used. The 70 images used correspond to images with variable shapes and information to test in all possible states the system based on image processing. Since it is not a system based on computational learning (machine learning or deep learning), it does not initially require a large number of images. Also, the performance in edge detection is compared with respect to other thresholding methods such as mean thresholding, and Gaussian thresholding. The comparison is performed considering thresholding methods since it is at this stage where the separation of classes in the image (border, image interior, image background) is achieved and it is one of these classes that is of interest for the processing. In addition, the comparison is made with respect to the method based on the Canny algorithm, specialized for edge detection, and with respect to Holistically-Nested Edge Detection, a method used for edge detection based on deep learning. Edge detection validation is performed by visual inspection of both the inner and outer contours of the image. Likewise, the response time of the proposed method and of the methods with which it is compared is calculated, taking into account that the developed tool is presented as a support in the processes of computer-assisted diagnosis, in which both efficiency and speed in the processing are required 34.

2.4.1. Graphical user interface

The graphical interface is developed in the Python programming language in the Thonny development environment. The tool is developed based on analysis, design, development, implementation and testing stages, according to ISA-101.01-2015 and IEC/TR 62366 standards, which establish the conditions for interfaces in automation and their application orientation in medical device engineering, respectively 35. In the analysis stage, the requirements are identified, as well as the applicability of the interface, where it is mainly required that the interface shows in a step-by-step manner the image processing stages of both mammography and computed tomography. In the design stage, the spaces in which the information can be entered into the system are taken into consideration. In addition to the title and presentation, the interface has 12 buttons, so that one button is used to load the image into the system and 5 buttons are used to execute each of the processing sections (grayscale conversion, smoothing filtering, gradient morphological filtering, distribution histogram and output image). There are also 3 buttons corresponding to help information, credits and closing the interface. Also, the application has 3 form-like spaces, in which the size of the masks for the smoothing filtering, as well as the size and shape of the structural element for the gradient morphological operation are entered manually. The manually entered information is uploaded to the system by pressing each of the 3 other buttons, respectively. The development and implementation correspond to coding in programming language applying mainly the Tkinter tool, and the tests were performed with images from both MINI-MIAS Dataset and COVID-CT dataset.

3. Results

Initial processing is performed on the medical images with respect to grayscale conversions and Gaussian blur filtering, as shown in Figure 2.

Source: own elaboration

Figure 2. Mammography and Chest CT Scan images preprocessing. Source: MINI-MIAS and COVID-CT Datasets and authors. (A) mammography, (B) CT scans.  

The first two rows present the images from the MINI MIAS dataset of mammograms with the Gaussian blur filtering process respectively, while the last two rows present the images from the COVID-CT dataset of chest computed tomography with the Gaussian blur filtering. As mentioned, for the image format the mammograms did not require grayscale conversion, while for the CT scans grayscale conversion was applied before the Gaussian filtering process.

As shown in Figure 3, the gradient morphological filter is applied, and the frequency distribution histogram of the mammography images is obtained and the image with demarcated contours is presented. The threshold value for edge demarcation is obtained from the image histogram. As illustrated, the mean threshold value for mammography images is at approximately T=150, with variable values between T=135 and T=165.

Source: own elaboration

Figure 3. Processing of mammography images by morphological gradient and pixel concentration histogram analysis.  

In the distribution histogram more than one peak is represented (referring to high pixel concentration values), where recurrently, in the analyzed images of the MINI MIAS Dataset, the first peak was found with a tendency to the value 0, while the second peak was found in a medium value of the scale between 0 and 255, with varying pixel concentration values according to the characteristics of each image. MINI MIAS Dataset, being a modification to MIAS dataset with image filling for 1024 x 1024-pixel size, presents a variation when obtaining the distribution histogram, since it takes into consideration the dark sections of the image used as filler, so, to obtain the histogram, only the section of the image referring to the breast was used.

In addition, a morphological gradient filtering process is applied to the Chest CT scans and the concentration histogram is obtained. This is presented in Figure 4. These images show a tendency towards a white hue in the pixels, since the pronounced and relevant peaks were found in the pixels close to 255. Unlike the MINI MIAS Dataset images, the COVID-CT Dataset images do not present any significant filling, so they do not require special treatment to obtain the pixel concentration histogram. In general terms, CT images presented characteristics that generate the threshold value to be in a wider range and not uniform as in the case of mammograms. For CT, the first representative peak is selected and is found between T=50 and T=70, since the peaks found in the sections with T>200 tend to present the background of the image.

Source: own elaboration

Figure 4 Processing of Chest CT Scan images by morphological gradient and pixel concentration histogram analysis.  

Finally, Figure 5 presents a comparison at the image quality and detection level between the proposed method and other thresholding techniques, such as mean thresholding and Gaussian thresholding, as well as the Canny algorithm and the HED algorithm for mammography and CT images and are shown respectively from top to bottom.

Source: own elaboration

Figure 5 Comparison of edge detection techniques. [1-3] mammography and [4-6] CT scans. (A) Proposed method, (B) mean thresholding, (C) Gaussian thresholding, (D) Canny algorithm, (E) HED algorithm.  

The images obtained by applying the mean and Gaussian thresholding techniques generate effects in the image in sections of no interest and demarcate almost the entire image as a region of interest. Under the same behavior, applying the Canny algorithm also generated sections of no interest as if they were regions of interest, and in the case of the mammograms, the identification of the external border was not completed, while in the CT scans the external borders were identified, but redundancy was generated in the internal contours. In addition, the HED algorithm-generated redundancy in the internal contours in mammograms, while in CT scans it improved its performance in terms of external contours. In general, the proposed method improved image features, identified regions of interest and mitigated redundancy effects in both mammograms and CT scans.

In addition, Table 1 shows the comparison of the techniques with respect to response time and CPU requirements, considering that computer-aided diagnosis processes are generated under a processing system. The values used for comparison were chosen randomly from the sample of images used from each dataset. The proposed method presents the third-best average response time with 1.054 seconds, surpassed by the mean thresholding and Gaussian thresholding method by 0.034 seconds and 0.014 seconds. Also, the proposed method is 1.7 and 4.9 times faster than the Canny algorithm and the HED algorithm. In addition, the proposed method is the one that showed the lowest CPU requirement, with an average requirement of 2.54 %, improving to the mean thresholding method and the Gaussian thresholding that required 2.63 % and 2.64 % of the CPU. In addition, the developed method required 1.22 and 3.36 times less of the central processing unit with respect to the Canny algorithm and the HED algorithm respectively.

Figure 6 shows the graphical interface developed. Box 1 shows the title and presentation of the interface. Box 2 shows the button for image loading and visualization. Box 3 shows the buttons for activating the processing steps, while Box 4 shows the spaces for loading the sizes and shapes of the masks for the filters and structural elements. Similarly, box 5 shows the visualization of the processing steps, while box 6 illustrates the help button with information for the use of the graphical user interface.

Source: own elaboration

Figure 6 Graphical User Interface developed.  

Table 1 Comparison between the proposed method and other techniques of edge detection for CAD 

Response time (s) Requirements of CPU (%)
# Propose Mean Gaussian Canny HED Propose Mean Gaussian Canny HED
1 0.98 0.99 0.96 1.65 5.5 2.50 2.55 2.65 3.12 8.65
2 0.99 1.01 0.99 1.85 5.4 2.43 2.54 2.63 3.25 8.43
3 1.1 1.03 1.1 1.45 5.34 2.67 2.57 2.47 2.99 8.39
4 1.5 0.98 0.99 1.73 5.21 2.38 2.43 2.63 3.05 8.53
5 1.6 1.01 1.05 1.68 4.99 2.46 2.75 2.87 2.98 8.76
6 1.04 0.96 0.95 1.69 4.98 2.50 2.71 2.69 3.12 8.54
7 1.01 0.94 0.93 1.87 5.1 2.67 2.65 2.64 3.06 8.51
8 0.94 0.99 1.1 1.98 5.2 2.47 2.54 2.53 3.17 8.49
9 0.96 1.05 1.3 1.83 4.98 2.53 2.63 2.76 3.22 8.63
10 0.95 1.03 0.93 1.77 4.99 2.45 2.48 2.65 3.27 8.45
11 0.96 1.1 0.99 1.54 5.05 2.68 2.67 2.51 3.12 8.53
12 0.99 0.97 1.103 1.93 5.1 2.75 2.69 2.57 3.21 8.56
13 1.03 0.96 1.2 1.95 5.25 2.73 2.75 2.67 2.99 8.57
14 1.1 0.99 0.99 1.84 5.4 2.62 2.72 2.53 3.19 8.45
15 0.9 1.13 0.96 1.78 5.37 2.41 2.56 2.47 3.11 8.56
16 1.05 1.17 1.102 1.83 5.5 2.45 2.68 2.67 3.09 8.53
17 1.1 0.98 1.01 1.87 5.29 2.53 2.89 2.69 2.97 8.65
18 1.03 1.1 0.99 1.9 4.96 2.55 2.56 2.75 3.15 8.49
19 0.95 0.99 0.96 1.84 5.29 2.67 2.64 2.79 3.21 8.52
20 0.91 0.96 1.1 1.76 5.23 2.38 2.61 2.69 3.12 8.59
𝑥 1.054 1.02 1.04 1.79 5.21 2.54 2.63 2.64 3.12 8.54

4. Conclusions

The proposed method visually improves edge detection performance over detection methods based on techniques such as median thresholding and Gaussian thresholding, as it focuses exclusively on image regions where sharp changes (which may signify benign or malignant sections) in image hue are observed. With respect to the Canny algorithm and HED algorithm methods, the performance is also superior, since the Canny algorithm failed in some cases to detect and identify the entire outer edge of the image and focused on regions that are potentially of no diagnostic interest. Likewise, the HED algorithm, while mostly successful in identifying the outer contours of medical images, also identified regions of little interest within the image.

Basing the proposed method on the morphological gradient operation allowed a clear image with relevant objects of interest to be obtained from the outset since the subsequent analysis was based on the silhouette appearance of both mammograms and CT scans. In this way, the histogram graph generated shows the trends in image tonality. In addition, it was convenient to obtain the threshold value following the point of maximum pixel concentration in the distribution histogram, since the image hue changes are considerably reduced to the edges or non-edges of the image sections, which is reflected in a pronounced peak in the histograms.

The proposed method presents robustness at the time of processing, since, both for mammography images with reduced image quality conditions and CT images with marked tonalities, the accurate detection of edges and contours of interest in the images is achieved, checked by visual inspection. Likewise, the time employed by the developed method is less concerning the techniques based on mean thresholding, Gaussian thresholding, Canny algorithm and HED algorithm. The proposed method offers the doctor or specialist an image with improved image quality, in addition to the demarcation of potential regions of interest on the original image. Also, the structure based on morphological gradient and pixel concentration histogram analysis improves the internal and external contours of the image facilitating the diagnostic steps and presents a better performance in terms of response time and CPU requirements, making it efficient for computer-aided diagnosis processes. In addition, the developed method is replicable in the future in other types of medical images.

5. Funding Statement and/or Acknowledgement

This scientific paper is result of a project funded by the Colombian Ministry of Science, Technology and Innovation MinCiencias and the Universidad Francisco de Paula Santander under the Young Researchers and Innovators agreement

6. References

1. Larrazabal AJ, Nieto N, Peterson V, Milone DH, Ferrante E. Gender imbalance in medical imaging datasets produces biased classifiers for computer-aided diagnosis. Proc Natl Acad Sci U S A. 2020;117(23):12592-4. Doi: 10.1073/pnas.1919012117 [ Links ]

2. Kido S, Hirano Y, Hashimoto N. Detection and classification of lung abnormalities by use of convolutional neural network (CNN) and regions with CNN features (R-CNN). In: 2018 International Workshop on Advanced Image Technology, IWAIT; 2018. p. 1-4. Doi: 10.1109/IWAIT.2018.8369798 [ Links ]

3. Fujita H. AI-based computer-aided diagnosis (AI-CAD): the latest review to read first. Radiol Phys Technol. 2020;13(1):6-19. Doi: 10.1007/s12194-019-00552-4 [ Links ]

4. Mohammed ZF, Abdulla AA. Thresholding-based White Blood Cells Segmentation from Microscopic Blood Images. UHD J Sci Technol. 2020;4(1):9-17. Doi: 10.21928/uhdjst.v4n1y2020.pp9-17 [ Links ]

5. Mohite V, Deoghare AB, Pandey KM. Modeling of Human Airways CAD model Using CT Scan Data. Mater Today Proc. 2022;22(4):1710-4. Doi: 10.1016/j.matpr.2020.02.189 [ Links ]

6. Huang Z, Xiao J, Xie Y, Hu Y, Zhang S, Li X, et al. The correlation of deep learning-based CAD-RADS evaluated by coronary computed tomography angiography with breast arterial calcification on mammography. Sci Rep. 2020;10(1):1-8. Doi: 10.1038/s41598-020-68378-4 [ Links ]

7. Xia K, Gu X, Zhang Y. Oriented grouping-constrained spectral clustering for medical imaging segmentation. Multimed Syst. 2020;26(1):27-36. Doi: 10.1007/s00530-019-00626-8 [ Links ]

8. Freitas-Junior R, Rodrigues DCN, Correa RS, Oliveira LFP, Couto LS, Urban LABD, et al. Opportunistic mammography screening by the Brazilian Unified Health System in 2019. Mastology. 2020;30:1-4. Doi: 10.29289/25945394202020190030 [ Links ]

9. Nizamuddin MK, Kirthana S. Reconstruction of human femur bone from CT scan images using CAD techniques. IOP Conf Ser Mater Sci Eng. 2018;455(1):1-9. Doi: 10.1088/1757-899X/455/1/012103 [ Links ]

10. Gómez-Ríos D, López-Agudelo VA, Urrego-Sepúlveda JC, Ramírez-Malule H. Research on repurposed antivirals currently available in Colombia as treatment alternatives for COVID-19. Ing y Compet. 2021;23(1):e10290. Doi: 10.25100/iyc.v23i1.10290 [ Links ]

11. Sweetlin JD, Nehemiah HK, Kannan A. Feature selection using ant colony optimization with tandem-run recruitment to diagnose bronchitis from CT scan images. Comput Methods Programs Biomed. 2017;145:115-25. Doi: 10.1016/j.cmpb.2017.04.009 [ Links ]

12. Yadav SP, Yadav S. Image fusion using hybrid methods in multimodality medical images. Med Biol Eng Comput. 2020;58(4):669-87. Doi: 10.1007/s11517-020-02136-6 [ Links ]

13. Luque Sulbaran GC, Walbaum García BV, Camus Appuhn M, Domínguez Covarrubias F, Merino Lara T, Acevedo C F, et al. Cáncer de mama triple negativo: terapias sistémicas actuales y experiencia local. Rev Cir (Mex). 2021;73(2):188-96. Doi: 10.35687/s2452-45492021003942 [ Links ]

14. Natanael G, Zet C, Fosalau C. Estimating the distance to an object based on image processing. In: EPE 2018 - Proceedings of the 2018 10th International Conference and Expositions on Electrical And Power Engineering. 2018. p. 211-6. Doi: 10.1109/ICEPE.2018.8559642 [ Links ]

15. Khatami A, Nazari A, Khosravi A, Lim CP, Nahavandi S. A weight perturbation-based regularisation technique for convolutional neural networks and the application in medical imaging. Expert Syst Appl. 2020;149:113196. Doi: 10.1016/j.eswa.2020.113196 [ Links ]

16. Lin WC, Wang JW. Edge detection in medical images with quasi high-pass filter based on local statistics. Biomed Signal Process Control. 2018;39:294-302. Doi: 10.1016/j.bspc.2017.08.011 [ Links ]

17. Dhruv B, Mittal N, Modi M. Early and Precise Detection of Pancreatic Tumor by Hybrid Approach with Edge Detection and Artificial Intelligence Techniques. EAI Endorsed Trans Pervasive Heal Technol. 2018;7(28):e1. Doi: 10.4108/eai.31-5-2021.170009 [ Links ]

18. Devkota B, Alsadoon A, Prasad P, Singh A, Elchouemi A. Image segmentation for early stage brain tumor detection using mathematical morphological reconstruction. Procedia Computer Science. 2018;125:115-23. Doi: 10.1016/j.procs.2017.12.017 [ Links ]

19. Manikandan LC, Selvakumar RK, Nair SAH, Sanal Kumar KP. Hardware implementation of fast bilateral filter and canny edge detector using Raspberry Pi for telemedicine applications. J Ambient Intell Humaniz Comput. 2021;12(5):4689-95. Doi: 10.1007/s12652-020-01871-w [ Links ]

20. Kimura-Sandoval Y, Arévalo-Molina ME, Cristancho-Rojas CN, Kimura-Sandoval Y, Rebollo-Hurtado V, Licano-Zubiate M, et al. Validation of Chest Computed Tomography Artificial Intelligence to Determine the Requirement for Mechanical Ventilation and Risk of Mortality in Hospitalized Coronavirus Disease-19 Patients in a Tertiary Care Center In Mexico City. Rev Investig Clínica. 2021;73(2):1-9. Doi: 10.24875/ric.20000451 [ Links ]

21. Khuriwal N, Mishra N. Breast Cancer Detection from Histopathological Images Using Deep Learning. 3rd Int Conf Work Recent Adv Innov Eng ICRAIE 2018. 2018;2018(November):1-4. Doi: 10.1109/ICRAIE.2018.8710426 [ Links ]

22. Divyashree B V., Kumar GH. Breast Cancer Mass Detection in Mammograms Using Gray Difference Weight and MSER Detector. SN Comput Sci. 2021;2(2):1-13. Doi: 10.1007/s42979-021-00452-8 [ Links ]

23. Shuja J, Alanazi E, Alasmary W, Alashaikh A. COVID-19 open source data sets: A comprehensive survey. Appl Intell. 2021;51(3):1296-325. Doi: 10.1007%2Fs10489-020-01862-6 [ Links ]

24. Niño Rondón CV, Castro Casadiego SA, Medina Delgado B, Guevara Ibarra D, Camargo Ariza LL. Comparativa entre la técnica de umbralización binaria y el método de Otsu para la detección de personas. Rev UIS Ing. 2021;20(2):65-73. Doi: 10.18273/revuin.v20n2-2021006 [ Links ]

25. Singhal P, Verma A, Garg A. A study in finding effectiveness of Gaussian blur filter over bilateral filter in natural scenes for graph based image segmentation. In: 2017 4th International Conference on Advanced Computing and Communication Systems, ICACCS. 2017. p. 4-9. Doi: 10.1109/ICACCS.2017.8014612 [ Links ]

26. Ramadan ZM. Effect of kernel size on Wiener and Gaussian image filtering. Telkomnika (Telecommunication Comput Electron Control). 2019;17(3):1455-60. Doi: 10.12928/telkomnika.v17i3.11192 [ Links ]

27. Palma CA, Cappabianco FAM, Ide JS, Miranda PAV. Anisotropic diffusion filtering operation and limitations - Magnetic resonance imaging evaluation. IFAC Proc Vol. 2014;47(3):3887-92. Doi: 10.3182/20140824-6-ZA-1003.02347 [ Links ]

28. Firoz R, Ali MS, Khan MNU, Hossain MK, Islam MK, Shahinuzzaman M. Medical Image Enhancement Using Morphological Transformation. J Data Anal Inf Process. 2016;4(1):1-12. Doi: 10.4236/jdaip.2016.41001 [ Links ]

29. Zhao F, Ma Y, Zhang J. Medical image processing based on mathematical morphology. In: Proceedings of the 2012 International Conference on Computer Application and System Modeling, ICCASM. 2012. p. 0948-50. Doi: 10.2991/iccasm.2012.241 [ Links ]

30. Xu H, Xu X, Zuo Y. Applying morphology to improve Canny operator's image segmentation method. J Eng. 2019;2019(23):8816-9. Doi: 10.1049/joe.2018.9113 [ Links ]

31. Ilhan HO, Serbes G, Aydin N. Automated sperm morphology analysis approach using a directional masking technique. Comput Biol Med. 2020;122:103845. Doi: 10.1016/j.compbiomed.2020.103845 [ Links ]

32. Gao X, Pan Z, Gao E, Fan G. Reversible data hiding for high dynamic range images using two-dimensional prediction-error histogram of the second time prediction. Signal Processing. 2020;173:107579. Doi: 10.1016/j.sigpro.2020.107579 [ Links ]

33. Li W, Huang Q, Srivastava G. Contour Feature Extraction of Medical Image Based on Multi-Threshold Optimization. Mob Networks Appl. 2020;26(2):381-9. Doi: 10.1007/s11036-020-01674-5 [ Links ]

34. Petrovic N, Moyà-Alcover G, Varona J, Jaume-i-Capó A. Crowdsourcing human-based computation for medical image analysis: A systematic literature review. Health Informatics J. 2020;26(4):2446-69. Doi: 10.1177%2F1460458220907435 [ Links ]

35. Hrgarek N. Certification and regulatory challenges in medical device software development. In: 2012 4th International Workshop on Software Engineering in Health Care, SEHC 2012 - Proceedings. 2012. p. 40-3. Doi: 10.5555/2667036.2667043 [ Links ]

Notas:

Como citar: Niño-Rondón CV, Castellano-Carvajal DA, Castro-Casadiego SA, Medina-Delgado B, Guevara-Ibarra D. Una aproximación a la detección de bordes en imágenes médicas mediante análisis de histograma y gradiente morfológico. INGENIERÍA Y COMPETITIVIDAD. 2022;24(2): e20611352. Doi: 10.25100/iyc.v24i2.11352

Received: June 02, 2021; Accepted: February 25, 2022

Creative Commons License This is an open-access article distributed under the terms of the Creative Commons Attribution License