You are on page 1of 5

Journal of Coastal Research Journal of Coastal Research

SI 64

pg - 1701 1697 - pg

ICS2011 (Proceedings) ICS2011

Poland

ISSN 0749-0208

Granulometry on classified images of sand grains


C. Lira and P. Pina
CERENA Centro de Recursos Naturais e Ambiente Instituto Superior Tcnico, Lisboa 1049-001, Portugal cristina.lira@ist.utl.pt

ABSTRACT Lira, C. and Pina, P., 2011. Granulometry on classified images of sand grains, SI 64 (Proceedings of the 11th . Szczecin, Poland, ISSN 0749-0208 International Coastal Symposium), A novel automated approach to determine the size of previously classified images of sand grains is presented in this text. It is based on image analysis and pattern recognition techniques and consists of two main phases: first, the individual recognition of the grains and their classification into distinct mineralogical classes and second, the computation of a global granulometry of the sample, constructed from the individual mineralogical curves obtained by the application of morphological openings of increasing size. These imaging dimensional features are compared to the ones obtained by a sieving procedure of several sand samples collected along the Portuguese coast (river, dune and beach) whose high degree of similarity permits to validate the proposed approach. ADDITIONAL INDEX WORDS: Mathematical Morphology, Pattern Recognition, Morphological Opening

INTRODUCTION
The application of image analysis to the dimensional characterization of unconsolidated particles increased rapidly in the last years. Size is addressed by different means and normally related to a specific application: coarse river gravels by measuring the minor axis of the grains (Graham et al., 2005a, 2005b), moraine constituents by using size and shape (Lebourg et al., 2004), estuarine and marine sediments by mathematical morphology (Franciskovik-Bilinski et al., 2003), series of small samples of crushed quartz sand standards by morphological operators (Pirard et al., 2004), different granulated materials by a combined set of imaging methods (Andrade and Pinto, 2009), rock fragments in mining activities with the watershed transform (Salinas et al., 2005), mineral ore with a combination of several image analysis techniques to better segment the grains (Mukherjee et al., 2009) and the study the influence of shape and volume/mass in the final granulometry (Fernlund et al., 2007). To deal with insitu characterization, Rubin (2004) introduced a method based on a spatial autocorrelation function that estimates the mean grainsize of the samples from bi-dimensional data. This technique is validated for medium-coarse sized sediments (Rubin et al., 2007; Barnard et al., 2007) and fine-medium gravels (Buscombe and Masselink, 2009). In addition, Buscombe (2008) introduced some improvements that permit to replicate not only the mean grain-size but also the complete size distribution curve. This is a powerful technique, but their broad application is complicated due to the sensitive calibration procedure (Pina and Lira, 2009). Although relevant advances were obtained, the dimension of the particles is never assessed with a distinction about their class, that is, composition and size are never provided simultaneously. Thus, the main objective of this paper is to introduce a method that is able to characterize the size of sediments in a more complete way, that is, to compute the global granulometry of the samples from the size distributions of their classified constituents, and additionally to obtain the individual granulometric distribution curve for all the mineralogical classes considered in the study.

DATA SETS AND IMAGE ACQUISITION


Several types of sands were collected and used in this investigation. Their origin is quite distinct since they come from river, dune and beach locations in the Portuguese coast, exhibiting differences in their compositional, dimensional and geometrical features. This diversity permits to better evaluate the robustness of our approach to a larger range of characteristics presented by sands. In particular, seven samples were used: one river sample (A5), one dune sample (Sancha) and five beach samples (PFaro, F260, F263, F271 and F275). Some differences are clearly noticeable in their size and compositional characteristics: finer to coarser grains, in variable contents of quartz, feldspars, heavy minerals, biotite and bioclasts. The image acquisition was performed using a flatbed colour scanner. The particles are disposed facing the scanner glass along their most stable position with their major and intermediate axes parallel to the glass, being also all of them correctly focused due to the acceptable narrow size ranges of the current sand samples. Moreover, in order to avoid the existence of shadows, a black background was placed on the scanner cover. In the preparation of the samples, the grains of the sands were quartered and winnowed over the scanner glass, which was previously protected with a very thin transparency, and placed in such a way that only the contact or low overlapping between grains is permitted to occur. The situation where the overlapping is permitted, like it happens in the field, is addressed in another text (Pina and Lira, 2011). The spatial resolution of the images is 1200 dpi (dots per inch) or approximately 0.021 mm per pixel. This value was chosen according to the aperture of the smallest sieve used in the laboratory with these samples (0.063 mm or 4 in the phi-scale); this way the smallest structure in the images of the corresponding sands can be identified with at least a region of 3x3 pixels. Squared regions of about 100cm2 were acquired in true colour mode (RGB), resulting in digital images with sizes approximately equal to 4750x4750 pixels, each containing around 10,000 grains.

