Computing and Visualization in Science

, Volume 14, Issue 5, pp 217–226 | Cite as

GPU implementations of a relaxation scheme for image partitioning: GLSL versus CUDA

  • Tetyana Ivanovska
  • Lars Linsen
  • Horst K. Hahn
  • Henry Völzke


The GPU programmability opens a new perspective for algorithms that have not been studied and used for real applications on commodity state-of-the-art hardware due to their computational expenses. In this paper, we present three implementations of a partitioning algorithm for multi-channel images, which extends an original algorithm for single-channel images presented in the early 1990’s. The segmentation algorithm is based on the information theory concept of minimum description length, which leads to the formulation of an energy functional. The optimal solution is obtained by minimizing the functional. The minimization approach follows a graduated non-convexity approach, which leads to a fully explicit scheme. As the scheme is applied to all pixels of the image simultaneously, it is naturally parallelizable. Besides the optimized sequential implementation in C++ we developed a GLSL version of the algorithm using vertex and fragment shaders as well as a CUDA version using global memory, shared memory, and texture memory. We compare the performance of the implementations, discuss the implementation details, and show that suitability of this algorithm for GPU allows it to become a comparable alternative to the modern partitioning algorithm (multi-label Graph-Cuts).


Image segmentation Parallel computing Graphics processors Color images CUDA Energy minimization 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Blake A., Zisserman A.: Visual Reconstruction. MIT Press, Cambridge, MA (1987)Google Scholar
  2. 2.
    Boykov Y., Veksler O., Zabih R.: Efficient restoration of multicolor image with independent noise. Technical report (1998)Google Scholar
  3. 3.
    Boykov Y., Veksler O., Zabih R.: Fast approximate energy minimization via graph cuts. IEEE Trans. Pattern Anal. Mach. Intell. 23(11), 1222–1239 (1999)CrossRefGoogle Scholar
  4. 4.
  5. 5.
    Figueiredo M.A.T., Leitão J.M.N.: Unsupervised image restoration and edge location using compound gauss-markov random fields and the MDL principle. IEEE Trans. Image Process. 6(8), 1089–1102 (1997)CrossRefGoogle Scholar
  6. 6.
  7. 7.
    Geman S., Geman D.: Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images. Readings in uncertain reasoning (1990)Google Scholar
  8. 8.
  9. 9.
  10. 10.
    Gruenwald P.D.: The Minimum Description Length principle. The MIT Press, Cambridge, MA (2007)Google Scholar
  11. 11.
    Ivanovska T.: Efficient multichannel image partitioning: theory and application. Ph.D. thesis, Jacobs University Bremen (2009)Google Scholar
  12. 12.
    Ivanovska T., Hahn H.K., Linsen L.: On global mdl-based multichannel image restoration and partitioning. In: 20th International Conference in Central Europe on Computer Graphics, Visualization and Computer Vision (WSCG) (2012)Google Scholar
  13. 13.
    Leclerc Y.G.: Constructing simple stable descriptions for image partitioning. J. Comput. Vis. 3(1), 73–102 (1989)CrossRefGoogle Scholar
  14. 14.
    Lehmann E.L., Casella G.: Theory of Point Estimation (Springer Texts in Statistics). Springer, Berlin (2003)Google Scholar
  15. 15.
    Li S.Z.: Markov Random Field Modeling in Image Analysis. Springer, New York, Inc. (2001)
  16. 16.
    Mumford D., Shah J.: Optimal approximation by piecewise smooth functions and associated variational problems. Commun. Pure Appl. Math. 42, 577–684 (1989)MathSciNetzbMATHCrossRefGoogle Scholar
  17. 17.
    Owens J.D., Houston M., Luebke D., Green S., Stone J.E., Phillips J.C.: Gpu computing. Proc. IEEE 96 (5), 879–899 (2008). doi: 10.1109/JPROC.2008.917757.
  18. 18.
    Owens J.D. et al.: A survey of general-purpose computation on graphics hardware. Comput. Graph. Forum 26(1), 80–133 (2007)CrossRefGoogle Scholar
  19. 19.
    Rost R.J.: OpenGL Shading Language. Addison-Wesley Professional, Reading, MA (2006)Google Scholar
  20. 20.
    Szeliski R., Zabih R., Scharstein D., Veksler O., Kolmogorov V., Agarwala A., Tappen M., Rother C.: A comparative study of energy minimization methods for markov random fields with smoothness-based priors. IEEE Trans. Pattern Anal. Mach. Intell. 30(6), 1068–1080 (2008)CrossRefGoogle Scholar
  21. 21.
    Vineet V., Narayanan P.J.: Cuda cuts: Fast graph cuts on the gpu. Vis. Pattern Recogn. Workshop 0, 1–8 (2008). doi: 10.1109/CVPRW.2008.4563095 Google Scholar
  22. 22.
    Vineet V., Narayanan P.J.: Solving multilabel mrfs using incremental alpha-expansion on the gpus. In: Ninth Asian Conference on Computer Vision (ACCV 2009), vol. poster (2009)Google Scholar
  23. 23.

Copyright information

© Springer-Verlag 2012

Authors and Affiliations

  • Tetyana Ivanovska
    • 1
  • Lars Linsen
    • 2
  • Horst K. Hahn
    • 3
  • Henry Völzke
    • 1
  1. 1.Institute of Community MedicineErnst-Moritz-Arndt UniversityGreifswaldGermany
  2. 2.School of Engineering and ScienceJacobs UniversityBremenGermany
  3. 3.Fraunhofer MeVisBremenGermany

Personalised recommendations