1 Introduction

Granular materials are involved in many geophysical phenomena, such as avalanches or debris flows, and also in several industrial applications, where powders are handled in chutes and silos. Despite the growing interest on these flows, the complete comprehension of their dynamics is still an open problem, because of the existence of several flow regimes that hardly can be described by a unified constitutive law [1]. In the last decades, several efforts have been made, both experimentally and theoretically, for better understanding granular flows and for modelling their motion by numerical tools [2, 3, 4, 5, 6, e.g.]. The lack of knowledge on constitutive laws for this kind of flows is partly due to an undeniable difficulty in obtaining reliable measurements of the main physical quantities, such as flow velocities, stresses and volume fraction, even in a controlled laboratory environment. Several non-invasive optical methods for measuring the flow velocity, employing particle tracking velocimetry (PTV) or particle image velocimetry (PIV) techniques, have been recently developed and applied to granular flows with a good level of reliability [7, 8, 9, 10, 11, 12, 13, e.g.].

Beside the flow velocity, also the volume fraction, which is the ratio between the volume of granular material and the total volume of the mixture, represents a crucial quantity to be investigated. In fact, the rheological behaviour of the granular material is strongly influenced by this quantity and there is experimental evidence showing that the volume fraction is highly interlinked with the flow regime [14, e.g.]. In the last decades few methods have been proposed for the measurement of the volume fraction. Drake [15] estimated the volume fraction of a two-dimensional dry granular flow, by manually counting the particles passing a line, normal to the bed, in unit time. Ahn et al. [16] employed fibre-optic probes to detect the characteristic particle spacing of a free surface dry granular flow and used it to estimate the volume fraction through a simple conversion formula. Mueth et al. [17] used magnetic resonance and X-rays for obtaining the volume fraction distributions of a shear flow in a three-dimensional Couette geometry. Capart et al. [7] proposed some estimators, obtained from the Voronoï tessellation, to reconstruct the near-wall volume fraction profiles. Such estimators are easy to be employed, though they are found not to be very sensitive and exhibit large scatter. An evolution of the previous approach, using two cameras placed in a stereoscopic arrangement, was proposed by Spinewine et al. [18] and successfully employed by Armanini et al. [1921]. More recently, Spinewine et al. [22] introduced a different technique, based on the measurement of the mean penetration distance of a laser stripe. This statistically-based approach, not requiring any preliminary calibration, is very promising. Yet, it is found to be very sensitive to the accuracy in measuring the laser penetration distance. Some different approaches based on luminance measurements [23, 24, e.g.] typically require a very careful control of the illumination and a proper calibration. As the granular material is opaque, all the aforementioned optical methods are only capable of measuring the volume fraction in a near neighbourhood of a boundary surface of the flowing domain. In channelized flows such measurements are usually performed through a transparent wall and, thus, are referred to as near-wall volume fraction estimations. Recently, Sheng et al. [25] developed an indirect method to obtain the averaged volume fraction inside the entire cross section, employing PIV measurements together with a load cell at the chute outlet for measuring the mass flow rate.

In this work, our first objective was to investigate the brightness patterns under controlled illumination conditions, to find a reliable and cost-effective way of estimating the near-wall volume fraction in granular flows. Several random distributions of mono-disperse virtual spheres were generated through a specifically designed numerical code, based on the Monte Carlo (MC) method [26, e.g.] and were, consequently, analysed under the assumption that the illumination comes from a particular angle of incidence. The main finding of this study is that there is an exponential law stochastically relating the near-wall volume fraction to a measurable quantity. This quantity, hereafter referred to as two-dimensional volume fraction, is the ratio between the area of visible and illuminated surface elements, belonging to the spheres, projected on the transparent wall, and the total area of the wall. The parameters of this relationship are found to depend only on the angle of incidence of light. Subsequently, we define a binarization algorithm, requiring the calibration of only one threshold parameter, for estimating the two-dimensional volume fraction from gray-scale images in a real experimental setup. Then, we successfully validated the proposed approach through several laboratory experiments on spheroidal beads, made of white acetal resin and immersed in different ambient fluids.

The paper is composed of the following parts. A description of the numerical investigation through MC generations is reported in Sect. 2. Section 3 is devoted to describe the experimental set-up and the binarization algorithm. The experimental validation of the proposed method is reported in Sect. 4. The main results are summarized in Sect. 5.

2 Numerical investigations through Monte Carlo (MC) generations

Our aim is here to assess whether the information optically available from a transparent wall, bounding a granular dispersion, can be fruitfully exploited for developing methods, able to estimate the near-wall volume fraction. We firstly investigated the problem numerically under simplifying assumptions about the geometry of the dispersion and the light conditions.

