https://doi.org/10.31449/inf.v47i9.4566 Informatica 47 (2023) 11–16 11 Optimization of Brain Cancer Images with Some Noise Models Ali Abdulmunim Ibrahim Al-Kharaz Technical College of Management-Baghdad, Middle Technical University, Baghdad, Iraq E-mail: ali.al-kharaz@mtu.edu.iq Keywords: harris corner detectors, gaussian noise, salt and pepper noise, mann-whitney test, magnetic resonance imaging Received: December 13, 2022 The diagnosis of brain cancer based on magnetic resonance imaging (MRI) is affected by many conditions such as the movement of the patient during capture which leads to the occurrence of noise associated with these images. In order to improve corner detection methods, many corner detection methods were adopted according to the many noise models. Experimental results showed the effect of magnetic resonance imaging capabilities on both corner detection methods and the noise model. This study shows that it is possible to rely on other medical images such as Doppler images and neural network algorithms to use image features to diagnose cancer. Povzetek: Opisana je nova metoda za diagnozo možganskega raka, ki učinkoviteje odpravi šum v MRI slikah možganov. 1 Introduction Magnetic Resonance Imaging (MRI) has become one of the most important tools for mapping brain function [1]. Diagnosing brain cancer based on MRI continues to be of interest; therefore many researches have used it to diagnose patients. In 2009, research by (Rajeev Ratan) and others, included the detection of brain cancer by MRI by relying on the sensitivity of image edges, but based their work on a threshold that represents the limit of the possible variation in image units. The experimental results showed the ability of the method to sensitize the areas of tumors [2]. Research introduced by (Aaswad Sawant) and others in 2018 used a set of (1800) magnetic resonance images with (900) cancerous and (900) non-cancerous, basing their analysis on a convolutional neural network (CNN) for the purpose of diagnosing the patient, and the results of the diagnoses appeared by (99) percent [3]. In 2022, research by (Mahsa Arabahmadi) and others compared three methods of sensing brain cancer (supervised, unsupervised and semi-supervised) and applied a number of neural network and CNN methods. These methods were applied to the studied group of MRI images, and the images compared [4]. Deep learning based on a systematic CNN approach was performed on 1258 MRI images of 60 patients. Accuracy was 47.02% using one epoch, increasing to 96% when the number of epochs rose to 15 [5]. Although previous studies removed noise and classified the MRI images into benign tumors and malignant tumors in the brain, the current study added two types of noise to the images and then used three methods (Features from Accelerated Segment Test, Harris Corner Detectors, and Binary Robust Invariant Scalable Key) to detect the brain cancer to establish the best method for detecting and removing noise. Table 1 provides a summary of the related work. Different noise models can affect MRI images of the brain, so the diagnosis of brain cancer can be affected by noise models and create problems that accompany the diagnosis stage. This research aimed to find the best corner detection method for detecting brain cancer with magnetic resonance images which are less affected by the noise model. 2 Background for digital images A digital image can be a (2D) representation of (3D) sensing images with each (2D) image consisting of sub- units, each of which is called a pixel. Digital images can be (color, gray or binary) images. The most common representation of a digital image is [6][7] 𝑓 (𝑥 ,𝑦 )= [ 𝑓 (𝑥 0 ,𝑦 0 ) 𝑓 (𝑥 0 ,𝑦 1 ) . . 𝑓 (𝑥 0 ,𝑦 𝑁 ) 𝑓 (𝑥 1 ,𝑦 0 ) 𝑓 (𝑥 1 ,𝑦 1 ) . . 𝑓 (𝑥 1 ,𝑦 𝑁 ) . . 𝑓 (𝑥 𝑀 ,𝑦 0 ) . . 𝑓 (𝑥 𝑀 ,𝑦 1 ) . . . . . . . . 𝑓 (𝑥 𝑀 ,𝑦 𝑁 )] ,(1) Where 𝑓 (𝑥 𝑖 ,𝑦 𝑗 ) represents the pixel element and the size of the image is (𝑀𝑋𝑁 ). 12 Informatica 47 (2023) 11–16 A.A.I Al-Kharaz Table1: Summary of related work. 3 Some corner detection methods The discovery of the angle within the image is one of the methods that depends on computer vision in order to search for the image features, and the accurate discovery of these angles helps in various applications, especially in the field of distinguishing patterns and identifying objects within images and in the field of discovering important points within the graphic content. Some of these are discussed below. 3.1 Features from accelerated segment test (FAST) In (2006), the FAST algorithm was proposed by (Edward Rosten and Tom) and the algorithm working as a corner detection method with the following steps [8]: 1-Select each pixel to be point of interest interest point or not with proposed intensity to be (𝑓 (𝑥 ,𝑦 ) ) 2-Select a threshold value to be (𝜏 ) and proposed (𝑘 ) should be a positive integer 3-Select (𝜑 ) which represents the nearest circle pixels with (16) pixels, see Figure 1 4-Now the selected pixel (𝑓 (𝑥 ,𝑦 ) ) will be the corner point if there exists (𝑢 ) contiguous pixels in (𝜑 ) which are all greater than (𝐿 1 ) or less than (𝐿 2 ) such that (𝐿 1 = 𝑓 (𝑥 ,𝑦 )+ 𝜏 ) and (𝐿 2 = 𝑓 (𝑥 ,𝑦 )− 𝜏 ) Figure 1: The nearest circle pixels with (16) pixels 3.2 Harris corner detectors (HCD) In (1988), the HCD algorithm was proposed by (Chris Harris & Mike Stephens) and the algorithm worked by finding (𝐺 (𝑢 ,𝑣 ) ) such that [9] 𝐺 (𝑢 1 ,𝑢 2 )= ∑ ∑ 𝑤 (𝑥 1 ,𝑥 2 )[𝑓 (𝑢 1 + 𝑥 1 ,𝑢 2 1 𝑥 2 =−1 1 𝑥 1 =−1 + 𝑥 2 )− 𝑓 (𝑥 1 ,𝑥 2 )] 2 ,(2) Where 𝑤 (𝑥 1 ,𝑥 2 ) represent the window function 𝑓 (𝑢 1 + 𝑥 1 ,+𝑥 2 ) represents the shifted intensity 𝑓 (𝑥 1 ,𝑥 2 ) represents the image intensity 3.3 Binary robust invariant scalable key (BRISK) This method gives better rotation stability in photo recording for image applications with more blur and quickly detected steps. This method also has modularity vision to combine with any other key and improve performance. Region (𝑔 (𝑢 𝑖 ,𝑢 𝑗 ) ) can be defined by the formula [6] 𝑔 (𝑢 𝑖 ,𝑢 𝑗 )= (𝑢 𝑗 − 𝑢 𝑖 ). 𝐼 (𝑢 𝑗 ,𝜎 𝑗 )− 𝐼 (𝑢 𝑖 ,𝜎 𝑖 ) ‖𝑢 𝑗 − 𝑢 𝑖 ‖ 2 ,(3) We note that this formula depends on (𝐼 (𝑢 𝑗 ,𝜎 𝑗 )& 𝐼 (𝑢 𝑖 ,𝜎 𝑖 ) ), which can be used to indicate the local gradient. 𝐴 = { (𝑢 𝑖 ,𝑢 𝑗 )∈ ℝ 2 × ℝ 2 | 𝑖 < 𝑁 ∧ 𝑗 < 𝑖 ∧ 𝑖 ,𝑗 ∈ 𝑁 } ,(4) A subset of minimum-distance for each pair is defined within (𝑀𝐼 ) and another subset includes maximum- distance for each pair defined within (𝑀𝐴 ) They are defined by the formulas 𝑀𝐼 = { (𝑢 𝑖 ,𝑢 𝑗 ) ∈ 𝐴 |‖𝑢 𝑗 ,𝑢 𝑖 ‖ <∈ 𝑚𝑎𝑥 } ⊆ 𝐴 ,(5 ) 𝑀𝐴 = { (𝑢 𝑖 ,𝑢 𝑗 ) ∈ 𝐴 |‖𝑢 𝑗 ,𝑢 𝑖 ‖ >∈ 𝑚𝑖𝑛 } ⊆ 𝐴 ,( 6 ) With (∈ 𝑚𝑎𝑥 = 9.75𝑡 ,∈ 𝑚𝑖𝑛 = 13.67𝑡 ) such that (t) represents the measure of training through the points within (𝐿 ) that includes the distinctive abilities within the specified direction and for each of the points. By the following equation 𝑔 = ( 𝑔 𝑥 𝑔 𝑦 ) = 1 𝐿 . ∑ 𝑔 (𝑝 𝑖 ,𝑝 𝑗 ) ,( 7 ) (𝑝 𝑖 ,𝑝 𝑗 )∈ℒ Ref. Noise detection and removal Methods [2] Gradient magnitude of an intensity Sobel edge detection for ROI and watershed segmentation (2D and3D) [3] Adam optimizer algorithm Machine learning [4] CNN-based deep feature extraction, classification and localization Compare among supervised, unsupervised and semi-supervised research [5] Median filter Deep CNN method Current study Accelerated Segment Test, Harris Corner Detector and Binary Robust Invariant Scalable Key Mann- Whitney Test to find the best corner detection Optimization of Brain Cancer Images with Some Noise Models… Informatica 47 (2023) 11–16 13 4 Noise models Noise always appears in digital images during image acquisition, encoding, transmission and processing. It is very difficult to remove noise from digital photos without prior knowledge of the type of noise, therefore it is necessary to review the models in the study of image noise reduction techniques. Noise is defined as a random signal that is used to destroy most or part of the information. There are many types of noise including those discussed below. 4.1 Gaussian noise (GN) This is one of the most common noises in images. Gaussian noise can be defined by using the most common statistical distribution which it is normal distribution. It can be defined by the following formula [10] 𝑓 (𝑥 )= 1 √2𝜋 𝜎 2 𝑒 − (𝑥 −𝜇 ) 2 2𝜎 2 ,(8) Where 𝑥 represents the random variable, μ,σ represent the parameters. 4.2 Salt and pepper noise (SPN) This noise model is caused in image transmission. The following formula represents the noise equation [10] 𝑓 (𝑥 )= { 𝑝𝑎 𝑓𝑜𝑟 𝑧 = 𝑎 𝑝𝑑 𝑓𝑜𝑟 𝑧 = 𝑏 0 0.𝑤 . ,(9) 5 Mann-Whitney test (MWT) This is a nonparametric test based on the null hypothesis test that assumes that the two random variables (𝑋 ,𝑌 ) came from the same statistical distribution (that is, the statistical distribution of the first variable is similar to the statistical distribution of the second variable) [11]. The test is calculated by [12] Let (𝑥 1 ,𝑥 2 ,𝑥 3 ,… …,𝑥 𝑛 ) be the first identically independent distribution and (𝑦 1 ,𝑦 2 ,𝑦 3 ,… ,𝑦 𝑛 ) be the second identically independent distribution with both samples independent of each other. Then, the Mann- Whitney Test is defined as: 𝜏 = ∑ ∑ 𝜑 (𝑥 𝑖 ,𝑦 𝑗 ) 𝑛 𝑗 =1 𝑛 𝑖 =1 ,(10) Where 𝜑 (𝑥 𝑖 ,𝑦 𝑗 )= { 1 𝑖𝑓 𝑥 𝑖 > 𝑦 𝑗 0.5 𝑖𝑓 𝑥 𝑖 = 𝑦 𝑗 0 𝑖𝑓 𝑥 𝑖 < 𝑦 𝑗 ,(11) 6 Methods 6.1 The suggested optimization model (SOM) The proposed model includes (normal images and noise images), where two types of noise were applied (Gaussian Noise, Salt and Pepper Noise) through three detection algorithms (Harris, BRISK, FAST). The following block diagram shows the structure of the suggested optimization model. Figure 2: Block diagram of the suggested optimization model (SOM). 6.2 Experimental dataset The study data included a number of magnetic resonance images that represent three patients with benign brain tumors and three patients with malignant brain tumors. Figure 3 shows the images of two patients. The left image is for benign brain tumors (BT) and the right image for malignant brain tumors (MT). GN SPN Start Input Image Adding Noise Yes No FAST/HCD/ BRISK Corner Detection MWT End Image Data 14 Informatica 47 (2023) 11–16 A.A.I Al-Kharaz Figure 3: Experimental data set including (left: benign tumors (BT)) and right: (malignant tumors (MT)). 7 Experimental results and discussion Applying the proposed system (SOM) to the research data, table 2 contains the testing results. Table 2: Average of Mann-Whitney test and testing results (R: reject; A: accept) Corner Detection Method Noise Model Tumor Kind MWT P-value Testi ng Resul ts FAST With out Benign 1.15234 × 10 8 0.00187 R Malignant 1.22034 × 10 8 0.00025 R GN Benign 1.88204 × 10 8 0.64223 A Malignant 1.98023 × 10 8 0.73165 A SPN Benign 2.25312 × 10 8 0.00012 R Malignant 2.26434 × 10 8 0.53423 A HCD With out Benign 3.54926 × 10 8 0.00026 R Malignant 4.34589 × 10 8 0.00012 R GN Benign 3.76723 × 10 8 0.00334 R Malignant 4.67726 × 10 8 0.00654 R SPN Benign 7.00598 × 10 8 0.00398 R Malignant 3.43312 × 10 8 0.54434 A BRISK With out Benign 7.41287 × 10 8 0.00767 R Malignant 7.33287 × 10 8 0.00026 R GN Benign 4.86498 × 10 8 0.00042 R Malignant 4.66532 × 10 8 0.36078 A SPN Benign 3.78554 × 10 8 0.55676 A Malignant 7.55812 × 10 8 0.00346 R Testing the results depended on the P-value with Reject the (Null Hypothesis) if the (P − value < 0.05) Accept the (Null Hypothesis) if the (P − value ≥ 0.05) With the null hypothesis (𝐻 0 ) states that the two random variables (𝑋 ,𝑌 ) follow the same statistical distribution and the alternative hypothesis (𝐻 1 ) states that the two random variables (𝑋 ,𝑌 ) follow a different statistical distribution. Figure 4: Average Mann-Whitney test and testing results for each group Figure 5: P-value and testing results for each group By observing Table 2 and Figures 4 and 5, it becomes clear that the (Harris) method is less affected by (Gaussian Noise) and (Salt and Pepper Noise), while the (FAST) and (BRISK) methods are affected more by the noise and its different models. The results showed that all corner detection methods were affected by the noise model as the comparisons, according to the results of the Mann-Whitney test, (18) compared, of which (6) accepted (12) reject for the hypotheses and according to their values, and thus the percentages of acceptance and rejection were according to the following Table 3. Table 3: The number of accepted and rejected groups The findings of the present study reveal the Harris Corner Detectors (HCD) to be the best noise detection method using corner pixels, and can be used as a training feature for support vector machine along with other features for classification [13]. In addition, the Harris Corner method performs better with a recognition rate and can be used as an effective tool for localization and detection [14]. Group Case Number of times % A Reject 12 0.66 B Accept 6 0.34 Optimization of Brain Cancer Images with Some Noise Models… Informatica 47 (2023) 11–16 15 8 Conclusions and future work The experimental results of (SOM) offer many conclusions including that corner detection methods are influenced by the type of image or image contents. Corner detection methods are influenced by the type of noise, and the Harris method gives the best results according to the overall average. In future work, other noise models such as (Rayleigh & Speckle) can be used to understand the effect of noise on images. Furthermore, the covariance and rotation of images can be changed to see their effect on detection methods. Finally, it is possible to use more images to achieve more accurate results. References [1] Xiong, Jinhu, Jia‐Hong Gao, Jack L. Lancaster, and Peter T. Fox (1996). Assessment and optimization of functional MRI analyses. Human Brain Mapping, 4, 3, pp. 153-167. https://doi.org/10.1002/(SICI)1097- 0193. [2] Ratan R, Sharma S, Sharma S. (2009).Brain tumor detection based on multi-parameter MRI image analysis, ICGST-GVIP Journal,9, 3, PP.9-17. https://doi.org/10.1007/978-3-642-20998-7_38. [3] Sawant A, Bhandari M, Yadav R, Yele R, Bendale MS (2018). Brain cancer detection from mri: A machine learning approach (tensorflow). Brain,5, 4. [Google Scholar] [4] Arabahmadi M, Farahbakhsh R, Rezazadeh J (2022). Deep Learning for Smart Healthcare—A Survey on Brain Tumor Detection from Medical Imaging. Sensors, 22, 5, PP.1-27. https://doi.org/10.3390/s22051960. [5] Mohammed, B.A. and Al-Ani, M.S. (2020). An efficient approach to diagnose brain tumors through deep CNN. Math. Biosci. Eng, 18, pp.851-867. https://doi.org/10.3934/mbe.2021045 [6] Gonzalez RC, Wintz P (1977). Digital image processing. Addison-Wesley Publishing Co, Inc Applied Mathematics and Computation. https://doi.org/10.1007/978-3-642-95298-2_1. [7] Vlaardingerbroek MT, Boer JA (2013). Magnetic resonance imaging: theory and practice. Springer Science & Business Media. https://doi.org/10.1002/(sici)1097- 458x(199709)35:9%3C656::aid- omr138%3E3.0.co;2-i [8] Viswanathan DG (2009). Editor Features from accelerated segment test (fast). Proceedings of the 10th workshop on image analysis for multimedia interactive services, London, UK. https://doi.org/10.1109/wiamis15130.2009. [9] Orguner U, Gustafsson F, editors (2007). Statistical characteristics of harris corner detector. IEEE/SP 14th Workshop on Statistical Signal Processing; 2007: IEEE. Pp. 571-575. https://doi.org/10.1109/SSP.2007.4301323. [10] Bar L, Sochen N, Kiryati N, editors (2005). Image deblurring in the presence of salt-and- pepper noise. International Conference on Scale-Space Theories in Computer Vision; 2005: Springer. https://doi.org/10.1007/11408031_10. [11] Ghisu, T., Parks, G.T., Jaeggi, D.M., Jarrett, J.P. and Clarkson, P.J.(2010). The benefits of adaptive parametrization in multi-objective Tabu Search optimization. Engineering Optimization,42,10, pp.959-981. https://doi.org/10.1080/03052150903564882. [12] Fagerland MW, Sandvik L (2009). The wilcoxon–mann–whitney test under scrutiny. Statistics in medicine, 28, 10, pp1487-1497. https://doi.org/10.1002/sim.3561. [13] Taheri, M.(2017). Enhanced breast cancer classification with automatic thresholding using support vector machine and Harris corner detection. https://doi.org/10.1145/2987386.2987420. [14] Basha, C.Z., Reddy, M.R.K., Nikhil, K.H.S., Venkatesh, P.S.M. and Asish, A.V.(2020). March. Enhanced computer aided bone fracture detection employing X-ray images by Harris Corner technique. In 2020 Fourth International Conference on Computing Methodologies and Communication (ICCMC) (pp. 991-995). IEEE. https://doi.org/10.1109/iccmc48092.2020.iccmc -000184. 16 Informatica 47 (2023) 11–16 A.A.I Al-Kharaz