The mean shift (MS) algorithm is sensitive to local peaks. In this paper, we show both empirically and analytically that when using sample data, the reconstructed PDF may have false peaks. We show how the occurrence of the false peaks is related to the bandwidth h of the kernel density estimator, using examples of gray-level image segmentation. It is well known that in MS-based approaches, the choice of h is important: we provide a quantitative relationship between false peaks and h. For the gray-level image segmentation problem, we provide a complete unsupervised peak-valley sliding algorithm for graylevel image segmentation.