Measuring the size of pores by the segmentation of images from scanning electron microscopy