Equations are not being displayed properly on some articles. We hope to have this fixed soon. Our apologies.

Sparavigna, A. (2016). A method for the segmentation of images based on thresholding and applied to vesicular textures. PHILICA.COM Article number 889.

ISSN 1751-3030  
Log in  
Register  
  1092 Articles and Observations available | Content last updated 22 June, 18:28  
Philica entries accessed 3 089 827 times  


NEWS: The SOAP Project, in collaboration with CERN, are conducting a survey on open-access publishing. Please take a moment to give them your views

Submit an Article or Observation

We aim to suit all browsers, but recommend Firefox particularly:

A method for the segmentation of images based on thresholding and applied to vesicular textures

Amelia Carolina Sparavignaunconfirmed user (Department of Applied Science and Technology, Politecnico di Torino)

Published in compu.philica.com

Abstract
In image processing, a segmentation is a process of partitioning an image into multiple sets of pixels, that are defined as super-pixels. Each super-pixel is characterized by a label or parameter. Here, we are proposing a method for determining the super-pixels based on the thresholding of the image. This approach is quite useful for studying the images showing vesicular textures. Keywords: Segmentation, Edge Detection, Image Analysis, 2D Textures, Texture Functions. Author: AC Sparavigna, Department of Applied Science and Technology, Politecnico di Torino.

Article body


Introduction 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 [1]. 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 [2-4].

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 [4]. As a consequence, the result of the  segmentation is a set of "segments", or “super-pixels”, 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 [4]. A discussion of these methods is not the subject of this paper. Here in fact, we want to address this method for applying it to the analysis of the vesicular textures, that we can encounter in geology, materials science and physics. 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.

From macro-photography or microscopes (optical, SEM and AFM), or from tomographic devices, we can have 2D  maps of pixels representing distributions of vesicular domains. In these cases, it could be interesting to determine the numbers and the size of such domains: this can be obtained by means of segmentation. After some examples illustrating the approach by thresholding to the segmentation, we will consider some studies of the vesicular textures.

Brightness matrix Before discussing the segmentation, let us remember something about images and image processing. Let us suppose that our starting point is a RGB source image of  Nx x Ny pixels, represented by the three-channel brightness function:

 

 

 

From this function, a grey-tone map can be obtained by giving:

Index c corresponds to the three channels R, G, B. The integer indices i and j are ranging in the x and y directions 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.

Of course, we could give some statistical parameters of the whole image, such as average brightness M0 and standard deviation Σ0:

 

 
 
 
 
From them, many statistical methods of image processing had been developed [5]. The author (ACS) for instance, proposed a statistical approach based on the Coherence Length Diagrams [6-8], for investigating the texture transitions in liquid crystals, evidenced by polarized light microscopy.

Thresholding and segmentation It is true that 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 with 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 [9-11]. A simple method is that of using GIMP  (GNU Image Manipulation Program), for X Windows systems, and make a visual choice of thresholding.

Once we have the binary image, we have a matrix of pixels containing black and white domains, or segments. Moving from the left/upper corner of this matrix, we focus on black pixels,  and characterize each of them by an integer number k, acting as a label which will be also the label identifying the segment (super-pixel) to which the pixel belongs. The label is determined according to the labels k of the nearest pixels above (A) and on the left (L) of the considered pixel. If the labels kA and kL are the same,  their value is the label of the pixel. If the labels are different, the pixel assumes as 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 (in the examples here proposed we use Fortran 77).  It gives to each of the super-pixels a different label. After this procedure, we have the matrix of labels:

 

 

 

Then, a new map can be proposed, where a grey tone is associated to the label and then to each super-pixel.

Let us see an example based on a detail from an image of a honeycomb structure (Courtesy: Audrius Meskauskas, Wikipedia). In the Figure 1, the steps of segmentation are shown. We start from A, the original image. Then we obtain the grey-tone image B. After, we use GIMP for a simple thresholding to have the black and white image C. After some small adjustments, we obtain the image D, on which we apply the Fortran program for segmentation. In the panel E, we show the super-pixels having different grey tones. Since some are very dark, the panel F shows the output of GIMP Sobel filter for  edge detection.

Since each black pixel of the original grey-tone image is labelled by the tone of the super-pixel to which it belongs, we can easily do some calculations. For instance, we can give the distribution of the area (in pixels) of the super-pixels. Since each super-pixel has a different label, we simply count the pixels having the same label. In this manner, we have the areas of the cells of the honeycomb structure. The result is proposed in the Figure 2.

Figure 1: A is the original image (240 x 240 pixels). B is the corresponding image in grey tones. C is after thresholding. D is the same as C after some smoothing. E is the result of segmentation according to the Fortran program. The super-pixels are given in grey-tones. Since some of these super-pixels are very dark, they are shown in F by an edge detection (Sobel) obtained using GIMP.

Figure 2: Areas of the super-pixels.

Two other examples are given in the Figures 3 and 4. In the Figure 4 we see a detail of an Entobia,  a trace fossil in a hard substrate formed by clionaid sponges as a branching network of galleries, often with regular enlargements termed chambers. The detail is from a photograph taken by Mark A. Wilson (Department of Geology, The College of Wooster).

Figure 3: A is the grey-tone image (240 x 240 pixels). B is the image after thresholding. C is B inverted (the inversion of tones is necessary since the program works on black pixels). D is the result of segmentation. The super-pixels are given in grey-tones. Since some of these super-pixels are dark; they are shown by an edge detection, as given in the E panel.

