Efficient MRI Image Real-Time Processing Using FPGA-Based IIR Filters

Efficient MRI Image Real-Time Processing Using FPGA-Based IIR Filters

Rasha Waleed Hamad* Mohammad H. Ismail Sara Raed

Electronic Engineering Department, Electronics Engineering College, Ninevah University, Mosul 41001, Iraq

Computer and Information Engineering Department, Electronics Engineering College, Ninevah University, Mosul 41001, Iraq

Corresponding Author Email: 
rasha.hamad@uoninevah.edu.iq
Page: 
869-876
|
DOI: 
https://doi.org/10.18280/jesa.570326
Received: 
18 April 2024
|
Revised: 
29 May 2024
|
Accepted: 
4 June 2024
|
Available online: 
25 June 2024
| Citation

© 2024 The authors. This article is published by IIETA and is licensed under the CC BY 4.0 license (http://creativecommons.org/licenses/by/4.0/).

OPEN ACCESS

Abstract: 

Magnetic Resonance Imaging (MRI) holds a pivotal position in contemporary medical diagnostics and the formulation of treatment strategies. At the same time, real-time processing of its massive data faces challenges. The current research introduces a highly efficient way to use IIR filters with Xilinx System Generator (XSG) to construct MRI image processing algorithms. explore Furthermore, focuses on the feasibility of utilizing XSG for implementing image processing algorithms in the context of MRI. In the initial stage of the process, MRI image processing algorithms are used, such as image compression, edge detection, and image fusion. These algorithms are then implemented using XSG, which provides a graphical design environment for FPGA programming. The performance of the implemented algorithms is evaluated through some prescribed performance measures and the results showed that the proposed algorithms exhibited superior performance in comparison to existing research across the majority of measures. FPGA implementation of such algorithms is then achieved with less complexity (1%-2%). The results demonstrate that system generator provides an efficient approach for implementing MRI image processing algorithms on FPGA kit, enabling real-time processing and high-quality results.

Keywords: 

magnetic resonance imaging, image compression, image fusion, edge detection, Xilinx System Generator, FPGA

1. Introduction

Magnetic Resonance Imaging (MRI) is a noninvasive imaging technique capable of producing highly detailed images of the human body. Used mainly for disease diagnosis, general physical examination, and evaluation of the therapeutic response. MRI uses sophisticated techniques to induce and image the changes in the spinning axis of the protons of the water that make up body tissues. MRI data require post-processing which involves conversion of raw data to obtain images, promoting image analysis and interpretation, and supporting additional functions for applications in both clinical and research fields [1].

The conversion of an image from its original analog form to a digital form and then subjected to several other processes such as analysis, manipulation, or enhancement, is referred to as image processing. This field comprises a variety of techniques and approaches aimed at identifying useful data captured within the digital images, enhancing the images themselves, or making them ready for additional stages of processing and application [2]. Image processing is used in various disciplines such as in analyzing digital photography, medical image processing, computer vision, digital encryption, and decryption [3]. MRI image processing challenges comprise computational efficiency issues and operational complexity. Traditional algorithms may have high requirements, limiting their use in real-time or resource-constrained settings. When it comes to digital data processing and collection, FPGAs are quite helpful, especially for real-time applications. They are widely used for processing data in parallel at fast speeds, including processing images [4, 5]. Utilizing a high-level programming language for FPGA-based image processing applications often demands the creation of thousands of lines of code, which can be inefficient and time-consuming. To address these challenges, this paper realized various algorithms for MRI image processing, including compression, edge detection, and fusion. These algorithms are using IIR filters and implemented on an FPGA kit utilizing the highly effective Xilinx System Generator tool, this tool featuring a user-friendly graphical interface integrated with Matlab and Simulink-based blocks. This decision streamlines the development workflow, distinguishing it from other hardware description tools. The selected approach reduces complexity in the development process, making it stand out from the typical hardware description software options.

The paper explores the following research questions:

  1. What are the most effective methods for performing real-time processing of MRI images on FPGA hardware?
  2. Parallel processing on FPGA can improve speed and efficiency of real-time MRI analysis using Xilinx System Generator?

The manuscript examines potential hypotheses to investigate, including:

  1. Using IIR filters on FPGA kit for real-time MRI image processing can dramatically enhance the speed and efficiency of the system compared to traditional processing algorithms.
  2. Employing IIR filters for real-time MRI image compression achieved higher compression rates and better quality of the compressed images compared to traditional methods.
  3. FPGA-based IIR filters for real-time MRI processing reduce power and resources, enabling more efficient and cost-effective imaging systems.

The Key Contributions of this manuscript are:

(1) Using IIR filter in MRI image processing algorithms is a critical component for improving the performance and efficiency of these imaging algorithms.

(2) Implementing MRI image processing algorithms on FPGA using XSG is a highly effective and appealing approach for real-time MRI image processing.

(3) The paper compares existing and proposed MRI processing techniques and finds the proposed algorithms outperform existing methods in compression, edge detection, and fusion.

This is the format for the remainder of the paper. The suggested image processing algorithms are shown in Section 3. Section 4 provides the implementation results utilizing a Xilinx FPGA kit. Section 5 includes a comparison of the suggested algorithms with alternative methods. Finally, Section 6 concludes this paper.

2. Related Works

In this section, an extensive literature review is presented and discussed, encompassing diverse research conducted on medical image processing. Dridi et al. [6] suggested an image compression algorithm for medical images utilizing an Artificial Neural Network (ANN), demonstrating its efficiency and performance through experimental results on 8-bit and 12-bit medical images. Various criteria, including MAE, UIQ, correlation, and PSNR, were used to assess image compression acceptability.

The canny algorithm for identifying brain tumors in MRI images was enhanced by Stosic and Rutesic [7], using a LoG filter and optimizing gradient parameters. They compared it to other methods, demonstrating superior edge detection, noise resilience, and detail capturing over the standard canny algorithm.

DR and Eranna [8] introduced an image compression method based on a region of interest (ROI) using discrete wavelet transform (DWT) on FPGA for medical imaging. DWT algorithm was designed with arithmetic operations and demonstrated a high compression ratio and potential for reduced transmission/storage costs in medical imaging.

Abdel-Gawad et al. [9] developed an improved genetic algorithm-based edge identification approach for brain tumor diagnosis in MR images. Training dataset used for optimal filter coefficients and thresholding algorithm. Comparative analysis with classical and fractional-order methods shows the GA method’s effectiveness in detecting fine edges.

Bhutto et al. [10] presented a medical image fusion (MIF) technique aimed at improving the accuracy of clinical diagnosis. The proposed method addresses challenges associated with illumination and noise by employing morphological preprocessing. To preserve detailed features, Grey-PCA is utilized, while characteristics are effectively restored using LSIST. Additionally, a siamese CNN is employed to capture edges and textures. This comprehensive approach enhances diagnosis accuracy and provides doctors with comprehensive information for their assessments.

Liu et al. [11] devised a medical image compression technique that effectively balances compression and reconstruction. By leveraging a residual network module and a variational autoencoder, they concurrently optimize the rate and distortion. This approach surpassed standard and deep learning techniques, delivering superior quality medical images at equivalent compression rates while effectively reducing distortion. It outperforms a hyperprior end-to-end compression network in terms of performance.

AS and Gopalan [12] employed an 8-directional Sobel technique to enhance edge recognition in brain tumor MRI images. Performance evaluation using metrics like PSNR, SNR, Entropy, RMSE, and MSE demonstrated the superiority of the 8-Sobel algorithm over conventional edge detection methods. The study also utilized an active contouring segmentation algorithm to validate tumor classification accuracy based on the detected edges.

Vidyadhar et al. [13] implemented Principal Component Analysis (PCA) on brain MR and CT images using Xilinx ISE. Their objective was to aid clinical diagnostics through image analysis. They proposed an image fusion technique that combines maximum selection fusion with PCA, enhancing image features and producing merged images with improved clarity. MATLAB simulations showed significant improvement in quality metrics, with up to an 11.7% enhancement compared to FPGA implementation of discrete wavelet transform (DWT) architecture.

Tabassum et al. [14] designed a cost-effective FPGA-based system for efficient brain tumor detection in MRI images. It surpasses CPU-based approaches, delivering satisfactory output in 6.49µs. Leveraging Xilinx Vivado, the system parallelly reads and processes multiple MRI images, enhancing efficiency. With a maximum memory capacity of 30.906MB and an average power consumption of 82mW, it is suitable for clinical usage. The FPGA-based medical diagnosis system utilized logic blocks and pixel value analysis to identify tumor-type anomalies in MRI images. Table 1 presents a summary of the related works.

Table 1. Summary of related works

Author/Date

Algorithm

Methodology

Performance Metrics

Dridi et al. [6], 2016

Compression

Neural Network

CR

MSE

MAE

UIQ

PSNR

Correlation

Stosic and Rutesic [7], 2018

Edge Detection

Improved Canny Algorithm

qualitatively (visually)

DR and Eranna [8], 2020

Compression

Discrete Wavelet Transformation (DWT)

MSE

PSNR

Abdel-Gawad et al. [9], 2020

Edge Detection

Genetic Algorithm

PCD

PND

PFA

Bhutto et al. [10], 2022

Fusion

Convolutional Neural Network

Q FAB

CRR

AG

Liu et al. [11], 2022

Compression

Variational Autoencoder

BPP

PSNR

MS-SSIM

AS and Gopalan [12], 2022

Edge Detection

Sobel Algorithm

MSE

RMSE

SNR

PSNR

Vidyadhar et al. [13], 2023

Fusion

Principal Component Analysis (PCA)

N/A*

Tabassum et al. [14], 2023

Edge Detection

Soft IP Core

N/A*

N/A*: Not Available

3. Proposed Image Processing Algorithms

In this section, three MRI image processing techniques are presented. The performance of each algorithm is evaluated using a predefined set of performance measures, which demonstrate an excellent closeness to typical algorithms.

The MRI image processing algorithm's suggested architecture, which employs Simulink and Xilinx blocks, is segmented into three stages, as depicted in Figure 1.

Figure 1. Block diagram of proposed MRI image processing algorithms

All necessary hardware methods are implemented between MRI image pre-processing and MRI image post-processing. Simulink is utilized to implement the MRI Image Pre-Processing and MRI Image Post-Processing blocks. The basic MRI image processing algorithms namely Compression, Edge detection, and Fusion are implemented using Xilinx blocks and then implemented on Artix 7 (XC7A100t-1CSG324) FPGA kit. The test dataset consists of five grayscale MRI pictures obtained from the study [15], each with a size of 256×256 pixels. These images are displayed in Figure 2.

Figure 2. Test MRI images

3.1 Algorithm for MRI image compression

The issue of minimizing the quantity of data needed to portray an MRI picture is addressed by MRI image compression. The proposed compression algorithm is shown in Figure 3, which utilized an IIR filter for its realization, the IIR filter coefficients are selected as in the study [16] for getting 7th low-pass IIR filter, the transfer function for the 7th low pass IIR is defined as in Eq. (1). The compression and reconstruction of brain MRI images in Figure 2(a) using the proposed compression algorithm is shown in Figure 4.

Figure 3. Model simulation for MRI image compression algorithm

Figure 4. Compression and reconstruction of test image brain MRI

Throughout this technique are given for four compression performance metrics are represented by numbers. These measures are SNR, PSNR, and Cor [17, 18] are taken between the original image and reconstructed image and, CR between the original image and compressed image [19]. Figure 5 and Table 2 illustrate the performance of the compression algorithm on the test MRI images.

$\begin{gathered}H(z)={\left[\frac{0.00605+0.11 z^{-2}+0.5 z^{-3}+0.5 z^{-4}+0.11 z^{-5}+0.00605 z^{-7}}{1+0.22 z^{-2}+0.121 z^{-4}}\right]}\end{gathered}$           (1)

Figure 5. Performance of compression algorithm on the test MRI images

Table 2. Compression algorithm performance on test MRI

Image

SNR(dB)

PSNR(dB)

Corr.

CR

Brain MRI

73.532

81.7467

1

2.8201

Small Bowel MRI

71.044

79.3902

1

2.4952

Cardiac MRI

55.2855

64.7188

1

2.6633

Mouth MRI

57.3822

76.1290

1

3.3451

Nose MRI

55.3829

62.8639

1

3.2893

Average

62.5253

72.9697

1

2.9226

3.2 Algorithm for MRI image edge detection

Edges are points of sharp change in an image. where there is a rapid transition in pixel intensity, signifying a distinct change in luminance. Edges encapsulate a significant portion of an image's shape-related information and play a crucial role in highlighting object characteristics within the image [20]. Edge detection stands as one of the most frequently employed techniques in image analysis, with a plethora of algorithms documented in the literature dedicated to enhancing and identifying these edges. Edge detection involves a straightforward process of filtering and masking using an appropriate filter mask. For MRI image edge detection, the input MRI image is convolved with the 7th IIR High-pass filter as outlined in the study [16], the transfer function for the 7th High-pass IIR is defined as in Eq. (2). utilizing Xilinx block sets for processing. This method is illustrated in Figure 6. Then the image will become sharper by enhancing the areas of the image that have edges. Figure 7 presents the results of MRI image edge detection.

$\begin{gathered}H(z)=  {\left[\frac{0.00605+0.11 z^{-2}-0.5 z^{-3}+0.5 z^{-4}-0.11 z^{-5}-0.00605 z^{-7}}{1+0.22 z^{-2}-0.121 z^{-4}}\right]}\end{gathered}$              (2)

Figure 6. Model simulation for MRI image edge detection algorithm

Figure 7. MRI image edge detection algorithm results

3.3 Algorithm for MRI image fusion

A technique known as image fusion turns two or more images from the same scene into a single image. Compared to all of the input images, the fused image that is produced will be more informative [21]. It is widely used in many application domains, such as medical imaging, photography, and surveillance [22]. There are two categories for image fusion techniques: spatial and frequency domains. The spatial-based approach is a basic image fusion technique made up of Max-Min, maximum, minimum, averaging, and principal component analysis (PCA) [22].

This paper achieved MRI Image Fusion utilizing the Simple Average technique, which is computationally efficient, requiring minimal processing time and resources, this approach is useful where real-time image fusion is required or when dealing with large datasets, it combines images by averaging the pixels, as in Eq. (3) [22, 23].

$w(i, j)=\frac{X(i, j)+Y(i, j)}{2}$           (3)

W(i,j) is a fused image and X(i,j), Y(i,j) are input image. Figure 8 shows the fusion algorithm, and the simulation results are shown in Figure 9.

Figure 8. Model simulation for MRI image fusion algorithm

Figure 9. Results for MRI image fusion algorithm

The metrics used for measuring the performance MRI image fusion algorithm, are mean, information entropy (IE), and standard deviation (SD) [24, 25]. The Fusion algorithm's performance on the test MRI images is displayed in Table 3. In Figure 10, the Fusion algorithm's performance was examined and plotted.

Table 3. Performance of fusion algorithm on the test MRI images

Metrics

Fused Image 1

Fused Image 2

Mean

117.8491

97.3319

Information Entropy (IE)

6.7692

7.6643

Standard Deviation (SD)

74.0610

63.9594

Figure 10. Performance of fusion algorithm on the test MRI images

4. The Implementation Results

The MRI image processing algorithms put forward in this article were simulated using a graphical programming environment Matlab Simulink then synthesized using Xilinx ISE Design Suite 14.7 and subsequently implemented on an Artix 7 FPGA kit (XC7A100t-1CSG324). The workflow between Matlab simulink and ISE program is shown in Figure 11. Table 4 provides an overview of the hardware resources necessary for the implementation of these MRI image processing algorithms.

Figure 11. Flow chart of workflow between Matlab simulink and ISE

Table 4. The implementation results for MRI image processing algorithms

Algorithm

Resource

Used

Available

Utilization

Ratio

Compression

Count of utilized slices

319

15,850

2%

Count of utilized slice registers

117

126800

1%

Count of utilized slice LUTs

1,097

63400

1%

Edge Detection

 

Count of utilized Slices

400

15,850

2%

Count of utilized Slice Registers

121

126800

1%

Count of utilized Slice LUTs

 

1,098

63400

1%

Fusion

Count of utilized Slices

2

15,850

0%

 

Count of utilized slice registers

1

126800

0%

Count of utilized slice LUTs

8

63400

0%

5. A Comparative Study

To demonstrate the effectiveness of the suggested algorithms, comparisons from the performance point of view are made between the proposed algorithms and other algorithms in the studies [6, 25] is shown in Table 5.

Table 5. Performance comparison of proposed algorithms and referenced algorithms

Algorithm

Metrics

Proposed

References

Compression

PSNR

72.9697

[6]

32,08

SNR

62.5253

35.7104

Corr.

1

0.99954

Fusion

Mean

117.8491

[25]

135.7702

IE

6.7692

6.9771

SD

74.0610

39.9774

Based on Table 5, it is notable that the proposed compression algorithm provides superior signal quality in terms of PSNR, SNR, and Corr. values. Additionally, it exhibits efficient subjective quality. Furthermore, the fusion algorithm demonstrates improved signal quality in Mean, IE, and SD values. The below list shows the benefits of enchantment values of image quality metrics:

  • Higher compression ratios reduced storage requirements without significant loss of important diagnostic information.
  • Efficient compression ratios enable faster transmission of MRI images over networks or through communication channels.
  • Improved SNR contributes to clearer visualization of anatomical structures, lesions, and other diagnostic features, assisting radiologists and clinicians in making accurate assessments.

Additionally, the results from Matlab simulations and hardware implementations were highly similar, with minor differences deemed negligible for the study. Key metrics like SNR, PSNR, and compression ratio showed less than 1% variation between software and hardware, attributed to rounding errors and implementation differences.

6. Conclusions

IIR filters with Xilinx System Generator have been utilized in designing and implementing MRI image processing algorithms with feasibility and effectiveness. The paper showed the feasibility of utilizing a system generator for implementing various image processing algorithms commonly used in MRI, such as image compression, edge detection, and image fusion. The developed algorithms contribute to the progress of image analysis algorithms and enhanced utilization of MRI data in medical applications. The implemented algorithms demonstrated favorable results in terms of image quality and resource utilization during performance evaluation. The employed performance metrics were significantly higher in comparison to other approaches mentioned in the references. Generally, using Xilinx System Generator to implement MRI image processing algorithms on FPGA offers a practical solution for efficient real-time processing. This paper has utilized new techniques that can lead to improved medical image application and enhance accurate diagnosis and patient care. Further studies will be aimed at implementing more sophisticated filtering such as the FIR filters or the wavelet filters to attain better performances of the MRI images already undergoing the filter process. This left this research to explore other more complex filtering methodologies that could show a possibility of opening further enhancements to other aspects of the overall image quality for medical imaging applications.

  References

[1] National Institute of Biomedical Imaging and Bioengineering. (2022). Magnetic Resonance Imaging (MRI). https://www.nibib.nih.gov/science-education/science-topics/magnetic-resonance-imaging-mri.

[2] Sakthivel, D.K., Swathi, B.R., Priyan, S.V., Yokesh, C. (2016). Analysis of medical image processing and its application in healthcare. International Journal of Advanced Engineering Research and Science (IJAERS), 3(2).

[3] Guragain, D.P., Ghimire, P., Budhathoki, K. (2018). Implementation of FPGA based image processing algorithm using Xilinx system generator. International Research Journal of Engineering and Technology (IRJET), 5(1): 2395-0056.

[4] Šušteršič, T.I., Filipovic, N.D. (2021). Implementation of medical image processing algorithms on FPGA using xilinx system generator. Computational Modeling and Simulation Examples in Bioengineering, 323-362. https://doi.org/10.1002/9781119563983.ch9

[5] Gupta, A., Vaishnav, H., Garg, H. (2015). Image processing using xilinx system generator (XSG) in FPGA. International Journal of Research and Scientific Innovation, 2(9): 119-125.

[6] Dridi, M., Hajjaji, M.A., Bouallegue, B., Mtibaa, A. (2016). An enhencment medical image compression algorithm based on neural network. International Journal of Advanced Computer Science and Applications, 7(5): 484-489.

[7] Stosic, Z., Rutesic, P. (2018). An improved canny edge detection algorithm for detecting brain tumors in MRI images. International Journal of Signal Processing, 3. http://iaras.org/iaras/journals/ijsp.

[8] DR, P., Eranna, U. (2020). Hardware realization of ROI based image compression using the DWT approach on FPGA for medical applications. International Journal of Advanced Research in Engineering and Technology, 11(11): 554-563.

[9] Abdel-Gawad, A.H., Said, L.A., Radwan, A.G. (2020). Optimized edge detection technique for brain tumor detection in MR images. IEEE Access, 8: 136243-136259. https://doi.org/10.1109/ACCESS.2020.3009898

[10] Bhutto, J.A., Tian, L., Du, Q., Sun, Z., Yu, L., Tahir, M.F. (2022). CT and MRI medical image fusion using noise-removal and contrast enhancement scheme with convolutional neural network. Entropy, 24(3): 393. https://doi.org/10.3390/e24030393

[11] Liu, X., Zhang, L., Guo, Z., Han, T., Ju, M., Xu, B., Liu, H. (2022). Medical image compression based on variational autoencoder. Mathematical Problems in Engineering, 2022(1): 7088137. https://doi.org/10.1155/2022/7088137

[12] AS, R.A., Gopalan, S. (2022). Comparative analysis of eight direction Sobel edge detection algorithm for brain tumor MRI images. Procedia Computer Science, 201: 487-494. https://doi.org/10.1016/j.procs.2022.03.063

[13] Vidyadhar, R.P., Mahalakshmi, B., Kethan, G.S., Deepak, K. (2023). FPGA implementation of medical image fusion using PCA. In 2023 9th International Conference on Advanced Computing and Communication Systems (ICACCS), Coimbatore, India, pp. 1083-1087. https://doi.org/10.1109/ICACCS57279.2023.10112690

[14] Tabassum, N., Islam, S.M.R., Bulbul, F. (2023). Brain tumor detection from brain MRI using soft IP core on FPGA. Circuits, Systems, and Signal Processing, 42(2): 724-747. https://doi.org/10.1007/s00034-022-02233-x

[15] National Library of Medicine. Open Access Biomedical Image Search Engine. https://openi.nlm.nih.gov/.

[16] M Abdul-Jabbar, J., Najeeb Saadi, O. (2015). Genetic-based IIR filter design for efficient QRS complex detection using neuro-based classifier. Al-Rafidain Engineering Journal (AREJ), 23(4): 172-182.

[17] Waleed, R. (2023). Medical image compression using IIR wavelet filter banks. In AIP Conference Proceedings. AIP Publishing, 2591(1). https://doi.org/10.1063/5.0119538

[18] Fakeh, R., Abd Ghani, A.A. (2009). Empirical evaluation of decomposition strategy for wavelet video compression. International Journal of Image Processing, 3(1): 31-54.

[19] Chowdhury, M.M.H., Khatun, A. (2012). Image compression using discrete wavelet transform. International Journal of Computer Science Issues, 9(4): 327-330.‏

[20] Solomon, C., Breckon, T. (2011). Fundamentals of Digital Image Processing: A Practical Approach with Examples in Matlab. John Wiley & Sons.

[21] Azam, M.A., Khan, K.B., Salahuddin, S., Rehman, E., Khan, S.A., Khan, M.A., Kadry, S., Gandomi, A.H. (2022). A review on multimodal medical image fusion: Compendious analysis of medical modalities, multimodal databases, fusion techniques and quality metrics. Computers in Biology and Medicine, 144: 105253. https://doi.org/10.1016/j.compbiomed.2022.105253

[22] Ma, X., Hill, P., Anantrasirichai, N., Achim, A. (2022). Unsupervised image fusion using deep image priors. In 2022 IEEE International Conference on Image Processing (ICIP), Bordeaux, France, pp. 2301-2305. https://doi.org/10.1109/ICIP46576.2022.9897779

[23] Al-Mokhtar, Z.T., Ibraheem, F.N., Al-Layla, H.F. (2021). A review of digital image fusion and its application. Al-Rafidain Engineering Journal (AREJ), 26(2): 309-322. https://doi.org/10.33899/rengj.2021.127928.1055

[24] Zhan, L., Zhuang, Y., Huang, L. (2017). Infrared and visible images fusion method based on discrete wavelet transform. Journal of Computers, 28(2): 57-71. https://doi.org/10.3966/199115592017042802005

[25] Panguluri, S.K., Mohan, L. (2020). Discrete wavelet transform based image fusion using unsharp masking. Periodica Polytechnica Electrical Engineering and Computer Science, 64(2): 211-220. https://doi.org/10.3311/PPee.14702