Skip to main content
Computational and Mathematical Methods in Medicine logoLink to Computational and Mathematical Methods in Medicine
. 2021 Oct 28;2021:5208940. doi: 10.1155/2021/5208940

A Study on Weak Edge Detection of COVID-19's CT Images Based on Histogram Equalization and Improved Canny Algorithm

Shou-Ming Hou 1, Chao-Lan Jia 1, Ming-Jie Hou 2, Steven L Fernandes 3, Jin-Cheng Guo 4,
PMCID: PMC8568529  PMID: 34745326

Abstract

The coronavirus disease 2019 (COVID-19) is a substantial threat to people's lives and health due to its high infectivity and rapid spread. Computed tomography (CT) scan is one of the important auxiliary methods for the clinical diagnosis of COVID-19. However, CT image lesion edge is normally affected by pixels with uneven grayscale and isolated noise, which makes weak edge detection of the COVID-19 lesion more complicated. In order to solve this problem, an edge detection method is proposed, which combines the histogram equalization and the improved Canny algorithm. Specifically, the histogram equalization is applied to enhance image contrast. In the improved Canny algorithm, the median filter, instead of the Gaussian filter, is used to remove the isolated noise points. The K-means algorithm is applied to separate the image background and edge. And the Canny algorithm is improved continuously by combining the mathematical morphology and the maximum between class variance method (OTSU). On selecting four types of lesion images from COVID-CT date set, MSE, MAE, SNR, and the running time are applied to evaluate the performance of the proposed method. The average values of these evaluation indicators are 1.7322, 7.9010, 57.1241, and 5.4887, respectively. Compared with other three methods, these values indicate that the proposed method achieves better result. The experimental results prove that the proposed algorithm can effectively detect the weak edge of the lesion, which is helpful for the diagnosis of COVID-19.

1. Introduction

COVID-19 has caused a health crisis worldwide, impacting all sectors of human life [1]. On 11 March 2020, COVID-19 was declared as an extremely high-risk disease by the World Health Organization (WHO) [2]. Up to April 16, 2021, more than 139.64 million people worldwide were infected, and more than 3 million people had died [3]. CT images contain a lot of important information, which can be used to evaluate disease quantitatively. In COVID-19 diagnosis, the reverse transcription-polymerase chain reaction (RT-PCR) detection is the most common way. However, when test kits are insufficient, especially during the outbreak phase, CT scan is a more effective diagnostic method. CT can show detailed symptoms of clinical diagnosis in COVID-19, especially for patients with moderate to severe [4]. Many hospitals use this technique to scan the lungs of patients and diagnose the illness. The severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) is determined as the cause of COVID-19 [5]. There are several CT image features of COVID-19, such as single ground-glass shadow, diffuse ground-glass shadow of both lungs, large area consolidation of both lungs, multiple patchy consolidations, and paving stone-like[6]. Edge detection algorithms are used to detect the lesion of CT images, which is helpful for doctors to diagnose the condition. However, the lesion will be missed or incorrectly detected due to poor contrast of the edge, thus affecting patient treatment. Therefore, weak edge detection is an urgent problem to be solved.

In recent years, weak edge detection has been researched by plenty of scholars. In 2012, Ji et al. [7] effectively extracted weak edge information in the skull using a combination of histogram equalization and mean-shift filter (called HMS from now on), but the edge continuity was flawed. In the same year, Xue et al. [8] developed the Laplace operator-based Hessian matrix to accurately detect blood vessels on uneven gray scale blood vessel images, which was only suitable for two-dimensional images. In 2015, Lin et al. [9] proposed a weak edge detection method based on the cumulative change rate, but this method required manual adjustment of the unified threshold. In 2016, Li et al. [10] segmented the prostate with the level set method from ultrasound images with weak edges. In 2017, Kathrin et al. [11] addressed the fuzzy edge detection of biomedical CT images by dynamic programming technology. In the same year, Khadidos et al. [12] proved that the weighted level set evolution method is an effective method in weak edge detection. In 2020, Wang and Xu [13] used fit methods to calculate new local terms of the variation segmentation model. The sensitivity of the method to the initial contour is reduced, and the accuracy of weak edge segmentation is improved. However, the segmentation process relies too much on manual experience. In the same year, Chetna et al. [14] designed an automatic segmentation technology based on energy curves, which used an automatic threshold to reduce step size, and then the breast cancer cells can be accurately identified.

