Skip to main content
Log in

Fast computation of 2D and 3D Legendre moments using multi-core CPUs and GPU parallel architectures

  • Original Research Paper
  • Published:
Journal of Real-Time Image Processing Aims and scope Submit manuscript

Abstract

Legendre moments and their invariants for 2D and 3D image/objects are widely used in image processing, computer vision, and pattern recognition applications. Reconstruction of digital images by nature required higher-order moments to get high-quality reconstructed images. Different applications such as classification of bacterial contamination images utilize high-order moments for feature extraction phase. For big size images and 3D objects, Legendre moments computation is very time-consuming and compute-intensive. This problem limits the use of Legendre moments and makes them impractical for real-time applications. Multi-core CPUs and GPUs are powerful processing parallel architectures. In this paper, new parallel algorithms are proposed to speed up the process of exact Legendre moments computation for 2D and 3D image/objects. These algorithms utilize multi-core CPUs and GPUs parallel architectures where each pixel/voxel of the input digital image/object can be handled independently. A detailed profile analysis is presented where the weight of each part of the entire computational process is evaluated. In addition, we contributed to the parallel 2D/3D Legendre moments by: (1) a modification of the traditional exact Legendre moment algorithm to better fit the parallel architectures, (2) we present the first parallel CPU implementation of Legendre moment, and (3) we present the first parallel CPU and GPU acceleration of the reconstruction phase of the Legendre moments. A set of numerical experiments with different gray-level images are performed. The obtained results clearly show a very close to optimal parallel gain. The extreme reduction in execution times, especially for 8-core CPUs and GPUs, makes the parallel exact 2D/3D Legendre moments suitable for real-time applications.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16

Similar content being viewed by others

