In image processing

In image processing, Otsu’s method, named after Nobuyuki Otsu, is used to perform image thresholding, or, conversion of grayscale image to a binary image.
The algorithm makes an 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.
In Otsu’s method, we search for the threshold that minimizes the intra-class variance i.e the variance within the class which is defined as the weighted sum of variance of two classes.
Hence Otsu’s algorithm shows that minimizing the intra-class is same as maximizing the inter-class variance.