From the experimental results, the above algorithms can extract weak edge, but there are still some defects, for example, the result is not so accurate of the COVID-19 CT image detection. In other words, the detection error needs to be further reduced. In this paper, based on histogram equalization and improved Canny algorithm, we propose an weak edge detection algorithm. Specifically, enhancing image edge is derived from capturing the details by using histogram equalization. Then, to obtain lesion edge, we embed median filter, K-means, mathematical morphology, OTSU algorithm into the Canny algorithm, and namely, the improved Canny algorithm. The proposed algorithm can efficiently eliminate noise of COVID-19 image and extract lesion's detail and edge.

The main contributions of this paper on weak edge detection of CT images are as follows:

  1. The histogram equalization is combined with the improved Canny algorithm to establish an edge detection model. The model benefits from balancing the noise and the edge. In other words, the model can not only reduce the noise influence in COVID-19 CT images but also improve the accuracy of weak edge detection

  2. The median filter is employed to optimize the Canny algorithm. Specifically, the median filter takes the place of the Gaussian filter so that the isolated noise point can be eliminated

  3. In order to automatically obtain threshold, the novelty of this paper is using the OTSU algorithm

This paper is organized as follows. Section 2 describes the data set applied by the proposed algorithm. Section 3 depicts the related theories of the proposed algorithm, including histogram equalization, Canny algorithm, and the proposed algorithm. Experimental evaluation and comparison with other methods are discussed in Section 4. Concluding remarks are given in Section 5.

2. Dataset

In this section, we introduce the dataset used in this paper. From the perspective of data authenticity, COVID-CT is used to verify the effectiveness of the algorithm [15], the dataset contains COVID and non-COVID, and Figure 1(a) and Figure 1(b) are representative image of COVID and non-COVID. From Table 1, COVID contains 349 CT images of clinical manifestation, which are from 216 patients, and the ratio of male to female is 86 : 51. And 463 CT images of healthy people are involved in non-COVID.

Figure 1.

Figure 1

Example of CT images for COVID and non-COVID.

Table 1.

Comparison of COVID and non-COVID.

Images Patients Male/female
COVID 349 216 86/51
Non-COVID 463 55

3. Methodology

In this section, we introduce the related methods, including histogram equalization, traditional Canny algorithm, the improved Canny algorithm, and the proposed method. Histogram equalization is detailed description firstly. Then, we improve the traditional Canny algorithm, namely, the improved Canny algorithm. Finally, we introduce the proposed method.

3.1. Histogram Equalization

Histogram equalization has been extensively used in image enhancement algorithms. The basic idea is that the original nonuniform probability distribution gray map of the CT image is nonlinearly stretched by the histogram and transformed into a uniform probability distribution map [16]. In other words, the image clarity is enhanced by adjusting the size of the gray value [17]. The theoretical formula of histogram equalization is as follows.

Calculate the normalized gray value of the original image and the normalized gray value of the mapped image, which are r and s, respectively. The relationship between s and r is as follows.

s=Tr=0rPrrdr, (1)

where Pr(r) represents the probability density function of the image, and the range of r, s, and T(r) values is all in [0, 1]; also, T(r) increases monotonically in the interval.

Assume thatPs(s)is the probability density function after gray scale transformation, an the relationship betweenPr(r)andPs(s)is as follows.

Pss=Prrdrdsr=T1r. (2)

B is expressed as gray level, the image distribution probability is P(rB), the number of pixels is nB, the pixel is N, the total gray level is L, and the relationship is as follows.

PrB=nBN, (3)

where B ∈ {0, L‐1}. When ∑B=0L−1P(rB) = 1, the image is a uniform probability density function.

Based on the histogram equalization algorithm, the single ground-glass shadow CT image features are enhanced, and the result is shown in Figure 2. Figure 2(a) is the original medical CT image of the single ground-glass shadow, and Figure 2(c) is the original image histogram. Figure 2(b) and Figure 2(d) are the enhanced original image and the enhanced histogram, respectively. We can observe that the weak pixels are enhanced, and the image details tend to be evenly distributed.

Figure 2.

Figure 2

Comparison of the effect of histogram equalization algorithm.

3.2. Traditional Canny Algorithm and Existing Problems

The edge detection is helpful towards analyzing CT images. At present, the mainstream edge detection algorithms include morphological processing [18], ant colony algorithm [19], watershed [20], Canny [21], and machine learning [22], in which Canny is one of the most widely used edge detection algorithms. This algorithm has the characteristics of high locating accuracy and effectively suppresses noise. The steps of the traditional Canny edge detection algorithm are as follows.

  1. Gaussian filter. It can remove nonhigh frequency noise and smooth graph

