Thresholding is considered as a statistical-decision making theory which can lessen the average error incurred in allocating pixels to two or more groups. The traditional Bayes decision rule can be applied with the prior knowledge of the Probability Density Function (PDF) of each class. It is surmised that a threshold resulting in the best class separation is the optimal one. In this paper, Otsu’s thresholding for image segmentation has been implemented. The well-known Otsu’s method is to learn a threshold that can maximize the between-class variance or equivalently make light of the within-class variance of the entire image. At first, a color image of a tree is taken. After that, the image is transformed into a grayscale image. Then in the first part, two-level thresholding is conducted, and later on, three-level thresholding is also applied. Again, two-level thresholding, as well as three level thresholding, are also applied to some other images. Finally, the comparison is made between two level thresholding and three level thresholding