Skip to main content
Log in

A graph based superpixel generation algorithm

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

In recent years, superpixels have become a prevailing tool in computer vision and many methods have been proposed. However, due to the problems such as high time complexity, low object boundary adherence and irregular shape, only a few methods are widely used. To improve these issues, we propose a novel general superpixel segmentation method called minstpixel, which relies on energy functional minimization. Minstpixel introduces an energy functional based on minimal spanning tree and designs a strategy to gain the global optimum. It never needs sophisticated optimization scheme, complicated mathematical deduction or fussy iteration process. At the same time, the time complexity of minstpixel is approximately linear with respect to the number of image pixels. The benchmark on Berkeley segmentation database shows that minstpixel could rival state-of-the-art in every aspect.

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

Similar content being viewed by others

References

  1. Liu Y-J, Cheng-Chi Y, Min-Jing Y, He Y (2016) Manifold SLIC: a fast method to compute content-sensitive superpixels. In: 2016 IEEE conference on computer vision and pattern recognition (CVPR). IEEE, pp 651–659

  2. Cheng M-M, Zhang G-X, Mitra NJ, Huang X, Shi-Min H (2011) Global contrast based salient region detection. In: CVPR 2011, vol 37. IEEE, pp 409–416

  3. Achanta R, Hemami S, Estrada F, Susstrunk S (2009) Frequency-tuned salient region detection. In: 2009 IEEE conference on computer vision and pattern recognition, number Ic. IEEE, pp 1597–1604

  4. Levinshtein A, Sminchisescu C, Dickinson S (2010) Optimal contour closure by superpixel grouping. In: Lecture notes in computer science (including subseries lecture notes in artificial intelligence and lecture notes in bioinformatics), volume 6312 LNCS. Springer, Berlin, pp 480–493

    Chapter  Google Scholar 

  5. Yu C-C, Liu Y-J, Wu MT, Li K-Y, Fu X (2014) A global energy optimization framework for 2.1D sketch extraction from monocular images. Graph Models 76(5):507–521

    Article  Google Scholar 

  6. Fulkerson B, Vedaldi A, Soatto S (2009) Class segmentation and object localization with superpixel neighborhoods. In: 2009 IEEE 12th international conference on computer vision. IEEE, pp 670–677

  7. Shu W, Huchuan L, Fan Y, Ming-Hsuan Y (2011) Superpixel tracking. In: 2011 IEEE international conference on computer vision (ICCV). IEEE, pp 1323–1330

  8. Mičušík B, Košecká J (2010) Multi-view superpixel stereo in urban environments. Int J Comput Vis 89(1):106–119

    Article  Google Scholar 

  9. Gould S, Rodgers J, Cohen D, Elidan G, Koller D (2008) Multi-class segmentation with relative location prior. Int J Comput Vis 80(3):300–316

    Article  Google Scholar 

  10. Achanta R, Shaji A, Smith K, Lucchi A, Fua P, Susstrunk S (2012) SLIC superpixels compared to state-of-the-art superpixel methods. IEEE Trans Pattern Anal Mach Intell 34(11):2274– 2282

    Article  Google Scholar 

  11. Machairas V, Decenciere E, Walter T (2014) Waterpixels: superpixels based on the watershed transformation. In: 2014 IEEE international conference on image processing (ICIP). IEEE, pp 4343–4347

  12. Moore AP, Prince SJD, Warrell J, Mohammed U, Jones G (2008) Superpixel lattices. In: 2008 IEEE conference on computer vision and pattern recognition. IEEE, pp 1–8

  13. Mathieu B, Crouzil A, Puel JB (2017) Oversegmentation methods: a new evaluation. Pattern Recogn Image Anal 10255:185–193

    Article  MathSciNet  Google Scholar 

  14. Wang M, Liu X, Gao Y, Ma X, Soomro NQ (2017) Superpixel segmentation: a benchmark. Signal Process Image Commun 56:28–39

    Article  Google Scholar 

  15. Neubert P, Protzel P (2012) Superpixel benchmark and comparison. In: Forum bildverarbeitung, pp 1–12

  16. Jianbo S, Malik J (2000) Normalized cuts and image segmentation. IEEE Trans Pattern Anal Mach Intell 22(8):888–905

    Article  Google Scholar 

  17. Liu M-Y, Tuzel O, Ramalingam S, Chellappa R (2011) Entropy rate superpixel segmentation. In: CVPR 2011. IEEE, pp 2097–2104

  18. Vedaldi A, Soatto S (2008) Quick shift and kernel methods for mode seeking. In: Computer vision – ECCV 2008, volume 5305 LNCS. Springer, Berlin, pp 705–718

  19. Vincent L, Soille P (1991) Watersheds in digital spaces: an efficient algorithm based on immersion simulations. IEEE Trans Pattern Anal Mach Intell 13(6):583–598

    Article  Google Scholar 

  20. Machairas V, Faessel M, Cardenas-Pena D, Chabardes T, Walter T, Decenciere E (2015) Waterpixels. IEEE Trans Image Process 24(11):3707–3716

    Article  MathSciNet  Google Scholar 

  21. Van den Bergh M, Boix X, Roig G, de Capitani B, Van Gool L (2012) SEEDS: superpixels extracted via energy-driven sampling. In: Lecture notes in computer science (including subseries lecture notes in artificial intelligence and lecture notes in bioinformatics), volume 7578 LNCS, pp 13–26

  22. Chen J, Li Z, Bo H (2017) Linear spectral clustering superpixel. IEEE Trans Image Process, 1–1

  23. Felzenszwalb PF, Huttenlocher DP (2004) Efficient graph-based image segmentation. Int J Comput Vis 59(2):167–181

    Article  Google Scholar 

  24. Comaniciu D, Meer P (2002) Mean shift: a robust approach toward feature space analysis. IEEE Trans Pattern Anal Mach Intell 24(5):603–619

    Article  Google Scholar 

  25. Buyssens P, Gardin I, Ruan S (2014) Eikonal based region growing for superpixels generation: application to semi-supervised real time organ segmentation in CT images. IRBM 35(1):20–26

    Article  Google Scholar 

  26. Yao J, Boben M, Fidler S, Urtasun R (2015) Real-time coarse-to-fine topologically preserving segmentation. In: 2015 IEEE conference on computer vision and pattern recognition (CVPR). IEEE, pp 2947–2955

  27. Wang J, Wang X (2012) VCells: simple and efficient superpixels using edge-weighted centroidal voronoi tessellations. IEEE Trans Pattern Anal Mach Intell 34(6):1241–1247

    Article  Google Scholar 

  28. Papon J, Abramov A, Schoeler M, Worgotter F (2013) Voxel cloud connectivity segmentation - supervoxels for point clouds. In: 2013 IEEE conference on computer vision and pattern recognition. IEEE, pp 2027–2034

  29. Drucker F, MacCormick J (2009) Fast superpixels for video analysis. In: 2009 workshop on motion and video computing (WMVC). IEEE

  30. Tang D, Huazhu F, Cao X (2012) Topology preserved regular superpixel. In: 2012 IEEE international conference on multimedia and expo. IEEE, pp 765–768

  31. Weikersdorfer D (2012) Depth-adaptive superpixels

  32. Levinshtein A, Stere A, Kutulakos KN, Fleet DJ, Dickinson SJ, Siddiqi K (2009) TurboPixels: fast superpixels using geometric flows. IEEE Trans Pattern Anal Mach Intell 31(12):2290–2297

    Article  Google Scholar 

  33. Ren X, Malik J (2003) Learning a classification model for segmentation. Proc Ninth IEEE Int Conf Comput Vis 1(c):10–17, 1

    Article  Google Scholar 

  34. Wang P, Zeng G, Gan R, Wang J, Zha H (2013) Structure-sensitive superpixels via geodesic distance. Int J Comput Vis 103(1):1–21

    Article  MathSciNet  Google Scholar 

  35. Cormen T, Rivest R, Leiserson C (1989) Introduction to algorithms. MIT Press

  36. Martin D, Fowlkes C, Tal D, Malik J (2001) A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In: Proceedings eighth IEEE international conference on computer vision. ICCV 2001, vol 2. IEEE Comput. Soc, pp 416–423

  37. Wei W, Fan X, Song H, Fan X, Yang J (2016) Imperfect information dynamic Stackelberg game based resource allocation using hidden Markov for cloud computing. IEEE Trans Serv Comput, 1–1

  38. Wei W, Fan X, Song H, Wang H (2017) Video tamper detection based on multi-scale mutual information. Multimed Tools Appl, 1–18

  39. Wei W, Yang X-L, Zhou B, Feng J, Shen P-Y (2012) Combined energy minimization for image reconstruction from few views. Math Probl Eng 2012:1–15

    MathSciNet  MATH  Google Scholar 

  40. Kruskal JB (1956) On the shortest spanning subtree of a graph and the traveling salesman problem. Proc Amer Math Soc 7(1):48

    Article  MathSciNet  Google Scholar 