G=12πσ2expx22σ2, (4)

where σ means the standard deviation of Gaussian filter, and G represents the intensity of the pixel after smoothing.

  • (2) The gradient magnitude and direction. Traditional edge difference operator, such as Sobel, is used to calculate the gradient magnitude and direction, so as to get thick and bright image edge

Gx=fx+1,y1+2fx+1,y+fx+1,y+1fx1,y1+2fx1,y+fx1,y+1,Gy=fx1,y1+2fx,y1+fx+1,y1fx1,y+1+2fx,y+1+fx+1,y+1, (5)

where Gx and Gy represent the gradient components in the horizontal and vertical direction, and f(x, y) represents the pixel value of the image.

Let M is the gradient magnitude, and the calculation formula of G is as follows.

M=Gx2+Gy2. (6)

Assume that J represents the gradient direction, the calculation formula of J is as follows.

J=arctanGyGx. (7)
  • (3) Nonmaximum suppression. After calculating the gradient magnitude and direction, the sharpest position is retained to ensure a clearer boundary in the gradient intensity change. Comparison of gradient intensity between current and other directions, the image boundary point is known as the current is greater than the other directions of gradient intensity. Otherwise, the gradient intensity threshold is set to 0, which can eliminate this point. Suppose P is the gradient intensity of the current pixel, P1 and P2 are the gradient intensity in positive and negative directions, respectively. The pseudocode for nonmaximum suppression is as follows

  • (4) Dual-threshold and hysteresis boundary track. Dual-threshold means setting high and low thresholds. The high threshold is greater than the pixel gradient value, and it is a strong edge and namely image edge. The low threshold is less than the pixel gradient value, and it is considered not to be the edge of the image and discarded. Weak edge points are defined as the pixel value varies between high and low thresholds. Finally, hysteresis boundary tracking is applied to determine whether the weak edge is an image edge

The traditional Canny algorithm may causes some problems while detecting the edge of the image.

First of all, the variance of Gaussian filtering determines the image smoothing effect and noise removal effect. Generally speaking, the size of the variance is fixed. If the variance is too large, Gaussian filtering will help to remove noise, but it will cause serious loss of image detail, resulting in blurred image edge; if the variance is too small, the denoising effect of Gaussian filtering will be poor.

Secondly, the Sobel operator is used to calculate the gradient amplitude and direction, and the obtained edge is relatively thick.

Finally, the dual-threshold detection method will generate more false edge, which will break the target edge and lose the edge information.

3.3. Improved Canny Algorithm

We use the median filter, K-means algorithm, mathematical morphology, and OTSU algorithm to improve the classical Canny algorithm.

Figure 3 is a flowchart of the improved Canny algorithm. Firstly, the Gaussian filter in the Canny algorithm is modified to the median filter. Next, based on the K-means, the Sobel operator is utilized to calculate the gradient magnitude and direction. Then, mathematical morphology is applied to thin out the edge. Finally, after nonmaximum suppression processing, the OTSU algorithm is used to determine the threshold automatically. The steps of improvement are as follows.

Figure 3.

Figure 3

Improved Canny algorithm.

The experimental results obtained after median filter, K-means clustering, mathematical morphology, and OTSU algorithm are shown in Figures 4(a)4(d). We can observe that after processing by several methods, the edge of the acquired lesion is very clear.

Figure 4.

Figure 4

Experimental result images.

3.3.1. Median Filter

COVID-19 CT image is complicated to understand; so, we need to remove undesirable portions, including noise [23]. The isolated noise points are eliminated by the median filter [24]. The median filter arranges the pixel values in the neighborhood of a point from large to small and takes the median value as the new pixel value to output, thereby eliminating isolated noise points. The algorithm is as follows.

  1. Sort all elements in the array ρ = [ρ11, ρ12, ρ13, ρ21, ρ22, ρ23, ρ31, ρ32, ρ33] from large to small

ρ=medρ1φ,ρ2φ,ρ3φ, (8)

where φ = [1, 2, 3]. The commonly used sorting templates are 3 × 3 and 5 × 5. In this paper, 3 × 3 template is cited for processing. The original pixel template is shown in Table 2.

  • (2) Take the value of each row for comparison and obtain the value of each row maximum, intermediate, and minimum, which are Maxµφ, Medµφ, and Minµφ, respectively. At this time, the pixel template is shown in Table 3

  • (3) Compare the data in each column and get the maximum value, respectively, which is Max1, Max2, and Max3. Finally, by comparing the Max1, Max2, and Max3, the middle value is result

Table 2.