The numerical investigation involved several MC generations where perfectly spherical particles of constant diameter, d, were uniformly randomly loaded into a cube with side length 10d. The only constraints were that all spheres were entirely contained in the cube and any particle overlapping was avoided. The front face of the box, hereafter referred to as \(\Delta ,\) is assumed to be transparent. Different averaged volume fractions, \(c_{3D} \), can be obtained by simply varying the number of spheres loaded into the box. In total 1650 dispersions were generated in the box, covering a range of \(c_{3D} \in \left[ {0, 0.5} \right] \). Different from more efficient physically-based algorithms [27, e.g.], with the present numerical code it was not possible to obtain generations with \(c_{3D} >0.5\) in a reasonable computation time. Nonetheless, as it will be shown in Sect. 4, the numerical findings, here obtained, are reasonably valid also when extrapolated to values of \(c_{3D} >0.5\). To reduce the confining effects of the box boundaries, that would produce lower values of \(c_{3D} \), the volume, in which \(c_{3D} \) is effectively calculated, was cropped from the box, by cutting bands spanning 2d from the non-transparent boundary surfaces. On the contrary, since we are interested in measuring the near-wall volume fraction in the neighbourhood of the transparent surface, the cropped domain is set to be exactly bounded by the front surface, \(\Delta \). A picture of a MC generation with the cropped domain is reported in Fig. 1.

Fig. 1
figure 1

Monte Carlo generation where 600 spheres are loaded into the virtual box. The green shaded volume represents the cropped volume, effectively used for calculating \(c_{3D}\) (colour figure online)

A virtual camera is assumed to be placed normally in front of the virtual box and a virtual source of light is assumed to form a given angle of incidence with the normal to \(\Delta \). Once the spheres distributions are generated, the two-dimensional volume fraction, \(c_{2D} \), is determined by the ratio between the overall area of projections onto \(\Delta \) of all visible and lightened surface elements, belonging to the spheres, and the total area of \(\Delta \). Any given infinitesimal surface element, \(d\Sigma \), belonging to a given sphere, is projected onto \(\Delta \) and it is visible in the image plane if there are no occlusions by other surfaces belonging to other spheres. Its projection contributes to the calculation of \(c_{2D} \), if and only if \(d\Sigma \) is directly illuminated by the light rays and, at the same time, \(d\Sigma \) is visible from the transparent wall. Conversely, if any of these two optical conditions is not fulfilled, \(d\Sigma \) do not provide any contribution to \(c_{2D} \). The existence of a non-null angle between the viewing direction and the lighting direction is of crucial importance in this approach, since it works similarly to a triangulation method [28, e.g.]. Analogously to what done for calculating the volume fraction, \(c_{3D} \), only the cropped area of \(\Delta \), obtained by cutting-off bands 2d-wide from the boundaries, was considered for calculating \(c_{2D} \). The following simplifying assumptions were made:

  • the position of the camera is assumed to be sufficiently far from \(\Delta \), so that perspective changes in apparent size of the spheres are negligible; it amounts that the viewing direction is everywhere normal to \(\Delta \) and, thus, the projections of \(d\Sigma \) are of axonometric type;

  • the light rays are assumed to be perfectly parallel each other; thus, the only parameter for characterizing the illumination conditions is the angle of incidence of light, \(\zeta \), i.e. the angle between the light rays and the normal to \(\Delta \).

A sketch of the virtual box (\(x{-}y\) view) together with the viewing and lighting angles is reported in Fig. 2.

Fig. 2
figure 2

Sketch of the geometric set-up employed for calculating \(c_{2D} \)

As an example, a MC generation of 600 spheres and the related projections on \(\Delta \) of illuminated and visible surface elements (shown in white) are reported in Fig. 3, where \(c_{2D} \) can be simply calculated as the ratio between the area of the white zones and the total area of the crop (in green). The binarized image in Fig. 3b has been numerically obtained by discretizing the surfaces of spheres and by identifying the surface elements that are visible and directly illuminated. Comparing Fig. 3a, b yields that, owing to the definition of \(c_{2D} \), there are some black regions, corresponding to surface elements, which, though visible, are not directly illuminated.

Fig. 3
figure 3

a MC generation (600 spheres) viewed from the normal viewing angle; b projection on \(\Delta \) of illuminated and visible surface elements (\(\zeta =25.0^{\circ })\)

Several values of \(\zeta \) were numerically investigated by using the dataset of MC generations. We found that the best function to describe the stochastic relationship between \(c_{2D} \) and \(c_{3D} \) is of the following exponential type

