Skip to content

Instantly share code, notes, and snippets.

@YimianDai
Last active July 30, 2019 05:19
Show Gist options
  • Save YimianDai/cd6fc23a996fe1e8379ad469b1ed46db to your computer and use it in GitHub Desktop.
Save YimianDai/cd6fc23a996fe1e8379ad469b1ed46db to your computer and use it in GitHub Desktop.
2012-TPAMI-SLIC Superpixels Compared to State-of-the-Art Superpixel Methods

2012 - TPAMI - Slic superpixels compared to state-of-the-art superpixel methods

SLIC SUPERPIXELS

Algorithm

  • SLIC,唯一的一个参数就是 k,想要的 superpixel 的数量
  • To produce roughly equally sized superpixels, the grid interval is $S= \sqrt{N/k}$
    • 最好当然是每个 superpixel 像素数都是一样的咯,是不是能够这么保证呢?拭目以待
  • 怎么确定 center?
    • 这其实是算法的第一步,确定 center
    • The centers are moved to seed locations corresponding to the lowest gradient position in a $3 \times 3$ neighborhood.
    • 这是为了避免让 seed 落在 edge 上 to reduce the chance of seeding a superpixel with a noisy pixel
  • 怎么 assign pixel?
    • 算法的第二步,pixel assignment
    • 每个 superpixel 期待的 size 是 $S \times S$
    • SLIC 每个 pixel 只寻找 $2S \times 2S$ 内的 center,还是每个 center 寻找 $2S \times 2S$ 内的 pixel
      • 虽然这两个应该本质是一样的,但这个应该关系到对算法的理解吧
    • each pixel i is associated with the nearest cluster center whose search region overlaps its location
      • 这也太简单了吧?
      • 这个 nearest 的距离,究竟是空间的距离,还是 灰度的距离?
  • update step —— 调整 cluster center
    • adjusts the cluster centers to be the mean $[l\ a\ b\ x\ y]^T$ vector of all the pixels belonging to the cluster
      • 看来这个距离,是 灰度和距离的混合体啊
    • 10 iterations suffices for most images
  • postprocessing step
    • enforces connectivity by reassigning disjoint pixels to nearby superpixels
  • 整体的算法流程

mark

Distance Measure

  • 因为距离度量同时包含了空间距离和颜色距离,但这两者不在同一空间内,如果 superpixel 大的话,空间距离一下子就会盖过颜色距离,所有有必要 combine the two distances into a single measure,具体的做法是 normalize color proximity and spatial proximity by their respective maximum distances within a cluster, $N_s$ and $N_c$

    mark

    • $N_s$ 就是 $N_s = S = \sqrt{N/K}$

    • fixing $N_c$ to a constant m so that (1) becomes

      mark

    • simplifies to the distance measure we use in practice:

      mark

    • Equation (3) can be adapted for grayscale images by setting

      mark

Postprocessing

  • 怎么处理 “orphaned” pixels that do not belong to the same connected component as their cluster center may remain
    • such pixels are assigned the label of the nearest cluster center using a connected components algorithm.
@article{Achanta2012SLICSC,
  title={SLIC Superpixels Compared to State-of-the-Art Superpixel Methods},
  author={Radhakrishna Achanta and Appu Shaji and Kevin Smith and Aur{\'e}lien Lucchi and Pascal Fua and Sabine S{\"u}sstrunk},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year={2012},
  volume={34},
  pages={2274-2282}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment