Illustration of the classification of pixels of whole image. For example, for the pixel PA, if dj−1 < dj, the pixel belongs to the interval Zj−1; otherwise, the pixel belongs to the interval Zj. For the pixel PB, if dj < dj+1, the pixel belongs to the interval Zj; otherwise, the pixel belongs to the interval Zj+1.