Neuroimaging is critical in the diagnosis and treatment of brain cancers; however, the first detection of tumors is a challenge. Detection techniques like image segmentation are heavily reliant on the segmented image’s resolution. Magnetic resonance imaging (MRI) tumor segmentation has emerged as a new study area in the medical imaging field. This spongy and delicate mass of tissue is the brain. Stable conditions allow for patterns to enter and interact with each other. To put it simply, a tumor is a mass of tissue that has grown unchecked by the natural mechanisms that keep it under control. When cells divide uncontrollably, they create a cancerous tumor. Brain tumors can be detected and segmented using a variety of methods. A new method for detecting brain tumors using MRI images is presented in this research. An innovative Woelfel filter is used for enhancement, and morphological segmentation approaches combined with anisotropic diffusion are used for segmentation. Segmentation of brain tumors can be accomplished using thresholding and morphological techniques, which are both effective. The tumor will be located and identified using morphological image processing. Image denoising refers to the process of removing artefacts such as noise and aliasing from digital images. Here MATLAB programming language is utilised as it incorporates all the toolboxes required for the application involved in the work.

1. Introduction

Medical imaging research has resulted in the development of diagnostic techniques such as computed tomography (CT), magnetic resonance imaging (MRI), and ultrasound. Each has its own set of pros and disadvantages. Medical imaging is the technique of creating images of the inside of the body in order to aid in the diagnosis of a medical condition. It not only aids in the treatment and identification of sickness but also allows for the discovery of inner structures that lay beneath the surface of the skin and bones, which is quite useful. It identifies abnormalities by comparing them to a database of normal anatomy and physiology. The segmentation of brain tumors is a crucial topic in the field of magnetic resonance imaging (MRI). Image segmentation is the process of breaking down a complex image into smaller, more manageable segments for simpler analysis [1]. An MRI scan of the brain is one of the most regularly used diagnostic procedures for the detection of brain tumors. The magnetic resonance imaging (MRI) machine operates in the same way. During scanning by a radio transmitter, an antenna (coil) captures a radio wave generated by the patient’s body. The radio transmitter then delivers a radio wave through the patient's body, shaking the protons in the process, which then generates a new radio wave. When the new radio wave is received, it is processed by a computer algorithm, which results in the creation of the magnetic resonance image (MRI). Tumors can be classified into two categories: primary tumors and secondary tumors [2]. Malignant tumors, on the other hand, are cancerous tumors that spread over a prolonged period of time. They are rapidly expanding, but their borders are unclear. It is possible to develop primary and secondary malignancies [35]. It would be helpful to have an automated system for finding, locating, and classifying things [6]. It is possible to execute a range of medical imaging techniques in order to make an accurate diagnosis of tumors. Stroke lesions are investigated using magnetic resonance imaging (MRI) sequences depending on a range of factors, including the patient’s age, location, and severity [7]. In the context of treatment, the adoption of a computerised system for determining the rate of sickness progression may be beneficial [8].

Medical imaging techniques use direct observation of body tissues to provide a relatively accurate diagnosis of disease without surgery. There have been numerous advancements in nanoscale imaging techniques during the last few decades. It is possible to capture images of the internal organs and tissues of the body using medical imaging. To put it another way, the disease can be treated better and faster, resulting in less agony and less expense for the patient. Imaging can also be used to track the progression of a disease and determine whether or not a treatment is working. Medical image processing’s primary goal is to extract relevant and accurate information from images with the least amount of error feasible. Because of the brain’s intricacy, it is challenging to identify brain tumors using MRI imaging. A brain tumor is defined as an abnormal growth of brain tissue that impairs normal brain function. It is vital to obtain medically relevant information from magnetic resonance imaging (MRI) in order to diagnose and treat patients. When it comes to non-invasively diagnosing brain tumors, computer-aided detection (CAD) is favoured. When employing MRI to capture the pictures of the brain, noise and artefacts such as labelling and intensity changes are inevitable during the acquisition process [9]. There are also numerous other structures in the brain imaging, including cerebrospinal fluid, grey and white matter, and skull tissues, apart from the tumor.

The authors in [10] proposed a model in which the MRI brain images are first preprocessed using the median filter, and then the segmentation component of a particular image is completed. Region-based, threshold-based, cluster-based, and region-merging segmentation techniques were all discussed by the researchers in [11].