References

  1. Flusser, J., Suk, T., Zitov, B.: Moments and Moment Invariants in Pattern Recognition. Wiley, Chichester (2009)

    Book  Google Scholar 

  2. Talenti, G.: Recovering a function from a finite number of moments. Inverse Probl. 3, 501–517 (1987)

    Article  MathSciNet  Google Scholar 

  3. Pawlak M.: Image analysis by moments: reconstruction and computational aspects. Oficyna Wydawnicza Politechniki Wroclawskiej. 38–42 (2006)

  4. Shin, HC., et al.: Interleaved text/image deep mining on a very large-scale radiology database. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1090–1099 (2015)

  5. Toharia, P., et al.: Shot boundary detection using Zernike moments in multi-GPU multi-CPU architectures. J. Parallel Distrib. Comput. 72(9), 1127–1133 (2012)

    Article  Google Scholar 

  6. Dongfeng, X., et al.: Parallel computation for discrete orthogonal moments of images using graphic processing unit. J. Inf. Comput. Sci. 9(3), 611–618 (2012)

    Google Scholar 

  7. Heidari, H., Chalechale, A., Mohammad abadi, A.A.: Parallel implementation of color based image retrieval using CUDA on the GPU. Int. J. Inf. Technol. Comput. Sci. 6(1), 33 (2013)

    Google Scholar 

  8. Teodoro, G., et al. High-throughput analysis of large microscopy image datasets on CPU–GPU cluster platforms. In: 2013 IEEE 27th International Symposium on Parallel Distributed Processing (IPDPS). IEEE (2013)

  9. Martin-Requena, M.J., Ujaldon, M.: High performance computation of moments for an accurate classification of bone tissue images. In: 2011 IEEE 13th International Conference on High Performance Computing and Communications (HPCC). IEEE (2011)

  10. Mustapha, H., Dimitrakopoulos, R.: HOSIM: a high-order stochastic simulation algorithm for generating three-dimensional complex geological patterns. Comput. Geosci. 37(9), 1242–1253 (2011)

    Article  Google Scholar 

  11. Srinivasa Rao, C.H.S., Kumar, S.S., Mohan, B.C.: Content based image retrieval using exact legendre moments and support vector machine. Int. J. Multimed. Appl. 2(2), 69–79 (2010)

    Google Scholar 

  12. Hosny, K.M.: Robust template matching using orthogonal Legendre moment invariants. J. Comput. Sci. 6(10), 1080–1084 (2010)

    Article  Google Scholar 

  13. Wojak, J., Angelini, E.D., Bloch, I.: Introducing Shape Constraint via Legendre Moments in a Variational Framework for Cardiac Segmentation on Non-contrast CT Images, pp. 209–214. VISAPP, Angers (2010)

    Google Scholar 

  14. Nakib, A., Schulze, Y., Petit, E.: Image thresholding framework based on two-dimensional digital fractional integration and Legendre moments. IET Image Process. 6(8), 717–727 (2012)

    Article  MathSciNet  Google Scholar 

  15. Dahdouha, S., Angelinia, E.D., Grangéb, G., Blocha, I.: Segmentation of embryonic and fetal 3D ultrasound images based on pixel intensity distributions and shape priors. Med. Image Anal. 24(1), 255–268 (2015)

    Article  Google Scholar 

  16. Vijayalakshmi, B., Bharathi, V.S.: Classification of CT liver images using local binary pattern with Legendre moments. Curr. Sci. 110(4), 687–691 (2016)

    Article  Google Scholar 

  17. Hosny, K. M., Papakostas, G. A., Koulouriotis, D. E.: Accurate reconstruction of noisy medical images using orthogonal moments. In: 18th International Conference on Digital Signal Processing (DSP), (2013)

  18. Sastry, S.S., Mallika, K., Rao, B.G.S., Ha, S.T., Lakshminarayana, S.: Novel approach to study liquid crystal phase transitions using Legendre moments. Phase Transit. 85(8), 735–749 (2012)

    Article  Google Scholar 

  19. Hosny, K.M.: Exact Legendre moment computation for gray level images. Pattern Recognit. 40(12), 3597–3605 (2007)

    Article  Google Scholar 

  20. Papakostas, G.A., Karakasis, E.G., Koulouriotis, D.E.: Accurate and speedy computation of image Legendre moments for computer vision applications. Image Vis. Comput. 29(3), 414–423 (2010)

    Article  Google Scholar 

  21. Hosny, K.M.: Fast and low-complexity method for exact computation of 3D Legendre moments. Pattern Recognit. Lett. 32(9), 1305–1314 (2011)

    Article  Google Scholar 

  22. Bahaoui, Z., Zenkouar, K., Fadili, H., Qjidaa, H., Zarghili A.: Blocking artifact removal using partial overlapping based on exact Legendre moments computation. J. Real Time Image Process. 1–19 (2014). doi:10.1007/s11554-014-0465-3

    Article  Google Scholar 

  23. Lachiondo, J.A., Ujaldóna, M., Berrettab, R., Moscatob, P.: Legendre moments as high performance bone biomarkers: computational methods and GPU acceleration. Comput. Methods Biomech. Biomed. Eng. Imaging Vis. 4(3-4), 146–163 (2016)

    Article  Google Scholar 

  24. Hosny, K.M.: New set of rotationally Legendre moment invariants. Int. J. Electr. Electron. Eng. 4, 176–180 (2010)

    Google Scholar 

  25. Hosny, K.M.: Refined translation and scale Legendre moment invariants. Pattern Recognit. Lett. 31(7), 533–538 (2010)

    Article  Google Scholar 

  26. Zhang, H., Shu, H., Coatrieux, G., Zhu, J., Wu, Q.M.J., Zhang, Y., Zhu, H., Luo, L.: Affine Legendre moment invariants for image watermarking robust to geometric distortions. IEEE Trans. Image Process. 20(8), 2189–2199 (2011)

    Article  MathSciNet  Google Scholar 

  27. Spiegel, M.R.: Schaum’s Handbook of Formulas and Tables. MacGraw Hill, New York (1968)

    Google Scholar 

  28. Bossen, D.C., Kitamorn, A., Reick, K.F., et al.: Fault-tolerant design of the IBM Series 690 system using POWER4 processor technology. IBM J. Res. Dev. 46(1), 77–86 (2002)

    Article  Google Scholar 

  29. Vajda, A.: Multi-core and Many-core Processor Architectures, pp. 9–43. Springer, Berlin (2011)

    Google Scholar 

  30. Dagum, L., Menon, R.: OpenMP: an industry standard API for shared-memory programming. IEEE Comput. Sci. Eng. 5(1), 46–55 (1998)

    Article  Google Scholar 

  31. Wen-Mei, W.H.: GPU Computing Gems, Emerald edn, pp. 5–10. Elsevier, Amsterdam (2011)

    Google Scholar 

  32. Zhu, X., et al.: Parallel implementation of MAFFT on CUDA-enabled graphics hardware. IEEE/ACM Trans. Comput. Biol. Bioinform. (TCBB) 12(1), 205–218 (2015)

    Article  Google Scholar 

  33. Hosny, K.M.: Fast computation of accurate Zernike moments. J. Real Time Image Process. 3(1), 97–107 (2008)

    Article  MathSciNet  Google Scholar 

  34. Hosny, K.M.: New set of Gegenbauer moment invariants for pattern recognition applications. Arab. J. Sci. Eng. 39, 7097–7107 (2014)

    Article  Google Scholar 

  35. http://wang.ist.psu.edu/docs/home.shtml (2016). Accessed 13 Dec 2016

  36. Lazebnik, S., Schmid, C., Ponce, J.: Semi-local affine parts for object recognition. In: Proceedings of the British Machine Vision Conference, vol. 2, pp. 959–968, (2004)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Khalid M. Hosny.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Hosny, K.M., Salah, A., Saleh, H.I. et al. Fast computation of 2D and 3D Legendre moments using multi-core CPUs and GPU parallel architectures. J Real-Time Image Proc 16, 2027–2041 (2019). https://doi.org/10.1007/s11554-017-0708-1

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11554-017-0708-1

Keywords

Navigation