Journal of Coastal Research, Special Issue 64, 2011 1697

Granulometry on classified images of sand grains

METHODOLOGY
Our automated approach follows two main steps, first the recognition or delineation of the contour of each grain, second its classification into a given mineralogical class.

Grain Recognition
The recognition of the grain implies the binarisation and separation of grains touching each other, so that each connected set of the image corresponds to an individualized grain. The binarisation of the sand grains in the images is performed on the intensity image, the grey level image that results from the average of the input Red, Green and Blue channels. It consists on finding the adequate threshold, after filtering and enhancement procedures were performed, to separate the grains from the dark background. The approach followed is based on mathematical morphology operators (Serra, 1982) to filter small artefacts, the Fast Fourier Transform (FFT) (Cooley and Turkey, 1965) to obtain the background and on an automatic thresholding method (Otsu, 1979) to get the binary image of the grains. This sequence, which avoids manual interventions, is constituted by four steps: i) Filtering by erosion-reconstruction to remove small light artefacts on the background; ii) Computation of the direct-FFT (Figure 1b) and filtering of the high frequency regions which corresponds to the central region of the spectrum (Figure 1c); iii) Computation of the inverse-FFT to obtain a filtered background (Figure 1d); iv) Automatic thresholding with Otsu method which minimizes the within-class variance and is defined as a weighted sum of variances of the two classes (background and grains); the output of this method is presented in Figure 1e. In the binary images obtained, the grains that are touching need to be separated. This situation would pose no problem for the direct computation of the granulometry by openings of increasing size, but as it can introduce important bias on the classification of each connected component and on the extraction of the respective features, we need to separate those adjacent grains. Thus, a three-step algorithm based on the notion of distance function and the watershed transform (Vincent and Soille, 1991) is used to separate these grains: i) Computation of the distance function on the binary image of the grains (Figure 2a); the resulting image indicates the distance that each pixel of the grain is from the border, the higher this value is, the higher the grey level becomes in the image (Figure 2b). ii) Suppression of low significance maxima by an opening: it removes those image extrema that have only a local importance, normally introduced by some small irregularities of the contour of the grains, preventing this way the separation of the same grain into disjoint parts; each remaining maximum should ideally mark one and only one sand grain. iii) Computation of the watershed on the negative of the opened image (each grain is now marked by each minimum)(Figure 2c): the resulting separation or watershed lines correspond to the border between the influence zone of each minimum (grain); thus, the removal of these dividing lines on the initial binary image permits to separate adjacent grains (Figure 2d). The results obtained in the segmentation, binarisation and separation, of the grains for all the studied images are highly

Figure 2. Grain individualization sequence: (a) Grains touching each other; (b) Distance function; (c) Watershed and (d) Grains separated. satisfactory, since about 99% of the grains touching each other are correctly separated.

Grain Classification
The automated classification of each grain into one pre-defined mineralogical class is the objective of this phase. The mineralogical classes chosen for this step are the main occurrences in the samples: quartz, feldspars, heavy minerals, biotite and bioclasts. Although sand samples are constituted by other mineralogical classes, we have opted to set these wider and more inclusive mineralogical classes because they are representative of the density differences and this discrimination was enough for our objective. Nevertheless, a more exhaustive approach can be used to complement these images, for instance with microscopic recognition, but this issue is beyond the scope of this study. A supervised approach, where a training stage is previously performed to obtain representative spectral features of each class on the initial color images (RGB), was followed to classify each pixel of the image into one of 6 possibilities: the 5 mineralogical classes and also the black background of the image. In addition, since the samples are constituted by mono-phase grains and their contour is available, we can assign a unique label to all classified pixels within the same connected component; this label will correspond to the most frequent class within the grain. Due to the great homogeneity of the surface of each grain in the samples under study, we decided to test standard classifiers. We confirmed this assumption by testing first one of the most common classifiers, minimum distance, which achieved good results on the seven samples under study, and then the maximum likelihood method which performed even better. A classification example is presented in a detail of the sample F260: first, the classification of each pixel of the image is performed (Figure 3a), then the assignment to the label of the most frequent class within each grain (Figure 3b), similarly to what was done for granites (Pina and Barata, 2003) and marbles (Benavente and Pina, 2009); misclassifications correspond to impurities or shades on the surfaces of the grains.

