Skip to main content
. 2016 Aug 17;11(8):e0160556. doi: 10.1371/journal.pone.0160556

Table 1. GSLIC algorithm.

Algorithm 1 GSLIC Algorithm
1: Initialize cluster centers Ck = [Lk, ak, bk, xk, yk, zk]T by sampling pixels at regular grid steps.
2: Choose cluster centers in an n * n neighborhood, to the lowest gradient position.
3: Repeat
4: for each cluster center Ck in zk do
5: Assign the best matching pixels from an 2S * 2S square neighborhood around the cluster center according to the distance measure.
6: end for
7: Compute new cluster centers and residual error E{distance between previous centers and recomputed centers}.
8: until E < = threshold. Save cluster centers Ck and transmit Ck to the next image zk+1.
9: until all image sequences are segmented.
10: Enforce connectivity.