Superpixel Generation by Agglomerative Clustering with Quadratic Error Minimization
Superpixel segmentation is a popular image pre-processing technique in many computer vision applications. In this paper, we present a novel superpixel generation algorithm by agglomerative clustering with quadratic error minimization. We use a quadratic error metric (QEM) to measure the difference of spatial compactness and colour homogeneity between superpixels. Based on the quadratic function, we propose a bottom-up greedy clustering algorithm to obtain higher quality superpixel segmentation. There are two steps in our algorithm: merging and swapping. First, we calculate the merging cost of two superpixels and iteratively merge the pair with the minimum cost until the termination condition is satisfied. Then, we optimize the boundary of superpixels by swapping pixels according to their swapping cost to improve the compactness. Due to the quadratic nature of the energy function, each of these atomic operations has only O(1) time complexity. We compare the new method with other state-of-the-art superpixel generation algorithms on two datasets, and our algorithm demonstrates superior performance. ©2018 The Authors Computer Graphics Forum ©2018 The Eurographics Association and John Wiley & Sons Ltd.