Journal of Coastal Research, Special Issue 64, 2011 1698

Lira and Pina

Figure 3. Detail of the classification procedure: (a) Pixel classification; (b) Assignment of the same label within each grain to the most frequent class. We evaluated the performance of the maximum likelihood classifier, by comparing the classified images with ground-truth manually constructed by an expert. This is done through the respective confusion matrices and an overall measure of the quality of the classification, the kappa index (k) (Landis and Koch, 1977). It incorporates all the information of the classification (the correct one and also the commission and omission errors), assumes values between -1 and 1 (the higher and closer to 1, the better the classification is). The values of k obtained are between 0.84 and 0.95, indicating high performances. In what concerns the composition, these beach samples are mainly constituted by quartz (around 90%) with small variations on the content of the other constituents. The river sample (A5) is the only one containing biotite and no bioclasts. On the contrary, the other 6 samples do not contain biotite, but all contain bioclasts. The dune sample (Sancha) has a higher grade of feldspars that all other samples. The constituents of each sample and the respective grades are presented in Figure 4. Figure 4. Mineralogical composition of the samples. opening correspond to the particles that are retained by each sieve), permits to obtain a size distribution, G(), cumulative function in measure (area), which is defined by the proportion of points x of X, that were eliminated by applying openings of size :
G ( ) = Area( X ) Area( B ( X )) Area( X )

(2)

GRAIN SIZE COMPUTATION


Sand particles tend to locate themselves with their major and intermediate axis parallel to the plane of the scanner glass. In the sieving method, the axis that controls the passages of the particles through the sieve apertures is the intermediate axis. Thus, the particle orientation against the scanner glass permits image analysis to analyse the same fundamental axis. This analysis is done by the application of a set of morphological openings () with a structuring element (B) of increasing size () that are capable of simulating the same processes of the sieves (Matheron, 1975). The morphological opening is defined as erosion () followed by dilation ():
( X ) = B B ( X )

(1)