$$\begin{aligned} c_{3D} =a\left( \zeta \right) \exp \left( {b\left( \zeta \right) c_{2D} } \right) , \end{aligned}$$
(1)

where the coefficients a and b are found to only depend on \(\zeta \). It is worth mentioning that in general such coefficients are expected to depend also on the geometrical properties of the investigated granular material (e.g. the shape of grains and the grain size distribution), which were kept constant in our study involving mono-disperse spheres distributions. A first preliminary curve fitting is performed by optimizing both parameters (a and b) of Eq. (1) for different values of \(\zeta \). The optimal values of such parameters are reported in Table 1 (columns 2–4) together with the coefficient of determination, \(R^{2}\).

Table 1 Parameter fitting of Eq. (1)

We found an excellent agreement for almost all \(\zeta \) (\(10^{\circ }\le \zeta \le 60^{\circ })\), where \(R^{2}\) reaches its maximum (ca. 0.98) at \(\zeta \approx 15^{\circ }\). For \(\zeta <10^{\circ }\) we observed some saturation of \(c_{2D} \) at high volume fractions, causing an unrealistically high optimal value for b and systematic underestimations of \(c_{3D} \) in the lower tail. Such a behaviour is due to the fact that, as \(\zeta \rightarrow 0^{\circ }\), the viewing and lighting directions tend to coincide and, thus, the method tends to be much less sensitive, as \(c_{2D} \) is merely calculated by projecting all the visible surface elements on the front surface. For \(\zeta >60^{\circ }\) we observed that the exponential model, Eq. (1), tends to overestimate \(c_{3D} \) in the lower region and the scatter of numerical data increases.

It is interesting that the parameter b weakly depends on \(\zeta \), and a distinctly increases with \(\zeta \). This finding suggests a more parsimonious model with a constant value for b independent of \(\zeta \). Based on the previous analysis, we set \(b=5.5\). This parsimonious model provides excellent agreement in the range \(10^{\circ }\le \zeta \le 60^{\circ }\), of which the results are summarized in the right columns of Table 1. Moreover, it is also found that \(a\left( \zeta \right) \) can be well described by a linear function of \(1/{\cos \left( \zeta \right) }\). This finding has a clear physical meaning, since the length of the path to be travelled without interference by a light ray for illuminating any given surface element is proportional to \(1/{\cos \zeta }\). For the sake of a handy application, we use the one-parameter parsimonious model in the subsequent experimental validation.

The standard deviations, \(\sigma _{c_{2D} } \), of \(c_{2D} \) lie between 0.02 and 0.03 and slightly decrease with \(c_{3D} \). The exponential relationships between \(c_{2D} \) and \(c_{3D} \) for a representative sample of angles of incidence, \(\zeta \in \left\{ 5.0^{\circ },15.0^{\circ }, 30.4^{\circ }, 46.9^{\circ },60.0^{\circ },\right. \left. 70.0^{\circ } \right\} \), are reported in Fig. 4. The exponential functions fit data very well for intermediate values of \(\zeta \). Differently, for \(\zeta =5.0^{\circ }\) and \(\zeta =70.0^{\circ }\) (Fig. 4a, f) a conditional bias is evident in the lower tail of the curve. This bias also affects the standard deviation \(\sigma _{c_{2D} } \), shown in Fig. 4, since it is calculated with respect to the fitting function. Moreover, Fig. 4 shows that, when \(\zeta \) increases, the sensitivity on \(c_{2D} \) decreases and the data scatter slightly increases. Thus, to minimize the uncertainties, it is generally advisable to choose a reasonably small incident angle (e.g. \(10^{\circ }<\zeta <40^{\circ })\) for laboratory applications.

Fig. 4
figure 4

Exponential relationship between \(c_{2D} \) and \(c_{3D} \) obtained by MC data. a \(\zeta =5.0^{\circ }\) (parameters of the model: \(a = 0.00043\), \(b = 7.416\)), b \(\zeta =15.0^{\circ }\) (\(a = 0.00421\), \(b = 5.5\)), c \(\zeta =30.4^{\circ }\) (\(a = 0.00789\), \(b = 5.5\)), d \(\zeta =46.9^{\circ }\) (\(a = 0.01596\), \(b = 5.5\)), e \(\zeta =60.0^{\circ }\) (\(a = 0.03155\), \(b = 5.5\)), f \(\zeta =70.0^{\circ }\) (\(a = 0.04799\), \(b = 6.006\))

