A C++ Implementation of Otsu’s Image Segmentation Method
Juan Pablo Balarini, Sergio Nesmachnow
Juan Pablo Balarini, and Sergio Nesmachnow, A C++ Implementation of Otsu’s Image Segmentation Method, Image Processing On Line, 6 (2016), pp. 155–164. https://doi.org/10.5201/ipol.2016.158

Communicated by Miguel Colom
Demo edited by Juan Pablo Balarini


This article presents a functional implementation of the Otsu’s segmentation method and a case study using multiple images. Otsu’s method performs nonparametric and unsupervised image thresholding, usually used on image segmentation. The algorithm finds an optimal threshold of an image by minimizing the within-class variance, using only the gray-level histogram of the image. The proposed implementation is conceived emphasizing the role of mathematics as a source for algorithm design and the reproducibility of the research, according to the Image Processing On Line (IPOL) philosophy.