Download references

Acknowledgments

This work was supported by the National High Technology Research, Development Program of China (No.2017YFB1401600), the National Natural Science Foundation of China (No.61573235,61703260), the Shanghai Innovation Action Project of Science and Technology (No.16111105802), and the Fundamental Research Funds for the Central Universities.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xianhui Liu.

Appendix

Appendix

This section prepares an proof for the global optimality of the algorithm 1. Proposition 1 and proposition 2 demonstrate that the segmentation \(\mathcal {S}\) generated by algorithm 1 is a valid superpixel segmentation. Proposition 3 demonstrates that algorithm 1 will always converge to the optimum of (4).

Proposition 1

There is one and only one seed point in each connected component produced by algorithm 1.

Proof

On the one hand, the number of seed points in each component is less than 2 (1 or 0) according to the step 3 of algorithm 1. On the other hand, we suppose that in segmentation \(\mathcal {S}\) there exists one connected component ci without seed points, then the number of connected components of segmentation is greater than k. There is a contradiction between assumption and termination condition of algorithm 1. So, the number of seed points in each component cannot be other except 1.□

Proposition 2

Each connected component produced by algorithm 1 is a minimum spanning tree.

Proof

Let \(G(\mathcal {V},\mathcal {E})\) be an input graph, \(G(\mathcal {V},\mathcal {A})\) is the segmentation result produced by algorithm 1, ci(vi, ai) is the ith connected component of graph \((\mathcal {V},\mathcal {A})\) i.e. \(\bigcup _{i} \mathbf {v}_{i}=\mathcal {V}\) and \(\bigcup _{i} \mathbf {a}_{i}\) = \(\mathcal {A}\). Obviously, if we remove an edge e ∉ \(\mathcal {A}\) from graph \((\mathcal {V},\mathcal {E})\), then the segmentation result \((\mathcal {V},\mathcal {A})\) produced by algorithm 1 remains the same. Now, we build a graph \((\mathcal {V}^{\prime },\mathcal {E}^{\prime })\) from graph \((\mathcal {V},\mathcal {E})\) by removing all edges e(v1, v2) satisfying v1ci, v2cj and cicj. Suppose that \((\mathcal {V}^{\prime },\mathcal {A}^{\prime })\) is the segmentation result produced by algorithm 1 on graph \((\mathcal {V}^{\prime },\mathcal {E}^{\prime })\), \(c^{\prime }_{i}(\mathbf {v}^{\prime }_{i},\mathbf {a}^{\prime }_{i})\) is the ith connected component of graph \((\mathcal {V}^{\prime },\mathcal {A}^{\prime })\) i.e. \(\bigcup _{i} \mathbf {v}^{\prime }_{i}\) = \(\mathcal {V}^{\prime }\) and \(\bigcup _{i} \mathbf {a}^{\prime }_{i}=\mathcal {A}^{\prime }\). Graph \((\mathcal {V},\mathcal {A})\) and graph \((\mathcal {V}^{\prime },\mathcal {A}^{\prime })\) is identical because all removed edges don’t belong to \(\mathcal {A}\), and then each ci is identical to the corresponding \(c^{\prime }_{i}\). On the other side, the process of algorithm 1 for graph \((\mathcal {V}^{\prime },\mathcal {E}^{\prime })\) is perfectly equivalent to the process of Kruskal algorithm for every \(c^{\prime }_{i}\) [40]. So, each connected component \(c^{\prime }_{i}\) is a minimum spanning tree, and then each ci is also a minimum spanning tree.□

