1 Introduction

Since December 2019, Coronavirus Disease (COVID-19) has spread in all over the world in very short time with a very terrifying effect on billions of people life's. The international community declared a public health emergency in February and the World Health Organization (WHO) recognized COVID-19 as a pandemic. Furthermore, all medical reports around the world have confirmed that COVID-19 is a highly contagious disease that may lead to acute pneumonia, followed by death in most cases. Therefore, the main goal to safely maintain public health care, the infected people must be accurately identified and then isolated them very quickly to limit the spread of the COVID-19 disease (WHO 2020a, b, c, d, e, f, g, h).

Although the most common symptom of Coronavirus is a high temperature, it is not sufficient evidence to confirm infection, and therefore doctors resort to conducting PCR medical swabs in order to confirm the infection (Pan American Health Organization 2020; WHO 2020i, Korea Ministry of Environment 2020; Centers for Disease Control and Prevention 2020; WHO 2020j, k, l). The result of the corona examination usually takes between 24 and 72 h, because laboratory should examine the genetic material of the virus in the patient’s cells to ensure that he is infected or not, so that the result is accurate. Unfortunately, error in result is possible in some cases to issue a negative result even though the person is already infected with the virus, and this is due to many reasons such as the disease is still in a very early stage and there are few viruses in the airway inside the body. Moreover, trouble in taking different nose samples with different types of swabs and different levels of accuracy. Hence the need to create an alternative solution that facilitates rapid examination as PCR medical swabs do not give the prompt detection of patients quickly in order to isolate positive cases (Liang 2020). Clinical experts have recommended the importance of using medical images as a quick and available solution against the rapid spread of the virus (Xie et al. 2020; Shi et al. 2020). Medical imaging techniques such as chest X-rays or computerized tomography (CT) scanners have performed an important role in combating the transmission of the COVID-19 virus. In China, suspected cases of COVID-19 were identified successfully at an early stage from CT scans which has speeded up the patient's isolation (Kanne 2020).

The strategy of CT and MRI are applied to detect several diseases such as tuberculosis, pneumonia, tumors in lungs and other membrane covering the lungs. However, CT and MRI systems suffer from some complex features, gray scale convergence of the various soft tissues, and low contrast density. Therefore, segmentation is applied as an optimal solution for improving the lung CT and MRI analysis in recent years. Computerized segmentation using variety of approaches has become an essential step in computer-aided diagnosis and treatment planning with different advantages and limitations (Chaganti and Balachandran 2020; Zhao et al. 2020; Pise et al. 2017; Gordaliza et al. 2018). To track an effective and fast COVID-19 treatment, computerized lung CT or MRI slices of the suspected patient are segmented with a suitable algorithm. Then, these segmented sections are analyzed and image pixels are clustered to obtain a detailed image clarifying the affected areas. Moreover, the collected parts show the large contrast in the characteristics of the infection, and the low-intensity contrast between infection and normal tissues, making it easier for the medical team to make appropriate decisions for each disease case separately (Jin et al. 2018, 2020; Brunda et al. 2018; Kamble et al. 2020; Fan et al. 2020; Bernheim et al. 2020; Shen et al. 2020). Unfortunately, during COVID-19 detection, some regions resulting from segmentation algorithms have low contrast and clarity features, especially in gray-scale images, which get worse with any image noise. Therefore, the segmentation output must re-process to compute the local image features and capture image redundancy with less complexity.

In medical field, various segmentation techniques could be used for segmented the infected regions for diagnosis different diseases. Thresholding segmentation is a simple method for partition regions according to pixel values but it has a great disadvantage of reducing the information to a binary variable. This could not accurately segment the infected regions in medical image for precise diagnosis and treatment. The watershed method has the disadvantage that it is highly sensitive to local minima that assign regions. Noise in images severely influence the segmentation regions.

Super-pixel resolution segmentation technologies are mainly based on two approaches graph-based methods and clustering methods. The graph-based methods implement segmentation based on partition regions with maximum similarities. A recursive process should be implemented for visiting the nodes in the graph that determine the regions with maximal similarities. Therefore, looking for the partition on a graph is a complex procedure, takes longer processing time, and it is difficult to integrate control about similarity and features of the segmented regions. these are considered some of the disadvantages of the graph-based methods.

In contrast, the Simple Linear Iterative Clustering (SLIC) technique is a simple and a powerful tool for generating significative image partitions. The clustering is performed based on aggregating pixels on a local window. In the SLIC technique, each pixel is represented and distinguished by a five-dimensional vector. Three components of the vector declare the colour and two components identify its position. The pixels' colour representation gives a good similarity measure for colour perception to increase its ability for effectively differentiate regions in an image. The SLIC algorithm appoints regions by three prime stages:

  1. 1.

    Creates initial regions according to a parameter that defines the desired number of super pixels. In the proposed algorithm, the MCFO optimization technique could provide the optimal parameter value for optimum segmentation results.

  2. 2.

    Performs region clustering to aggregate pixels to the regions according to the similarity criteria.

  3. 3.

    Strengthen connectivity.

