Fast Parallel Gaussian Filter Based on Partial Sums †
Abstract
1. Introduction
2. Materials and Methods
2.1. Related Works
2.2. Parallel Algorithms for Gaussian Filtering
int i, j, k, p, idx, mask, img[m][n] double tot, sum1, kernel[mask][mask], sum[mask] for i = 1 to m − mask − 1 for k = 1 to mask {sum [k] = 0} for j = 1 to n − mask − 1 if i = 1 then tot = 0 for k = 1 to mask for p = 1 to mask sum [k] + = img [i + p − 1][j + k − 1] ∗ kernel [p] [k] tot + = sum [k] end for end for end if else sum1 = 0; for idx = 1 to mask {sum1 + = img [i + idx − 1][j] ∗ kernel [idx][1]} tot = sum1; for idx = mask to 2 {sum [idx] = sum [idx − 1]; tot + = sum [idx]} sum[1] = sum1; end else {img [i][j + mask/2] = tot;} end for end for |
2.3. Experimental Settings
2.4. Evaluation Quality of Filtering and Time Performance
3. Results and Discussion
4. Conclusions
- the application of parallel processing using the MPI (Message Passing Interface) library significantly accelerates image filtering using Gaussian filters;
- the use of previously calculated partial sums leads to a significant acceleration of computations in both cases, when the processing is sequential and when the processing is parallel;
- the size of the Gaussian kernel significantly influences the time complexity of parallel algorithms that do not use partial sums, and slightly influence the time complexity of parallel algorithms that use partial sums;
- the size of the kernel also influences the quality of the filtered images, which is proved using the popular PSNR metric;
- the efficiency of parallel execution is higher when the acceleration of calculations using partial sums is not attempted, but this means that every computational core has more workload, in comparison with the scenario when partial sums are utilized to improve time performance and, thus, the use of partial sums leads to decreasing energy consumption for Gaussian filtering;
- the fluctuations of measured time are greater when filtering is performed without using partial sums because, in this case, the time for processing is the longest; thus, the use of partial sums leads to more stable timing results, which yields more robust processing regarding time consumption when partial sums are used.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Gonzalez, R.C.; Woods, R.E. Digital Image Processing, 4th ed.; Pearson Education: New York, NY, USA, 2018. [Google Scholar]
- Mafi, M.; Martin, H.; Cabrerizo, M.; Andrian, J.; Barreto, A.; Adjouadi, M. A comprehensive survey on impulse and Gaussian denoising filters for digital images. Signal Process. 2019, 157, 236–260. [Google Scholar] [CrossRef]
- Desai, B.; Kushwaha, U.; Jha, S. Image Filtering—Techniques, Algorithm and Applications. Appl. GIS 2020, 7, 970–975. [Google Scholar]
- Mohanty, S.; Tripathy, S. Application of Different Filtering Techniques in Digital Image Processing. J. Phys. Conf. Ser. 2021, 2062, 012007. [Google Scholar] [CrossRef]
- Vijeyakumar, K.N.; Joel, P.T.N.K.; Jatana, S.H.S.; Saravanakumar, N.; Kalaiselvi, S. Area Efficient Parallel Median Filter Using Approximate Comparator and Faithful Adder. IET Circuits Devices Syst. 2020, 14, 1318–1331. [Google Scholar] [CrossRef]
- Hasan, S.K. FPGA Implementations for Parallel Multidimensional Filtering Algorithms. Ph.D. Thesis, Agriculture and Engineering Newcastle University, Newcastle upon Tyne, UK, June 2013. [Google Scholar]
- Gawande, G.S.; Dhotre, D.R.; Choubey, N.; Mate, D.S. A MILP based Optimization and FPGA Implementation of Efficient Polphase Multirate Filters. Int. J. Intell. Syst. Appl. Eng. 2023, 11, 164–172. [Google Scholar]
- Skirnevskiy, I.P.; Pustovit, A.V.; Abdrashitova, M.O. Digital image processing using parallel computing based on CUDA technology. J. Phys. Conf. Ser. 2017, 803, 012152. [Google Scholar] [CrossRef]
- Bosakova-Ardenska, A.; Bosakov, L. Parallel image processing with mean filter. In Proceedings of the International Scientific Conference—UniTech, Gabrovo, Bulgaria, 16–17 November 2012; pp. I-362–I-365. [Google Scholar]
- Stoica, V.; Coconu, C.; Ionescu, F. Parallel Implementation of Image Filtering Algorithms in Multiprocessor Systems. IFAC Proc. Vol. 2001, 34, 349–354. [Google Scholar] [CrossRef]
- Kabbai, L.; Sghaier, A.; Douik, A.; Machhout, M. FPGA implementation of filtered image using 2D Gaussian filter. Int. J. Adv. Comput. Sci. Appl. 2016, 7, 514–520. [Google Scholar] [CrossRef]
- Ivashko, A.; Zuev, A.; Karaman, D.; Moškon, M. Fpga-based implementation of a Gaussian smoothing filter with powers-of-two coefficients. Adv. Inf. Syst. 2024, 8, 39–47. [Google Scholar] [CrossRef]
- Saxena, S.; Sharma, S.; Sharma, N. Parallel Image Processing Techniques, Benefits and Limitations. Res. J. Appl. Sci. Eng. Technol. 2016, 12, 223–238. [Google Scholar] [CrossRef]
- Bozkurt, F.; Yağanoğlu, M.; Günay, F.B. Effective Gaussian Blurring Process on Graphics Processing Unit with CUDA. Int. J. Mach. Learn. Comput. 2015, 5, 57–61. [Google Scholar] [CrossRef]
- Rybakova, E.O.; Limonova, E.E.; Nikolaev, D.P. Fast Gaussian Filter Approximations Comparison on SIMD Computing Platforms. Appl. Sci. 2024, 14, 4664. [Google Scholar] [CrossRef]
- Fauzie, A.N.; Sakti, S.P.; Rahmadwati. Parallel Implementation of Gaussian Filter Image Processing on a Cluster of Single Board Computer. EECCIS 2023, 17, 82–88. [Google Scholar] [CrossRef]
- Singh, K.; Nair, J.S. Satellite Image Enhancement Using DWT and Gaussian Filter. Int. J. Comput. Sci. Eng. 2018, 6, 289–297. [Google Scholar] [CrossRef]
- Bausys, R.; Kazakeviciute-Januskeviciene, G.; Cavallaro, F.; Usovaite, A. Algorithm Selection for Edge Detection in Satellite Images by Neutrosophic WASPAS Method. Sustainability 2020, 12, 548. [Google Scholar] [CrossRef]
- Devi, T.G.; Patil, N.; Rai, S.; Philipose, C.S. Gaussian Blurring Technique for Detecting and Classifying Acute Lymphoblastic Leukemia Cancer Cells from Microscopic Biopsy Images. Life 2023, 13, 348. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
- Kim, H.S.; Cho, S.G.; Kim, J.H.; Kwon, S.Y.; Lee, B.I.; Bom, H.S. Effect of Post-Reconstruction Gaussian Filtering on Image Quality and Myocardial Blood Flow Measurement with N-13 Ammonia PET. Asia Ocean J. Nucl. Med. Biol. 2014, 2, 104–110. [Google Scholar] [PubMed] [PubMed Central]
- Bosakova-Ardenska, A. One approach for parallel algorithms representation. Balk. J. Electr. Comput. Eng. 2017, 5, 30–33. [Google Scholar] [CrossRef]
- Bosakova-Ardenska, A.; Vasilev, N. Parallel algorithms of the scanning mask method for primary images processing. In Proceedings of the 5th International Conference on Computer Systems and Technologies, Rousse, Bulgaria, 17–18 June 2004; pp. 1–7. [Google Scholar] [CrossRef]
- Sara, U.; Akter, M.; Uddin, M.S. Image quality assessment through FSIM, SSIM, MSE and PSNR—A comparative study. J. Comput. Commun. 2019, 7, 8–18. [Google Scholar] [CrossRef]
Image | Resolution [Pixels] | Size [kb] |
---|---|---|
waterliliya.bmp | 450 × 800 | 1057 |
street_art.bmp | 700 × 1244 | 2552 |
snow_trees.bmp | 1050 × 1865 | 5741 |
house.bmp | 1452 × 2581 | 10,980 |
old_Nessebar.bmp | 2000 × 3555 | 20,831 |
Image | Original Image and Selected ROI | Filtered ROI Using Gaussian1D Algorithm | Filtered ROI Using Gaussian2D Algorithm | Filtered ROI Using MATLAB Function |
---|---|---|---|---|
waterliliya.bmp | ||||
street_art.bmp | ||||
snow_trees.bmp | ||||
house.bmp | ||||
old_Nessebar.bmp |
Algorithm | Kernel Size (Sigma) | Waterliliya | Street_Art | Snow_Trees | House | Old_Nessebar |
---|---|---|---|---|---|---|
Gaussian1D | 3 (0.5) | 29.15 | 30.37 | 36.22 | 35.66 | 44.87 |
5 (1) | 28.31 | 29.20 | 34.18 | 33.44 | 42.56 | |
7 (1.5) | 28.27 | 29.15 | 34.04 | 33.27 | 42.38 | |
9 (2) | 28.29 | 29.15 | 34.04 | 33.27 | 42.38 | |
11 (2.5) | 28.31 | 29.16 | 34.05 | 33.28 | 42.38 | |
Gaussian2D | 3 (0.5) | 26.13 | 25.78 | 31.21 | 31.79 | 39.23 |
5 (1) | 24.35 | 24.00 | 27.86 | 27.42 | 35.40 | |
7 (1.5) | 23.43 | 23.27 | 26.31 | 25.39 | 33.63 | |
9 (2) | 22.78 | 22.76 | 25.27 | 24.16 | 32.40 | |
11 (2.5) | 22.27 | 22.37 | 24.51 | 23.30 | 31.39 | |
MATLAB function imgaussfilt() | 3 (0.5) | 33.44 | 33.51 | 39.34 | 40.64 | 47.58 |
5 (1) | 25.94 | 25.42 | 30.01 | 30.48 | 37.51 | |
7 (1.5) | 24.21 | 23.66 | 27.13 | 26.90 | 33.91 | |
9 (2) | 23.22 | 22.77 | 25.56 | 24.85 | 31.92 | |
11 (2.5) | 22.52 | 22.19 | 24.55 | 23.50 | 30.66 |
Algorithm | Kernel | Processes | Waterliliya | Street_Art | Snow_Trees | House | Old_Nessebar |
---|---|---|---|---|---|---|---|
Gaussian1D | 3 | 1 | 0.0071 ± 0.0001 | 0.0173 ± 0.0003 | 0.0386 ± 0.0004 | 0.0747 ± 0.0030 | 0.1416 ± 0.0037 |
8 | 0.0037 ± 0.0002 | 0.0080 ± 0.0005 | 0.0175 ± 0.0010 | 0.0304 ± 0.0031 | 0.0570 ± 0.0040 | ||
5 | 1 | 0.0116 ± 0.0002 | 0.0279 ± 0.0002 | 0.0641 ± 0.0027 | 0.1219 ± 0.0026 | 0.2323 ± 0.0063 | |
8 | 0.0051 ± 0.0003 | 0.0111 ± 0.0008 | 0.0251 ± 0.0016 | 0.0442 ± 0.0038 | 0.0772 ± 0.0050 | ||
7 | 1 | 0.0158 ± 0.0003 | 0.0385 ± 0.0009 | 0.0873 ± 0.0028 | 0.1688 ± 0.0054 | 0.3204 ± 0.0071 | |
8 | 0.0064 ± 0.0005 | 0.0151 ± 0.0005 | 0.0304 ± 0.0022 | 0.0542 ± 0.0046 | 0.0979 ± 0.0053 | ||
9 | 1 | 0.0208 ± 0.0002 | 0.0510 ± 0.0011 | 0.1162 ± 0.0032 | 0.2253 ± 0.0048 | 0.4189 ± 0.0030 | |
8 | 0.0079 ± 0.0003 | 0.0179 ± 0.0013 | 0.0370 ± 0.0024 | 0.0660 ± 0.0051 | 0.1194 ± 0.0050 | ||
11 | 1 | 0.0263 ± 0.0003 | 0.0644 ± 0.0011 | 0.1479 ± 0.0036 | 0.2831 ± 0.0038 | 0.5354 ± 0.0100 | |
8 | 0.0093 ± 0.0007 | 0.0212 ± 0.0012 | 0.0464 ± 0.0038 | 0.0744 ± 0.0045 | 0.1349 ± 0.0043 | ||
Gaussian2D | 3 | 1 | 0.0231 ± 0.0010 | 0.0552 ± 0.0021 | 0.1255 ± 0.0036 | 0.2402 ± 0.0042 | 0.4545 ± 0.0046 |
8 | 0.0082 ± 0.0003 | 0.0192 ± 0.0012 | 0.0372 ± 0.0022 | 0.0659 ± 0.0035 | 0.1259 ± 0.0058 | ||
5 | 1 | 0.0681 ± 0.0008 | 0.1663 ± 0.0010 | 0.3734 ± 0.0025 | 0.7133 ± 0.0018 | 1.3566 ± 0.0036 | |
8 | 0.0198 ± 0.0016 | 0.0421 ± 0.0022 | 0.0858 ± 0.0041 | 0.1522 ± 0.0030 | 0.2876 ± 0.0105 | ||
7 | 1 | 0.1371 ± 0.0013 | 0.3322 ± 0.0017 | 0.7512 ± 0.0036 | 1.4383 ± 0.0060 | 2.7304 ± 0.0057 | |
8 | 0.0361 ± 0.0032 | 0.0727 ± 0.0052 | 0.1556 ± 0.0035 | 0.2888 ± 0.0073 | 0.5305 ± 0.0092 | ||
9 | 1 | 0.2252 ± 0.0009 | 0.5515 ± 0.0022 | 1.245 ± 0.0042 | 2.3857 ± 0.0038 | 4.5355 ± 0.0059 | |
8 | 0.0504 ± 0.0043 | 0.1153 ± 0.0034 | 0.2443 ± 0.0064 | 0.4545 ± 0.0125 | 0.8646 ± 0.0271 | ||
11 | 1 | 0.3371 ± 0.0023 | 0.8232 ± 0.0020 | 1.8688 ± 0.0071 | 3.5789 ± 0.0039 | 6.8095 ± 0.0026 | |
8 | 0.0727 ± 0.0059 | 0.1644 ± 0.0057 | 0.3637 ± 0.0090 | 0.6723 ± 0.0194 | 1.2543 ± 0.0157 | ||
Gaussian2DParSums | 3 | 1 | 0.0091 ± 0.0002 | 0.0220 ± 0.0006 | 0.0505 ± 0.0023 | 0.0978 ± 0.0055 | 0.1834 ± 0.0058 |
8 | 0.0044 ± 0.0002 | 0.0098 ± 0.0006 | 0.0215 ± 0.0012 | 0.0363 ± 0.0020 | 0.0657 ± 0.0045 | ||
5 | 1 | 0.0134 ± 0.0001 | 0.0332 ± 0.0021 | 0.0756 ± 0.0037 | 0.1413 ± 0.0025 | 0.2676 ± 0.0062 | |
8 | 0.0059 ± 0.0004 | 0.0132 ± 0.0006 | 0.0277 ± 0.0025 | 0.0483 ± 0.0026 | 0.0867 ± 0.0031 | ||
7 | 1 | 0.0188 ± 0.0003 | 0.0454 ± 0.0008 | 0.1020 ± 0.0015 | 0.1966 ± 0.0030 | 0.3748 ± 0.0094 | |
8 | 0.0076 ± 0.0003 | 0.0165 ± 0.0012 | 0.0341 ± 0.0028 | 0.0593 ± 0.0033 | 0.1139 ± 0.0063 | ||
9 | 1 | 0.0247 ± 0.0003 | 0.0593 ± 0.0008 | 0.1330 ± 0.0005 | 0.2549 ± 0.0013 | 0.4887 ± 0.0043 | |
8 | 0.0093 ± 0.0003 | 0.0198 ± 0.0014 | 0.0413 ± 0.0021 | 0.0748 ± 0.0059 | 0.1280 ± 0.0040 | ||
11 | 1 | 0.0306 ± 0.0010 | 0.0731 ± 0.0004 | 0.1656 ± 0.0023 | 0.3182 ± 0.0039 | 0.6016 ± 0.0102 | |
8 | 0.0108 ± 0.0004 | 0.0237 ± 0.0012 | 0.0465 ± 0.0036 | 0.0844 ± 0.0057 | 0.1564 ± 0.0065 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bosakova-Ardenska, A.; Andreeva, H.; Halvadzhiev, I. Fast Parallel Gaussian Filter Based on Partial Sums. Eng. Proc. 2025, 104, 1. https://doi.org/10.3390/engproc2025104001
Bosakova-Ardenska A, Andreeva H, Halvadzhiev I. Fast Parallel Gaussian Filter Based on Partial Sums. Engineering Proceedings. 2025; 104(1):1. https://doi.org/10.3390/engproc2025104001
Chicago/Turabian StyleBosakova-Ardenska, Atanaska, Hristina Andreeva, and Ivan Halvadzhiev. 2025. "Fast Parallel Gaussian Filter Based on Partial Sums" Engineering Proceedings 104, no. 1: 1. https://doi.org/10.3390/engproc2025104001
APA StyleBosakova-Ardenska, A., Andreeva, H., & Halvadzhiev, I. (2025). Fast Parallel Gaussian Filter Based on Partial Sums. Engineering Proceedings, 104(1), 1. https://doi.org/10.3390/engproc2025104001