High-Performance Krawtchouk Polynomials of High Order Based on Multithreading
Abstract
:1. Introduction
- A novel multi-threaded implementation method is proposed to improve the efficiency of the DKraP coefficient computation.
- A computationally efficient solution using a multi-threaded method to reduce computation time is proposed.
- The proposed algorithm for DKraP preserves the orthogonality condition for large signal sizes as well as higher polynomial sizes and improves performance across different parameter values.
2. Mathematical Definitions of DKraP and DKraM
- n is a non-negative integer .
- x is an integer such that .
- p is a real number in the range .
3. Multi-Threaded Algorithm
3.1. Multi-Threaded Algorithm for DKTv1
- Compute initial sets and .
- Set number of threads (T).
- Start the loop for a thread to run the bunch such that bunch = N/T.
- Call the function (Krawtchouk_Rec) for multi-threaded.
- Function (Krawtchouk_Rec).
- Check for the total threads.
Algorithm 1 Compute DKraP coefficients using MDKTv1. |
Input: N, p, T |
N Size of DKraP (integer), |
p parameter of DKraP (float), |
T Number of threads (integer). |
Output: |
represents DKraP. |
|
|
|
|
|
|
|
|
|
|
3.2. Multi-threaded Algorithm for DKTv2
Algorithm 2 Compute DKraP coefficients using MDKTv2 with unbalanced threads. |
Input: N, p, T |
N Size of DKraP (integer), |
p parameter of DKraP (integer), |
T Number of threads (integer). |
Output: |
represents DKraP. |
|
|
|
|
|
|
|
|
|
|
|
|
Algorithm 3 Compute DKraP coefficients using MDKTv2 with balanced threads. |
Input: N, p, T |
N Size of DKraP (integer), |
p parameter of DKraP (float), |
T Number of threads (integer). |
Output: |
represents DKraP. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3.3. Multi-Threaded Algorithm for DKTv3
- Region 1: This region covers the range and , with the recurrence relation given by Equation (30). The recurrence relation for each n depends only on the values of and , which are independent of each other for different values of n. This region can be parallelized across multiple threads by assigning each thread a subset of the values of n.
- Region 2: This region covers the range and , with the recurrence relation given by Equation (9). The recurrence relation for each n depends only on the values of and , which are independent of each other for different values of n. Thus, this region can be parallelized across multiple threads by assigning each thread a subset of the values of n.
- Region 3: This region covers the range and , with the recurrence relation given by Equation (9). Since the recurrence relation for each n depends only on the values of and , which are independent of each other for different values of n, this region can be parallelized across multiple threads by assigning each thread a subset of the values of n.
4. Experimental Results
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
DKraPs | discrete Krawtchouk polynomials |
CPU | central processing unit |
IoT | Internet of Things |
OP | orthogonal polynomial |
DKraM | discrete Krawtchouk moment |
ED | equal distribution |
NED | non-equal distribution |
KPCs | Krawtchouk polynomial coefficients |
References
- Mahmood, B.M.; Younis, M.I.; Ali, H.M. Construction of a general-purpose infrastructure for RFID–based applications. J. Eng. 2013, 19, 1425–1442. [Google Scholar] [CrossRef]
- Ahmed, H.M. Recurrence relation approach for expansion and connection coefficients in series of classical discrete orthogonal polynomials. Integral Transform. Spec. Funct. 2009, 20, 23–34. [Google Scholar] [CrossRef]
- Yang, B.; Suk, T.; Flusser, J.; Shi, Z.; Chen, X. Rotation invariants from Gaussian-Hermite moments of color images. Signal Process. 2018, 143, 282–291. [Google Scholar] [CrossRef]
- Abdulhussain, S.H.; Ramli, A.R.; Al-Haddad, S.A.R.; Mahmmod, B.M.; Jassim, W.A. Fast Recursive Computation of Krawtchouk Polynomials. J. Math. Imaging Vis. 2018, 60, 285–303. [Google Scholar] [CrossRef]
- Asli, B.H.S.; Flusser, J. Fast computation of Krawtchouk Moments. Inf. Sci. 2014, 288, 73–86. [Google Scholar] [CrossRef]
- Shakibaei Asli, B.H.; Paramesr, R. Digital Filter Implementation of Orthogonal Moments. In Digital Filters and Signal Processing; InTech: Houston, TX, USA, 2013. [Google Scholar] [CrossRef]
- Chang, K.H.; Paramesran, R.; Asli, B.H.S.; Lim, C.L. Efficient Hardware Accelerators for the Computation of Tchebichef Moments. IEEE Trans. Circuits Syst. Video Technol. 2012, 22, 414–425. [Google Scholar] [CrossRef]
- Mennesson, J.; Saint-Jean, C.; Mascarilla, L. Color Fourier–Mellin descriptors for image recognition. Pattern Recognit. Lett. 2014, 40, 27–35. [Google Scholar] [CrossRef]
- Genberg, V.L.; Michels, G.J.; Doyle, K.B. Orthogonality of Zernike polynomials. In Proceedings of the Optomechanical Design and Engineering, Seattle, WA, USA, 7–11 July 2002; SPIE: Bellingham, WA, USA, 2002; Volume 4771, pp. 276–286. [Google Scholar]
- Yap, P.-T.; Paramesran, R.; Ong, S.-H. Image analysis by krawtchouk moments. IEEE Trans. Image Process. 2003, 12, 1367–1377. [Google Scholar] [CrossRef] [PubMed]
- Chong, C.W.; Raveendran, P.; Mukundan, R. Translation and scale invariants of Legendre moments. Pattern Recognit. 2004, 37, 119–129. [Google Scholar] [CrossRef]
- Abdulhussain, S.H.; Mahmmod, B.M.; Baker, T.; Al-Jumeily, D. Fast and accurate computation of high-order Tchebichef polynomials. Concurr. Comput. Pract. Exp. 2022, 34, e7311. [Google Scholar] [CrossRef]
- Junkins, J.L.; Younes, A.B.; Bai, X. Orthogonal polynomial approximation in higher dimensions: Applications in astrodynamics. Adv. Astronaut. Sci 2013, 147, 531–594. [Google Scholar]
- Chihara, T.S. An Introduction to Orthogonal Polynomials; Dover Publications: Mineola, NY, USA, 2011. [Google Scholar]
- Pee, C.Y.; Ong, S.; Raveendran, P. Numerically efficient algorithms for anisotropic scale and translation Tchebichef moment invariants. Pattern Recognit. Lett. 2017, 92, 68–74. [Google Scholar] [CrossRef]
- Di Ruberto, C.; Loddo, A.; Putzu, L. On The Potential of Image Moments for Medical Diagnosis. J. Imaging 2023, 9, 70. [Google Scholar] [CrossRef] [PubMed]
- Chen, Y.; Meng, M.Q.H.; Liu, L. Direct Visual Servoing Based on Discrete Orthogonal Moments. IEEE Trans. Robot. 2024, 40, 1795–1812. [Google Scholar] [CrossRef]
- Venkataramana, A.; Ananth Raj, P. Combined Scale and Translation Invariants of Krawtchouk Moments. In Proceedings of the National Conference on Computer Vision, Pattern Recognition, Image Processing and Graphics, Gandhinagar, India, 11–13 January 2008. [Google Scholar]
- Honarvar Shakibaei Asli, B.; Rezaei, M.H. Four-Term Recurrence for Fast Krawtchouk Moments Using Clenshaw Algorithm. Electronics 2023, 12, 1834. [Google Scholar] [CrossRef]
- Koehl, P. Fast recursive computation of 3d geometric moments from surface meshes. IEEE Trans. Pattern Anal. Mach. Intell. 2012, 34, 2158–2163. [Google Scholar] [CrossRef] [PubMed]
- Asli, B.H.S.; Paramesran, R.; Lim, C.L. The fast recursive computation of Tchebichef moment and its inverse transform based on Z-transform. Digital Signal Process. 2013, 23, 1738–1746. [Google Scholar] [CrossRef]
- Rivera-Lopez, J.S.; Camacho-Bello, C.; Gutiérrez-Lazcano, L. Computation of 2D and 3D High-order Discrete Orthogonal Moments. In Recent Progress in Image Moments and Moment Invariants; Papakostas, G.A., Ed.; Gate to Computer Science and Research: Democritus, Greece, 2021; Volume 7, Chapter 3; pp. 53–74. [Google Scholar] [CrossRef]
- Mahmmod, B.M.; Flayyih, W.N.; Fakhri, Z.H.; Abdulhussain, S.H.; Khan, W.; Hussain, A. Performance enhancement of high order Hahn polynomials using multithreading. PLoS ONE 2023, 18, e0286878. [Google Scholar] [CrossRef] [PubMed]
- Jassim, W.A.; Raveendran, P.; Mukundan, R. New orthogonal polynomials for speech signal and image processing. IET Signal Process. 2012, 6, 713–723. [Google Scholar] [CrossRef]
- Zhang, G.; Luo, Z.; Fu, B.; Li, B.; Liao, J.; Fan, X.; Xi, Z. A symmetry and bi-recursive algorithm of accurately computing Krawtchouk moments. Pattern Recognit. Lett. 2010, 31, 548–554. [Google Scholar] [CrossRef]
- AL-Utaibi, K.A.; Abdulhussain, S.H.; Mahmmod, B.M.; Naser, M.A.; Alsabah, M.; Sait, S.M. Reliable Recurrence Algorithm for High-Order Krawtchouk Polynomials. Entropy 2021, 23, 1162. [Google Scholar] [CrossRef] [PubMed]
- He, W.; Li, G.; Nie, Z. An adaptive sparse polynomial dimensional decomposition based on Bayesian compressive sensing and cross-entropy. Struct. Multidiscip. Optim. 2022, 65, 26. [Google Scholar] [CrossRef]
- He, W.; Li, G.; Nie, Z. A novel polynomial dimension decomposition method based on sparse Bayesian learning and Bayesian model averaging. Mech. Syst. Signal Process. 2022, 169, 108613. [Google Scholar] [CrossRef]
- Vittaldev, V.; Russell, R.P.; Linares, R. Spacecraft uncertainty propagation using gaussian mixture models and polynomial chaos expansions. J. Guid. Control Dyn. 2016, 39, 2615–2626. [Google Scholar] [CrossRef]
- Xiao, B.; Zhang, Y.; Li, L.; Li, W.; Wang, G. Explicit Krawtchouk moment invariants for invariant image recognition. J. Electron. Imaging 2016, 25, 023002. [Google Scholar] [CrossRef]
- Li, B.; Zhang, Y. A Piecewise and Bi-recursive Algorithm for Computing High-order Krawtchouk Moments. In Proceedings of the 2015 4th International Conference on Computer Science and Network Technology (ICCSNT), Harbin, China, 19–20 December 2015; pp. 1414–1418. [Google Scholar]
- Yap, P.T.; Raveendran, P.; Ong, S.H. Krawtchouk moments as a new set of discrete orthogonal moments for image reconstruction. In Proceedings of the 2002 International Joint Conference on Neural Networks, IJCNN ’02, Honolulu, HI, USA, 12–17 May 2002; pp. 908–912. [Google Scholar] [CrossRef]
- Koekoek, R.; Swarttouw, R.F. The Askey-scheme of hypergeometric orthogonal polynomials and its q-analogue. arXiv 1996, arXiv:math/9602214. [Google Scholar]
- Nikiforov, A.F.; Uvarov, V.B.; Suslov, S.K.; Nikiforov, A.F.; Uvarov, V.B.; Suslov, S.K. Classical Orthogonal Polynomials of a Discrete Variable; Springer: Berlin/Heidelberg, Germany, 1991. [Google Scholar]
- Milovanović, G.V.; Stanić, M.P.; Mladenović, T.V.T. Gaussian type quadrature rules related to the oscillatory modification of the generalized Laguerre weight functions. J. Comput. Appl. Math. 2024, 437, 115476. [Google Scholar] [CrossRef]
- Griffel, D. An introduction to orthogonal polynomials, by Theodore S. Chihara. Pp xii, 249.£ 26· 30. 1978. SBN 0 677 04150 0 (Gordon and Breach). Math. Gaz. 1979, 63, 222. [Google Scholar] [CrossRef]
- Rivero-Castillo, D.; Pijeira, H.; Assunçao, P. Edge detection based on Krawtchouk polynomials. J. Comput. Appl. Math. 2015, 284, 244–250. [Google Scholar] [CrossRef]
- Abd-Elhameed, W.M.; Ahmed, H.M.; Napoli, A.; Kowalenko, V. New formulas involving Fibonacci and certain orthogonal polynomials. Symmetry 2023, 15, 736. [Google Scholar] [CrossRef]
- Abramowitz, M.; Stegun, I.A. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables; US Government Printing Office: Washington, DC, USA, 1948; Volume 55. [Google Scholar]
- Şahin, R.; Yağcı, O. A new generalization of pochhammer symbol and its applications. Appl. Math. Nonlinear Sci. 2020, 5, 255–266. [Google Scholar] [CrossRef]
- Koepf, W.; Schmersau, D. Representations of orthogonal polynomials. J. Comput. Appl. Math. 1998, 90, 57–94. [Google Scholar] [CrossRef]
Signal Type | Signal Symbol | DKraM |
---|---|---|
1D | ||
2D | ||
3D |
Variables | |
---|---|
(10) | |
(11) | |
(12) | |
Initials | |
(13) | |
(14) | |
(15) |
Variables | |
---|---|
(25) | |
(26) | |
(27) | |
(28) | |
(29) |
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. |
© 2024 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
Flayyih, W.N.; Al-sudani, A.H.; Mahmmod, B.M.; Abdulhussain, S.H.; Alsabah, M. High-Performance Krawtchouk Polynomials of High Order Based on Multithreading. Computation 2024, 12, 115. https://doi.org/10.3390/computation12060115
Flayyih WN, Al-sudani AH, Mahmmod BM, Abdulhussain SH, Alsabah M. High-Performance Krawtchouk Polynomials of High Order Based on Multithreading. Computation. 2024; 12(6):115. https://doi.org/10.3390/computation12060115
Chicago/Turabian StyleFlayyih, Wameedh Nazar, Ahlam Hanoon Al-sudani, Basheera M. Mahmmod, Sadiq H. Abdulhussain, and Muntadher Alsabah. 2024. "High-Performance Krawtchouk Polynomials of High Order Based on Multithreading" Computation 12, no. 6: 115. https://doi.org/10.3390/computation12060115
APA StyleFlayyih, W. N., Al-sudani, A. H., Mahmmod, B. M., Abdulhussain, S. H., & Alsabah, M. (2024). High-Performance Krawtchouk Polynomials of High Order Based on Multithreading. Computation, 12(6), 115. https://doi.org/10.3390/computation12060115