Particles are progressively eliminated by increasing the size of the structuring element used and their surface is reduced as in the sieving procedure whereas the size of the sieve is reduced. In this case, the initial binary image X of the grains is probed by a squared structuring element B of size that eliminates the regions of the grains that do not contain it completely. Increasing the size of the structuring element B and measuring the area of the remaining grains after the application of each openingreconstruction (the regions of the image that are retained at each

In order to compare the granulometries obtained by imaging and sieving techniques, some additional calculations must be performed. In fact, the sieving technique measures the weight of the grains retained in each sieve while image analysis measures the area of the grains that resisted to each opening transform. Next, the measured areas in the digital images are transformed into weight. We simplified this procedure by assuming that all particles are spheres (except the micas, where a minimum height is considered) and that they have the same average density in the different samples. The granulometry by openings of increasing size is computed on the respective binary images of the mineralogical classes obtained for each sample: first we transform them into volume and then into weight. An example of each of those curves for a beach sample (F260) is presented in Figure 5, where the cumulative size distributions (experimental points for the phi-scale) for quartz (qz), feldspars (fp) and bioclasts (bio) are almost identical with average grains sizes of 0.97 , 093 and 0.92 , respectively, while the heavy minerals (hm) present a somehow distinct curve with finer particles (average value equal to 1.40 ). The construction of a global curve in weight GW() for each sample is now performed taking into account an average density for each type of grain (approximated to a sphere, except the micas (mic) where their tabular habit is assumed) according to:
GW ( ) = aVqz ( ) + bV fp ( ) + cVhm ( ) + dVmic ( ) + eVbio ( ) Vtotal

(3)

where a=2.65, b=2.79, c=2.90, d=2.72, e=2.76 correspond to the average densities of the material in each class.

Journal of Coastal Research, Special Issue 64, 2011 1699

Granulometry on classified images of sand grains

Figure 5. Individual granulometries of sample F271. Nevertheless, the verification of some specifications related to the preparation of the samples and their internal variability was tested beforehand. First, we tested the disposition of the sand grains during the image acquisition procedure could influence their size distributions, the same exact sample was differently placed several times over the scanner glass and their digitalization and segmentation computed with the above mentioned sequence. Since the granulometric curves obtained at each turn, for five experiments, are highly similar (see the plot for sample F271 in top of Figure 6 we may be secure that the different placements of the grains on the horizontal surface are robust and do not have influence on the measurements. In addition, a similar procedure to test the consistency of the sampling was effectuated: five different sub-samples were taken from the same large sample whose granulometries were again almost identical (see the curves in bottom Figure 6 for sample F271); a very small deviation between the sub-samples can be seen, but we suggest that it is due to the intrinsic natural variability of the sedimentary material, and this way not distinct enough to invalidate the sampling performed. After those verifications, we proceeded to obtain the global granulometries of the samples under study. A good overall result of the curves that we have obtained is plotted in Figure 7 for sample F260 and the average diameter (D50) and the quadratic error measuring the deviation between the curves, both for imaging and sieving techniques are presented in Table 1. The curves obtained by image analysis have, for the same range, a maximum of 53 experimental points, whereas the ones by sieving to -2 , correspond to 13 experimental points (sieves from 4 with an interval of 0.5 ); this difference on the number of experimental points, explains the smoother aspect of image analysis curves when compared to the broken into segments characteristic of the sieving curves. The shape of all size distributions obtained through the two techniques presents a very similar global behaviour. There is some small discrepancy between the curves of the two used techniques (Figure 7), which we think is due to the simplification introduced to compute the volume of each detected grain by image analysis; in some particles the real volume may not be correctly approximated to a sphere and the density of some particles, namely the bioclasts, may present larger deviation from the average value considered, which is naturally less negligible when its content or grade in the sample is higher. Moreover, most of the bioclasts are shell fragments and when these fragments are larger, they tend to exhibit a more planar than spherical shape; as this happens the particle volume is overestimated and the whole curve shifts towards the larger grain size values. Despite these small differences, the quadratic error is always inferior to 0.2 and in

Figure 6. Granulometries of different: (top) Dispositions of the exact same sample F271; (bottom) Sub-samples extracted from the same beach location (large F271 sample).

Figure 7. Global granulometric curve by image analysis (dashed line) and by sieving (solid line). most images even very close to 0, reinforcing the robustness and validity of the approach presented in this paper. Additionally this approach presents another rather interesting feature: the possibility of the computation of granulometries by mineralogical class. In Figure 8 we present an example of the application of this feature to sample F275, where we can observe the size distributions of the four mineralogical classes presented in this type of sand. Also it is visible the asymmetry in the bioclasts class versus the smoothness of quartz class curve. The resemblance in shape of both feldspars and heavy minerals, although this last one presents smaller grains, is also striking.

CONCLUSIONS
We have presented a method that computes the global size distributions of sedimentary samples on digital images from the individual curves of the constituents of the samples, which, are previously recognized and classified by automated means. The results obtained with this approach were validated by the high similarity with the size distributions given by a sieving procedure.

Journal of Coastal Research, Special Issue 64, 2011 1700

Lira and Pina

Figure 8. Granulometric curves by image analysis for the four mineralogical classes presented on sample F275. Table 1: Comparison of average diameters (D50) and quadratic errors. D50 Sample Quadratic Reference error Im. An. Sieving A5 0.18 0.28 0.01 Sancha 1.42 0.99 0.18 PFaro 0.31 0.29 0.00 F260 0.92 0.97 0.00 F263 1.08 1.19 0.01 F271 1.40 1.14 0.07 F275 0.37 0.81 0.19 This allows disposing of the global granulometric curve of the sample, as well as of the size distributions of each of its constituents. Additional features of the grains can also be obtained for the complete sample and for each of its constituent classes. Future work will also involve the incorporation of shape features (Lira and Pina, 2007, 2009) into the computation of the granulometry in order to use the shape information to correct the bias introduced by some classes (micas and bioclasts).

REFERENCES
ANDRADE M.C. and PINTO L.C.M., 2009. Interactive characterization of granulated materials. Computers & Geosciences, 35(10), 1968-1974. BARNARD P.L., RUBIN D.M., HARNEY J. and MUSTAIN N., 2007. Field test comparison of an autocorrelation technique for determining grain size using a digital beachball camera versus traditional methods. Sedimentary Geology, 201(1-2), 180195. BENAVENTE N. and PINA P., 2009. Morphological segmentation and classification of marble textures at macroscopical scale Computers & Geosciences, 35(6), 1194-1204. BUSCOMBE D., 2008. Estimation of grain-size distributions and associated parameters from digital images of sediment. Sedimentary Geology, 210, 110. BUSCOMBE D. and MASSELINK G., 2009. Grain-size information from the statistical properties of digital images of sediment. Sedimentology, 56(2), 421-438. COOLEY J.W. and TUKEY J.W., 1965. An algorithm for machine calculation of complex Fourier series. Mathematics of Computation, 19(90), 297-301. FERNLUND J.M.R., ZIMMERMAN R.W. and KRAGIC D., 2007. Influence of volume/mass on grain-size curves and conversion of image-analysis size to sieve size. Engineering Geology, 90(3-4), 124-137.

FRANCISKOVIC-BILINSKIA S., BILINSKI H., VDOVIC N., BALAGURUNATHAN Y. and DOUGHERTY E.R., 2003. Application of image-based granulometry to siliceous and calcareous estuarine and marine sediments. Estuarine, Coastal and Shelf Science, 58, 227239. GRAHAM D.J., REID I. and RICE S.P., 2005a. Automated sizing of coarse-grained sediments: Image processing procedures. Mathematical Geology, 37(1), 1-28. GRAHAM D.J., RICE S.P. and REID I., 2005b. A transferable method for the automated grain sizing of river gravels. Water Resources Research, 41, W07020. LANDIS J.R. and KOCH G.G., 1977. The measurement of observer agreement for categorical data. Biometrics, 33, 159-174. LIRA C., and PINA P., 2007. Sedimentological analysis of sands. In: Marti J., Benedi J.M., Serrat J. and Mendona A.M. (eds), Pattern Recognition and Image Analysis, LNCS series, 4478, 388-395. Springer, Berlin. LIRA C., PINA P., 2009. Automated grain shape measurements applied to beach sands. Journal of Coastal Research, Sp.Iss. 56(2), 1527-1531. MATHERON G., 1975. Random Sets and Integral Geometry. New York: Wiley. MUKHERJEE D.P., POTAPOVICH Y., LEVNER I. and ZHANG H., 2009. Ore image segmentation by learning image and shape features. Pattern Recognition Letters, 30(6), 615622, OTSU N., 1979. Threshold selection method from gray-level histograms. IEEE Transactions on Systems Man and Cybernetics, 9(1), 62-66. PINA P. and BARATA T., 2003. Petrographic classification at the macroscopic scale using a mathematical morphology based methodology. Lecture Notes in Computer Science, 2652, 758765. PINA P. and LIRA C., 2009. Sediment image analysis as a method to obtain rapid size measurements. Journal of Coastal Research, Sp.Iss. 56(2), 1562-1566. PINA P., LIRA C. and LOUSADA M. 2011. In-situ computation of granulometries of sedimentary grains - some preliminary results. Journal of Coastal Research, Sp.Iss. 64. PIRARD E., VERGARA N. and CHAPEAU V., 2004. Direct estimation of sieve size distributions from 2-D image analysis of sand particles. Proceedings of PARTEC2004 - International Congress for Particle Technology (Nuremberg, Germany), 4 pp (CD-ROM). RUBIN D.M., 2004. A simple autocorrelation algorithm for determining grain size from digital images of sediment. Journal of Sedimentary Research, 74(1), 160165. RUBIN D.M., CHEZAR H., HARNEY J.N., TOPPING D.J., MELIS T.S. and SHERWOOD C.R., 2007. Underwater microscope for measuring spatial and temporal changes in bed-sediment grain size. Sedimentary Geology, 202, 402408. SALINAS R.A., RAFF U. and FARFAN C. (2005) Automated estimation of rock fragment distributions using computer vision and its application in mining. IEE Proceedings-Vision, Image & Signal Processing, 152(1), 1-8. SERRA J., 1982. Image analysis and mathematical morphology. London: Academic Press, 600 p. VINCENT L. and SOILLE P., 1991. Watersheds in digital spaces: An efficient algorithm based on immersion simulations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 13(6), 583598.

Journal of Coastal Research, Special Issue 64, 2011 1701

You might also like