Detection of COVID-19 Based on Chest Medical Imaging and Artificial Intelligence Techniques

infected or healthy. This study was implemented in MATLAB software. The results showed that the noise cancellation technology using anisotropic filtering gave the best results. As for the optimization technology, only the brightness of the images has been increased. At the stage of segmentation of the area of lung injection using the area transplant method, the best results are detection of COVID-19 from other healthy tissues. The FFBPN gave the best results for detecting and classifying COVID-19 as well as determining whether a person has been infected or not. The results of the proposed methodology in accurate and rapid detection of COVID-19 in the lung. The contribution of this paper is to help medical staff detect COVID-19 without human intervention.


H I G H L I G H T S A B S T R A C T
• Detection of COVID-19 was studied.
• Classification of images CT scan using Feed Forward Back Propagation Network (FFBPN) and Support Vector Machine (SVM) was implemented. • SVM gives 96% accuracy and FFBPN gives 98.5% accuracy.
The emergence of COVID-19 disease in the world has moved the wheel of scientific research in order to detect it in the best method, and the fastest of these methods is the use of Artificial Intelligence (AI) techniques to help medical professionals detect COVID-19. The proposed topic is aim to develop algorithm based on combination between image processing techniques with artificial intelligence to diagnose COVID-19. The proposed algorithm consists of five stages to detect and classify COVID-19 from Computer Tomography (CT) images. These stages include; The first of these stages is to collect data from hospitals as real data and from Kaggle website for patients and healthy people, then the stage before removing the noise and converting it from RGB to grayscale, then we improve the image, segmentation and formalities, the other stage is a stage used to extract the important characteristics, and the last stage is the classification of images CT scan using Feed Forward Back Propagation Network (FFBPN) and Support Vector Machine (SVM )and compare the result between them and see if the person is infected or healthy. This study was implemented in MATLAB software. The results showed that the noise cancellation technology using anisotropic filtering gave the best results. As for the optimization technology, only the brightness of the images has been increased. At the stage of segmentation of the area of lung injection using the area transplant method, the best results are detection of COVID-19 from other healthy tissues. The FFBPN gave the best results for detecting and classifying COVID-19 as well as determining whether a person has been infected or not. The results of the proposed methodology in accurate and rapid detection of COVID-19 in the lung. The contribution of this paper is to help medical staff detect COVID-19 without human intervention.