Proposition 3

The algorithm 1 can converge to the global minimum point.

Proof

We define proposition P : If \(\mathcal {A}\) is the set of edges chosen at any stage of the algorithm 1, then there are some optimal segmentations that contain \(\mathcal {A}\). Clearly, proposition 3 is equivalent to proposition P. We show that proposition P is true by induction.

  1. 1.

    Clearly, P is true at the beginning, when \(\mathcal {A}\) is empty: any optimal segmentation will do, and there exists one because a weighted connected graph always has some segmentation satisfying the constraint condition of energy functional (4).

  2. 2.

    Now assume that P is true for a non-final edge set \(\mathcal {A}\) and let \(\mathcal {S}\) be an optimal segmentation that contains \(\mathcal {A}\). If the next chosen edge e is also in \(\mathcal {S}\), then P is true for \(\mathcal {A} + e\). Otherwise, \(\mathcal {S} +e\) has a cycle C or leads to a superpixel which contains two seed points p1 and p2.

    • If, \(\mathcal {S} + e\) has a cycle C and there is another edge f that is in C but not \(\mathcal {A}\). (If there were no such edge f , then e could not have been added to \(\mathcal {A}\), since doing so would have created the cycle C.) Then \(\mathcal {S} - f + e\) is a valid superpixel segmentation, and it has the same weight as \(\mathcal {S}\), since \(\mathcal {S}\) has minimum weight and the weight of f cannot be less than the weight of e, otherwise the algorithm 1 would have chosen f instead of e. So \(\mathcal {S} - f + e\) is a minimum spanning tree containing \(\mathcal {A} + e\) and again, P holds.

    • If, \(\mathcal {S} + e\) leads to a superpixel contains two seed points p1 and p2. In other words, there is a path between p1 and p2 and there is another edge f that is in path p1p2 but not \(\mathcal {A}\). Then \(\mathcal {S} - f + e\) is a valid superpixel segmentation, and it has the same weight as \(\mathcal {S}\), since \(\mathcal {S}\) has minimum weight and the weight of f cannot be less than the weight of e, otherwise the algorithm 1 would have chosen f instead of e. So \(\mathcal {S} - f + e\) is a minimum spanning tree containing \(\mathcal {A} + e\) and again, P holds.

  3. 3.

    Therefore, by the principle of induction, P holds when \(\mathcal {A}\) has become a valid segmentation, which is possible only if \(\mathcal {A}\) is a optimal superpixel segmentation itself.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Wu, X., Liu, X., Chen, Y. et al. A graph based superpixel generation algorithm. Appl Intell 48, 4485–4496 (2018). https://doi.org/10.1007/s10489-018-1223-1

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-018-1223-1

Keywords

Navigation