  In the following work, we described the problems of porosity analysis of
cement materials using backscattered electron images. We noticed that despite
its great utility, the overflow porosity segmentation method allows for the
introduction of an additional error by the effect of the subjective researcher.
For this purpose, two developed variants of this method - regression I and II -
were completely algorithmized and compared with the literature methods of
overflow, triangle, and method preserving to choose the fastest and most
consistent measurement method. Based on the comparison of the two data sets, it
was judged that the improved overflow-based methods are the best candidates for
the automated porosity assessment, with particular emphasis on regression II.
All the algorithms used are summarized as Python source code in Supplementary
Material.