Though these numerical findings are obtained by mono-disperse systems of perfect spheres, in Sect. 4 it will be shown that they are applicable also to real cases of slightly disperse beads. A further extension of the present approach would be feasible also for strongly poly-disperse distributions, provided that stochastic functions \(c_{3D} =f\left( {c_{2D} } \right) \) are available through new ad hoc simulations. To this regard, it should be kept in mind that MC simulations cannot reproduce some dynamical effects of poly-disperse granular flows (e.g. size segregation and Brazil nut effect). Thus, to obtain realistic relationships \(c_{3D} =f\left( {c_{2D} } \right) \), in this case dynamical numerical simulations might be required.

3 Experimental set-up and binarization

3.1 Experimental set-up

We carried out an experimental campaign with random distributions of plastic particles under controlled light conditions. The employed granular material is composed of white spheroidal beads, made of acetal copolymer (POM), whose properties are listed in Table 2. The average particle diameter, d, is 3.3 mm, while the internal angle of friction is found to be around \(27^{\circ }\) [29]. The particle diameter is slightly disperse with a relative standard deviation of 5 %. This deviation was measured by using the free software ImageJ [30], through optical granulometry techniques based on image binarization [31, e.g.]. Also the deviation of the grain shape from the perfect sphericity was optically estimated by using a 2D indicator of sphericity [31], defined as \(S_g =4\pi A/{P^{2}}\) with A and P being the area and the perimeter of the particle image silhouette, respectively. We found an average \(\overline{S_g } =0.92\) with a relative standard deviation of 3 %. The granular material was loaded into a plastic container with a volume of \(1.6\,\hbox {dm}^{3}\) and a front transparent surface of size \(12\,\hbox {cm} \times 10\,\hbox {cm}\).

Table 2 Properties of the granular material
Table 3 List of experiments on POM granular material with different ambient fluids and different angles of incidence of light

The experiments are divided into two series and the applied conditions are listed in Table 3. The first series of experiments was performed by using a dense viscous ambient fluid, consisting of a sucrose-water solution (61.5 % in weight). With reference to the standard temperature of \(20\,^{\circ }\hbox {C}\), the high density of this solution (\({\approx }1300\,\hbox {kg/m}^{3})\) and its high viscosity (\({\approx }76\,\hbox {mPa s})\) guarantee very small sedimentation rates for the employed granular material and, hence, allowed for obtaining almost random distributions of grains by simply shaking the box by hand. Since the densities of the grain and the ambient fluid are known, one can easily calculate the averaged volume fraction, \(c_{3D} \). In each experiment, seven different volume fractions, ranging from 0.05 to 0.625, were repeatedly investigated by producing 50 distinct random distributions through shaking the container. As it is also interesting to apply the proposed approach to dry granular flows, the second series was carried out by using air as ambient fluid. The only volume fraction that could be observed was \(c_{3D} =0.625\), corresponding to the volume fraction at deposit. In this series, the measurements were also repeated 50 times.

The granular mass was photographed by a high-speed digital camera (mod. AOS S-PRI), placed on a tripod normally to the front surface of the box at a distance of 40 cm. All digital images cover an area of around \(18\times 14\,\hbox {cm}^{2}\) with a spatial resolution of \(900\times 700\) pixels. The lens aperture was set equal to f / 4 to guarantee a sufficiently wide depth of field and the shutter time was set equal to \(50\mu \hbox {s}\). The only active lighting system consists of a high-brightness planar LED lamp (7700 lumen, mod. MultiLED-LT by Photo-Sonics Corp.), placed at a distance of 32 cm from the front surface. For this combination of lens aperture and shutter time, we carefully verified that the effects due to the ambient light conditions are irrelevant with respect to the photographic exposure. The lamp is mounted on a tripod, equipped with a geared head (mod. Manfrotto Junior 410) allowing fine adjustments of both azimuth and tilt angles. The azimuth angle is defined as the angle between the normal to \(\Delta \) and the projection on the horizontal plane of the normal to the plane of the lamp. The tilt angle is defined as the inclination of the lamp with respect to the vertical. The lamp is placed so as to be centred with respect to the centre of the front surface of the box. Its tilt angle is verified by a digital level with an accuracy of \(0.1^{\circ }\). Thanks to the geared head and a careful placement of the tripod, we could set any position of the lamp with a typical error of order of 1 mm. Azimuth angles smaller than \(25^{\circ }\) could not be tested, because of interference with the tripod of the camera. As regards the first series of experiments, the effective angle of incidence, \(\zeta _{effective} \), inside the domain is calculated according to the refractive index, \(n_{fluid} \), of the water-sucrose solution, which is around 1.445 at \(20\,^{\circ }\hbox {C}\) [32, e.g.]. In order to study the sensitivity of the measurements to misalignments of the lamp with respect to the region of interest, Exp. P3 was repeated into Exp. P3-offset, by placing the lamp so as to point 5 cm below the centre of the area of interest. Moreover, to investigate the effects of non-transparency of the ambient fluid, Exp. P2 was repeated into Exp. P2-E131, by employing a darker water-sucrose solution with the addition of the colorant E131.

