Image Segmentation Applied to the Study of Micrographs of Cellular Solids

The paper is proposing a method of image segmentation applied to the study of the micrographs of cellular solids. The segmentation is based on a thresholding which creates a binary (black and white) image of the micrograph. The binary image is divided in super-pixels which correspond to the microcells of the material. From the areas of the super-pixels it is easy to evaluate the distribution of the size of the cells and correlate this distribution to the properties of the material.


Introduction
A cellular solid is defined as an assembly of cells, that is, according to the etymology of the word "cell" from the Latin "cella", as an assembly of small compartments [1]. The cells, which are usually empty, can be sealed (closed-cell solid) or interconnected (open-cell solid). In the case of sealed cells, the void space inside a cell is isolated by a solid wall from the rest of the space.
A large number of cellular solids are available from natural structures. We find them in some parts of the living beings, such as in wood, cork, bones, but also in the mineral world such as the vesicular volcanic rocks. A well-known example of cellular solid is the honeycomb of wax made by the bees. The honeycomb and other natural cellular solids are also examples of efficient structures. As told in [2], it is a honeycomb-like microstructure which gives the wood an exceptionally high performance index for resisting bending and buckling.
Besides the natural materials, artificial cellular solids exist. They can be obtained from several raw materials and in different architectures [1]. Compared to their raw materials, the corresponding cellular solids are lightweight structures, which can be used for countless applications. Let us consider the metal foams for instance: the use of them is mainly in vehicles to reduce the weight and to increase the energy absorption in case of crashes. In the form of metal sponges, these materials can be used in heat exchangers and flow diffusion [3,4].
One of the features which is characterizing a cellular solid is its relative density, ρ/ρ 0 , defined as the density of cellular solid (ρ) divided by the density of the solid it is made from (ρ 0 ). Typical relative densities of cellular materials are ranging from the values of the ultra-low-density foams (about 0.001) to those of the porous materials (greater than 0.3). Passing from foams to porous materials, so that the relative density increases, the cells are contained in thicker walls [2].
Besides the relative density, some variables exist for the classification of the structure of cellular solids [5]. These variable are: open-cells or closed-cells, flexible or brittle cell walls, the cell-size distribution, the cell-wall thickness and the cell shape. The uniformity of the structure of the material and the scales of length are also considered. These parameters are characterizing the porosity of the solid, the resulting structure of which can be investigated by microscopy, X-ray tomography and microtomography [6].
Starting from a micrograph of the solid, which can be obtained by macro photography, or by a microscope or from the slices of a tomography, the study of the cells in the structure can start from a binary (black and white) image and a further segmentation of it [6], to obtain the domains containing the pores (other studies based on this method are given, for instance, in [7][8][9]).
A review of the literature about this subject is not the aim of this paper. Here, we want to show how to apply the segmentation of the images we obtain from microscopy to some case studies concerning the cellular solids. We will use binary images obtained by means of GIMP, the GNU Image Manipulation Program, for X Windows systems. The segmentation is made by a Fortran program, written according to a simple algorithm used for labelling the domains in the binary image [10].
Before the case studies, let us shortly discuss the image segmentation.

Segmentation of images
In image processing, a segmentation is a process of partitioning an image into multiple sets of pixels, defined as super-pixels, in order to have a representation which is simpler than the original one and more useful to the following desired analyses [11]. For this reason, the segmentation of images is often used in many applications of the image processing, and in particular in the medical image processing, where the aim is that of determining the presence of pathologies, and for the stacking of the maps coming from tomography to have the 3D reconstructions [12][13][14].
The typical use of the image segmentation is that of locate objects, or domains, and boundaries among them. Specifically, the segmentation is a process of assigning a label to every pixel in an image, such that the pixels having the same label share certain characteristics [14]. As a consequence, the result of the segmentation is a set of "segments", or "superpixels", that are covering the whole image, or a set of contours, that is "edges", extracted from the image. In this case, the segmentation gives the "edge detection".
Several methods exist for segmentation, as we can appreciate from [14]. Here in fact, we want to address this method for applying it to some analysis of the cellular solids, which create the vesicular textures that we can see in the micrographs of the samples of such materials. The vesicular textures in images are features that evidence the presence of cavities or holes in the samples; these textures look like those displayed by the volcanic rocks when are pitted with many cavities (known as vesicles) at their surfaces and inside. In such cases, the vesicles are made by gas escaping from cooling lava.