the original pixel template.

Column 1 Column 2 Column 3
Row 1 g 11 g 12 g 13
Row 2 g 21 g 22 g 23
Row 3 g 31 g 32 g 33
Table 3.

Pixel template after processing.

Column 1 Column 2 Column 3
Row 1 Max11 Med12 Min13
Row 2 Max21 Med22 Min23
Row 3 Max31 Med32 Min33

3.3.2. K-Means Algorithm

K-means algorithm is one of the most commonly applied clustering algorithms. By randomly selecting K points as the starting center point, then finding the same characteristic data and letting it be grouped into the same cluster [25]. Cluster ensures that between similar sample points are compact, and between different types of samples is scattered so that the clustering effect is optimal.

The main flow of the algorithm is as follows.

  1. Given the sample data w, the set of objects is A = {w1, w2 ⋯ ⋯, wn}, and the initialization center B = {C1, C2 ⋯ ⋯, Ck}

According to the principle of the minimum norm of grey value, the sample data point (w, v) is assigned to the cluster closest to it. The calculation formula is as follows.

Ui=minfw,vCi, (9)

where Ui is the minimum value of the distance between the sample point f(w, v) and the various centroids Ci.

  • (2) Calculate the cluster center point again and use it as the new cluster center point Ti, i = 1, 2 ⋯ ⋯k. Formula is as follows

Ti=i1mCi=jxii1mCj=j. (10)
  • (3) Repeat steps 2 and 3 until it reaches the maximum number of iterations

3.3.3. Mathematical Morphology

The basic idea of mathematical morphology is using structural elements to obtain graphical shapes [26]. The main processing processes include expansion, erosion, reconstruction, opening operation, filling, closing operation, and edge extraction. The most basic operations are expansion and corrosion. The most typical operations combining the two are opening and closing operations.

Let T represents an image, τ(α, β) is the gray value at the point (α, β), g(σ, ε) is the structural element of the image, the domains of τ(α, β) and g(σ, ε)are Dτ and Db, and (ασ, βε) ∈ Dτ, (α + σ, β + ε) ∈ Db, and (σ, ε) ∈ Db.

Expansion is used to fill the voids in the graphics and expand the boundaries of the graphics outwards. The calculation formula is as follows.

τgα,β=maxταδ,βε+gδ,ε, (11)

where ⊕ indicates the expansion operation. The expansion operation is the maximum value of τ ⊕ g in the domain determined by the structural elements.

Corrosion is used to eliminate small, useless edges, and shrink the image boundary inward. The calculation formula is as follows.

τΘgα,y=minτα+δ,β+εgδ,ε, (12)

where Θ represents the corrosion operation, which is the minimum value of τΘg in the domain determined by the structural elements.

The step of the open operation is to corrode first and then expand. It can smooth the contour and filter out isolated parts that noncontain structural elements. The calculation formula is as follows.

τg=τgΘg. (13)

The step of the closed operation is to expand first and then corrode. It can fill in small holes and connect the image boundaries to make them smooth. The calculation formula is as follows.

τ·g=τΘgg, (14)

where ∘ represents the open operation, and · represents the closed operation.

Due to the shrinkage of the open operation and the expanding ability of the closed operation, the results will be biased. In this paper, using equation (15), it is an average method to eliminate the influence of offset.

T=12τg+τ·g. (15)

3.3.4. OTSU Algorithm

The maximum between-class variance algorithm, also known as the OTSU algorithm, is an algorithm used to automatically determine the image binarization threshold. Because of its simple calculation and not affected by image contrast and brightness, it is widely used in global threshold determination [27]. The basic idea is: according to the gray-scale characteristics of the image, and the image is divided into two parts: the foreground and the background. The difference of value is greater between the foreground and the background, and the effect is better. Based on the input image, the OTSU algorithm automatically calculates the threshold value [28]. In this paper, we firstly set the threshold as 1, then, using the maximum interclass variance to calculate the optimal threshold.

Let γ represent the pixel gray value of a certain point in the image, [0, R] is the pixel gray level, and nγis the number of pixels; thus, the value of the total number of pixels N is as follows.

N=γ=0Rnγ. (16)

The probability of each pixel at gray level γ:

Pγ=nγN. (17)

The threshold is used to divide the image pixels into two parts: Q1 and Q2; then, the probabilities of Q1 and Q2 at [0, L − 1], and [L‐1, R] are D1 and D2, and D1 + D2 = 1.

D1=γ=0L1Pγ,D2=LRPγ. (18)