For a unique condition in comparison with the numerical investigation of Sect. 2, the main analyses were initially limited to a central squared sub-domain of the captured images, spanning 6d. Subsequently, a sensitivity analysis on the size of such a region of interest (ROI) was also performed. A picture of the box together with the cropped ROI is reported in Fig. 5.

Fig. 5
figure 5

Image of a random distribution of plastic grain particles immersed in water-sucrose solution (\(c_{3D} =0.35)\) together with the cropped ROI of \(6d\times 6d\)

3.2 Binarization algorithm

A direct applicability to real cases of the numerical results reported in Sect. 2 could only be possible after defining an algorithm for converting the grey-scale pictures into binary images, so as to get a proper estimation of \(c_{2D} \). This is not a trivial task. The grey patterns in the image are influenced by direct and diffuse reflections, depending on the optical properties of the granular material and also on the properties of the ambient fluid and of the transparent wall. Some optical algorithms available in the literature, exploiting brightness information, suggest using a constant global threshold for discriminating foreground illuminated elements from background [24, e.g.]. Yet, to take into account possible uneven light conditions over the region of interest, a more robust algorithm should be local, i.e. it should depend only on the brightness values of a neighbourhood of each pixel.

Here, we propose a simple binarization algorithm, based on a local normalization. Since the actual radiance measured by the camera sensor is generally not linearly proportional to the brightness value recorded in the output file, we choose to recover this information firstly. Typically, the output brightness values, O, saved in the output file and the radiated energy, E, absorbed by the camera sensor are related by a power-law function, called gamma-encoding, \(O=k E^{\gamma }\), with \(0<\gamma <1\) [33, e.g.]. We experimentally estimated the conversion function of our camera by shooting different pictures of a matte gray card with different shutter times covering the whole dynamic range of the sensor, under constant lighting conditions. We found that the best fitting between the shutter time, \(t_S \), which is proportional to E, and the output brightness, O, is obtained by using \(\gamma =0.62\). Thus, all the values in the image files were preliminary converted through the transformation, \(O^{\prime }=O^{1/\gamma }\). To get binary images, the following simple local normalization formula is proposed

$$\begin{aligned} O_{binary} =\left( {\frac{O^{\prime }_{i,j} -O^{\prime }_{\min ,N\left( {i,j} \right) } }{O^{\prime }_{\max ,N\left( {i,j} \right) } -O^{\prime }_{\min ,N\left( {i,j} \right) } }>s} \right) , \end{aligned}$$
(2)

where \(O^{\prime }_{i,j} \) is the brightness value of the generic pixel (ij), \(O^{\prime }_{\min ,N\left( {i,j} \right) } \) and \(O^{\prime }_{\max ,N\left( {i,j} \right) } \) represent the minimum and maximum brightness values in a properly chosen neighbourhood N of (ij), s is a threshold to be experimentally calibrated. Obviously, N(ij) has to be sufficiently large to contain both illuminated and non-illuminated surface elements. We found that the minimum span of N(ij) to fulfil this requirement is around 1.5d, while a slightly larger N(ij) is able to yield more robust results at the cost of a decreased spatial resolution. In all the present calculations, a circular neighbourhood with a diameter of 2d was chosen for N(ij). In the experiments of the second series, where the ambient fluid is air, there were some occasional glares randomly arising across the image, inducing unexpected overshoots of \(O^{\prime }_{\max ,N\left( {i,j} \right) } \). To overcome these issues, Eq. (2) was modified by

$$\begin{aligned} O_{binary} =\left( {\frac{O_{i,j}^{\prime } -O^{\prime }_{\min ,N\left( {i,j} \right) }{\prime } }{O^{\prime \prime }_{\max ,N\left( {i,j} \right) } -O_{\min ,N\left( {i,j} \right) }{\prime } }>s} \right) , \end{aligned}$$
(3)

