Skip to main content
. 2016 Oct 13;16(10):1687. doi: 10.3390/s16101687
Algorithm 1. IER for Optical Images.
given: the initial grid width S , color image I
step 1. (Initialization)
 Initialize the superpixels of I as regular grids with width S . Create the models (mean color values and geometric centers) for all superpixels. Initialize the unstable pixels as the grid edge pixels. Set the iteration index iter = 0.
step 2. (Local relabeling)
 If iter ≥ itermax, the maximum iteration times reached, or the unstable pixel set is empty, then the algorithm ends and goes to Step 4. If not, relabel all the unstable pixels by the color-spatial combined distance defined in Equation (2) in the local searching area 2S×2S .
step 3. (Updating)
 Update the superpixel models and the unstable pixel set by its definition (1). Set iter = iter + 1 and return to Step 2.
step 4. (Postprocessing)
 Remove the generated isolated regions with size smaller than Smin by connected component analysis (CCA) based on the combined distance defined as Equation (2).
output: superpixels