imea: A Python package for extracting 2D and 3D shape measurements from images

Abstract

Quantitative measurement of 2D and 3D shapes from images is used in many research fields, for example, chemistry (Lau et al., 2013), mineral engineering (Andersson et al., 2012), medicine (Nguyen & Rangayyan, 2005), biology (Smith et al., 1996), and environmental engineering (Kandlbauer et al., 2021; Weissenbach & Sarc, 2021). In the past, a variety of shape measurements have been proposed in the scientific literature and as technical norms (DIN ISO 9276-6, 2012; Pabst & Gregorova, 2007; Pahl et al., 1973a, 1973b, 1973c; Steuer, 2010). imea is an open source Python package for extracting 2D and 3D shape measurements from images. The current version of imea enables the extraction of 53 different 2D shape measurements, covering macrodescriptors such as minimal bounding boxes (Steuer, 2010), mesodescriptors such as the numbers of erosion to erase a binary image (DIN ISO 9276-6, 2012), microdescriptors such as the fractal dimension (DIN ISO 9276-6, 2012), as well as statistical lengths like Feret, Martin or Nassenstein diameters (Pahl et al., 1973a), as shown by the exemplary selection in Figure 1. Furthermore, 13 different 3D shape measurements ranging from volume (Pahl et al., 1973a) and minimal 3D bounding boxes (Steuer, 2010) to 3D Feret diameters and maximum dimensions (Steuer, 2010) can be extracted. Both 2D shapes, represented as 2D binary images, as well as 3D shapes, represented as grayscale images where the grayvalue of each pixel represents its height, can be analyzed automatically with a single function call. Extracted shape measurements are returned as a pandas dataframe (McKinney, 2010), and by specifying the spatial resolution of inserted images, results are automatically converted into metric units for further quantitative analysis.

Publication
Journal of Open Source Software