where \(O^{\prime \prime }_{\max ,N\left( {i,j} \right) } \) represents the local maximum of the smoothed image \(O^{\prime \prime }=O^{\prime }_{mean, N^{\prime }\left( {i,j} \right) } \), obtained by applying a mean filter with the neighbourhood, \(N^{\prime }(i,j)\), on the original image \(O^{\prime }\). Too wide neighbourhood for the mean filter causes too much loss of detail. We found that the best result is obtained by simply using a rectangular neighbourhood of size \(3\times 3\) pixels. Equation (3) is employed for all the calculations of \(c_{2D} \), reported in the present work. Once the binary image, \(O_{binary} \) is available, the two-dimensional volume fraction \(c_{2D} \) over the cropped image can be straightforwardly calculated by

$$\begin{aligned} c_{2D} =\frac{\sum _N {O_{binary} } }{N}, \end{aligned}$$
(4)

where N is the total number of elements of the binary matrix \(O_{binary} \). Some explanatory results of the binarization algorithm are reported in Fig. 6, where for better illustrating the properties of the algorithm, a ROI spanning 12d is employed and foreground illuminated pixels are coloured black on a white background. As clearly appears in Fig. 6, the binarization algorithm is able to distinguish illuminated elements in a reasonable fashion, which is also congruent with a naked eye observation. Analogously to what deduced from the mathematical model, the increase of the incident angle, \(\zeta \), reduces the value of \(c_{2D} \).

Fig. 6
figure 6

Images before and after binarization at different angles of incidence of light (\(c_{3D} =0.35\), ROI \(12d\times 12d\), \(s=0.55\)). a Exp. P1 (\(\zeta _{eff} =17.0^{\circ })\), b Exp. P2 (\(\zeta _{eff} =22.3^{\circ })\); c Exp. P3 (\(\zeta _{eff} =28.1^{\circ })\); d Exp. P4 (\(\zeta _{eff} =30.4^{\circ })\)

4 Experimental validation

4.1 Experiments in sucrose-water solution

The two-dimensional volume fraction, \(c_{2D} \), is calculated by employing the aforementioned binarization algorithm. Since \(c_{3D} \) was independently measured, the experimental relationship between \(c_{2D} \) and \(c_{3D} \) could be directly obtained and compared with the curves by MC generations with the same effective angles of incidence. The threshold parameter of the binarization algorithm, s, is optimized for the best agreement with the MC fitting curves. Interestingly, a unique value \(s=0.55\) is found for all the experiments in water-sucrose solution (P1–P4).

Fig. 7
figure 7

Comparisons between the experimental data \(\left( {c_{2D} ,c_{3D} } \right) \) obtained in water-sucrose solution (ROI \(6d\times 6d)\) and the exponential fitting curves obtained through MC generations with the same effective angle of incidence, \(\zeta _{eff} \). In the background the cloud of points from numerical generations is also reported. a Exp. P1 (\(\zeta _{eff} =17.0^{\circ })\), b Exp. P2 (\(\zeta _{eff} =22.3^{\circ })\), c Exp. P3 (\(\zeta _{eff} =28.1^{\circ })\), d Exp. P4 (\(\zeta _{eff} =30.4^{\circ })\)

The plots of the experimental data together with the related fitting curves by MC generations are reported in Fig. 7. Though some minor discrepancies emerge at the lower end of the investigated range of \(\zeta \) (Exp. P1), sound agreement is observed, which confirms the exponential relationship between \(c_{2D} \) and \(c_{3D} \). It is particularly valuable, that, with the simple binarization formula, the averaged mean squared error (RMSE) of \(c_{3D} \), calculated over the whole dataset, is smaller than 0.04. Especially, if we consider that the idealized conditions (e.g. perfectly spherical particles, perfectly parallelelism of light rays, constant apparent size of grain projections) are not strictly fulfilled in real experiments. Additionally, it is interesting to note that the exponential relationships, numerically obtained by MC generations, are in reasonable agreement with experimental data also at the upper end of investigated values of \(c_{3D} \), near to the random close packing. The standard deviations of the experimental values of \(c_{2D} \), \(\sigma _{c_{2D} } \), (cf. blue bars in Fig. 7) follow the same trend as observed in the numerical simulations. For any given \(\zeta \), large values of \(\sigma _{c_{2D} } \) correspond to low volume fractions, while a smaller scatter is observed at the upper end of the curve. The averaged values, \(\overline{\sigma _{c_{2D} } } \), of \(\sigma _{c_{2D} } \) are 0.026, 0.026, 0.029, 0.032 in experiments P1, P2, P3 and P4, respectively, showing that the scatter slightly increases with \(\zeta \), analogous to what observed by simulations. Moreover, since the standard deviations are of the same order of those ones numerically observed (cf. Sect. 2), it can be reasonably inferred that only minor uncertainties are introduced by the binarization algorithm.