The goal of this work is to introduce an automated segmentation as a screening aid for COVID-19 and assessing the degree of infection using chest CT images. The proposed frame work combined an MCFO optimized segmentation process with a super-resolution (SR) in order to produce a sequence of higher resolution image against blurring, resolution decimation, and noise. The extensive chest CT and MRI images of the segmentation based on the SR concept showed better efficiency and flexibility with image enhancement in the computer simulations comparing to the state-of-the-art segmentation approaches only.

The rest of this paper is structured as follows. Section 2 explores and explains the previous related work. Section 3 explores the applied main preliminaries. Section 4, introduces the suggested framework. Section 5 investigates the evaluation matrices analysis and its numerical results. Section 6 explores and discusses the simulation analysis. The paper is concluded in Sect. 7.

2 Related work

Utilization of computer vision in medical assessments has been employed for screening chest CT and MRI images. Recently, SR algorithms have achieved an impressive success in several computer vision applications to manipulate the existing methods such as image segmentation, classification, object recognition, tumors detection and tracking objects in videos.

In Achanta et al. (2012), an empirically comparison of five SR algorithms are done and their impact on segmentation performance for their ability to adjust the boundaries of an image, speed, memory efficiency. Also, the work suggested a new algorithm called simple linear iterative clustering to improve segmentation performance, speed and memory efficient. Different segmentation algorithms with varying their parameters are employed to introduce a novel segmentation method with an effective super-pixel using a principled bipartite graph partitioning scheme (Li et al. 2012). The proposed method results on the Berkeley Segmentation Database have presented superior performance in terms of both quantitative and perceptual criteria.

To produce compact and uniform super pixels with low computational costs, another segmentation algorithm called linear spectral clustering is presented in (Li and Chen 2015). The work used a kernel function leading pixel values to a high dimensional feature space. The proposed method has a linear computational complexity with an efficient memory able to preserve global images properties. In El Amraoui et al. (2016), based on a quantum computation concept, a new edge detection algorithm is presented for medical images. The algorithm implemented in two stages: the image under the quantum states' superposition property is enhanced to determine the values of adequate quantum pixels'. Then, image edges extracted based on Shannon entropy. The proposed algorithm results are compared to others' classical edge detection methods which showed a promising approach. In Maghsoudi et al. (2017), an automatic segmentation to quantify the kinematics of high frame rates (250 Hz) is presented as it considered the premier models of human disease. Recently, an animal locomotion has played very important role in the most common diseases assessments. The authors suggested two methods using SLIC super pixels segmentation with a tracker and thresholding on hue channel with the same tracker. SLIC super pixels method was proved its reliability and superior performance.

A new technology called a wireless capsule endoscopy (WCE) for recording the entire GI trace in vivo can captured several frames during an examination making diagnosis difficult. In Maghsoudi (2017), a segmentation technique of polyps in WCE frames using different simple linear iterative clustering super pixel numbers is investigated. A support vector machine (SVM) is applied for classifying the super pixels features with a sensitivity of 91%. In Xiao et al. (2018), a new content-adaptive super pixel segmentation including embraces color, contour, texture, and spatial features is presented. The proposed technique is able to adjust the different features weights automatically and iteratively to fit various properties of image instances in very low computational cost.

As mentioned, segmentations of CT and MRI scans have provided great information in qualitative evaluation of COVID-19 infection and fighting against it. Therefore, the authors proposed a segmentation procedure using a Cuckoo Search-Algorithm monitored Kapur/Otsu image thresholding to extract the COVID-19 infection in Satapathy et al. (2020). Also, a comparative study between Level-Set (LS) and Chan-Vese (CV) two segmentation algorithms are investigated which ensures the superiority of the CV. In Zhou et al. (2020), a fully automatic, rapid, accurate, and machine-agnostic method is proposed to identify the regions affected by COVID-19 using CT scans and then segmented it. The proposed algorithm measured real patients’ data at different time and resolve the large-scene small-object issue using the 3D segmentation to reduce the complexity. The work in Ávila et al. (2020) aims to help radiologist in the assessment of the Chest images by a fast, user-friendly, and accurate digital method. The work applied an accurate segmentation using super pixels analysis to differentiate between positive and negative cases. Image metrics results of the segmented lung areas proved the proposed method capabilities. In Castiglione et al. (2021), Aniello Castiglione and others proposed a new technique for classifying CT chest images to detect corona virus in patients based on an optimized Conventional Neural Network using (ADECO-CNN) model. The results have been compared with pretrained CNN based (VGG 19), GoogleNet, and ResNet models. The proposed methodology has proved better performance with higher accuracy, sensitivity, and precision. In Umer et al. (2021), Muhammad Umer and others proposed a methodology based on CNN network to extract features from chest X-ray images and classify into four classes: Normal, Virus pneumonia, Bacterial pneumonia, and Covid-19 patients. The proposed approach implements three filters for enhancing edge segmentation for the infected area and Keras’ Image Data Generator that produce ten thousand augmented images that better handles smaller size datasets.