Another study can diagnose a brain tumor using a combination of handmade and deep learning characteristics [1214]. Authors have presented malignant vs. benign and low-grade to high-grade glioma classification [1518]. There are tumors in the human brain that are composed of a large number of abnormal cells or “tumors.” The sooner the brain tumor is discovered, the better [1922]. The segmentation of MR brain images to detect and extract tumor areas has been the subject of numerous studies. References [2327] contain some of the related research on brain tissue segmentation using clustering and other approaches. It is difficult to segment images despite extensive research because of a variety of issues, such as diverse visual content and objects with non-uniform textures. While various algorithms and strategies exist, there is still a need for an effective, rapid method of segmenting medical images [2830].

3. Methodology

The one-of-a-kind filter design would be selected almost universally since the complexity of the filter has little bearing on its implementation in a digital system. Both filters were the same size (order) and would process an image in around the same length of time.

The Woelfel method is used in this procedure (using two FIR filters). The employment of FIR filters, whether decimating or interpolating, allows for the omission of some calculations, resulting in significant computing savings. When IIR filters are employed, however, each output must be calculated individually, even if that output will be discarded (so, the feedback will be incorporated into the filter). They are suitable for multi-rate applications. We mean “decimation,” which means lowering the sample rate, and “interpolation,” which means increasing the sampling rate or both. FIR filters are used for decimating or interpolating, and they allow some calculations to be skipped, resulting in significant processing efficiency. When IIR filters are employed, however, each output must be calculated individually, even if that output will be discarded (so, the feedback will be incorporated).

An organised collection of structured data, or “data,” is stored electronically in a computer system. In this way, it is possible to access and handle the data in a streamlined and efficient manner.

A brain MRI scan may be considered to evaluate the brain for tumors and other lesions, traumas, intracranial hemorrhages, and structural anomalies. The rgb2gray function removes the hue and saturation information from RGB images while keeping the luminance; this is referred to as the “color mapping” procedure.

The power spectral density (PSD), often known as the power spectrum, is a metric for evaluating a signal’s power over its whole frequency range. By multiplying the Fourier terms by their complex conjugate and scaling by the number of samples, we can obtain an estimate of the PSD at frequency [3133].

Roundoff noise causes a rise in the power spectral density (PSD) at the filter system object’s output. Quantization mistakes in the filter are the causes of this noise. To calculate an average, L is the number of trials that were performed. The average of the L trials is used to calculate the PSD. The better the estimate is, the more trials you specify and the longer it takes to compute, but this comes at a cost. Ten trials are considered default when you do not specify L.

Filters are most typically used in image processing to suppress either the high frequencies in an image, resulting in a smoother image, or the low frequencies in an image, resulting in the augmentation or detection of edges in the image. Filters can be applied to an image in either the frequency domain or the spatial domain. Smoothing techniques are used in digital picture processing to remove noise. Image filtering is a critical step in the smoothing process. Digital photos are enhanced and modified using filtering algorithms. Image filters are also used for blurring, noise reduction, sharpening, and edge identification. FIR filter design can be done using a variety of well-known and proven techniques. The implementation of FIR filters is straightforward. It is possible to create distortion-free FIR filters by using linear phase design principles. Image processing applications do not benefit as much from the infinite impulse response (IIR) filter class as it does from others. Stability and ease of implementation are not inherent in this filter, as they are in the FIR filter. Because of this, this toolbox does not have IIR filtering capabilities. The picture quality improves and becomes clearer when using the Woelfel filter as compared to other filters, and an isotropic diffusion approach and these output images are utilised to do the morphological operation and discover brain tumors. Morphology refers to a broad range of image processing techniques that alters pictures based on the contours of the objects in the pictures. The output image of a morphological operation is always the same size as the input image because it is created by using a structural element. In a morphological process, the value of one pixel in a picture corresponds to the value of another pixel in its immediate neighborhood.

Only a limited amount of information was permitted to travel through the boundaries of the unique filtering image’s PSD, which had no ringing.

There are advantages and cons to each strategy. We have compiled some of the most significant findings in the field of image denoising in this project. For this section, we begin by defining an image denoising problem and then discuss various image denoising approaches. MSE and SNR are used as the primary tools for noise removal in the project. To get an SNR of 20–30 dB, this filter would not degrade the image or lose crucial information. An issue noticed was that the SNR and blurriness appeared to be correlated. SNR, on the other hand, grew in proportion to the image's fuzziness. These methods are used to detect tumors.

