Shouming Hou,Chaolan Jia,Kai Li,Liya Fan,Jincheng Guoand Mackenzie Brown
1School of Computer Science and Technology,Henan Polytechnic University,Jiaozuo,454000,China
2City College,Xi’an Jiaotong University,Xi’an,710018,China
3Department of Thoracic Surgery,Jiaozuo Second People’s Hospital,Jiaozuo,454000,China
4School of Engineering,Edith Cowan University,Joondalup,6027,Australia
ABSTRACT Edge detection is an effective method for image segmentation and feature extraction.Therefore,extracting weak edges with the inhomogeneous gray of Corona Virus Disease 2019(COVID-19)CT images is extremely important.Multiscale morphology has been widely used in the edge detection of medical images due to its excellent boundary detection accuracy.In this paper,we propose a weak edge detection method based on Gaussian filtering and singlescale Retinex(GF_SSR),and improved multiscale morphology and adaptive threshold binarization(IMSM_ATB).As all the CT images have noise,we propose to remove image noise by Gaussian filtering.The edge of CT images is enhanced using the SSR algorithm.In addition,based on the extracted edge of CT images using improved Multiscale morphology,a particle swarm optimization(PSO)algorithm is introduced to binarize the image by automatically getting the optimal threshold.To evaluate our method,we use images from three datasets,namely COVID-19,Kaggle-COVID-19,and COVID-Chestxray,respectively.The average values of results are worthy of reference,with the Shannon information entropy of 1.8539,the Precision of 0.9992,the Recall of 0.8224,the F-Score of 1.9158,running time of 11.3000.Finally,three types of lesion images in the COVID-19 dataset are selected to evaluate the visual effects of the proposed algorithm.Compared with the other four algorithms,the proposed algorithm effectively detects the weak edge of the lesion and provides help for image segmentation and feature extraction.
KEYWORDS COVID-19;SSR;multiscale morphology;PSO;adaptive threshold;edge detection
COVID-19 is a disease in the worldwide spread,severely threatening the lives of people around the world.Computer tomography(CT)is an important means of clinical diagnosis of COVID-19,which can help doctors diagnose patients’respiratory symptoms,especially uncertain SARS-CoV-2(severe acute respiratory syndrome coronavirus infection with negative PCR(Polymerase Chain Reaction))[1].Accurately and rapidly determining the edge of the lesion has great application value for COVID-19[2],which is helpful for doctors to diagnose the condition[3].However,the boundary of the lesion in CT images is not clear,which makes it a challenging problem to delineate the boundary of the lesion from the organs.Based on the characteristics of lesion boundary,we believe that extracting lesions from organ tissue is actually performing edge detection of the lesions.The most typical edge detection operators are Canny,Laplace and Sobel.Although these edge detection operators are simple to operate,they are sensitive to noise.
In recent years,in order to detect the continuous and complete edge,many scholars have put forward a lot of effective methods[4,5].In 2008,Erwin et al.[6]proposed an edge detection algorithm of medical ultrasound images based on fuzzy morphology.In 2011,Abdallah et al.[7]addressed an improved multiscale morphology,which employs anisotropic diffusion with Hessian matrix to improve multiscale morphology,to reduce image noise and to detect blood vessels in 2D retinal images.In 2013,Li et al.[8]used an enhanced morphological filter to detect blurred edges.In 2014,Malathi et al.[9]proposed an improved Canny algorithm to detect the edge of tumor image.The algorithm can accurately detect the edge of the image while removing noise.In 2015,Alsaiq et al.[10]detected edges which is most sensitive by the finite-difference method.In the same year,based on spatial filtering and wavelet filtering,Hua[11]combined mathematical morphology and threshold segmentation for edge detection(MMTS).In 2015,Batool et al.[12]combined Gabor filtering and mathematical morphology to detect discontinuous facial wrinkles(GFMM).In 2019,Alharbi et al.[13]employed multiscale Top-Hat Tensor(MTHT)to perform high-precision segmentation in 2D and 3D images.In 2020,Ghanbari et al.[14]proposed amethod based on fractional derivatives with non-singular kernels and non-laocal,which can the edge detection result of image more accurate.In 2021,Zhang et al.[15]developed a fivelayer convolutional neural network for COVID-19 diagnosis.Zhu[16]designed an attention network for COVID-19 explainable diagnosis.
Motivated by previous work,we are proposing an edge detection method that employs Gaussian filtering,SSR,improved multiscale morphology,and threshold binarization.Specifically,our method removes image noise and enhances image detail by Gaussian filtering and SSR algorithm.In addition,the improved multiscale morphology and threshold binarization,which are used to accurately extract the weak edge of COVID-19 CT images.Moreover,we test the performance of the proposed method by selecting weak edges and intensity inhomogeneities medical images in the COVID-19 dataset.Meanwhile,we compare our method’s performance with other methods.We believe that the techniques used in the proposed method can provide more meaningful information for feature extraction and lesion segmentation,since the edge detection accuracy has improved.
The main contribution to this paper is presented below:
1.In the context of Gaussian filtering,SSR,improved multiscale morphology,and the optimization of threshold based on PSO,we propose a weak edge detection algorithm.
2.Adding a multiscale filter to the multiscale morphology to remove image noise.
3.In order to make the detected edge clearer,our method considers using the PSO algorithm to binarize the image by automatically getting double thresholds.
The rest of this paper is organized as follows.Section 2 introduces the basis of our proposed method in detail.Section 3 presents the datasets and extensive experimental results.The conclusion is given in Section 4.
In this section,firstly,a quick review of Gaussian filtering and SSR is followed by a brief description of the improved multiscale morphology.Then,the optimization of threshold based on PSO.Meanwhile,in Section 2.4,the evaluation indicators used in this paper are further introduced.Finally,the flow of the proposed method is introduced.
In this work,the GF_SSR algorithm is used for image filter and enhancement.In general,Gaussian filtering can remove Gaussian noise.Although SSR cannot remove hidden noise,it possesses the ability to enhance the image contrast.
2.1.1 Gaussian Filtering
Gaussian filtering is a linear smoothing filter based on the Gaussian function which is widely used to remove Gaussian noise [17].The key two methods are the fast Fourier transform and discretized Gaussian window for sliding convolution.The Gaussian window for sliding convolution[18]is used here.To denoise,using the scanned pixels and convolution as the core center and weighted average method as the core center,respectively.The Gaussian filtering formula is as Eq.(1).
where c0andu0are template center,c anduare the coordinate of pixel in the image,εis standard deviation,G(c,u)represents the Gaussian function.
2.1.2 SSR Algorithm
The retinex theory is a widely used image enhancement algorithm based on human visual perception,which is determined by the color of the image,not by light and other factors [19].The calculation formula is as Eq.(2).
where(x,y)is the coordinate of pixel,T(x,y)represents the denoised CT image observed by human eyes,which is the product of the reflection image and the illumination image.And retinex segments the image T(x,y)into two parts,the reflection image and the illumination image,can be expressed asI(x,y)andL(x,y),respectively.
Based on the above principle,many scholars have proposed various image enhancement algorithms,including SSR and multiscale retinex(MSR)[20,21].We use the SSR algorithm to enhance the image here.The SSR algorithm was proposed by Jobson et al.[22]in 1997,which can enhance the lighter part of the image and improve the edge detection rate of the CT image.The basic principles are as follows.The Eq.(2)can be represented by logarithmic operation,and the calculation formulas are shown as Eqs.(3)and(4).
where r(x,y)denotes the mathematical model of SSR,⊗denotes the convolution operation.S(x,y)is realized by Gaussian convolution function,and the formula is as Eq.(5).
where u is the normalized parameter,and∂is the Gaussian convolution size.
2.2.1 Improved Multiscale Morphology
The steps for edge detection by improved multiscale morphology are as follows:(1)Taking structural element B and performing expansion operations for obtaining multiscale structural element nB.(2)Constructing a multiscale filter for the multiscale structural element nBto eliminate the noise in the CT image.(3)Using the basic morphological operator to process the multiscale structural element nBfor obtaining the edge information of different scales.(4)The non-mean weight is applied as the coefficient of the multiscale edge fusion algorithm to calculate the edge image.(5)Extracting the boundary by corrosion operation and differential idea.(6)Refining the edge.
Mathematical morphology has been widely applied for edge detection.Multiscale morphology can be used to detect the edge of different directions,which basic elements including original data and structural elements[23].The selection of structural elements directly affects the effect of image edge detection.Supposing we only select a structural element,resulting in discontinuous edge information[24].Assuming we select multiscale structural elements to process images,small-scale structural elements can retain image detail,but the disadvantage is that the anti-interference ability is weak and easy to detect the false edge.In addition,large-scale structural elements are robust to noise,but it is easy to filter out image details[25].Based on the above analysis,we combine the corrosion,expansion,opening,and closing operations of mathematical morphology to detect the weak edges of the image.The multiscale structural element formula is as Eq.(6).
where n represents the scale parameter,B represents the structural element,and B is designed as five 3 × 3 templates.They are B1(0°),B2(45°),B3(90°),B4(135°),and B5(Diamond structural elements),respectively.
Expansion,erosion,opening,and closing operations are the most basic operations in multiscale morphology,and opening and closing operations are defined by erosion and expansion [26].Using the characteristics of structural elements,the calculation formulas can be constructed for expansion,corrosion,and opening and closing operations.The calculation formulas are shown in Eqs.(7)-(10).
whereωandσrepresent the abscissa value and ordinate value of the image.After processing,the abscissa value and ordinate value obtained arexandy.Moreover,⊕,Θ,°,·,andF(x,y)represent the expansion,erosion,opening,closing operation and the image to be processed,respectively.
The initialized structure element nGis obtained by the multiscale structure element nBto perform the expansion operation.And W(x,y)is as Eq.(11):
In addition to filtering,morphological processing can also obtain the edge.Assume that the image boundary isF(x,y),we use the mathematical morphology operators to perform multiscale calculations C(x,y)on the structural elements nB.The obtained edge detection algorithm is as Eq.(12).
In order to reduce the influence of noise,the non-average weight is used as the weighting coefficient for edge detection at different scales.The calculation formula is as Eq.(13).
where[m,l]is the value range of scale n,λnis the weighting co-efficient.
We select multiscale edge fusion algorithm for obtaining the edge image T(x,y).The calculation formula is as Eq.(14).
Obtaining the results indicate that,by the above steps,the detected edges are relatively thick and many non-edges are detected as edges.Then,we add the following algorithm to get a more accurate boundary.R(x,y)represents image boundary.The calculation formula is as Eq.(15).
2.2.2 Adaptive Threshold Based on PSO
PSO algorithm is an evolutionary computation technology from seeking the optimal solution of the path by studying the cooperation and information sharing between individuals of the birds’predation [27].Firstly,the algorithm sets the initial position and initial fitness.Then,we obtain the global optimal position and optimal fitness’value according requirements.Next,based on updating particle speed,position,and inertia factor,we can determine the global optimal position as the optimal threshold,by judging the maximum number of iterations.Finally,according to the threshold,we determine whether the image pixel is an edge point.The calculation formula of the theory is as Eqs.(16)-(18).
whereWmaxis the maximum weight,Wminis the minimum weight.And K represents the maximum number of iterations.
Eqs.(16)-(18)show that after obtaining the optimal position of the particle,it is judged whether it has reached the limit number of times.If it reaches the limit,then Eq.(19)is used,otherwise it is executed again.And Y is the threshold of a certain pixel in the image.
The edge detection results are evaluated using Shannon Information Entropy(SIE),Precision,Recall,F-Score,and the average time [28].The SIE believes a system must contain multiple states in order to carry information,and only the more states,the more information it contains [29].In addition,based on human visual characteristics[30],the SIE is used to evaluate the denoising effect of the proposed method.Meanwhile,the value of Shannon information entropy [31] is smaller,the denoising effect is better[32].SIE is defined as Eq.(20).Wherep(xi)denotes the probability of eventxi.
Also,Precision,Recall,F-Score are considered to be as quantitative evaluation index.Moreover,Precision represents how many of the samples predicted to be positive are correct.Recall represents the probability that the prediction is positive in the true value.F-Score considers the harmonic value of Precision and Recall.Precision,Recall,and F-Score are defined as Eqs.(21)-(23).
whereTPrepresents that the positive samples are correctly predicted to be a positive sample.FPrepresents that the negative samples are incorrectly predicted to be a positive sample.TNare correctly predicted as negative samples which are negative samples.FNrepresents that positive samples are incorrectly predicted as negative samples.βis used to balance the weight ofPrecisionandRecallinF-Score.
The proposed edge detection algorithm mainly consists of two parts:(1)Using Gaussian filtering and SSR to preprocess the CT image which can remove image noise and enhance the image detail.(2)Extracting the image edge by the improved multiscale morphology and PSO algorithm.The principle of the algorithm is shown in Fig.1.
Figure 1:The flow chart of the proposed algorithm
In this section,we firstly introduce the datasets.Then,to demonstrate the effectiveness of our method,we compare several edge detection models in three datasets,including multiscale morphological,the MMTS algorithm,the GFMM algorithm,and the MTHT algorithm.Further,comparing results of these algorithms is given.
In this section,we discussed the dataset used.The images used in this study were acquired from three datasets to evaluate the performance of the proposed method.Fig.2 illustrates representative images from three datasets.Firstly,the dataset is used in this study,namely COVID-19,which is available from https://github.com/UCSD-AI4H/COVID-CT.The dataset contains 349 CT images of COVID and 463 CT images of non-COVID,which are from 216 COVID-19 patients and 55 non-COVID patients,respectively.CT images are collected from papers published in journals such as medRxiv,bioRxiv,NEJM,and JAMA,and Lancet et al.Secondly,we use the Kaggle’s challenge dataset from https://www.kaggle.com/andrewmvd/covid19-ct-scans,which is named Kaggle-COVID-19 and contains 20 CT scan images of patients with COVID-19.Finally,the images of the Covid-Chestxray dataset are retrieved from the open-access Github repository including COVID-19 CT images and bacterial pneumonia(MERS,SARS,ARDS),and the URL is https://github.com/ieee8023/covid-chestxray-dataset.Representative images are shown in Fig.2.
Figure 2:Samples of three datasets
The comparison results using COVID-19 are summarized in Tables 1-3.As shown in these tables,it is evident that the average value of the SIE by the proposed method,outperformed all the compared four methods.This finding indicates that the proposed method achieves a better denoising effect among all the images.However,compared to the average value ofPrecision[33],our method’s value is 0.9997 in the COVID-19 dataset,which is higher 0.0016 than COVID-Chestxray and lower 0.0002 than Kaggle-COVID-19.Moreover,in terms ofRecall,we found that the average value is 0.9551 in the COVID-19 dataset,which is slightly lower(0.5574 and 0.9346)than those obtained by Kaggle-COVID-19 and COVID-Chestxray.In addition,the value ofF-Scoreis biggest in COVID-19 dataset than Kaggle-COVID-19 and COVID-Chestxray dataset.
Table 1:Results on the COVID-19 dataset for four algorithms and the proposed method.The best results are shown in bold font
Table 2:Results on the Kaggle-COVID-19 dataset for four algorithms and the proposed method.The best results are shown in bold font
Table 3:Results on the COVID-Chestxray dataset for four algorithms and the proposed method.The best results are shown in bold font
In addition,we need to calculate the average time of the CT images from COVID-19,COVIDChestxray,and Kaggle-COVID-19,meanwhile,the average time is shown in Fig.3.The average times are 15.3850,15.1755 and 11.3000 s of the proposed method in COVID-19,Kaggle-COVID-19,and COVID-Chestxray respectively,which are shorter than the multiscale morphology,MMTS,GFMM,and MTHT.Moreover,according to the results of the average time by comparing three datasets,we find that the edge detection of the proposed algorithm in the COVID-19 dataset has the shortest time.And the specific content is shown in the Fig.3.
Figure 3:The comparison with the average time
Considering all factors,we believe that the experimental results of the proposed algorithm on COVID-19 are better than Kaggle-COVID-19 and COVID-Chestxray.Fig.4 shows the processing effect images of the proposed algorithm under different steps on the COVID-19 dataset.The marked part in red of the original image is the lesion to be detected.Firstly,for effectively smoothing image boundary and enhancing the image detail,the GF_SSR based on Gaussian filtering and SSR is applied to preprocess the image.Then,determined the image preliminary outline by improving multiscale morphology,but the boundary of the inspected image is not clear.Finally,used the PSO algorithm perform adaptive threshold binarization of images[34],which can further strengthen the weak edge of the image.And in Fig.5,we automatically obtain the optimal dual thresholds are 38 and 105,respectively.These processes have the capability of detecting lesion parts in the image with reduced noise and improved the detection rate of weak edges.
Figure 4:The process images of the proposed algorithm
The subjective evaluation indicator of edge detection is determined by the good visibility of the detected edge.Using the proposed model,the edge detection results of three type’s lesions from the COVID-19 dataset are shown in Figs.5-7.We can see from the results that the multiscale morphology algorithm,the MMTS algorithm,the GFMM algorithm,and the MTHT algorithm can detect many false edges when tending to obtain more real edges.The proposed edge detection method can detect the lesion edge in the CT images with more noise and weaker edges.In addition,from the visual effect of result images,we can also find that the detected edges are clear and more continuous in the proposed method than the edge detection results using the other four methods.Meanwhile,the proposed method can be applied to the CT image edge detection-related applications.
Figure 5:The edge detection images of paving road shape
Figure 6:The edge detection images of Single ground glass shadow
Figure 7:The edge detection images of multiple ground glass shadow
3.4.1 Paving Road Shape
To verify the effect of edge detection,the multiscale morphology algorithm,the MMTS algorithm,the GFMM algorithm,and the MTHT algorithm,and the proposed algorithm are used to carry out experiments on paving road shape.The result obtained is shown in Fig.5,we can conclude that the experimental results of the proposed algorithm are better than the other four algorithms after analysis.
3.4.2 Single Ground Glass Shadow
In our experiment,we test the effect of edge detection in single ground glass shadow,the result is shown in Fig.6.We can see that the lesion’s edge is not clear and has more noise by multiscale Morphology,MMTS,GFMM,and MTHT algorithms.We found that the detected lesion’s edge and the denoising effect are best.
3.4.3 Multiple Ground Glass Shadow
As an assistant feature extraction and segmentation means,edge detection is expected to offer more accurate information.In multiple ground glass shadow images,the subjective performance comparisons among five algorithms are shown in Fig.7.Fig.7f shows the proposed method’s advantage,which is to automatically obtain clear edge through the PSO algorithm.Thus,it can be seen clearly that the edge detection results of the proposed method are satisfactory.
This paper studies the capability of edge detection at CT images of COVID-19.For detecting CT images edge,a method has been proposed,combining GF_SSR and IMSM_ATB.Based on the Gaussian filter and SSR algorithm,we can remove noise and enhance the weak edge.In addition,we use improved Multiscale morphology to detect the image’s initial edge,however,which is not clear.Finally,we have proposed the use of the PSO algorithm to obtain dual thresholds for image binarization,thereby significantly enhancing the weak edge and producing the final edge image.In the experiment,five closely related algorithms namely multiscale morphology,MMTS,GFMM,MTHT,and the proposed method are compared to check the de-noising and image edge detection effect.Meanwhile,we select Shannon Information Entropy,Precision,Recall,F-Score,and the running time is as evaluation indexes.In this work,according to the test results of Shannon information entropy,Precision,Recall,F-Score,and the running time,we find that the proposed method is better than multiscale morphology,MMTS,GFMM,and MTHT.Moreover,compared with the Kaggle-COVID-19 and the COVID-Chestxray datasets,the COVID-19 dataset can get better results.The simulation results indicate that the proposed method can improve the edge detection accuracy and robustness to noise than the other methods on the COVID-19 dataset.Therefore,the high efficiency and the relatively high precision can be considered as one of the advantages of the proposed method at the edge detection.In the future,we should further study the connectivity of weak edges in order to obtain better detection results.
Funding Statement:Research on the Application of MR Technology in the Teaching of Emergency Nursing Training(HBKC217154).
Conflicts of Interest:The authors declare that they have no conflicts of interest to report regarding the present study.
Computer Modeling In Engineering&Sciences2022年7期