Otsu’s Method Algorithm
- Compute the normalized histogram of the input image. Denote the components of the histogram by pi.
- Compute the cumulative sums P1(k).
- Compute the cumulative mean m(k).
- Compute the global intensity mean mG.
- Compute the between-class variance σB2(k).
- Obtain the optimum threshold k’ for which between-class variance is maximum by iterating over values of k. If more than one maximum exists, obtain k’ by averaging over these values.
- Segment the image using the threshold k’ as g(x,y) = 1 if f(x,y)>k’ and g(x,y) = 0 if f(x,y)≤k’.
Optimum Global Thresholding Using Otsu’s Method
Image thresholding is one of the segmentation techniques, that segments or divided the image into two or more different parts based on pixel intensities. There are many different algorithms for carrying out thresholding and here we are going to see one of the most efficient and optimum techniques called Otsu’s method.