Known also as Perona–Malik diffusion, anisotropic diffusion in the field of image processing and computer vision reduces noise in images while preserving critical characteristics such as edges and lines that aid in the interpretation of the image. If you think of anisotropic diffusion as an image generation method, it is similar to the diffusion process that produces a parameterized family of gradually blurrier images. When using the anisotropic diffusion filter, often known as ADF, it is possible to keep the image’s borders while simultaneously adaptively reducing noise from the picture. Anisotropic diffusion filters frequently make use of the technique of spatial regularization. When building their models, anisotropic models take into account a number of other factors in addition to the modulus of the edge detector. Anisotropy was initially included into diffusion processes as a response to the need to manage one-dimensional features such as line-like forms.

An image processing approach that changes the pixels in the picture comes into play later in the process. There are two ways to identify pixels in a grayscale image: either utilising complex image processing techniques or a simpler set of operations that do not require as much arithmetic. When we dilate an image, we are essentially expanding it. Adding pixels to an image’s borders increases the number of pixels in an object’s area. It is under the command of the structural element. After the dilation procedure is complete, the brain tumor is discovered.

3.1. Algorithm

Step 1. Import an image; in this case, MRI scan image is acquired from database.

Step 2. Take RGB image as input and convert it to grayscale before storing it in another variable to calculate the mean luminance (intensity of light).

Step 3. Display of PSD estimate via mesh grid image visualization.
The PSD of the signal is computed from discrete Fourier transform of image aswhere N is considered as the width of the frequency spectrum.
(U, V) is the PSD of the image.
F (U, V) is the discrete Fourier transform of image given byWe can estimate the visualization of base image using the mesh grid PSD.

Step 4. A grayscale PSD image estimates the PSD visualization of the base image.

Step 5. Random noise will be added to the PSD of the image’s PSD.

Step 6. Noisy image as a result is obtained.

Step 7. Mesh grid PSD can be attained to estimate for the visualization of noisy image.

Step 8. Once again, we obtain the PSD of the noisy image.

Step 9. The PSD of the noisy image output is provided.

Step 10. The Woelfel filter output image is attained.
It provides the PSD of the output image, and the SNR of the output image is higher when compared to the existing method, which improves image quality.

Step 11. The highest quality image the detector receives is the output image of the Woelfel filter.

Step 12. The outcomes from filter are fed to the anisotropic diffusion to provide a thresholded image by highlighting the tumor.

Step 13. The morphological operation output image is subjected to dilation.
Let A and B be sets of image function, and the dilation of A by B is defined asIn dilatation, set B is frequently referred to as the structural element. This equation is based on finding B’s reflection about its origin and shifting it by z; in the meantime, and A overlap by at least one element.

Step 14. The tumor is detected in the brain after the dilation process is completed.

4. Experimental Results and Analysis

The brain BMP scan image was loaded from a medical database for the initial step of the inquiry and is depicted in Figure 1 as an example of what was done. The PSD estimate for the noiseless BMP scan was calculated and displayed using two different methods, as depicted in Figure 2. This is because the power spectral density (PSD) analysis of an image must be performed in two dimensions based on pixel value and position. A three-dimensional (3D) recording of the mesh grid portrayed the PSD estimation. The use of PSD analysis can be highly beneficial when attempting to determine the frequency content of photographs. Determining the frequency content of images is the first step in many different strategies for processing photos, such as compression, edge identification, and analysis.

Figure 3 depicts a 2D representation of the PSD estimation in greyscale, as depicted in Figure 4. These photographs were created with the help of the standard PSD code. It is possible to measure the power spectral density (PSD) or power spectrum of a signal by looking at how much power it has over a wide range of frequencies. It is possible to derive an estimate of the PSD at frequency by multiplying the Fourier components by their complex conjugate and scaling the result by the number of samples taken. Figure 5 illustrates how noise accumulates over time to produce a cluttered image.

This produces the mesh grid PSD estimate shown in Figure 6 as well as the corresponding grayscale PSD visualization in frequency domain shown in Figure 7. Both of these results are given in Figure 7. It was possible to acquire these results by without applying any filters during the preprocessing stage. Figure 8 shows the output picture obtained after applying an ideal low-pass filter to the imported input image. Figure 9 shows the PSD mesh grid plot visualization created in conjunction with the output image obtained after applying an ideal low-pass filter to the imported input image. It can be noticed that the image has been smoothed, and the effect is blurry in the eyesight since the image’s clear details have been obscured by the smoothing. An increase can also be noted in the PSD estimation visualization, which is also on the rise. For the ideal low-pass filter, as shown in Figure 10, the suitable frequency-domain transfer image, which has a ripple-like structure away from the estimate's center, is shown in Figure 11.