Method of segmentation
. From this function, a grey-tone map can be obtained by giving: The index c corresponds to the three channels R, G, B. The integer indices i and j are ranging in x-and ydirections of the Cartesian frame corresponding to the image frame. In this manner, we have, from a RGB image, a brightness map of its grey-tone pixels. From this map, we can obtain some statistical parameters of the whole image. From them, many statistical methods of image processing had been developed [15].
For several physical analysis, the requested measures, which are concerning the domains in the image, are those of simple quantities such as size and area and number of domains. Let us therefore move on proposing a simple method based on the thresholding of the brightness map. Thresholding is using a clip-level (the threshold value τ), according to which a grey-scale image is turned into a binary image T.
The clip-level has a crucial role in the rendering of the binary image; often it is determined by means of the entropy, evaluated on the histogram of grey-tones of the pixels [16][17][18].
A simple method is that of using GIMP and make a visual choice of thresholding. Sometimes, other tools of GIMP are necessary to adjust the binary image, as we will discuss in the case-studies.
Once we have obtained the binary image, we have at our disposal a matrix of black and white pixels. Starting from the left/upper corner of this matrix, we move on each row from left to right, from the upper to the lower row of the image. We focus on black pixels and characterize each of them by a sequential integer number k, which is acting as a label of the single pixel. Some of these labels will be the labels identifying the domains, or super-pixels, to which the pixels belong (see Fig.1).

Figure 1:
The white pixels have a label k=0. Each black pixel has a label different from zero, with a value which is increasing as we move from left to right on the rows. However, the final values is fixed according to the labels of the black pixels above and on the left of the considered pixel.
The label of a black pixel is determined according to the labels k of the nearest black pixels above (A) and on the left (L) of the considered pixel. If the labels k A and k L are the same, their value is the label of the pixel under examination. If these labels are different, the pixel assumes as its label the lower value among them. Then, all the pixels having the label with the larger value change their labels into the value of the smaller one.
This approach can be easily obtained by logic instructions in any programming language (here we use Fortran 77). It gives to each of the super-pixels a different label. After this procedure, we have a matrix of labels: Then, a new map can be proposed, where a colour tone is associated to such labels and then to each super-pixel.
Let us see an example from an image of a honeycomb structure. In the Figure 2, the three steps of segmentation by thresholding are shown. We start from the original image, converted in grey tones, as in the panel A of the figure. Then we use GIMP for a simple thresholding to have the black and white image, reproduced in the panel B. On the binary image, we apply the Fortran program for segmentation. In the C panel, we show the superpixels having different colour tones. Since each black pixel of the original grey-tone image has the label of the super-pixel to which it belongs, we can easily make some calculations. First of all, we have the total number of the super-pixels. Then, for each of them, we can give the number of pixels, that is the area, the super-pixel is covering. In this manner, for instance, we can measure the size of each of the cells of the honeycomb lattice (Fig.2, panel D).

Figure 2:
The grey-tone image (240 x 240 pixels) is given in the panel A (Courtesy: Audrius Meskauskas, Wikipedia). In B, the binary image is obtained by thresholding. In C, the result of the segmentation is shown. Each super-pixel is rendered in different colour tone. In D, the areas (in pixels) of some cells are given.