The mean values of Q1 and Q2 are m1 and m2, respectively, and mθ is the global mean value of the image.

mθ=D1×m1+D2×m2 (19)

The between-class variance expression is as shown in formula (20).

σ2=D1×m1mθ2+D2×m2mθ2. (20)

3.4. The Proposed Method

In this paper, the proposed weak edge detection method of CT image is mainly divided into three steps. Firstly, enhancing the image detail feature by histogram equalization, secondly, obtaining the weak edge of the lesion on CT image by using median filter, K-means, Sobel operator, and mathematical morphology, and thirdly, combining nonmaximum suppression and OTSU algorithm to connect the edge. The flow of the proposed algorithm is shown in Figure 5.

Figure 5.

Figure 5

Algorithm flow chart.

Specific steps are as follows:

  1. Histogram equalization. Performing histogram equalization on the grayscale image to enhance image detail

  2. Edge acquisition. Firstly, using the median filter to preserve the grayscale characteristic of the image and reduce the noise of the image. Then, the K-means algorithm is used to classify the edge of the image for obtaining edge points and nonedge points. After calculating the gradient magnitude and direction, a thick and bright edge is obtained, which further enhances the brightness of the weak edge. Finally, the edge is refined using mathematical morphology to obtain more accurate edge

  3. Edge connection. After nonmaximum value processing, the OTSU algorithm is applied to automatically obtain the best threshold and connect weak edge

3.5. Measure

In order to objectively evaluate the performance of the Canny algorithm, the HMS algorithm, the ETAR algorithm (Benhamza and Seridi [29] proposed algorithm, called ETAR from now on), and the proposed algorithm, we select mean square error (MSE), signal-noise ratio (SNR), mean absolute error (MAE), and the running time. MSE is used to evaluate the deviation between the observed value and the true value. The value of MSE is larger, and the detection error is greater. SNR refers to the false detection probability of nonedge points. If the value of SNRis larger, indicating that the false detection rate is lower, the detection effect is better. MAE represents the average of the error between the predicted value and the true value. The value of MAE is smaller, which means the error is smaller and the fusion effect is better. The calculation formulas of MSE, SNR, and MAE are as follows.

MSEIH,IW=1MNIHi,jIWi,j2,SNR=logi=1Mj1NIwi,j2i=1Mj=1NIHi,jIwi,j2,MAEIH,IW=1MNIHi,jIWi,j, (21)

where IH and IW represent the fused image and the ideal image, respectively, and IH and IW are the pixel gray values of the fused image and the ideal image in the ith row and jth column, respectively.

4. Results and Discussion

In this section, firstly, we introduce selected four types of CT lesion images. Then, by MSE, SNR, MAE, and the running time, we verify performance of the proposed algorithm in these images. And the results are shown in the table and figure below. Specifically, we intend to compare the performance of the proposed algorithm with the following algorithms, including the Canny algorithm, the HMS algorithm, and the ETAR algorithm. In the experiment, we use the COVID-CT for verifying the effect of the proposed algorithm on the denoising ability and weak edge detection. Four types of typical sample images selected from the dataset are shown in Figure 6. Figure 6(a) is diffuse ground-glass shadow in both lungs, and the lesion tissue is relatively unclear. Figure 6(b) is single ground-glass shadow, Figure 6(c) is paving stone, and their lesion's edge is relatively weak. Figure 6(d) is patchy lungs with field consolidation, and the lesion's tissue is clear, but it is tightly connected with the lung tissue.

Figure 6.

Figure 6

Partial sample data.

4.1. Verification of the Detection Effect of Diffuse Ground-Glass Shadow in Both Lungs

Compared the edge detection effect of diffuse ground-glass shadow in both lungs, the results are shown in Figure 7. The boundary of the lesion detected by the Canny algorithm is not continuous. The HMS algorithm detection result image contains a lot of noise, and the lesion's detail cannot be detected. The ETAR algorithm can detect the lesion, but the detected lesion feature is different from the actual lesion feature. The proposed algorithm not only effectively removes noise but also clearly shows the characteristics of the lesion.

Figure 7.

Figure 7

Comparison of the detection of diffuse ground-glass shadow in both lungs.

The MSE, SNR, and MAE of diffuse ground-glass shadows in both lungs are shown in Table 4. The MSE is 1.0513 of the proposed algorithm, and the MSE of other algorithms exceeds 1.1000, which means that the detection error of the proposed algorithm is the smallest. From the SNR values of the four algorithms in Table 4, it can be seen that the SNR of the proposed algorithm is the smallest, indicating detection error is the smallest. The MAE is 65.0062, but the MAE values of all other algorithms exceed 150.0000, suggesting that the average error of the proposed algorithm between the predicted value and the true value is the smallest, and the detection effect is the best.