Introduction
The COVID-19 epidemic, which began on December 31, 2019 in Wuhan, Hubei Province, China, is rapidly declared a pandemic [1][2][3]. COVID-19 is close to a virus called SARS-CoV-2. This virus quickly spread within 30 days, from Wuhan to all Chinese cities [4]. Then, to the United States of America, [5]. These viruses infected animals, then transmitted to humans this virus (SARS-CoV), known as Middle East Respiratory Syndrome (MERS-CoV), which infects the acute respiratory system and leads to human deaths [6]. Symptoms of this virus are fever, cough, fatigue, sore throat, headache, body aches and shortness of breath. Many contactless imaging techniques have been developed during the outbreak of the COVID-19 virus [7,8,9,10], including the use of the examination rooms of surveillance cameras [11][12]13] or their use of the system [14] and then the use of portable Computer Tomography(CT) [ 8,[15][16][17][18]. Automatic scanning with portable Computed Tomography (CT) scanning platform supported with visual Artificial Intelligence techniques are a prime example [8]. By using a pre-screening system as well as a diagnostic system that relies mainly on the principle of artificial intelligence [15], this portable system works completely by itself. It was transferred to a survey room and then to a control room, where it is completely isolated. Therefore, to prevent any unwanted contact between technicians and patients, every room has a private entrance. Where the patient is asked to stand on the patient's bed after entering the examination room. As for the technicians, they can look through the window, as well as make a survival video transmit from AI camera installed in the ceiling of the scanning room, and also correct the patient's position. The algorithm used to automatically determine the patient's position restoring the 3D position and the patient's 1589 reconfigured grid from previous images in the camera [10] until the patient is ready, or through the technician or using an algorithm for motion analysis. The 3D grid does the job, in which the center line is 3D estimated for the fitness stage of the injured person and then converted into alerts for control as well as optimized scan parameters for the technician for the purpose of verification. Then, the technician can make some adjustments and then automatically align the patient's bed with the ISO center and then transfer it to the Computed Tomography (CT) bridge for scanning. For the purpose of obtaining the Computed Tomography (CT) images, they are finally analyzed and processed for examination and diagnosis.
Medical imaging such as X-rays and Computed Tomography (CT) play an important role in detecting COVID-19, and so do computer aided systems help radiologists make informed scientific decisions. The main objectives of this work are to detect COVID -19 from CT image using image processing algorithms and to make an automatic diagnosis of the degree of effects of COVID (19) with high accuracy.
Many researches using x -ray or ct for detection disease such as Shubhangi Khobragade,et.al [19]: The use of forward feeding of neural networks by chest radiography to detect artificial lung disease. This paper has suggested dividing the lung. In terms of extracting the lung feature. Using image processing techniques such as methods of severity and methods of discontinuity to detect lung boundaries, and the result extracted from statistical and engineering features and to determine if the patient has any lung disease such as tuberculosis, pneumonia and lung cancer A. Mathur [20] This research used machine learning to detect myocardial infarction Manuel Vázquez enríquez [21] Use of deep learning to detect pneumonia with chest X -data The obtained results showed that the classification gave a significant improvement.

Contribution of this work
The proposed topic aims to develop an algorithm based on the combination of image processing techniques and artificial intelligence to diagnose COVID-19, and help medical staff to detect COVID-19 without human intervention due to the severity of the disease and the lack of specialized doctors to read the CT images.

Methodology
For details used at each stage of the proposed algorithms. where the proposed algorithms consist of five stages for the purpose of detecting COVID-19 using CT images. These stages consist of the following: first collecting data from hospitals as real data as well as from the Internet (computerized tomography lung image), then the image processing stage to remove noise and convert the image from RGB to Grayscale, after which the image improvement stage, then the segmentation stage, secondly the characterization extraction stage, and the final stage is the classification of the CT images using FFBPN and SVM and compare the result between them and determine whether the person is infected or healthy. In this work data were collected from the database commonly available from Kaggal website.

Propose System
The proposed algorithm consists of five stages to detect and classify COVID-19 from Computer Tomography (CT) images. These stages include; The first of these stages is to collect data from hospitals as real data and from Kaggle website for patients and healthy people, then the stage before removing the noise and converting it from RGB to grayscale, then we improve the image, segmentation and formalities, the other stage is a stage used to extract the important characteristics, and the last stage is the classification of images CT scan using Feed Forward Back Propagation Network (FFBPN) and Support Vector Machine (SVM )and compare the result between them and see if the person is infected or healthy, as shown in Figure 1 main block diagram of the proposed algorithm and the stages of wok.

Image Segmentation Stage
Segmentation technology plays the primary role of image processing. Image segmentation divides the image into several regions where it corresponds to the objects and different parts of the objects. These results are used to extract quantitative information from the image, threshold, including clustering. In this paper, the proposed algorithm is Region Growing algorithm Segmentation and morphological processes is used to segment the CT images.

Region Growing Segmentation
This method proportionally divides an image depended on the similarity of each pixel to its adjacent pixel to evaluate image properties such as gray level, coloration, shape, and texture. The basis for this method is composition of the area by grouping a series of pixels into an image in equal proportions. Where, the closure grows using a setting selection referred to as the seed pixel. Then, the neighborhood grows with the help of the ability to make use of which consists of adjacent pixels connected according to a well established criterion of homogeneity, which leads to the development of a step across the dimension of the area. The homogeneity criterion has the characteristic for detecting whether a pixels belongs to the developing neighborhood or not, or is no longer now or no longer belongs to the developing neighborhood [22]. Area development can be processed in four steps: (1) Mark the raw pixel set into an original image. (2) Select a group criterion such as depth of gray phase or coloration and set up a stop rule. (3) Expand regions using the useful resource of a method to call each seed to adjacent pixels that easily have mass properties related to the seed pixel. (4) Stop the development of the adjacent area when the additional pixels do not meet the embed criterion in that place.

Morphological operation
Morphological processes affect the shape, structure or shape of an object. Applies to binary image (white and black) and pixels between (255, 0). They are used for pre or post treatment (thinning, clarification and pruning) or in describing (borders, skeletons, convex bodies) [23]. The first step to remove unwanted pixels is by filling in the small hole of white pixels inside dark back-ground with the dark pixels and dark holes turn into a white pixel. Simple area-filling algorithm depending on specific expansions, integrations and intersections. The second step, erosion processes remove pixels from the objects' boundary region. The process of adding and removing pixels to the border area of objects depends on the image skeleton element. Region growing Zone growth is a method of segmenting the picture depending on the area. It categorizes a pixel-based image segmentation method because it includes a selection of primary points. The segmentation method examines the pixels adjacent to the primary points and determines whether or not adjacent pixels should be added to the region. Thus, the process is repeated in the same way as general data-gathering algorithms.

Feature Extraction Stage
Feature extraction is extracting the input information and converting it into a feature set called feature vector, in which a function group extracts information from inputs data to perform a classification tasks. This paper, tissue features by Gray Level Co-Occurrence Matrix (GL CM) were used to extract statistical feature.

Classification Stage
Classification stage is to classify CT images into sets to identify COVID-19. The system consists of two stages (feature extraction stage, pre-processing and post processing, and classification stage) by AI and SVM algorithms.

Artificial neural network structure
Feed Forward Back Propagation Network (FFBPN) and Support Vector Machine (SVM) are used in this paper and they are considered of the types of artificial neural networks. So the FFBPN widely used because of simple use. The multi layer forward feeding process requires determining the number of hidden layer and neurons in each layer, the number of neurons in the input layer, the type of activation function and the number Output layer.

Feed Forward Back Propagation (FFBPN) Algorithm
The CT image features are divided into two groups, test group and training set, to test the training performance of the neural network model. The percentage of images of CT features in the training set equals 70 percent of the total feature count and the percentage of features in the test set equals 30 percent. That's need to determine number of hidden layers, type of communication between the layers, number of neurons in each layer, and the neuronal activation function in order to design a multi layer feeding network. Figure (2) illustrates the training network for FFBPN. Neural network training is process of defining network parameters (biases, weights). When training process is completed for the training data set, the updated weights and bias values were saved in a file to be ready for the testing procedure. The weights of the neural network are adapted with the help of a learning algorithm. back propagation training algorithm is summarized as follows 1. Initialize network weight value 2. Sum weighted input and apply activation function to compute output of hidden layer as equation (1) [24].
Where: ai: is the input training vector. wij: is the weight connected between input node and hidden node j. bij: is the bias of hidden node j .
hj: is the output of hidden node j . 3. Sum weighted hidden layer and apply activation function to compute output of output layer as equation (2) [24] = (∑ ℎ + ) Where: W j k : is the weight connected between hidden node j and output node k . b k: is the bias of output node k. Y k : is the output of output node k. 4. Compute back propagation error as equation (3) [24] Where: T k: is the desired output at node k Δ k: is the error at node k 5) Calculate weight correction term between the hidden and the output as equation (4) [24] ∆ ( ) = ℎ + ∆ ( − 1) where: : is the momentum coefficient. η: is the learning rate.
1591 Δ w j k : is the weight adjustment between hidden node j and output node k . 6) Sum delta input for each hidden unit and calculate error term as equation (5) [24] = ∑ ʹ(∑ ) (5) δ j: is the error at node j . 7) Calculate weight correction term between the input and the hidden as equation (6) [24] ∆ ( ) = + ∆ ( − 1) Where: w i j: is the weight adjustment between input node i and hidden node j. 8) Update weights as equation (7) and (8) [24].
Where: P: is the number of patterns in the training set.