In Namasudra et al. (2021), a novel Nonlinear Autoregressive (NAR) Neural Network Time Series (NAR-NNTS) model for forecasting COVID-19 cases has been proposed. This model is trained with Scaled Conjugate Gradient (SCG), Levenberg Marquardt (LM) and Bayesian Regularization (BR) training algorithms to increase the reliability and accuracy of COVID-19 prediction. In Zhao et al. (2019), Xinchao Zhao introduced a survey on the technologies and inspiring new ideas for web service selection and composition. In Namasudra (2020), a novel DNA computing based secure and fast Access Control Model (ACM) is proposed for securing biomedical data over the cloud with fast data accessing. In Rasim et al. (2020), a study has been presented to proposes a new parallel clustering algorithm for analysing the big data based on the k-means algorithm and reducing the exponential growth of computations. An article of Chakraborty et al. (2021) presents an improved version of Fractional Order Darwinian PSO (IFODPSO) for segmenting 3D histogram-based color images at multiple levels. Also, a delta potential model of quantum mechanics has been incorporated with FODPSO for updating the particle’s present as well as global position. This provides a better discrimination between different segmented objects. An important survey study has been introduced in Li et al. (2019). This paper presents a survey for some popular similarity measure methods of cloud models as it is a useful tool to describe uncertain problems and plays a significant role in uncertain artificial intelligence due to its strong ability for describing fuzziness, randomness and their connection.

3 Preliminaries

3.1 Local Laplacian filter

Although, Laplacian pyramid is constructed for decomposing images using spatially invariant Gaussian kernels, it is not able to illustrate edges well. Various alternative techniques have been suggested for edge-aware manipulation while keeping simplicity and flexibility (He et al. 2013).

The Local Laplacian filter employs edge operators to represent the output image O by applying the Laplacian pyramid \(\left\{ {L\left[ O \right]} \right\}\) which is based on the center pixel local neighborhood of an image. At level \(l\) and position \(\left( {x,y} \right)\), the Laplacian coefficient can be estimated in the following steps as: (1) Compute the Gaussian coefficient pyramid \(\left\{ {G\left[ I \right]} \right\}\) at level \(l\) and position \(\left( {x,y} \right)\). (2) Determine the local neighborhood \(R_{l}\) which is similar to the required result and the intensity \(I\) that is closely near to the input image pixel intensity distance.\(I\) can be calculated as the absolute of the pixel intensity difference to the reference value called \(g\) or the Gaussian pyramid coefficient at \(\left( {l,x,y} \right)\), \(g = \left\{ {G_{l} \left[ I \right]\left( {x,y} \right)} \right\}\). (3) Apply a point wise nonlinearity remapping function \(r\) for processing \(R_{l}\) and compute the sub-pyramid \(\left\{ {L\left[ {r\left( {R_{l} } \right)} \right]} \right\}\). (4) Update the output pyramid coefficient for the output image O as \(\left\{ {L_{l} \left[ O \right]\left( {x,y} \right)} \right\} = \left\{ {L_{l} \left[ {r\left( {R_{l} } \right)} \right]\left( {x,y} \right)} \right\}\).

The remapping function \(r\) is a piecewise function with a threshold \(\sigma_{r}\) to identify small-scale details and large-scale edges (He et al. 2013).

$$r\left( i \right) = \left\{ \begin{aligned} g + sign\left( {i - g} \right)\sigma_{r} \left( {\left| {i - g} \right|/\sigma_{r} } \right)^{\alpha }\quad if\;\left| {i - g} \right| \le \sigma_{r} \hfill \\ g + sign\left( {i - g} \right)\left( {\beta \left( {\left| {i - g} \right| - \sigma_{r} } \right) + \sigma_{r} } \right)\quad\;if\;\left| {i - g} \right| \succ \sigma_{r} \hfill \\ \end{aligned} \right\}$$
(1)

where \(\alpha\) adjusts the detail amount increase \(0 \le \alpha \triangleleft 1\) or decrease \(\alpha \triangleright 1\), β adjusts the compression dynamic range \(0 \le \beta \triangleleft 1\) or expansion \(\beta \triangleright 1\).

If the input image pixel intensity distance is smaller than \(\sigma_{r}\), the small-scale details are considered, and if it is larger than \(\sigma_{r}\) the large-scale edges are considered.

For edge-preserving image smoothing, an enhanced local Laplacian filter using relative total variation is examined in Yua and Yiquana (2018). It consists of windowed total and inherent variations. The windowed total variation can be considered as the gradients absolute estimate Gaussian convolution which may be computed as (Yua and Yiquana 2018):