Table 4.

Comparison of detection indexes of diffuse ground-glass shadow in both lungs.

The Canny algorithm The HMS algorithm The ETAR algorithm The proposed algorithm
MSE 1.1230 8.2723 1.3313 1.0513
SNR 0.0457 0.0475 1.4373 6.6078
MAE 155.2991 157.5637 196.9864 65.0062

4.2. Verification of the Detection Effect on Single Ground-Glass Shadow

Figure 8 shows the experimental results of four algorithms for detecting the edge of single ground-glass shadow. We found that the denoising effect and the accuracy of the detected lesion features of the proposed algorithm are better than other three algorithms.

Figure 8.

Figure 8

Comparison of single ground-glass shadow detection.

In the experiment, we use three data evaluation indicators to verify the detection effect of the proposed algorithm. We can see from Table 5 that the detection effect of the proposed algorithm is significantly better than the other algorithms. From a data point of view, the MSE, SNR, and MAE of the proposed algorithm are 2.8982, 7.0879, and 55.1343, respectively, while the MSE and MAE of the other algorithms are greater than 5.000 and 150.0000, and the SNR is less than 7.0000, respectively.

Table 5.

Comparison of single ground-glass shadow lesion detection indicators.

The Canny algorithm The HMS algorithm The ETAR algorithm The proposed algorithm
MSE 5.8147 5.6171 8.3632 2.8982
SNR 2.0091 4.3257 2.3107 7.0879
MAE 157.2183 176.4992 158.5642 55.1343

4.3. Verification of Detection Effect on Paving Road Shape

For paving road CT image, we compare the edge detection effect of the proposed algorithm with the other three algorithms. The detection effect images are shown in Figure 9. We can see that the lesion feature detected by the proposed algorithm is more clear.

Figure 9.

Figure 9

Comparison diagram of paving road shape detection.

The experimental results are shown in Table 6. After analysis, we can conclude that the experimental results of the proposed algorithm are significantly better than the other three algorithms, which proves that the detection error of the algorithm is the smallest and the detection effect is the best.

Table 6.

Comparison table of paving road detection indicators.

The Canny algorithm The HMS algorithm The ETAR algorithm The proposed algorithm
MSE 9.2358 9.3340 9.3341 1.8103
SNR 0.0460 3.8837 2.7741 7.4247
MAE 173.6431 172.6516 174.6519 67.1646

4.4. Verification of Detection Effect on Patchy Lungs with Field Consolidation

To verify the effect of edge detection, the Canny algorithm, the HMS algorithm, the ETAR algorithm, and the proposed algorithm are used to carry out experiments on patchy lungs with field consolidation. The result is shown in Figure 10, compared with the other three algorithms, the proposed algorithm has better noise robustness, and the detected lesion feature is more accurate.

Figure 10.

Figure 10

Comparison of the detection of patchy lungs with field consolidation.

In order to evaluate the performance of the proposed algorithm, a comparative analysis is carried out from quantitative perspective. Table 7 shows the data of the four algorithms under the three evaluation indicators. The experimental results show that the proposed algorithm using histogram equalization and improved Canny algorithm has the best denoising effect and the highest accuracy of lesion detection.

Table 7.

Comparison table of detection indexes for patchy lungs with field consolidation.

The Canny algorithm The HMS algorithm The ETAR algorithm The proposed algorithm
MSE 1.3192 5.617 1.3313 1.1690
SNR 0.0397 3.2443 2.8746 10.4839
MAE 195.9766 174.4995 196.9860 41.1912

4.5. The Running Time

In order to further intuitively evaluate the edge detection effect of the Canny algorithm, the HMS algorithm, the ETAR algorithm, and the proposed algorithm, the edge detection time is calculated of the above cases. Figure 11 gives the result; in terms of the running time of all images, we can observe that the proposed algorithm is shorter as compared to other three algorithms. Therefore, the proposed algorithm is considered to be one of the best edge detection algorithms.

Figure 11.

Figure 11

The running time of cases.

5. Conclusion

