DWT-BASED IMAGE FUSION TECHNIQUE IN MATLAB: Identifying the most effective method

Abstrac t . Images have some information that can be perceived by the value or intensity of pixel colors or through their visual appearance, used in medical imaging which is used for medical management to generate a visual representation of the inside functioning of the human body. CT and MRI go through medical imaging techniques that provide valuable information to treat medical conditions. The fused image gives a complete analysis of a patient's body by revealing the internal structure with comprehensive information through computer processing. In previous research, this process of fusing two images was approached using a specified DWT technique. In this paper, we demonstrate the best image fusion method for a DWT technique so that it can provide a fused image with significant detail. Image fusion can be implemented using Discrete Wavelet Transform techniques, which include nine combinations of Mean-Max-Min fusion methods. The analysis to derive the best fusion method and implementation of the image fusion method using the DWT technique is done using Matlab programming.


INTRODUCTION
Image processing is the analysis of digital images using various methods and techniques [1]. The steps involved in image processing are image acquisition, image enhancement, etc. These steps make image processing much easier. Image processing encompasses many techniques for the visualization of images. Image fusion is one of the important techniques used for enhancing the image [2]. Researchers merged some number of images of satellites to get a more informative representation of the Earth in the twentieth century. In earlier days, the operations used in image fusion were addition, multiplication, subtraction, and so on. Now the technology has evolved and some of the methods used for image fusion are Deep neural networks (DNN), Wavelet Transforms, Multiresolution Analysis, etc. Image Fusion integrates two or more images which results in an image called a fused image. Image fusion techniques are classified as pixel-level and feature-level fusion. Pixel-level fusion combines and arranges pixels to form an output image. In feature-level fusion, features such as colors, edges, and textures of an input image are taken into consideration to form an output image [3]. Pixel-level fusion methods have the concept of averaging pixels of an input image. It also includes median, maximum, and minimum operations. Feature-level fusion methods involve the decomposition of input images, also known as multi-resolution analysis. Discrete Wavelet Transform (DWT) is a technique used to decompose images into their frequency components [4]. The sub-band that contains the most energy is selected for fusion so that the resultant image obtained can be more informative. Sometimes DWT and PCN techniques are used together to create more effective fusion methods [5].
Image fusion is widely used in many fields like medical sectors, remote sensing, etc. Computed Tomography(CT), Magnetic Resonance Imaging (MRI) techniques, etc come under the medical sector [6].

MRI Scan
Paul Lauterbur and Sir Peter Mansfield 1973 invented the magnetic Resonance Imaging (MRI) technique. MRI techniques form accurate images of internal structures using magnetic fields. Image fusion techniques combine MRI images with CT scans, to obtain more detailed information. In brain imaging, MRI can help to detect abnormalities of the structure. Sometimes MRI alone cannot provide helpful information about the image to make a clear diagnosis. Techniques used in MRI-based-image fusion are intensity-based fusion, featurebased fusion, and hybrid fusion. Intensity-based fusion involves fusing images based on their intensity values. Feature-based fusion consists in extracting features of images. As discussed earlier, feature-based fusion uses wavelet transform. In MRI-based image fusion, DWT can be used to extract features from the MRI data to combine with other image modality like CT scan [7].

CT Scan
In 1967, the idea of creating computer-assisted tomography came to a British Electrical Engineer, Sir Godfrey Hounsfield, at EMI central research laboratories, using X-ray technology. It was first commercially available in 1971 to perform a brain CT scan in Wimbledon, England. Later, the MRI scan was invented.
Computerized tomography (CT) scan unify a collective set of images of x-ray scans onto a single sheet. It uses computer processing to scan [8]. CT scans provide more detailed information about diagnosing bone and muscle disorders and fractures. People get CT scans of their pain to detect any injuries, so they can get treatment.