In order to investigate the sensitivity of the algorithm to misalignments of the lamp, we also analysed images from Exp. P3-offset, in which the lamp was differently positioned so as to point at the middle of the bottom edge of the front surface, 5 cm below the centre of the ROI. For comparison, the two different illumination conditions are reported in Fig. 8. The experimental points \(\left( {c_{2D} ,c_{3D} } \right) \), calculated from images of P3-offset by using the same threshold \(s=0.55\) and the same ROI, are found to be very close to those ones observed in Exp. P3, with an averaged RMSE of \(c_{3D} \) of 0.036. This result confirms that even a quite noticeable unevenness of light can be straightforwardly handled by the binarization algorithm, thanks to the fact that the formula only depends on local values of brightness.

Fig. 8
figure 8

a Picture from Exp. P3 (centred light), b picture from Exp. P3-offset (offset of the lamp position 5 cm below the centre of the transparent surface)

In order to reduce the deviation of the measurements of \(c_{2D} \), a bigger ROI should be employed at the cost of a lower spatial resolution. Here, we report further calculations performed on the same images of experiments P1–P4 by varying the size of the squared cropped areas from \(4d\times 4d\) up to \(14d\times 14d\). For all these calculations the same threshold as before (\(s=0.55\)) was employed. The results are listed in Table 4, where the averaged RMSE of \(c_{3D} \) and the averaged \(\overline{\sigma _{c_{2D} } } \) are reported. As shown in Table 4, the averaged RMSE are mostly stable or slightly decrease as the ROI size increases. Conversely, as expected, the values of \(\overline{\sigma _{c_{2D} } } \) noticeably decrease as the ROI enlarges, since the calculation of \(c_{2D} \) over a greater area is more robust.

Table 4 RMSE of \(c_{3D} \)and averaged standard deviations of \(c_{2D} \) from experimental data in water-sucrose solution, analyzed over different ROIs
Fig. 9
figure 9

Comparisons among the experimental data obtained from Exp. P2 (\(s=0.55\)), those ones obtained from Exp. P2-E131 (\(s=0.45\)) and data from MC generations. Insets a image from Exp. P2 (\(c_{3D} =0.25)\); b image from Exp. P2-E131 (\(c_{3D} =0.25)\). For ease of illustration the shown cropped areas are 12d large, while the calculations were performed on a ROI of \(6d\times 6d\)

Table 5 RMSE and averaged standard deviations of \(c_{2D} \) of experimental data in air, analyzed over different ROIs

A further experiment, P2-E131, was performed by using a much darker ambient fluid. The lamp position was exactly the same of experiment P2. Differently, the water-sucrose solution was darkened by adding a small amount of Patent Blue V dye (E131). The refractive index is unchanged, while the fluid transparency is much reduced, causing that the brightness values fade out faster with the distance from the transparent wall. For such reasons, this setup represents a challenging test for the binarization algorithm. In this case, we observed that the optimal value of the threshold, s, decreases, owing to an overall increase of the image contrast. We found that the best agreement with the numerical model from MC generations is obtained by choosing \(s=0.45\). The experimental data from P2-E131 and P2 together with the numerical data from MC generations are reported in Fig. 9. In the same figure, two inset pictures from the two experiments are also reported.

Note that the degree of agreement with the fitting curve is very similar in Exp. P2 and P2-E131, with an averaged RMSE around 0.04. However, while in Exp. P2 the values of \(c_{3D} \) are slightly underestimated in the middle zone of the curve and slightly overestimated in the upper end, Exp. P2-E131 exhibits an opposite trend, with the theoretical curve being in the middle. If, on the one hand, this finding confirms the robustness of the theoretical model, on the other hand, suggests that the simple binarization algorithm, here proposed, causes a small systematic error on the estimation of \(c_{3D} \), depending on the optical properties of the ambient fluid. Some improvements might be achieved by designing a more sophisticated binarization algorithm. Nonetheless, whenever the experimental curves \(\left( {c_{2D} ,c_{3D} } \right) \) can be obtained in laboratory, an ad-hoc correction of the stochastic relationship \(c_{3D} =f\left( {c_{2D} } \right) \) can be straightforwardly implemented.

4.2 Experiments in air