$$D_{x} \left( P \right) = \sum\limits_{q \in R(p)} {g_{p,q} \left| {\left( {\partial {}_{x}S} \right)_{q} } \right|} ,D_{y} \left( P \right) = \sum\limits_{q \in R(p)} {g_{p,q} \left| {\left( {\partial {}_{y}S} \right)_{q} } \right|}$$
(2)

where \(D_{x}\) and \(D_{y}\) represent the windowed total variations in x-direction and y-direction for the pixel \(p\). \(q\) depends on the local neighborhood \(R(p)\) centered at pixel \(p\) and \(g_{p,q}\) can be represented according to spatial affinity as weighting function and can be computed as (Yua and Yiquana 2018):

$$g_{q,p} \propto \exp \left( { - \frac{{\left( {X_{p} - X_{q} } \right)^{2} + \left( {X_{p} - X_{q} } \right)^{2} }}{{2\sigma^{2} }}} \right)$$
(3)

where \(\sigma\) can control the window spatial scale. The detail and structure pixels of the salient textures image yield large \(D_{x}\) and \(D_{y}\) which indicates visual saliency of the windowed total variation. To identify the prominent elements from texture elements, besides \(D\), the technique has a windowed inherent variation (Yua and Yiquana 2018).

3.2 Super pixel segmentation methods clustering-based: simple linear iterative clustering (SLIC)

Digital image segmentation converted image to a number of split regions or clusters. But, SR segmentation technique collects similar color or grayscale levels and structural properties of image pixels to build significant clusters with high sensitive (Lee et al. 2015; Li and Chen 2015). SR greatly reduces the image processing complexity and segmentation processing time with high quality. However, some of the SR recent methods do not achieve all requirements.

The proposed work supported an SR algorithm with high quality, compact, nearly uniform more efficiently and excellent perceptually characteristics than other methods like SLIC.

The SLIC is a SR gradient ascent-based scheme introduced in 2012 (Achanta et al. 2012). It has gradually used in medical image processing to performs a local clustering of pixels with very low computational speed and good boundary characteristic.

The SLIC algorithm is an over-segmentation method which has been applied to the medical image for superior performance. From the sampled regular grid spaced S, SLIC selects centers of clusters Ci to generate SR efficiently. S can be estimated as \(\sqrt{\frac{N}{K}}\).

Where N and K are the image pixels and desired SR number. Also, SLIC algorithm found the identical pixels in every cluster center within a 2S*2S setting area instead of the whole image and produce super-pixels quickly. SLIC integrates the color proximity with the spatial distances in a distance estimate D. D can be estimated as (Achanta et al. 2012):

$$D = \sqrt {\bigg(\frac{{d_{c} }}{{N_{c} }}\bigg)^{2} + } \bigg(\frac{{d_{s} }}{{N_{s} }}\bigg)^{2}$$
(4)

where \(d_{c}\) and \(d_{s}\) are the color proximity and space proximity. The \(d_{c}\) and \(d_{s}\) values can be computed as (Achanta et al. 2012):

$$d_{c} = \,\sqrt {\left( {l_{j} - l_{i} } \right)^{2} + \left( {a_{j} - a_{i} } \right)^{2} + \left( {b_{j} - b_{i} } \right)^{2} }$$
(5)

And

$$d_{s} = \,\sqrt {\left( {x_{j} - x_{i} } \right)^{2} + \left( {y_{j} - y_{i} } \right)^{2} }$$
(6)

where [\(l\),\(a\), \(b\)]T lab and [x, y]T are the pixel’s color in CIE LAB color space and pixel’s position.

3.3 MCFO optimization technique

Building a strong, reliable, and accurate super pixel segmentation algorithm is mainly applied to accomplish super performance by adjusting the optimum conditions. The local Laplacian filter provides the best edge-preserving for images to be segmented. This encouraged us to propose an optimized technique for choosing the optimum N parameter value that determines the number of pixels required in the image for SLIC algorithm for achieving the highest image quality rich of details information and higher ability to accurately detect segmented boundaries in COVID-19 CT lung scans. Several optimization strategies are successfully performed in various medical fields to identify the optimal parameters values using particular constrains. The primary objective is to determine the optimum N parameter value for SLIC algorithm. Therefore, the optimization concept implemented consists of three stages starting with generating a twenty set of N parameter values randomly. Then perform the SLIC algorithm on the enhanced images based on local Laplacian filter using the first N value and evaluating the obtained image quality using quality metrics of accuracy, boundary recall, and jaccard. Finally, the super-pixel segmentation is employed many times till obtaining the optimum value of N that achieves the highest accuracy, boundary recall, and jaccard.

The CFO algorithm is considered as a population-based meta-heuristic scheme which makes the decision space (DS) through employing probes set (Np) which their trajectories can be controlled by identical gravitational equations in physical motion (Elhoseny et al 2018a, 2019a, 2018b, 2019b; El-Hag et al. 2020). With CFO, every probe (R) has three parameters which are fitness value (M), acceleration vector (A), and position vector. The MCFO improves CFO through employing two modifications to govern and enhance the accuracy and memory capability to update the probe's position based on the previously superior visited positions. The acceleration can be updated as (Elhoseny et al 2018a):