Image fusion of both MRI and CT scan
Fusion imaging combines different imaging modalities. We perform image fusion of MRI and CT scans to reduce redundancy and combine the individual images into a single image [9]. This provides enhanced information from each modality, resulting in more retained details to examine and facilitate the treatment process. We use Wavelet Transform for this process.
A wavelet transform is a mathematical tool that analyzes data with features that vary over different scales [10]. It extracts features like edges and textures of images. Wavelet transform is used in signal processing, data compression, and image processing. It compresses image data and extracts information from images. Wavelet transform can represent the signal in both time and frequency domains with localized information. This method has the great advantage of image fusion.
In wavelet transform, the signal or image is analyzed at different scales using small functions called wavelets, which are translated and scaled. The wavelet transform is divided into two types. 1) Continuous Wavelet Transform and 2) Discrete Wavelet transform.
Continuous Wavelet Transform analyzes a signal or image at different scales and positions in time or frequency and provides a continuous spectrum of scales. Discrete Wavelet Transform analyzes a signal or image at different scales and positions in a discrete manner. DWT analyzes the signal at a specific set of positions whereas the CWT analyzes the signal at continuous positions [11] [12]. In the process of DWT, the input image with some noise passes through a low pass filter and a high pass to remove that noise and this repeats until a detailed image is filtered. DWT is widely used in biomedical signal analysis, image and audio compression, and financial time series analysis.

Methodology
Many fusion techniques can be performed on images. They are classified as Spatial and Frequency domains. The spatial domain involves pixel values of images. By using Fourier Transform the image pixel values can be evaluated Fourier Transform methods include High pass filtering, PCA, Brovery method, and others.
The frequency domain overcomes the drawback of spatial distortions that are caused by Spatial domain techniques. The techniques involved in the frequency domain are the Laplacian pyramid fusion technique, Discrete Cosine Transform, etc. Discrete Wavelet Transform provides information about both spatial and frequency domains

A. Discrete Wavelet Transform (DWT)
DWT is a technique that is used for signal processing that decomposes the signal or image into a collection of wavelets [13]. These wavelets have different signal frequency components. The mother wavelet function gets translated and then a generation of wavelets takes place. By using DWT we can sample discretely the input function or wavelet. It is preferable to other wavelet transform techniques because it can capture both frequency and location.
The DWT decomposition of x(n) into approximation coefficients (A) and detail coefficients (D) can be expressed as follows: where * denotes convolution, j is the decomposition level, and n is the sample index.  Here are the image fusion process steps explained in a detailed manner: Pre-processing: In this, a high-quality fused image will produce. By removing noise or filtering and by using a sharpening technique like laplacian on that image that the visual quality of an image will be increased. It ensures that input images should align properly. The pre-processing step involves smoothing, and filtering the images etc Decomposition: In image fusion using the DWT technique, decomposition is a fundamental step. The image is broken into multi-level wavelet coefficients in this process. High-pass and low-pass filters are applied to input images to extract the different frequency components at different levels using the DWT technique. It produces the approximation coefficient in the first level of the decomposition that represents low-frequency information. It also gives a detailed coefficient that represents the high-frequency information. The size of input images will decide the number of decomposition levels. The wavelet coefficients are included in the fusion rule after this decomposition process. These fused coefficients are utilized to construct the fused image.
Fusion rule: In image fusion using the DWT technique, the fusion rule combines the wavelet coefficient obtained from the input image decomposition. In DWT-based image fusion, there are several fusion rules used, those are minimum selection, maximum selection, and average selection. The minimum selection rule selects the minimum value from the corresponding wavelet coefficients of input images. In a similar way, the maximum selection rule and average selection rule select the maximum and average of the corresponding wavelet coefficients from input images.
Reconstruction: It is the final step in DWT-based image fusion. Using fused wavelet coefficients the reconstruction will be done. After the fusing of wavelet coefficients, those are used to reconstruct the final fused image by performing the (IDWT)inverse DWT.
The inverse DWT takes the fused wavelet coefficients and combines them to obtain a highresolution image. This is done by applying the inverse DWT in reverse order to the decomposition process used in the image fusion technique. The final reconstructed image is obtained by adding the detail and approximation coefficients from all decomposition levels.
Post-processing: In this process, the image will sharpen, reduces noise, and enhance the method of contrast. These techniques are applied to the final fused image after the reconstruction step. Sharpening techniques are applied to enhance the details or edges in the fused image.The post-processing technique depends on the characteristics of input images, and the fusion rule used on the final fused image.