The work is further carried out by means of applying the novel Woelfel filter, and its output is displayed in Figure 11, and it indicates a smooth enhancement by highlighting the significant features in the original image even though it has been deteriorated by the additive noise. The corresponding mesh grid of the output image for its PSD values and a clear indication of the detail enhancement can be observed from the center of mesh grid (see Figure 12). Furthermore, its grayscale PSD estimate in frequency domain is achieved to see that the ripples have been reduced during the use of Woelfel filter (see Figure 13).

The obtained results for three stages such as no filter, low-pass filter, and after application of Woelfel filter are tabulated in Table 1 based on terms of the prominent attributes such as peak signal to noise ratio (PSNR), normalized absolute error (NAE), structural content (SC), and normalized cross-correlation (NCC). The graphical representation for these values is represented in Figure 14 for PSNR values and Figure 15 for normalized absolute error (NAE), structural content (SC), and normalized cross-correlation (NCC).

It is obvious from Figure 14 that the proposed filter during preprocessing stage can provide an optimal and best PSNR value when compared to no filter and ideal low-pass filter. From Figure 15, it can be noticed that normalized absolute error (NAE) and structural content (SC) values are less for proposed filter, whereas the normalized cross-correlation (NCC) value indicates the higher side which is the optimal solution during the preprocessing stage.

Using the PSNR, one may determine the quality of an image that has been distorted by noise and blur. The MSE is what determines the PSNR value. When comparing two images, the mean squared error (MSE) between the pixel intensities and the ratio of the greatest possible intensity to the computed value yields the PSNR (or peak signal to noise ratio).

This is the typical method for detecting blur in real-time images, and it may be applied to any image. This estimates the difference between the original image and the reconstructed image in terms of numerical values. An image’s structural content is concerned with how its pixels are arranged in relation to each other. Correlation functions are another way of expressing how close two digital images are. In order to compare two collections of photographs, the NCC is a metric that is used. Images can initially be normalized in image processing applications where the brightness of the image can change owing to lighting and exposure situations. It is a tool for counting how many times a pattern or object appears in a photograph. The degree to which the original and rebuilt images are similar or distinct is one of the most commonly utilised parameters in image reconstruction.

No filter, low-pass filter, and Woelfel filter findings are shown in Table 2 in terms of mean square error (MSE) and maximum difference (MD), respectively, for the three stages.

The difference between predicted and expected outcomes is calculated using the MSE. An image improvement technique that removes noise and blur is evaluated using this metric, which is called the dispersion metric. It can be seen in Figure 16 that the proposed filter has a smaller mean square error (MSE), which implies that it is the best solution for preprocessing.

The dynamic range of a picture is determined by the MD, which is inversely proportional to contrast. To do this, a low-pass filter is used to suppress the image's higher frequency components, which correspond to the sharp edges in the image. The image filtering technique that was carried out in this work has significant parameters that correspond well with the subjective sense of quality that a human observer can have on the images that were produced as a result of the procedure.

Images like the one shown in Figure 17 can be used to generate parameterized families of successively more and more blurred images using a diffusion process in order to achieve an exact detection of a brain tumor after superimposition on the original image as shown in Figure 18.

5. Conclusion

Radiation oncology researchers have developed a simple algorithm for tumor segmentation using MRI. Segmentation is carried out using morphological segmentation approaches mixed with anisotropic diffusion, and enhancement is accomplished using a new Woelfel filter. While keeping small details in the image, the new feature accurately detects the boundary. In order to perform morphological operations on tumors, a series of pretreatment steps must be completed beforehand. Before postprocessing, it is possible to see a clearer picture of the final image’s PSD values and the degree to which the mesh grid has been enhanced in simulation results. A novel Woelfel filter reduces ripples to estimate grayscale PSD in the frequency domain. As a result, the new Woelfel filter has yielded better results in terms of important parameters such as peak signal to noise ratio (PSNR), normalized absolute error (NAE), structural content (SC), normalized cross-correlation (NCC), mean square error (MSE), and maximum difference (MD). As a further work, feature extraction procedures are required to work on all types of imagery by maintaining the integrity of the information, which can be a limitation of the work after repeated stage of filtering.

Data Availability

The processed data are available upon request from the corresponding author.

Conflicts of Interest

The authors declare that they have no conflicts of interest.