OtsuAlgorithmus
The Otsu algorithm is a method for automatic image thresholding. Its purpose is to find an optimal threshold value to separate pixels into foreground and background classes. It works by minimizing the intra-class variance, which is the weighted variance of the pixel intensities within each class.
The algorithm assumes that the image contains two classes of pixels, typically foreground and background, and
The variance within each class is then calculated. The algorithm seeks the threshold that minimizes the sum