$$A_{j - 1}^{p} = G_{i} \sum\limits_{\begin{subarray}{l} k = 1 \\ k \ne p \end{subarray} }^{{N_{p} }} {U\left( {M_{j - 1}^{k} - M_{j - 1}^{p} } \right)} \times \left( {M_{j - 1}^{k} - M_{j - 1}^{p} } \right)\frac{{\alpha \left( {R_{j - 1}^{k} - R_{j - 1}^{p} } \right)}}{{\left. {\left\| {\left( {R_{j - 1}^{k} - R_{j - 1}^{p} } \right)} \right.} \right\|}}$$
(7)
$$G_{j} = G_{o} \exp \left( {\frac{ - j\gamma }{{N_{t} }}} \right)$$
(8)

The probe position can be updated as (Elhoseny et al 2018a):

$$R_{j}^{p} = R_{j - 1}^{p} + C1_{j} rand_{1} \left( {} \right)A_{j - 1}^{p} \Delta t^{2} + C2_{j} rand_{2} \left( {} \right)\left( {R_{best} - R_{j - 1}^{p} } \right)\Delta t,{\kern 1pt} j \ge 1$$
(9)
$$C1_{j} = C1^{\max } - \frac{{C1^{\max } - C1^{\min } }}{{N_{t} }} \times j$$
(10)
$$C2_{j} = C2^{\max } + \frac{{C2^{\max } - C2^{\min } }}{{N_{t} }} \times j$$
(11)

where \(G_{o}\) and \(G_{i}\) are the gravitational constant and current gravitational. \(\upgamma\) \(\gamma\), \(p\), and \(N_{t}\) are the descending coefficient factor, probe number, and maximum iterations number. C1 and C2 represent the time-varying acceleration coefficients. \({\mathrm{rand}}_{1}\) \(rand_{1}\) and \(rand_{2}\) represent the two random numbers ranged from [0, 1]. U(.) and \(\Delta t\) are the unit step function and unit time step increment. Finally, \(\alpha\) and \(\beta\) represent are the CFO exponents. For evaluating the segmented images, the fitness value of the presented scheme, is the maximum accuracy, boundary recall, and jaccard of the segmented images which are the most commonly trusted measuring metrics.

4 The proposed algorithm

Due to the difficulty of diagnosing the degree of infection with the Coronavirus, as the Corona virus spreads rapidly in multiple parts with different sizes of the lung, which are difficult to be segmented to determine the severity of the virus infection by traditional segmentation methods. It is very important to detect the infected parts of the lung from the first day of the onset of symptoms and follow their spread day after day. This provides an appropriate diagnosis for specialists, enabling them to accurately study the impact of the virus and determine the extent of its spread and the lung's response to healing, using the appropriate treatment methods. Therefore, this research proposed a novel improved algorithm for super pixel segmentation of CT images based on modified central force optimized Simple Linear Iterative Clustering (SLIC) algorithm and local Laplacian filter. The main flow chart of the proposed scheme is presented in Fig. 1.

Fig. 1
figure 1

The proposed MCFO-SLIC scheme with local Laplacian filter

The main steps of the proposed algorithm are:

Step 1: first, implement the local Laplacian filter to the input CT images that efficiently provides higher contrast for large-scale edges and small-scale details edges than textures. This introduces better detection for multiple infected parts with different sizes of the lung

Step 2: the MCFO optimization technique is implemented to optimize cluster number required to the Simple Linear Iterative Clustering (SLIC) for providing better segmentation accuracy

Step 3: the super pixel segmentation is implemented

Step 4: the proposed algorithm is evaluated using different quality metrics and compared to traditional thresholding segmentation

4.1 Evaluation metrics

Some evaluation metrics are performed to calculate the accuracy of the proposed framework such as Accuracy, Jaccard, Boundary Recall, and F measure. The efficiency of the proposed framework is calculated by using the standard metrics (Xiao et al. 2018; El-Hag et al. 2020).

The evaluation matrices are determined by the following formulas, where TP, TN, FP, and FN are true positive cases, true negative cases, false positive cases, and false negative cases. A true positive is a result when the model correctly predicts the positive class. In a similar way, a true negative is a result when the model correctly predicts the negative class. These variables are measured to produce the confusion matrix that used for calculating the following evaluation metrics as Eqs. (1217).

The accuracy represents the percentage of image pixels that are classified correctly as (Xiao et al. 2018):

$$Accuracy = \frac{{correctly{\kern 1pt} {\kern 1pt} \;predicted{\kern 1pt} {\kern 1pt} {\kern 1pt} \;pixels}}{{Total\,\;{\kern 1pt} image{\kern 1pt} {\kern 1pt} \;\,pixels}} = \frac{TP + TN}{{TP + FP + TN + FN}}$$
(12)

