数字图像实验
SLIC超像素分割算法复现
目录
数字图像实验 1
SLIC超像素分割算法复现 1
1.实验目的: 1
2.论文详读: 1
3 SLIC SUPERPIXELS 1
1.实验目的:
阅读SLIC论文,使用c++复现论文中的算法并对图片进行实际操作
2.论文详读:
这里从原文章出发,文章中介绍算法的部分在第三段
3 SLIC SUPERPIXELS
We propose a new method for generating superpixels which is faster than existing methods, more memory efficient, exhibits state-of-the-art boundary adherence, and improves the perfor- mance of segmentation algorithms. Simple linear iterative clustering is an adaptation of k-means for superpixel generation, with two important distinctions:
1. The number of distance calculations in the optimization is dramatically reduced by limiting the search space to a region proportional to the superpixel size. This reduces the complexity to be linear in the number of pixels N—and independent of the number of superpixels k.
2. A weighted distance measure combines color and spatial proximity while simultaneously providing control over the size and compactness of the superpixels.
SLIC is similar to the approach used as a preprocessing step for depth estimation described in [30], which was not fully explored in the context of superpixel generation.
3 超像素
我们提出一种新的生成超像素的方法,比现有方法更快,更高的记忆效率,展示了目前最优的边界依从性,并提高了分割算法的性能。简单线性迭代聚类(SLIC)采用K均值算法生成超像素,相较与其他算法具有两个重要的区别:
1)通过将搜索空间限制为与超像素大小成比例的区域,显着地减少了优化中的距离计算的数量。这降低了像素数N的线性复杂度,并且与超像素k的数量无关。
2)加权距离度量组合颜色和空间接近度,同时提供对超像素的尺寸和紧凑性的控制。
SLIC类似于[30]中描述的用于深度估计的预处理步骤的方法,其没有在超像素方向进行研究。
3.1 Algorithm
SLIC is simple to use and understand. By default, the only parameter of the algorithm is k, the desired number of approximately equally sized superpixels[ Optionally, the compactness of the superpixels can be controlled by adjusting m, which is discussed in Section 3.2. 或者,可以通过调整m来控制超级混合的致密度,这将在第3.2节中讨论。]. For color images in the CIELAB color space, the clustering procedure begins with an initialization step where k initial cluster centers are sampled on a regular grid spaced S pixels apart. To produce roughly roughly equally sized superpixels, the grid interval is . The centers are moved to seed locations corresponding to the lowest gradient position in a 3 * 3 neighborhood. This is done to avoid centering a superpixel on an edge and to reduce the chance of seeding a superpixel with a noisy pixel.
Next, in the assignment step, each pixel i is associated with the nearest cluster center whose search region overlaps its location, as depicted in Fig. 2. This is the key to speeding up our algorithm because limiting the size of the search region significantly reduces the number of distance calculations, and results in a significant speed advantage over conventional k-means clustering where each pixel must be compared with all cluster centers. This is only possible through the introduction of a distance measure D, which determines the nearest cluster center for each pixel, as discussed in Section 3.2. Since the expected spatial extent of a superpixel is a region of approximate size S * S, the search for similar pixels is done in a region 2S * 2S around the superpixel center.
Once each pixel has been associated to the nearest cluster center, an update step adjusts the cluster centers to be the mean vector of all the pixels belonging to the cluster. The L2 norm is used to compute a residual error E between the new cluster center locations and previous cluster center locations. The assignment and update steps can be repeated iteratively until the error converges, but we have found that 10 iterations suffices for most images, and report all results in this paper using this criteria. Finally, a postprocessing step enforces connectivity by reassigning disjoint pixels to nearby superpixels. The entire algorithm is summarized in Algorithm 1.