Support Vector Machine (SVM) Algorithm
The Support Vector Machine algorithm was contributed by Vladimir N. Vapnik and its new version was developed by Cortes and Vapnik in 1993 [25]. SVM is a supervised machine learning algorithm used to classify data for different classes based on a separating hyperplane. Although there two main types of SVM classifications: linear and non-linear [26]. The input vectors are assigned to the feature vector using the kernel function that directly calculates the dot product in the feature space. The hyperplane is formed in a dimensional space separated into two classes, which Optimizes the distance between each other and closes the training sets. This hyperplane is used as a basis for classifying vectors of unknown objects (testing objects). The training sample is {( , )} =1 , where is represents the set of inputs for the ℎ instance and represents the output classes (target), which is represented by = +1 or -1 and each refers to the linearly separable point class, as shown in Figure 3 . The hyper-plane equation that separates is [27]: Where: X: is an input vector. W: is a modifiable weight vector. b: is a bias.
The case of the non-linear samples, the distribution of samples is irregular, so that SVM can determine the limitations of non-linear decisions by using kernel function and using two phases. The first phase is the use of the kernel equation that transforms the coming input into the higher dimensional space, And the second phase of the new location searches for a linear hyperplane to classify the samples [26]. There are several types of kernel function below [25]: 1. Radial basis function (RBF) Where and ' are sample vectors and || − '||2 is a Euclidean distance between sample vectors 2. Linear kernel = ( , ′) Where and ' are sample vectors where is the linear kernel which is a function of linear vectors.
Where and ' are sample vectors.