The Sensitivity (Boundary Recall) is the ratio of illness pixels in the ground truth that were correctly defined through segmentation automatically in correct manner. The sensitivity can be estimated as (Xiao et al. 2018):

$$Sensitivity = \frac{{correctly{\kern 1pt} {\kern 1pt} \;predicted{\kern 1pt} {\kern 1pt} {\kern 1pt} \;disease\;\;pixels}}{{Total\,\;number{\kern 1pt} {\kern 1pt} \;of\;actual\;\,disease\;\;pixels}} = \frac{TP}{{TP + FN}}$$
(13)

The F measure: precision and recall are used with each other to evaluate F measure. The F measure can be estimated as (Xiao et al. 2018):

$$F_{measure} = 2 \times \frac{{\Pr ecision \times {\text{Re}} call}}{{\Pr ecision \oplus {\text{Re}} call}}$$
(14)

Jaccard is the ratio of the region of the intersection between the expected segmentation and the ground truth segmentation to their union. It can be estimated as (Xiao et al. 2018):

$$Jaccard = \frac{TP}{{TP \oplus FP \oplus FN}}$$
(15)

In many medical vision tasks, the Jaccard index is used as a performance evaluation index in segmentation. Jaccard index is a useful tool in similarity measures to handle data sparsity problem that represents the ratings frequency allocated by users. Jaccard similarity coefficient for two different image segmentations using binary medical image segmentation as a set of pixels labeled as BW1 and BW2. Therefore, Jaccard’s Index is between 0 and 1.

The DICE similarity coefficient is an efficient evaluation that illustrated the difference between the segmented image and the ground truth. The Dice can be estimated as (Xiao et al. 2018):

$$Dice = 2 \times \frac{2 \times TP}{{2 \times TP \oplus FP \oplus FN}}$$
(16)

Matthews’s correlation coefficient can be estimated as (Xiao et al. 2018):

$$MCC = \frac{{\left( {TP \times TN - FP \times FN} \right)}}{{\sqrt {\left( {TP + FP} \right)} \times \left( {TP + FN} \right) \times \left( {TN + FP} \right) \times \left( {TN + FN} \right)}}$$
(17)

5 Simulations and discussions

The proposed segmentation system evaluation is carried out using several simulation tests. MATLAB R2018a under windows 10 on an Intel laptop with core i7 processor, and 8.0 GB RAM were employed on 64 different datasets of CT COVID-19 cases (GISAID 2020; Fang et al. 2020; Xie et al. 2020; Bernheim et al. 2020). Description of some of the implemented CT scans is shown in Table. 1 to provide the main information of CT scan images such as: (Size, Resolution, Bit depth, Color type, Format Contrast, Entropy).

Table 1 The implemented datasets details and definitions

The main processing of the SLIC algorithm is to implement the clustering techniques based on similar color or grayscale levels features and structural properties of image pixels to build significant clusters with highly sensitive. If the number of clusters is too few, the SLIC algorithm will have fewer grayscale levels features and could not detect the boundaries of infected regions accurately so the segmentation process of these clustered regions could not present precise information of the infected regions. Also, if the number of clusters is too large, the SLIC algorithm will have too many grayscale levels features and will cause noise in detecting the infected regions. Therefore, the proposed algorithm based on the MCFO optimization technique is implemented to optimize the N parameter value for optimum detection of the infected regions and provides a precise follow-up for the COVID-19 cases study.

From the visual images provided in Table 2, the proposed optimized super pixel resolution and segmentation algorithm provides better detection and much more details for the multiple infected parts with different sizes of the lung better that the traditional thresholding segmentation which could not detect various and small infected regions in the input images. The thresholding segmentation could not detect the small infected regions and thus it will not be able to provide an accurate diagnosis of the severity of the affected case, nor an accurate study of the performance of the Corona virus during the follow-up of the sick cases, which have an important and vital role in discovering the appropriate treatment. The proposed optimized super pixel segmentation algorithm has achieved better visualization for segmenting the small infected regions due to optimizing the required N number for SLIC algorithm that enhancing clustering performance and enhancing the edges retrieval using local Laplacian filter. The proposed algorithm is also evaluated using different evaluation metrics such as: accuracy, boundary recall, F-measure, and Jaccard. This can be introduced in Figs. 2, 3, 4 and 5 and Table 3.

Table 2 The proposed Optimized Super Pixel resolution and segmentation for different data sets and the segmented images using traditional thresholding segmentation
Fig. 2
figure 2

Accuracy measurement of the proposed MCFO-based SLIC segmentation algorithm and thresholding segmentation

Fig. 3
figure 3

F-Measure quality metric of the proposed MCFO-based SLIC segmentation algorithm and thresholding segmentation

Fig. 4
figure 4

Jaccard quality metric of the proposed MCFO-based SLIC segmentation algorithm and thresholding segmentation

Fig. 5
figure 5

Boundary recall metric of the proposed MCFO-based SLIC segmentation algorithm and thresholding segmentation