Honeycombs
Let us start our case studies from the honeycomb cellular solid, that built by the bees. A honeycomb is the hexagonal arrangement of cells made of wax, built by the bees in their nests. These cells are used to host the larvae and to store the honey. To secrete the wax for the honeycomb, the bees are largely consuming the honey that they produce [19]; for this reason, the wax structure is left intact, in its most part, when the honey is extracted by the beekeepers, so that the bees have not to reconstruct the entire structure. Let us observed that some wasps construct hexagonal combs too, but they are made of paper instead of wax [20].
A common explanation exists as to why honeycomb is made of hexagonal cells. The hexagonal structure is giving a partition of a surface with equal-sized cells, which are minimizing the total perimeter of the cells. This is known as the "honeycomb conjecture" [21][22][23]. Thus, the bees need to use in the hexagonal structure the least material to create the cells within a given volume. Another explanation was given by D'Arcy Wentworth Thompson [24]: the hexagonal shape simply results from the process of individual bees putting the cells together. The process is somewhat analogous to the lattice that we can see appearing in a field of soap bubbles.
The individual cells have not a geometric perfection, and therefore, in a regular honeycomb we can observe deviations of a few percent from the "perfect" hexagonal shape [25]. Moreover, in the transition zones between the larger cells of dronecomb and the smaller cells of worker-comb, or when the bees encounter obstacles, the shapes are often distorted.
When the cells are used as brood-comb, the queen bee lays eggs in them. The cells for the brood-comb vary in diameter: the size ranges between less than 4.6 millimetres to greater than 6 millimetres [26]. As we can see in the Figure 3, the drone bees require the largest cell size. Some evidence suggests that a smaller cell enables faster development time from egg to a fully developed, adult bee [27]. A detailed discussion and data of the cell size are available from [28]. The cells in honeycombs has been recently studied also in [29]. In these references, the authors obtained the size of the cells by a direct inspection of the samples and by the use of a ruler.

Figure 3:
Here we can see a honeycomb containing transition from worker to drone cells. Where there is the transition, the bees make irregular and five-cornered cells (Image Courtesy, 2011, Audrius Meskauskas, Wikipedia). In the middle, the greyscale image is reduced to a black and white image (600 x 210 in pixels). The cells which are crossed by the image frame had been removed from the binary image. The segmentation gives the black pixels grouped into coloured super-pixels.
In fact, the measurement of all the cells is a quite long work; we could ask ourselves whether an automatic method, based on the image processing for instance, could be helpful in such studies. The answer is positive.
Let us follow the approach of an image segmentation, as previously proposed [10]. After the thresholding made by GIMP of the grey-scale image (Figure 3), the cells which are crossed by the image frame have been removed. The black pixels of the Figure 3 are analysed to subdivide them in super-pixels. Each of the super-pixels has a different label. If we use the colour tones to render the super-pixels, the result is like that given in the same Figure. As we can see in the coloured image, each superpixel corresponds to a cell of the honeycomb structure. It is therefore quite simple to deduce the size of each cell, because it is the size of the corresponding super-pixel. Then, we can plot the distribution of the super-pixels, and consequently their frequencies, for given sizes of the cells ( Figure  4). From this plot, we can appreciate the regularity of the small cells, those of the workers that we find in the honeycomb. The drone cells have a larger distribution of sizes.
The results we have given above, are showing that we can use one of the fundamental methods of the image processing, the segmentation of the images [30,31], to evaluate the distribution, in size, of the natural honeycomb cells, and therefore of the natural cellular solids. The proposed approach can be interesting for the numerical and statistical analysis of the brood combs and the role of the size of the cells in the beekeeping [32][33][34][35].

