In image processing

In image processing, Otsu’s method which is named after Nobuyuki Otsu, is basically used to perform image thresholding or we can say conversion of grayscale image to a binary image.
The algorithm makes an initial assumption that the image contains two classes of pixels i.e. foreground pixels and background pixels, it then calculates weight, mean and variance of both foreground and background pixels and then obtains optimum threshold value separating the two classes so that their (combined spread) intra-class variance is minimal, or equal, or their inter-class variance is maximal. To obtain optimum threshold value using Otsu’s algorithm is easy to compute and also it maintains constancy and is effectiveness.
In Otsu’s method, we search for the threshold that minimizes the intra-class variance i.e. the variance within the class which is the weighted sum of variance of two classes.
Hence it shows that minimizing the intra-class variance is same as maximizing the inter-class variance.