Table 3 The performance of the proposed MCFO-based SLIC segmentation and thresholding segmentation on different data sets measured based on the accuracy, F-measure, Jaccard, and boundary recall quality metrics

Figures 2, 3, 4 and 5 and Table 3 have introduced the performance evaluation of the proposed MCFO-based SLIC segmentation algorithm and thresholding segmentation using quality metrics of accuracy, F-measure, Jaccard, and boundary recall. For the accuracy measuring metric that represents the percentage of image pixels that are classified correctly, the proposed MCFO-based SLIC segmentation algorithm has introduces higher accuracy values for all the implemented COVID-19 cases and this indicates higher ability for detecting the infected regions with different sizes precisely much better than the traditional thresholding segmentation. The Boundary Recall measuring metric that indicates the ability of the algorithm for performing the segmentation automatically in a correct manner, the proposed MCFO-based SLIC segmentation algorithm has introduces higher reliability and efficiency for segmenting the infected regions in all COVID-19 cases. The F-measure and Jaccard measuring metrics, that proves the trustability and effectiveness for detecting the correct segmentation compared to the ground truth, have proved better performance of the proposed algorithm. Hence, as the proposed MCFO-based SLIC segmentation algorithm has achieved higher performance than the traditional thresholding segmentation and better detection of small infected regions represented in the higher values of boundary recall and Jaccard metrics for all the implemented cases. This proves higher efficiency for providing an accurate and precise studying for the COVID-19 cases helping the specialists in finding the appropriate treatment.

Table 4 introduces the performance evaluation metrics of the proposed MCFO-based SLIC segmentation and thresholding segmentation on different data sets measured based on the MCC, Dice, and Similarity quality metrics. These metrics are used to measure the implemented algorithm’s ability to separate affected regions. From these results, it is clear that the proposed MCFO-based SLIC segmentation algorithm has achieved better detection for the small infected regions in CT lung scans than the thresholding segmentation. This could help the specialists for accurate diagnosing and precise follow-up and studying the effect of Corona virus to determine the appropriate treatment.

Table 4 The performance of the proposed MCFO-based SLIC segmentation and thresholding segmentation on different data sets measured based on the MCC, Dice, and Similarity quality metrics

Table 5 held a comparison for the performance evaluation of the proposed algorithm and other proposed methods in (Castiglione et al. 2021; Tello-Mijares and Woo 2021; Umer et al. 2021) for detecting COVID-19 infected regions in different CT lung images. The proposed MCFO-based SLIC segmentation algorithm has achieved better detection for the small infected regions in CT lung scans with higher accuracy, F-measure, Jaccard, and boundary recall metrics values. This indicates better performance for automated detection for Covid-19. This could help the specialists for accurate diagnosing and precise follow-up and studying the effect of Corona virus to determine the appropriate treatment.

Table 5 Comparison between the performance of the proposed algorithm and other related techniques for detecting COVID-19 infected regions in different CT lung images

In this section the proposed algorithm based on MCFO optimization has been evaluated and compared to other optimization techniques of Particle Swarm Optimization (PSO), and Salp Swarm Algorithm (SSA). PSO optimization algorithm generates particles that begin moving in a search region based on the current optimum particles and changing their positions in order to find out the new optima. These new positions of particles introduce closer solution of the function to be optimized and better performance for these function until reaching the fitness solution. In each iteration, updating particles values depends on the best solution achieved of the current particle (Dervis Karaboga et al. 2009). Assuming that the starting particles are uniformly distributed over a space of x. The objective function that evaluates the position for each particle is represented in the following equation:

$$y=F\left(x\right) = -{x}^{2}+5x+20$$
(18)

The updating process of particles’ velocities can be done by Eq. (19) to move these particles into their new positions in Eq. (20) and the acceleration coefficients is calculated according to Eq. (21):

$$v_i^{t + 1} = \underbrace {v_i^t}_{{int} eria} + \mathop {\mathop {\underbrace {C_1^t\left( {pb_i^t - p_i^t} \right)}_{personal \,influence}} } + \underbrace {{C_2}U_2^t\left( {gb_i^t - p_i^t} \right)}_{Social \, influence}$$
(19)
$${P}_{i}^{t+1}={P}_{i}^{t}+{v}_{i}^{t+1}$$
(20)
$${v}_{ij}^{t+1}={v}_{ij}^{t}$$
(21)

where c1, c2 are cognitive and social constants, v is the particle’s velocity. The parameters values that have been used of implementing the PSO are c1 = 2, c2 = 2 for the acceleration coefficients and Inertia weight (W) = 0.9.

In the SSA optimization algorithm, a leader salp is determined in the search space for the required parameters. By updating the position of the salp to reach the swarm’s target in the search space according to Eq. (22) (Hegazy et al. 2020). Updating the parameter values is made until reaching the optimal values.