Metal foams
A metal foam is a cellular solid the structure of which is made of a metal. The most used metal is the aluminium. In the foam, the cells can be sealed (closed-cell foam) or interconnected (open-cell foam). Since the cells are occupying a large part of the volume, the material has a high porosity and is ultralight. Typically, only 5-25% of the volume is occupied by the metal.
For what concerns the structure, a foam is defined to be stochastic when the distribution of the cells, and therefore the porosity, is random. A foam is regular when the structure and the distribution of the cells is ordered.
Let us consider a stochastic foam, such as that shown in the Figure 5 (upper-left panel). Using GIMP, we can obtain a binary image. First of all, the original image is filtered using the Colour-Levels. Using the two sliders of dark and bright tones, we have the image in the upper-right panel. Since in this image the edges of the cells are rather thin, we need to apply another filter to enhance them. The filter used is for this purpose is the Generic-Dilate, a filter that widens and enhances bright areas. The result is given in the lower-left panel. Then, the image is converted in a black and white image (lower-right panel). In fact, after the abovementioned processing obtained with GIMP, some further adjustment are necessary. We can simply make them with Paint, to remove the white pixels inside the cells, and to close some edges.
In the Figure 6 we give the processing of a larger image. In the Figure 7, we have the distribution of the areas of the cells, typical of a stochastic distribution. Let us also note that, from the distribution it is evident that we have a large number of small cells, but looking at the image, it is the presence of the larger cells that is attracting the observer's attention.  In the counting these areas within intervals spaced of 50 pixels, we have neglected the super-pixels having an area less than 50 pixels.

Microcellular plastics
The microcellular plastic, also known as microcellular foam, is a form of material fabricated to contain tiny bubbles less than 50 microns in size. The bubbles are formed by dissolving a gas under high pressure into a polymer, to obtain an almost uniform arrangement of the gas bubbles [36]. The plastic which is obtained has good mechanical properties, with a reduced use of material; in it, the density of the foam is ranging between 5% to 99% of the pre-processed plastic [37].
Recently, researches made at the Indian Institute of Technology in Delhi have been published on new technologies based on ultrasounds for the development of high quality microcellular foams [38,39]. In [40], we can see a micrograph of a sample obtained by this Institute. As proposed in the previous cases, also for a microcellular plastic it is interesting to evaluate the distribution, in size, of the cells we observe in the micrograph. The original image is the micrograph given in [40]. Let us start considering the Figure 8. We have a detail of the original image, its processed and binary image obtained using GIMP and the coloured segmentation. As we can see from the result of Figure 8, some small super-pixels can appear, due to the segmentation of the regions that we find between the large cells in the image. To reduce their role in the counting of the distribution of the super-pixels, the binary image we obtain after the thresholding of the grey-level image is further subjected to a processing. This processing is made, also in this case, by the GIMP generic filter Dilate, followed by the generic filter Erode. Dilate widens and enhances bright areas, whereas Erode widens and enhances the dark areas. The segmentation we obtain is given in the Figure 9. If we consider the segmentation and the super-pixels as given in the Figure 9, we can determine the distribution of the microcell cross-sections, by counting them according to their area (in pixels) within intervals spaced of 50 pixels. We obtain the distribution given in the Figure 10 (the super-pixels having an area less than 25 pixels are not considered). The Figure 10 shows that a few polyhedra having a large size exist, but many polyhedra with a crosssection between 100 and 400 pixels are found in the micrograph. It means that we have a large number of cells with size ranging from 6 to 11 pixels. If we have also a scale on the recorded micrograph, we can give the size in microns. In the case of the Figure 9, the length of 10 pixels corresponds to 20 microns. In Figures 11 and 12, we are proposing another analysis of a microcellular plastic micrograph. Gandhi.iitdelhi, Wikipedia, https://commons.wikimedia.org/wiki/File:Cyclic_Mic rocellular_Foam.tif). The area of the image is 600 x 376 pixels. In the lower panel, there is the distribution of the super-pixels.

Conclusion
In this paper we have proposed the use of image segmentation to investigate the distribution in size of the cells and pores of some cellular solids. The approach we discussed is based on the use of binary images obtained by means of GIMP. In a future work, we will give other applications of such method, in other research fields such as biology and arts.