In this paper, aiming at the weak edge problem in the edge detection of lesion from COVID-19 CT image, a fusion algorithm is proposed which includes three improvements: (1) usage of histogram equalization, we can obtain the maximum entropy of the image, thereby improving the clarity of weak edge. (2) The median filter, K-means algorithm, and mathematical morphology are added to the Canny algorithm, which can make the edge of the inspected more accurate. (3) The OTSU algorithm is used to automatically obtain the best threshold. Compared with the Canny algorithm, the HMS algorithm, and the ETAR algorithm, these improvements enable our method to have improved performance. The average values of MSE, MAE, SNR, and the running time of four types of lesion images are 1.7322, 7.9010, 57.1241, and 5.4887, respectively, indicating that our method has better results. Experiments show that the proposed algorithm can effectively extract the weak edge of the lesion.

In the future, we can do further research from the following two aspects: (1) The average running time is 5.1887 seconds, and we needs to further reduce the average running time for the purpose of improving the performance of the proposed method. (2) In order to improve the credibility of the experiment, we will carry on experiment on more data set.

Pseudocode 1.

Pseudocode 1

Acknowledgments

Henan Key Research and Development Project (182102310629), Royal Society International Exchanges Cost Share Award, UK (RP202G0230), Medical Research Council Confidence in Concept (MRC CIC) Award, UK (MC_PC_17171), and Hope Foundation for Cancer Research, UK (RM60G0680).

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflict of interest.

Authors' Contributions

Shou-Ming Hou and Chao-Lan Jia contributed equally to this paper and should be regarded as co-first authors.