$${z}_{n}^{1} = \left\{\begin{array}{c}{{{p}_{n}+r}_{1}(u}_{n}-{l}_{n}){r}_{2}+{l}_{n} ,\quad {r}_{3 }\ge 0\\ {{{p}_{n }- r}_{1}(u}_{n}-{l}_{n}){r}_{2}+{l}_{n} ,\quad {r}_{3 }<0\end{array}\right.$$
(22)

where \({z}_{n}^{1}\) is the leader position, \({p}_{n}\) is the position of the food source, \({u}_{n} and {l}_{n}\) are upper and lower bound, and \({{r}_{1},r}_{2}\) are random variables.

The new positions for the followers are calculated from Eq. (23):

$${z}_{n}^{m} = 0.5 c {e}^{2}+{v}_{o}e$$
(23)

where e is time parameter, \({v}_{o}\) is the initial velocity.

The implemented parameter values are the lower bound = −100, the upper bound = 100, the number of variables = 3, the number of search agents = 30, Max_iterations = 500 (Table 6).

Table 6 Visual evaluation for the proposed optimized SLIC superpixel segmentation technique using different optimization algorithms MCFO, PSO, and SSA optimization technique on different data sets

Table 7 helds a comparision for other optimization algorithms used for optimizing the parameter values of the proposed SLIC superpixel segmentation algorithm. These optimization techniques are MCFO optimization, Particle Swarm Optimization (PSO), and Salp Swarm Algorithm (SSA).

Table 7 The performance of the proposed optimized SLIC superpixel segmentation algorithm based on MCFO optimization, particle swarm optimization (PSO), and salp swarm algorithm (SSA) on different data sets measured based on the accuracy and boundary recall quality metrics

The performance of the proposed algorithm has been measured based on the accuracy and boundary recall evaluation metrics. From the implemented results it is clear that the performance of the proposed SLIC superpixel segmentation algorithm has been enhanced greatly with the three optimization techniques however the MCFO and SSA optimization have better enhancing on the performance of the proposed SLIC superpixel segmentation algorithm. This can be proved mathematically from Eqs. (711) as The MCFO implementing two modifications to enhance the accuracy and memory capability for updating the probe's position based on the previously superior visited positions. This provides much optimized parameter estimation and better performance for the proposed algorithm.

An additional statistical tests like p-value and t-test can be implemented to analysis the performance of the proposed algorithm using MCFO optimization technique versus other population-based optimization algorithms. T-test is a metric for population-based techniques that measures the probability of obtaining the same results or the same performance by comparing the means and variences of the two groups and provides the probability of those results happening and find out if the results are repeatable for an entire population. A correlated pairs t-test would be preferred as the two algorithms have been implemented on the same data sets. T- Test can be calculated as the following equation (Guo et al.):

$${for \, paired \,samples \,x}_{0i}, {x}_{1i}\quad where\, i=1,\dots ., n$$
$${D}_{i}={x}_{0i}- {x}_{1i}$$
(24)
$$\overline{D }=\sum_{i=1}^{n}\frac{{D}_{i}}{n}$$
(25)
$${S}_{D}^{2}= \frac{{{(D}_{i}-\overline{D })}^{2}}{n-1}$$
(26)
$${T}_{pair}=\frac{\overline{D}}{{S}_{D}/{\sqrt{n}}}$$
(27)

By implementing the T-test on the results of the proposed algorithm using MCFO optimization technique compared to the other population-based optimization techniques of PSO and SSA the results are: 0.01607, 0.5843 respectively. These T values indicates that the results of higher accuracy of the proposed algorithm based on MCFO optimization did not occur by chance and the proposed algorithm is reliable with very high stability (Table 8).

Table 8 A comparison between some relevant optimized segmentation approaches

6 Conclusions and future works

An optimized super pixel resolution and segmentation algorithm based on enhanced edge-retrieval using local Laplacian filter is presented for better detection of COVID-19 small infected regions in the input CT lung images. The algorithm provided accurate detection and more details for the multiple infected parts with different sizes of the lung compared to the traditional thresholding segmentation methods that helping the specialists for automatic and fast detection of the infected regions. The proposed MCFO-based SLIC segmentation algorithm is evaluated and compared to the thresholding segmentation algorithm with the aid of various evaluation metrics like accuracy, boundary recall, F-measure, similarity index, MCC, Dice, and Jaccard. The outcome findings ensured and confirmed that the proposed MCFO-based SLIC segmentation algorithm has achieved better detection for the small infected regions in CT lung scans than the thresholding segmentation. The future directions will include: (1) enhancing the proposed MCFO-based SLIC segmentation algorithm to accurately estimate the actual size of the infected regions and classifying the degree of infection (simple, moderate or severe), (2) incorporating deep learning-based techniques to the proposed MCFO-based SLIC segmentation algorithm to enhance and achieve a high degree of segmentation, (3) building and realizing a practical implementation of the proposed MCFO-based SLIC segmentation algorithm using Field Programmable Gate Array (FPGA).