Experimental Data
The proposed algorithm is based on actual data from Kaggle website. 200 CT for training and testing. Also, through fieldwork to collect CT lung images case for training and 30% CT lung images case for testing as 70 % from Al-Marjahn hospital \ Babil-Iraq. Tables 1 and Table 2 show details of the testing and training of the CT lung images and were used directly for pre-treatment and CT lung images taken from hospitals in CD format where the CT lung images were in DCM format (real CT lung images), and using an online website to convert the format Photo and save as digital color Pictures in JPEG format on a computer.

Pre-Processing Stage
The pre-processing stage consists 4 steps to improve the CT image, as well for its preparations for the retail stage to extract COVID-19 region which is (image format conversion, grayscale image, image enhancement, and noise filtering).

Grayscale Image
This operation was done using the function (rgb2gray) to convert RGB image to a grayscale image as shown in the rgb2grayscale converted code in MATLAB. The function rgb2gray uses to convert RGB image to Grayscale image range (0 to 255) as shown in Figure 4.

Image Enhancement
In this step, the visibility and brightness of the image is improved. Figure 5 shows the original CT image enhancement processing.

Noise Filtering or Noise Removal
The final step is tasked in a pre-processing stage in which the extra and useless parts of CT image are removed and that anisotropic filter is applied to the image by 8-connected neighborhood for removing noise from it as show in figure 6. Table 3 show results of test anisotropic filtering works by adding noise (Gaussian noise) to CT input images and remove or deleting noise from images by anisotropic filtering as shown in equation (16) .
Where: K ρ: Gaussian kernel I m: is the image intensity in weighting direction m G: gradient image

Image Segmentation Stage
Segmentation is an image representation that is easier to parse operations as it locates the objects in the boundary and assigns a label to each pixel in the input image.. The results of image segmentation consists of steps morphological operation, region growing algorithm segmentation and a COVID-19 outline.

Morphological Operation
This step is used to improve the segmentation of the incremental area of the image by removing unwanted pixels. This step includes two parts, the holes section and the stripping image process section. Figure 7 shows the morphological processes on the CT image after segmentation.

Region growing algorithm Segmentation
The region growing algorithm segmentation gives better results due to the background of CT image are dark and the illumination is even while isolated theCOVID-19 region from non-infected region. For instance, results for images are depicted in Figure 8.