Implementation
MATLAB is famous as a goal-oriented programming language. The stated environment is interactive and designed for numerical computation, programming, and visualization purposes. It is used for high mathematical operations also. Matlab got the features like matrix operations, built-in functions, toolboxes, visualization tools, and interoperability.
Matlab is also commonly used for computational methods and numerical analysis. Discrete Wavelet Transform can be implemented for data visualization, 1-D and 2-D signal plotting, and image processing using matrix operations on images. Image fusion is based on Mean, Max, and Min components in the image. Matlab has the built-in command Wavelet Analyzer to perform Wavelet transform on different kinds of matrices.
The Matlab program applies the DWT technique to the input image which breaks down a signal into a set of wavelet coefficients that represent different frequency components of the signal. So the image decomposes itself into four segments of all which are the same size. Those segments are called approximate coefficients (from low pass filter), diagonal coefficients ( from high pass filter), horizontal coefficients, and vertical coefficients ( after multi levels). That can be done by Matlab's built-in function "dwt2" (Discrete Wavelet Transform). The reconstructed image can be retrieved by the "idwt2" (Inverse Discrete Wavelet Transform) function. The different types of wavelets and their Matlab abbreviations are Harr as "haar", Daubechies as "Db", Symlets as "Sym", Coefleh as "coeif5", Bi-Orthogonal " Bior" etc. CT and MRI scans are taken as input images. Allocate the image file and its path to user-defined variables, if the image path and Matlab file paths are different. Learn the size of each image that was taken as input since for the matrix operations the size should be the same for each image matrix. Matlab uses DWT built-in functions by taking the input parameters, where the parameters are input images that are in double data type for DWT operation, wave type, and fusion type. Here the wave type is "coif5" and the fusion type is the concluded image fusion method. Coiflet 5 (Coif5) is a wavelet function used for signal processing and data compression. The Coif5 wavelet is used for signal decomposition and reconstruction. This allows for efficient compression of signals while preserving important features. For the inverse DWT function, it takes parameters of CA, CH, CV, CD, wave type, and fusion type. In Matlab, the syntax for the DWT function is," dwt2 (input_image, wave_type, fusion_type )" In an image, it consists of pixels arranged in a matric format. After getting the CA and CD values from the DWT process, image fusion occurs with those CA and CD values for each color using the fusion calculation method. The calculation methods in image fusion can be any combination of Mean-Max-Min. Image fusion eventuates through every row and column for each color individually and then all united into a final fused image. Image fusion occurs by calling the user-defined function, which does actual implementation using a specified calculation method and wave type. The resultant image's name, format, and quality can be assigned by using the given Matlab syntax, Plot the CT scan, MRI scan, and resultant image into subplots for better understanding. Find Signal to noise ratio and Peak-SNR for each image and calculate the error.

a. Image Fusion Methods
The image fusion operation is done by a combination of these three Mean-Max-Min.

RESULT
The project is implemented using MATLAB. The fusion of both MRI and CT scans is done by using the DWT technique. This technique has more priority in the medical field. The DWT Technique has highlighted the potential of DWT-based image fusion to improve the accuracy of image-guided procedures. The fused images generated using DWT in MATLAB identify abnormalities and treatment strategies.

A. Peak Signal to Noise Ratio (PSNR)
PSNR stands for Peak Signal to Noise Ratio. It is used to measure the similarities between two signals or two images. It is the ratio of the image value to the image noise. PSNR can be measured in ( Where I(i) is the actual image pixel at the location I, K(i) is the fused image pixel at the location I, and N is the total no. of pixels in the image

B. Signal to Noise Ratio
The SNR is the ratio between signal power and noise power. SNR is inversely proportional to noise. So, if noise is high, SNR will be less which means the signal or image is not clear. SNR (dB) = 10 * log10 (P signal / P noise) P signal is the signal power and P noise is the noise power.

Graphs:
The graphs below shown corresponds with the

CONCLUSION
This paper implements image fusion of CT and MRI scans using a DWT technique in the Matlab 2021b tool. The Fusion method used here was determined by analyzing the best one out of the nine calculation methods listed in the table. The analysis of determining the best fusion method is followed using Matlab programming. The comparative analysis of Fusion methods helps select the best calculation method to use and therefore can provide a betterfused image with detailed information. This Image fusion with the DWT technique does decomposition, feature extraction, fusion rule, and reconstruction. The DWT technique decomposes the input images into frequency bands, extracts features from each image, applies a fusion rule to combine the features, and then reconstructs the fused image. This project on image fusion of CT and MRI scans using DWT techniques with Matlab programming can provide valuable insights into the potential benefits of this technique for medical imaging applications. The synthesized image has the qualities of both MRI and CT fused images. After the fusion of the images and from the graphical representations, it is concluded that the best-synthesized image is with the "max-max" method using the coif5 Discrete Wavelet Transform technique. The resultant fused images of the Max-Max, Max-Mean, and Max-Min methods have good quality.