References

  • 1.Wang S. H., Zhang Y., Cheng X., Zhang X., Zhang Y. D. Psspnn: patchshuffle stochastic pooling neural network for an explainable diagnosis of Covid-19 with multiple-way data augmentation. Computational and Mathematical Methods in Medicine . 2021;2021:18. doi: 10.1155/2021/6633755.6633755 [DOI] [PMC free article] [PubMed] [Google Scholar] [Retracted]
  • 2.Bhattacharya S., Reddy Maddikunta P. K., Pham Q. V., et al. Deep learning and medical image processing for coronavirus (Covid-19) pandemic: a survey. Sustainable Cities and Society . 2021;65, article 102589 doi: 10.1016/j.scs.2020.102589. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Wang S. H., Govindaraj V. V., Gorriz J. M., Zhang X., Zhang Y. D. Covid-19 classification by Fgcnet with deep feature fusion from graph convolutional network and convolutional neural network. Information Fusion . 2021;67:208–229. doi: 10.1016/j.inffus.2020.10.004. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Zhang Y. D., Dong Z., Wang S. H., et al. Advances in multimodal data fusion in neuroimaging: overview, challenges, and novel orientation. Information Fusion . 2020;64:149–187. doi: 10.1016/j.inffus.2020.07.006. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Trimboli P., Camponovo C., Franscella S., Bernasconi E., Buetti N. Subacute thyroiditis during the covid-19 pandemic: searching for a clinical association with Sars-Cov-2. International Journal of Endocrinology . 2021;2021:4. doi: 10.1155/2021/5588592.5588592 [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Chen Z., Xu L., Zhu W., Ge J. Cardiovascular manifestations in severe and critical patients withCOVID‐19. Chinese Journal of Frontier Health and Quarantine . 2020;43(10):1054–1420. doi: 10.1002/clc.23422. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Ji F., Gao X. B., Xie S. Y. Image weak edge extraction based on mean-shift filtering and histogram enhancement. Chinese Journal of Image and Graphics . 2012;17(6):651–656. [Google Scholar]
  • 8.Xue W. Q., Zhou Z. Y., Zhang T., Li L. H., Zheng J. Vessel segmentation under non-uniform illumination: a level set approach. Journal of Software . 2012;23(9):2489–2499. doi: 10.3724/SP.J.1001.2012.04095. [DOI] [Google Scholar]
  • 9.Lin Q. H., Du M., Gao Y. M. Medical image weak edge detection algorithm based on cumulative change rate. Computer Engineering and Design . 2015;36(11) [Google Scholar]
  • 10.Li X., Li C., Fedorov A., Kapur T., Yang X. Segmentation of prostate from ultrasound images using level sets on active band and intensity variation across edges. Medical Physics . 2016;43(6, Part1):3090–3103. doi: 10.1118/1.4950721. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Ungru K., Jiang X. Dynamic programming based segmentation in biomedical imaging. Computational and Structural Biotechnology Journal . 2017;15:255–264. doi: 10.1016/j.csbj.2017.02.001. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Khadidos A., Sanchez V., Li C. T. Weighted level set evolution based on local edge features for medical image segmentation. IEEE Transactions on Image Processing . 2017;26(4):1979–1991. doi: 10.1109/TIP.2017.2666042. [DOI] [PubMed] [Google Scholar]
  • 13.Wang N., Xu D. Y. Left ventricular image segmentation algorithm for weak edge information. Computer Engineering and Applications . 2020;56(23):211–219. [Google Scholar]
  • 14.Kaushal C., Singla A. Automated segmentation technique with self-driven post-processing for histopathological breast cancer images. CAAI Transactions on Intelligence Technology . 2020;5(4):294–300. doi: 10.1049/trit.2019.0077. [DOI] [Google Scholar]
  • 15.He X. H., Yang X. Y., Zhang S. H., et al. Covid-Ct-dataset a Ct scan dataset about covid-19. 2020, https://github.com/UCSD-AI4H/COVID-CT.
  • 16.Zhao C. L., Dong J. W., Xu B., Ma X. F. Research on fog image enhancement algorithm combining histogram equalization and homomorphic filtering. Journal of Harbin University of Science and Technology . 2019;24(6):97–101. [Google Scholar]
  • 17.Xiong J., Yu D., Wang Q., et al. Application of histogram equalization for image enhancement in corrosion areas. Shock and Vibration . 2021;2021:13. doi: 10.1155/2021/8883571.8883571 [DOI] [Google Scholar]
  • 18.Raza S., ur Rahman T., Saeed M., Jameel S. Performance analysis of power system parameters for islanding detection using mathematical morphology. Ain Shams Engineering Journal . 2021;12(1):517–527. doi: 10.1016/j.asej.2020.07.023. [DOI] [Google Scholar]
  • 19.Lohvithee M., Sun W., Chretien S., Soleimani M. Ant colony-based hyperparameter optimisation in total variation reconstruction in X-ray computed tomography. Sensors . 2021;21(2):p. 591. doi: 10.3390/s21020591. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Osma-Ruiz V., Godino-Llorente J. I., Sáenz-Lechón N., Gómez-Vilda P. An improved watershed algorithm based on efficient computation of shortest paths. Pattern Recognition . 2007;40(3):1078–1090. doi: 10.1016/j.patcog.2006.06.025. [DOI] [Google Scholar]
  • 21.Sangeetha D., Deepa P. FPGA implementation of cost-effective robust canny edge detection algorithm. Journal of Real-Time Image Processing . 2019;16(4):957–970. doi: 10.1007/s11554-016-0582-2. [DOI] [Google Scholar]
  • 22.Madireddy S., Chung D. W., Loeffler T., et al. Phase segmentation in atom-probe tomography using deep learning-based edge detection. Scientific Reports . 2019;9(1, article 20140) doi: 10.1038/s41598-019-56649-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Wu W. W., Hu D. L., An K., Wang S. Y., Luo F. L. A high-quality photon-counting Ct technique based on weight adaptive total-variation and image-spectral tensor factorization for small animals imaging. IEEE Transactions on Instrumentation and Measurement . 2021;70:1–14. doi: 10.1109/tim.2020.3026804. [DOI] [Google Scholar]
  • 24.Garg B. Restoration of highly salt-and-pepper-noise-corrupted images using novel adaptive trimmed median filter. Signal, Image and Video Processing . 2020;14(8):1555–1563. doi: 10.1007/s11760-020-01695-3. [DOI] [Google Scholar]
  • 25.Holilah D., Bustamam A., Sarwinda D. Detection of Alzheimer’s disease with segmentation approach using K-means clustering and watershed method of Mri image. Journal of Physics: Conference Series . 2021;1725, article 012009 [Google Scholar]
  • 26.Rani S. A novel mathematical morphology based edge detection method for medical images. CSI Transactions on ICT . 2016;4(2-4):217–225. doi: 10.1007/s40012-016-0092-1. [DOI] [Google Scholar]
  • 27.Lin Q., Jing W., Chen Y. L., Wang Z. Z. Research on the image segmentation of icing line based on Nsct and 2-D Ostu. International Conference on Modelling . 2016;57(2):112–120. [Google Scholar]
  • 28.Sharma K. K., Rai P., Patidar K. C. Ct scan image segmentation based on hounsfield unit values using Otsu thresholding method. Journal of Physics: Conference Series . 2021;1816(1, article 012080) [Google Scholar]
  • 29.Benhamza K., Seridi H. Canny edge detector improvement using an intelligent ants routing. Evolving Systems . 2021;12(2):397–406. doi: 10.1007/s12530-019-09299-0. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

The data used to support the findings of this study are available from the corresponding author upon request.


Articles from Computational and Mathematical Methods in Medicine are provided here courtesy of Wiley

RESOURCES