Figure 4: A is the original image (240 x 240 pixels).  B is its grey-tone image. C is the image after a Retinex filtering provided by GIMP. D is an image after thresholding from C. E is a modified version of D. F is the result of segmentation according to the Fortran program discussed above. The super-pixels are given in grey-tones. Since some of these super-pixels are very dark, again we show them by an edge detection in the G panel.

In the following example (Figure 5),  the original image is showing some sponge borings (Entobia made by the genus Cliona). The photograph was taken by Mark A. Wilson (Department of Geology, The College of Wooster). In this case, we show also the areas of the super-pixels, given in the plot of Figure 6.

Figure 5: A is the original image (240 x 240 pixels).  B is its grey-tone image. C is after a thresholding. D is the result of segmentation according to the Fortran program discussed above. The super-pixels are given in grey-tones. Again, all the super-pixels are shown by an edge detection in the E panel.

Figure 6: Areas of the super-pixels.

Vesicular textures As told previously, the vesicular textures are those containing domains which look like cavities or holes. In fact, in the previous examples, we have already investigated images which are showing cavities, and we have seen that the approach can be very useful to measure the number and the size of the cavities. Let us continue proposing specific examples.

In the Figure 7, the original image is a detail of a photograph taken by Siim Sepp. It is a picture of vesicular basalt with olivine crystals. In the Figure 8, a volcanic sand grain with many vesicles, is viewed with a petrographic microscope (Courtesy: Qfl247, Wikipedia).

Of course other materials, besides the volcanic rocks, have a vesicular structure. In the Figure 9, we see a detail of the surface of a sponge, and in the Figure 10 the surface of a crisp toast.

Figure 7: A is the original image (240 x 240 pixels).  B is the corresponding image in grey tones. C is after thresholding. D is the same as C after some smoothing. E is the result of segmentation, and F the image after edge-detection.

 

Figure 8: A is the original image (240 x 240 pixels). B is the corresponding image in grey tones. C is after thresholding. D is the same as C, but with black and white tones inverted. E is the result of segmentation, and F the image after edge-detection.

 

Figure 9: A is the grey-tone image (240 x 240 pixels). B is the image after thresholding and C is the result of segmentation. As in the previous cases, we have some super-pixels which are so dark that are not visible in the map.

 

Figure 10: A is the grey-tone image (240 x 240 pixels). B is the image after thresholding and C is the result of segmentation. D is the result of edge-detection.

 

As previously told, we can find several cases of materials, having a vesicular structure. The example of the Figure 9, involves the surface of a sponge, and then all such cases can be studied by the proposed segmentation. In the Figure 10, we have used the surface of a crisp toast. Again, all the surfaces of such products and others similar, can be studied. Then, the segmentation we proposed seems being suitable for studying several natural samples and artificial products. The examples given above are coming from photography and macro-photography, but the same approach can be used for images obtained from optical microscopes, SEM and AFM microscopes.

References

[1] Shapiro, L. G., & Stockman, G. C. (2001).  Computer vision, New Jersey, Prentice-Hall, ISBN 0-13-030796-3

[2] Pham, D. L., Xu, Chenyang, & Prince, J. L. (2000). Current methods in medical image segmentation. Annual Review of Biomedical Engineering. 2: 315–337. doi:10.1146/annurev.bioeng.2.1.315. PMID 11701515.

[3] Forghani, M., Forouzanfar, M., & Teshnehlab, M. (2010). Parameter optimization of improved fuzzy c-means clustering algorithm for brain MR image segmentation. Engineering Applications of Artificial Intelligence. 23 (2): 160–168.

[4] Vv. Aa. (2016). Wikipedia. https://en.wikipedia.org/wiki/Image_segmentation

[5] Haralick, R. M. (1979). Statistical and structural approach to textures, Proceedings IEEE, 67, 786-804.

[6] Montrucchio, B., Sparavigna, A., & Strigazzi, A. (1998). A new image processing method for enhancing the detection sensitivity of smooth transitions in liquid crystals, Liquid Crystals, 24(6), 841-852.

[7] Sparavigna, A.,  Mello, A., & Montrucchio, B. (2006). Texture transitions in the liquid crystalline alkyloxybenzoic acid 6OBAC, Phase Transitions, 79, 293-303.

[8] Sparavigna, A.C., & Marazzato, R. (2010).  An image processing analysis of skin textures. Skin Research and Technology, 16, 161-167.

[9] Gull, S.F., & Skilling, J. (1984). Maximum entropy method in image processing. communications, Radar and Signal Processing, IEE Proceedings F, 131(6), 646-659.

[10] Sahoo, P.K., & Arora, G. (2006). Image thresholding using two-dimensional Tsallis – Havrda – Charvát. Pattern Recognition Letters, 27, 520-528.

[11] Sparavigna, A. C. (2015). Tsallis entropy in bi-level and multi-level image thresholding. International Journal of Sciences, 4(1), 40-49.

 

Information about this Article
This Article has not yet been peer-reviewed
This Article was published on 4th December, 2016 at 16:45:01 and has been viewed 571 times.

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License.
The full citation for this Article is:
Sparavigna, A. (2016). A method for the segmentation of images based on thresholding and applied to vesicular textures. PHILICA.COM Article number 889.


<< Go back Review this ArticlePrinter-friendlyReport this Article



Website copyright © 2006-07 Philica; authors retain the rights to their work under this Creative Commons License and reviews are copyleft under the GNU free documentation license.
Using this site indicates acceptance of our Terms and Conditions.

This page was generated in 0.3026 seconds.