Covid-19 Classification Stage
At this stage, SVM and FFBPN are used to detect COVID (19). Experiments and feature extraction were performed by GLCM with a region object using SVM and FFBPN to train the connection weights for each layer.

Training and Testing FFBPN
The training procedure was randomly configured on the weights and the network was trained using (nntool), then the results were recorded. The FFBPN training is set to terminate when the desired MSE is reached, minimum gradient, number of validation errors, or maximum number of periods. The cross-validation method is used in FFBPNN training, the data set is separated into 3 groups during each experiment, 70 percent of the data were randomly selected for training, 15 percent of the data were randomly selected for validation, and the remaining 15percent of the data were used for the testing phase. FFBPN pre-training and typical performance using different numbers of neurons in the hidden layer. 2, 3 and 5 neurons in the hidden layer were selected as good numbers after employing several training processes of FFBPN can be show 3 neurons as an ideal number used of hidden layer. FFBPN gave 98.5% accuracy. Figure 9, Figure 10, and Figure 11 shows performance of the system.

Training and Testing SVM
In this paper, the corresponding output of the SVM classification. The results are shown in MATLAB for lung image it is a normal SVM classifier for CT images taken from information base for 200 states and show accuracy for SVM Linear kernel.

Results and Discussion
The images of the trained dataset on which the extracted features were trained using the classifier (FFBPN & SVM) for classification tasks, while test dataset was not trained using the FFBPN & SVM classifier, only the statistical and textual features were extracted. The resolution training and testing image was compared based on the COVID-19 tissue classification of FFBPN and SVM was based on COVID (19) Table 4, and Table 5. SVM give accuracy 96% and FFBPN give accuracy 98.5%. The FFBPN gives the best results as shown Table 6. Final stage for detection Non-COVID-19 and COVID-19 show as in the Figures 12-14.

SVM classification performance
1. Accuracy is the ratio of correct data during diagnosis to total data as shown in equation (17) Accuracy(%) = *100       Calculation of test images (images are used for testing after training process) in Table 7 shows ten features for fourteen people infected with COVID-19, and CT medical images are denoted with the symbol Z, as well as eight images of normal people whose images are denoted by the symbol A and these are the features It is an entry into the classification stage to determine whether a person has COVID-19 or is healthy, the eleventh feature representing the area is used to determine the severity of COViD-19 Parameters Texture Features as following [28][29][30][31][32] : 1. Contrast is a measure of the changes in the intensity or gray level between the reference pixel and its adjacent pixel as shown in equation (20).
3. Energy measures the Angular Second Moment (ASM), the local uniformity of gray levels at similar pixels as shown in equation (22) and equation (23).
4-Homogeneity is a measure of the convergence for distribution the elements in the GLCM from the diagonal of the GLCM as shown in equation (24) = ∑ ∑ 1 1+( − ) 2 d (i, j) 5-The mean represents the average values of the elements in the array as shown in equation (25) X ̅ = ∑ X N (25) 6-Standard deviation is a statistic that measures the dispersion of a data set relative to its mean and is calculated as the square root of the variance as shown in equation (26).

Conclusions
It is concluded from this work that the real database gives the same results compared to the database obtained from websites, and filter noise removal gives good results beforehand to remove noise from digital images in pre-processing in addition to using optimization techniques to improve image information and obtain The accuracy of the results, increased image brightness, improved image visibility, which were made to improve the quality of the CT images. The MATLAB (imadjust) function that makes the image contrast is used by adjusting the values of the input density image to new values so that the data is saturated with low and high density of the input data. Segmentation of the lung injection zone using the zone transplantation method gave good results for the detection of COVID -19. It also uses statistical property analysis to extract the feature from the image. Graycomatrix computed features based on the GLCM image. The best features are used as input parameters for the back propagation network, after which the network is trained and its performance evaluated. The FFBPN gave good results in detecting and classifying COVID-19. The results of the proposed methodology in accurate and rapid detection of COVID -19 in the lung.