Let’s consider a simple example. Suppose we want to cluster black and white intensities, and we have the intensities: 1 3 8 11. Suppose we start with centers c1 = 7 and c2=10. We assign 1, 3, 8 to c1, 11 to c2.
Then we update c1 = (1+3+8)/3 = 4,
c2 = 11. Then we assign 1,3 to c1 and
8 and 11 to c2. Then we update c1 = 2, c2 = 9 ½. Then the algorithm
has converged. No assignments change, so the centers don’t change.