In the second series of experiments with air as ambient fluid (P5–P10) we only have experimental data at the volume fraction of deposit, \(c_{3D} =0.625\). The threshold, s, was optimized over the whole dataset and a unique optimal value of the threshold, equal to 0.44, was found. The comparisons between experimental data and the fitting curves obtained from MC generations are shown in Fig. 10. The standard deviations of \(c_{2D} \), not reported in the figure for reasons of clarity, are of the same order of those ones in water-sucrose solution. They are 0.022, 0.026, 0.035, 0.033, 0.043, 0.035 for experiments P5, P6, P7, P8, P9 and P10, respectively. With an averaged RMSE of 0.06, the results are reasonably good. The good agreement of the experimental data at the upper bound of \(c_{3D} \) (i.e. \(c_{3D} =0.625)\) where the differences among the various theoretical exponential curves are at their maximum, allows us to reasonably infer that a similar degree of agreement should be also expected in the entire range of variation of \(c_{3D} \). It has to be underlined, that, when employing air as ambient fluid, it is challenging to achieve a complete experimental calibration of the relationship between \(c_{2D} \) and \(c_{3D} \). Thus, the optimal value of the threshold parameter, s, can be obtained by calibrating experimental data at deposit over a sufficiently wide range of incident angles.

Sensitivity tests on the choice of the ROI were also performed (see Table 5). While the overall RMSE is mostly independent from the ROI size, the standard deviations of \(c_{2D} \) decrease as the ROI area increases. The standard deviation of \(c_{2D} \) depends on the area of ROI but is independent from its shape. Thus, provided that the ROI area is chosen congruently with the desired precision, the shape of ROI could be rectangular instead of square. This choice is preferable, for example, if the method is employed for measuring near-wall volume faction profiles of channelized granular flows. In this case, to guarantee a better spatial resolution along the profile, the rectangular ROI could conveniently have a wider span along the direction of flow motion, compared to its span along the normal to bed direction.

Fig. 10
figure 10

Comparison between the experimental data at \(c_{3D} =0.625\) obtained from tests in air (P5–P10) and the exponential fitting curves obtained from MC generations with the same angle of incidence of light

5 Conclusions

In this paper we proposed an optical method for estimating the near-wall volume fraction, \(c_{3D} \), in granular dispersions, by directly measuring the two-dimensional volume fraction, \(c_{2D} \),through a transparent wall and under controlled light conditions. Firstly, the potential of exploiting information, resulting from controlled illumination conditions, is numerically investigated through Monte Carlo generations of mono-disperse sphere distributions. The stochastic relationship between \(c_{3D} \) and \(c_{2D} \) (defined as the ratio between the projections on a transparent boundary surface of all visible and illuminated surface elements and the total area of the boundary surface) is found to be of exponential type. The parameters of this law are found to depend on the angle of incidence of light, \(\zeta \). The degree of agreement of the model with the numerical data is very good for a wide range of angles \(\zeta \) between \(10^{\circ }\) and \(60^{\circ }\). While the scatter of the numerical data slightly increases with \(\zeta \), the range of variation of \(c_{2D} \) is found to decrease inversely with the cosine of \(\zeta \).

The numerical findings are, then, implemented into an algorithm for estimating the near-wall volume fraction through the direct measurement of \(c_{2D} \) in a real laboratory set-up. The method, which requires the calibration of only one threshold parameter, employs a binarization algorithm based on a local normalization formula. Several experiments at various volume fractions, involving different ambient fluids and different angle of incidence of light, were performed in order to validate the proposed approach. A digital camera, set at a very low shutter time, and a high-brightness LED lamp were employed, so as to guarantee that the exposure of photographs are not influenced by the environmental light. Despite the extreme simplicity of the employed binarization formula, the experimental results show a very good agreement with the fitting curves obtained from the numerical investigation. A precision of about \(0.1^{\circ }\), easy to be achieved in a normal laboratory environment, is found to be adequate for setting the tilt and azimuth angles of the LED lamp. The robustness of the method and its accuracy are further investigated through sensitivity analyses on the size of the region of interest.

The proposed method, applied with a high-speed camera allowing a sufficiently high recording frequency compared to the grain flow velocity, is ready to be employed for estimating near-wall volume fraction of granular flows in different geometries (e.g. channelized flows, vertical-chute flows or rotating drums). Well-established techniques, such as particle image velocimetry or particle tracking velocimetry, can be straightforwardly applied on the same digital images for obtaining also flow velocity profiles. Hence, these two joint measurements could be fruitfully employed to better understand the granular flow dynamics and its rheological behaviour. Extensions of the proposed approach could involve its application to more complex systems, in particular to poly-disperse mixtures of non-spherical particles and to natural materials with heterogeneous optical properties. Finally, to further increase the accuracy, the method could be improved by combining pictures, taken from different angles (by using multiple cameras) or, conversely, by using multiple light sources with different incident angles. In this case, pulsating light sources could be employed to avoid interferences.