1 Introduction

Deep bed filtration (DBF) is found in natural processes, such as bank filtration, and technical processes, such as the treatment of wastewater (Yao et al. 1971; Xu 2006), the extraction of oil (Moghadasi et al. 2004) or for the purification of beer (Russ et al. 2006). DBF processes are defined as the transport and retention of solid particles through a filter system, which for example can be a porous ceramic (Khilar and Fogler 1998; Mikolajczyk et al. 2018). The characteristic feature in DBF process is that in the process, the particles are significantly smaller than the characteristic dimensions of the filter structure. Accordingly, the particles deposit on the inner surface at different depths rather than deposit as filter cake on top of the filter (Jegatheesan and Vigneswaran 2005). Furthermore, the process itself is defined by various mechanisms of actions, which make DBF effective but complex. More precisely, it is differentiated between transport mechanisms, attachment mechanisms and detachment mechanisms (Stieß 1994; Jegatheesan and Vigneswaran 2005. DBF processes can be divided into two stages and the particle retention can as well be divided into two groups. The beginning of DBF in a clean filter is called the initial stage were the particles pass through and deposit in a clean and particle free filter. Subsequently is the transient stage in which the particles pass through a filter which is already partly filled with deposited particles. This also changes the performance characteristics of the filter, for the reason that the deposition of the particles changes the filter geometry, which in turn results in flow changes such as velocity changes. Due to, for example, changing surface and velocity the particle deposition can not only increase but also decrease. Furthermore, the retention of the particles can be divided into transport and immobilisation mechanism. To the former belong sedimentation, inertia, hydrophilic forces and interception and to the latter van-der-Waals-forces, electrostatic forces and wedging or straining (Verwey and Overbeek 1947; Ives 1975; McDowell-Boyer et al. 1986; Derjaguin and Landau 1993; Johnson et al. 2010). Due to the complexity of the whole DBF process and its mechanisms, DBF is a topic in science for decades and still remains a relevant topic in research not only experimentally but numerically as well. Regarding the experimental investigation of DBF processes CT proved itself a useful tool to obtain information about the characteristics of deposition since particle agglomerations with a minimum size given by the resolution of the tomography system can be detected and quantified independent from the fact that DBF usually takes place in an opaque system.

Still there is no possibility to observe the 3D motion of particles through a filter matrix and towards retention locations. It has been shown that high speed tomography with synchrotron radiation provides a possibility to track single particles inside the matrix (Stefan Günther, personal communication). However, the drawback of using synchrotron radiation is the limited availability, as well as the large amount of data that results from taking multiple scans. Nevertheless, synchrotron systems produce narrow high intensity X-ray beams which are extremely collimated and therefore lead to a high spatial resolution and brilliance. The production of synchrotron radiation is more complex, needs a major setup and is therefore more cost intensive than radiation from X-ray tubes. Moreover, there are only around 70 synchrotrons in the world, which limits the accessibility. Alternatively, laboratory CT systems became more advanced during the last decades, and they depict not only in medicine an important (research) tool (Willmott 2019). Laboratory tomography systems have a longer scanning time, are not as accurate and create more noise than synchrotron radiation. Nevertheless, the quality of modern laboratory computer tomography systems is increasing, and their great advantage is availability. With synchrotron systems it is possible to acquire a series of time discrete particle positions in a filtration process because the time for a 360° scan is below 1 s. However, a lot of laboratory µCT systems are not able to realise short scanning times and especially not with the high resolution and brilliance synchrotron systems can. Since particle tracking at different time steps is not possible the option left is based on long time exposure of the moving particles, a method in experimental observation of fluid motion that is usually called particle tracing (Ahlborn 1902; Prandtl and Tietjens 1934; Racca and Dewey 1988).

Multiphase flows are ubiquitous and research of them showed a positive impact in for example medicine or sustainability (Mäkiharju 2022). Usually, particle tracking is used to illustrate multiphase flows and not for the tracking of single particles. Besides, different techniques have been used to follow the movement of particles within a flow mostly in transparent systems. Common particle tracking methods amongst others are Particle-Image Velocimetry (PIV) and Particle Tracking Velocimetry (PTV). Nonetheless, since most multiphase flows often occur in an opaque system not all investigation methods are suitable. To get a better understanding of fluid flows and the pursuit of particle movement, different techniques for flow measurements and particle tracking have been developed. Those without tomography include amongst others nuclear magnetic resonance imaging (Pykett et al. 1982) and PIV (Adrian 1991). In particle tracking and tracing, it can be distinguished between tomography related and unrelated particle tracking and tracing.

More relevant for this study are tomography related techniques such as tomographic micro-/particle image velocimetry as in (Mäkiharju 2022) and (Bultreys et al. 2022). Mäkiharju (2022) have presented a concept of proof for X-ray particle tracking velocimetry (TXPTV). With the industrially bought tomography system (TESCAN CoreTOM micro-CT) used in their study, it is possible to make a complete 360° rotation of the sample in less than 3 s. Furthermore, the system can rotate a specimen over multiple turns directly after each other. Using a high-speed silicon flat panel detector with 68 frames per second (fps) and an exposure time of 14.5 ms/projection allows it, as with synchrotron measurements, to make a series of time discrete measurements at short time intervals and as a result extract the coordinates of the respective measurement by means of volume segmentation and thus to the track tracer particles. In (Bultreys et al. 2022) the Environmental Micro-CT scanner (EMCT), more information can be found in (Dierick et al. 2014 and Bultreys et al. 2016), at the Centre for X-ray Tomography of the Ghent University (Belgium) was used. The special feature of the system is that the source and detector rotate around the sample on a gantry whilst the sample is fixed. Moreover, this easily enables the possibility of conducting several scans after another without interrupting the experiment. In their study, they acquired 700 projections/rotation in 70 s using an exposure time of 100 ms/projection. In both studies, the trajectories of the particles were determined by determining the particle position in every time step and connecting the particles at every time step. Due to technical limitations, like long scanning times and a low frame rate, particle tracking is not possible with the used µCT system. Therefore, the aim was it to develop a method to trace the particles using only one scan and exploiting the motion artefacts.

Many different methods for particle tracking exist, which is not possible with all kinds of tomography scanners. This study presents a proof of concept for a developed method for the tracing of particles with even only laboratory tomography systems. The method utilises a RANSAC algorithm adapted with least squares ellipse fitting of motion artefacts. Thus, it is capable to trace particles in several complex and especially opaque systems. Furthermore, the evaluation can be performed with simple computers. Section 2 provides the information of the used experimental system and the corresponding experimental µCT setup. The developed method for the evaluation of particle traces is present in Sect. 3 ensued by results in Sect. 4.

2 Materials

2.1 Model Filter, Experimental Conditions and Implementation

Instead of several scans extracting one coordinate for each particle, each of the experiments in this study took place during active scans resulting in one scan, respectively. Therefore, the coordinates from one trace are all extracted from one scan leading to a coherent trace. Regarding the time for a full 360 scan, a time restriction is set by the frames per second that the used detector can realise, because the scan time has to have a certain length in order to gain enough images for a proper image reconstruction (Buzug 2004). Due to the movement of the particles during the scan, motion artefacts occur in the reconstruction of the absorption data. Depending on various factors, these are shaped like stripes or parabolas. To analyse the motion artefacts, the simplest form of particle motion, meaning the sedimentation of particles in a featureless container, was executed. An overview of the experimental vessels can be found in Fig. 1. Additionally, a single-channel-cell without pores was developed in which there is only one serpentine way for the particle to move trough. For the advanced filtration systems, a multi-porous system was designed to get a controlled and reproducible environment for method testing. Consequently, the number of pore channels and pores was confined to facilitate the tracing of single to few particles and reduce artefacts caused by particle deposition. All 3D printed (ProJet MJP 2500 Plus) designs are made of photopolymer (VisiJet® M2R-TN). An open-porous ceramic monolith served as a template for the filter structure, as it was used in the previous work of Mikolajczyk et al. (2018) and Ilzig et al. (2022).

Fig. 1
figure 1

3D printed vessels for the experiments a sedimentation, b serpentine single-channel-cell, c straight single-channel-cell and d final filtration experiment design. Flow direction is from the right to the left in all vessels

All experiments were carried out with the same particles and glycerine as medium. The advantages brought by 3D printing filtration cells that are the room to manoeuvre. It opens up the possibility of quickly adapting the requirements for the filtration cells and experiments, e.g., up and down scaling, and implementing them promptly. Multiple printing also makes it possible to examine the same filtration geometry several times. In addition, it made it possible to develop a different single-channel-cell beyond the sedimentation tests, which not only achieves straight tracks but also sinuous tracks as a result.

The sedimentation print has an open conic reservoir on top and a closed reservoir at the end, see Fig. 1a. In addition, the single-channel-cells, Fig. 1b, c, and the filtration cell, Fig. 1d, were connected with polyvinyl chloride (PVC) tubing to a reservoir above the experimental body and below with a peristaltic pump (REGLO Analog MS-2/6, Cole-Parmer Instrument Company LTD (now known as Antylia Scientific), USA). The pump was connected to pull the liquid through the filtration cell in the interest of pulling single particles, which were inserted into the reservoir through the filter.

The particles to be traced were barium titanate particles (Worf Glaskugeln GmbH, Germany), as these have a higher absorption compared to other glass particles such as borosilicate glass and soda lime glass, making even particles around 90 µm individually visible in the X-ray system present. The particles come in different size distributions, in this work distributions in the range 325–600 µm and 212–250 µm were used for the measurements. Particles in both ranges can still be perceived individually by the human eye and can therefore be introduced into the system individually, which is done proximately before the measurement. The targeting of individual particles is intended to ensure that a particle is between the X-ray tube and the detector during a scan, thus avoiding wait times and empty scans.

Glycerine (Carl Roth GmbH + Co. KG, Germany) was used as medium because in this context, it has two advantages over water. First, it has an X-ray attenuation close to the one of the photopolymer of the printed filtration cells. Which results in the pores barely showing on the scans which has advantages in subsequent digital image processing. Second, glycerine (1480 mPa s at 20 °C) has a higher viscosity than water (1 mPa s at 20 °C) which leads to slower flow velocities.

Furthermore, for all experiments an exposure time of 0.13 s/projection, a distance from centre of experiment to the X-ray source of 66.14 mm and a detector to source distance of 218 mm was utilised. The time for a 360° scan varied between 30 and 110 s. The variation of this scan time only results in a change of the rotation velocity of the specimen table. Therefore, the number of projections for the reconstruction changes, yet all other parameters stay the same. For example, the higher the rotational velocity, the shorter the scan time, and the fewer projection images are created, which also results in a lower resolution.

2.2 X-Ray Computed Micro-Tomography (µCT)

All CT data were created with the same laboratory µCT scanning system consisting of a nanofocus X-ray tube (XS160NFOF, GE Measurement and Control Solutions, USA) with a tungsten target and a flat panel detector (Shad-o-Box 6 K GK HS, Teledyne DALSA, Canada). The technical specifications of the self-build µCT system differ drastically in contrast to for example the bought TESCAN CoreTOM micro-CT system used in (Mäkiharju 2022). The detector in the used system has a resolution of 2304 × 2940 px, a digitization of 14 bit with a maximum of 9 fps and a pixel size of 49.5 µm. Moreover, taking flat field and dark field images into account the reconstruction of the µCT data was based on the FDK algorithm (Feldkamp et al. 1984) as well.

For the measurements, an acceleration voltage of 90 kV and a tube current of 170 µA were utilised. Depending on particle size and velocity, a scan time between 30 and 110 s was chosen in order to get enough data of the moving particle between source and detector as well a long enough trace.

Since the laboratory tomography system is limited by the technical conditions both in terms of system rotation and exposure rate of the detector, it is not possible to implement measurements with discrete time steps in a meaningful way. Technically, however, it is only feasible if the particles move significantly slower through the system, which is not very efficient with the available resolution due to the various parameters such as particle size or particle X-ray attenuation and the existence of other methods. Therefore, the other option possible is the deliberate particle movement during the scan.

Therefore, unlike in unlike in the previous works (Waske et al. 2012; Günther and Odenbach 2016; Mikolajczyk et al. 2018; Ilzig et al. 2022), the specimen table harbouring the filtration cell rotated continuously rather than in angular increments. Moreover, with the aim to watch particles in the visible zone between tube and detector, the scan was started shortly after the insertion of a particle or the start of the pump in filtration experiments. In addition, arc-shaped motion artefacts occur as a result of the movement of the particles during a scan, see Fig. 2.

Fig. 2
figure 2

A slice of µCT data with a view along the z-axis shows exemplarily how a moving particle looks like after the data is reconstructed. An arc-shaped artefact appears around the particle which cannot be differentiated from the particle

3 Method Description

To extract a particle trace digital image processing was performed in Python and the procedure contains three main steps:

2. Ellipse fitting through a combination of RANSAC with least squares method, Fig. 4

1. Noise suppression and binarisation, Fig. 5a–c

3. Coordinate determination, Fig. 5d

To determine the particle coordinate, which is located at the apex coordinate of an arc-shaped motion artefact, the artefact shape is fitted using an, with LSF, adjusted RANSAC. This has the advantage of minimising the influence of erroneously binarised background. Essentially, the method can be divided into three parts. A pre-processing ending with a binarisation, a RANSAC algorithm combined with least squares method and a coordinate processing which can be visualised.

3.1 Noise Suppression and Binarisation

As a result of the movement of the particles during the scans parabola shaped motion artefacts occur around the particle, with particle positions being at the apices of the parabolas. Since the artefact is usually not homogeneously bright an instant binarisation with a high threshold is not an option, considering one method for inhomogeneous and homogeneously bright motion artefacts. Besides, the binarisation of the intensity maximum would lead to a spot, see Fig. 3, where the determination of the particle coordinate is questionable. Whereas the determination of a parabola and its apex is clearly defined.

Fig. 3
figure 3

Result of the binarisation of an inhomogeneous bright motion artefact. Whilst a shows the raw data, it can be seen in b that the result is a spot from which it is not possible to get a utilisable centre coordinate

With regard to achieve a proper motion artefact fitting, it is necessary that the image stack passes through a pre-processing to obtain a binarised image of the motion artefacts. Also, each image of the image stack was processed independently. To reduce calculation time and to reduce the chance of noise being binarised, it is advisable to crop the data so that the background is minimised. A Gauß filter is applied to diminish noise and smoothen the data, see Fig. 5b, so that the threshold value of the binarisation can be as low as possible in the interest of loosing as little of the motion artefact as possible. However, it must be taken into account that the lower the threshold value, the more background pixels are erroneously binarised, see Fig. 4. Since the inadvertent binarised background is usually smaller than the binarised area from the arc-shaped artefact, bigger parts can be removed by removing all objects which are smaller than a defined number of pixels.

3.2 Ellipse Fitting Through a Combination of RANSAC with Least Squares Method

Due to the fact, the particle is in the middle of the motion artefact, and therefore, at the apex of the parabola, a fitting of geometric primitives is chosen. Because the motion artefacts are constantly changing from image to image, fitting of a parabola is more complex and computation-intensive than the fitting of an ellipse. Nonetheless, different methods for ellipse fitting have been presented in literature (Bookstein 1979; Fischler and Bolles 1981; Sampson 1982; Yuen et al. 1989; Porrill 1990; Taubin 1991; Dave and Bhaswan 1992; Haralick and Shapiro 1993; Leavers 1992; Yip et al. 1992; Rosin 1993; Wu and Wang 1993; Gander et al. 1994; Gath and Hoory 1995; Rosin and West 1995; Werman and Geyzel 1995; Fitzgibbon et al. 1996; Halir and Flusser 1998) and the methods can be divided into two proceedings: clustering methods and optimisation methods.

Clustering approaches are more robust against outliers and can determine several primitives at once. However, these approaches are slower, have a high memory consumption and a low accuracy. To the clustering approaches belong Fuzzy Clustering, Hough Transform, Kalman filtering and RANSAC. On the contrary, optimisation methods characterise the fit of a function onto given data points. Whilst speed and accuracy are advantages of these methods, the disadvantages are that only one primitive can be fitted at a time, and they are significantly more sensitive to outliers than clustering.

To ensure a good and robust ellipse fit onto the binarised artefact the combination of a least squares fit with a RANSAC was chosen. Fundamentally, a RANSAC algorithm is a resampling algorithm which estimates usually linear mathematical models to data points (Fischler and Bolles 1981). Using a RANSAC, a function, usually linear, is fitted through a certain amount of data points for a predefined number of times. For every fitted function, in this work the conic equation is used, the amount of data points within a predefined distance, so called inlier, is calculated. Eventually, the parameters which lead to the function with the highest number of inliers is chosen.

In this work, a standard mathematical procedure for regression analysis is used to fit a function into images instead onto a set of data points. Moreover, (x, y) are not data points but pixels of the binarised artefact. As proven in several studies, fitting of an ellipse on data points can be achieved using the least squares approach. As introduced in Fitzgibbon et al. (1996) fitting an ellipse can be done using the conic equation

$$F(x,y) = a\, x^{2} + b\,x\,y + c\,y^{2} + dx + e\,y + f = 0$$
(1)

because an ellipse depicts one case of a conic with the constraint

$$b^{2} - 4\,a\,c < 0$$
(2)

The best elliptic fit for data points can be approximated (Haralick and Shapiro 1993) by minimising the sum of the algebraic distance \(F(x,y)\)

$$\mathop {\min }\limits_{{\varvec{a}}} \mathop \sum \limits_{i = 1}^{N} F\left( {x_{i} , y_{i} } \right)^{2}$$
(3)

of the coordinates \({\text{(x}}_{{\text{i}}} {\text{, y}}_{{\text{i}}} {)}\), \(i = 1 \ldots N\) of points being on the ellipse with coefficient vector a

$${\varvec{a}} = [a, b, c, d, e, f]^{{\text{T}}} .$$
(4)

However, the formulas introduced here do not ensure that the result is always an ellipse, because for example the mean square distance to a hyperbola could be smaller than to an ellipse. To counteract this, proper scaling (2) can be rewritten to an equality constraint:

$$4ac - b^{2} = 1$$
(5)

To avoid the trivial solution in which all parameters of a are zero and acknowledge that every multiple of a solution always yields the same conic section, a needs to be restricted. In literature different authors have used different constraints, an overview can be found in Fitzgibbon et al. (1996). As a result, the ellipse fitting problem can be rewritten as

$$\mathop {\min }\limits_{{\varvec{a}}} = \left\| {{\mathbf{Da}}^{2} } \right\|$$
(6)

with D being the design matrix with a size of Nx6

$$\user2{D} = \left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {x_{1}^{2} } & {x_{1} y_{1} } & {y_{1}^{2} } \\ \vdots & \vdots & \vdots \\ {x_{i}^{2} } & {x_{i} y_{i} } & {y_{i}^{2} } \\ \end{array} } & {\begin{array}{*{20}c} {x_{1} } & {y_{1} } & 1 \\ \vdots & \vdots & \vdots \\ {x_{i} } & {y_{i} } & 1 \\ \end{array} } \\ {\begin{array}{*{20}c} \vdots & \vdots & \vdots \\ {x_{N}^{2} } & {x_{N} y_{N} } & {y_{N}^{2} } \\ \end{array} } & {\begin{array}{*{20}c} \vdots & \vdots & \vdots \\ {x_{N} } & {y_{N} } & 1 \\ \end{array} } \\ \end{array} } \right)$$
(7)

Whilst the design matrix embodies the minimisation of F(x, y), the constraint matrix C

$${\varvec{C}}{ = }\left( {\begin{array}{*{20}c} {\begin{array}{*{20}c} {0} & {0} & {2} \\ {0} & { - {1}} & {0} \\ {2} & { 0} & {0} \\ \end{array} } & {\begin{array}{*{20}c} {0} & {0} & {0} \\ {0} & {0} & {0} \\ {0} & {0} & {0} \\ \end{array} } \\ {\begin{array}{*{20}c} {0 } & {0} & { 0} \\ {0 } & {0} & { 0} \\ \end{array} } & {\begin{array}{*{20}c} {0} & {0} & {0} \\ {0} & {0} & {0} \\ \end{array} } \\ \end{array} } \right)$$
(8)

represents Eq. (7).

To solve this minimisation problem, (Gander 1980) suggested a solution using a quadratically constrained least squares minimisation with Lagrange multipliers, adding

$${\mathbf{Sa}} = \lambda \,{\mathbf{Ca}}$$
(9)
$${\varvec{a}}^{T} {\mathbf{Ca}} = 1$$
(10)

along with the scatter matrix S

$${\varvec{S}} = {\varvec{D}}^{T} {\varvec{D}}$$
(11)

having a size of 6 x 6.

Nevertheless, (Halir and Flusser 1998) revealed certain drawbacks of this approach. Problematic is that C Eq. (8) is singular, and S Eq. (11) is nearly singular. Therefore, the calculation of the eigenvalues Eq. (9) is numerically unstable and leads to wrong solutions. Furthermore, they disagree with the statement of Fitzgibbon et al. (1996) that the one positive eigenvalue of Eq. (9) is not the optimal solution for Eq. (6), because if all points lie on the ellipse, the eigenvalues are 0.

As a proposed solution implemented in this work and providing reliable results, a matrix decomposition of D into a linear and a quadratic part was performed,

$$\user2{D}_{1} = \left( {\begin{array}{*{20}c} {x_{1}^{2} } & {x_{1} y_{1} } & {y_{1}^{2} } \\ {\begin{array}{*{20}c} \vdots \\ {x_{i}^{2} } \\ \end{array} } & {\begin{array}{*{20}c} \vdots \\ {x_{i} y_{i} } \\ \end{array} } & {\begin{array}{*{20}c} \vdots \\ {y_{i}^{2} } \\ \end{array} } \\ {\begin{array}{*{20}c} \vdots \\ {x_{N}^{2} } \\ \end{array} } & {\begin{array}{*{20}c} \vdots \\ {x_{N} y_{N} } \\ \end{array} } & {\begin{array}{*{20}c} \vdots \\ {y_{N}^{2} } \\ \end{array} } \\ \end{array} } \right)$$
(12)
$$\user2{D}_{2} = \left( {\begin{array}{*{20}c} {x_{1} } & {y_{1} } & 1 \\ {\begin{array}{*{20}c} \vdots \\ {x_{i} } \\ \end{array} } & {\begin{array}{*{20}c} \vdots \\ {y_{i} } \\ \end{array} } & {\begin{array}{*{20}c} \vdots \\ 1 \\ \end{array} } \\ {\begin{array}{*{20}c} \vdots \\ {x_{N} } \\ \end{array} } & {\begin{array}{*{20}c} \vdots \\ {y_{N} } \\ \end{array} } & {\begin{array}{*{20}c} \vdots \\ 1 \\ \end{array} } \\ \end{array} } \right)$$
(13)

As well as a matrix decomposition of S

$${\varvec{S}}{ = }\left( {\begin{array}{*{20}c} {{\varvec{S}}_{{1}} } & {{\varvec{S}}_{{2}} } \\ {{\varvec{S}}_{{2}}^{{\text{T}}} } & {{\varvec{S}}_{{3}} } \\ \end{array} } \right)$$
(14)

with

$${\varvec{S}}_{{1}} { = }{\varvec{D}}_{{1}}^{{\text{T}}} {*}{\varvec{D}}_{{1}}$$
$${\varvec{S}}_{{2}} { = }{\varvec{D}}_{{1}}^{{\text{T}}} {*}{\varvec{D}}_{{2}}$$
$${\varvec{S}}_{{3}} { = }{\varvec{D}}_{{2}}^{{\text{T}}} {*}{\varvec{D}}_{{2}}$$

and a decomposition of C in

$${\varvec{C}}{ = }\left( {\begin{array}{*{20}c} {{\varvec{C}}_{{1}} } & {0} \\ {0} & {0} \\ \end{array} } \right)$$
(15)

with

\({\varvec{C}}_{{1}} { = }\left( {\begin{array}{*{20}c} {0} & {0} & {2} \\ {0} & { - {1}} & {0} \\ {2} & {0} & {0} \\ \end{array} } \right)\),

plus the decomposition of Eq. (4) in.

$${\varvec{a}} = \left( {\begin{array}{*{20}c} {{\varvec{a}}_{1} } \\ {{\varvec{a}}_{2} } \\ \end{array} } \right)\,{\text{with}}\,{\varvec{a}}_{1} = \left( {\begin{array}{*{20}c} a \\ b \\ c \\ \end{array} } \right),\,{\varvec{a}}_{2} = \left( {\begin{array}{*{20}c} d \\ e \\ f \\ \end{array} } \right).$$
(16)

Considering that \({\varvec{S}}_{3}\) is singular only if all points lie on a line (Haralick and Shapiro 1993), which in this case leads to no real solution, but in any other issue, it is regular, and the equations can be transformed to the reduced scatter matrix

$${\varvec{M}} = {\varvec{C}}_{1}^{ - 1} \left( {{\varvec{S}}_{1} - {\varvec{S}}_{2} {\varvec{S}}_{3}^{ - 1} {\varvec{S}}_{1}^{T} } \right).$$
(17)

Regarding the ellipse fitting, it could be shown that the problem is basically a constraint minimisation problem Eq. (6) were the optimal solution matches the eigenvector a of Eq. (9) leading to a minimal non-negative value \(\lambda\).

Figure 4 depicts the application of those combined methods onto the µCT data. It can be seen that when fitting a perfectly binarised artefact, see Fig. 4a, the one fitted ellipse can fit precisely onto it, if the number of data points chosen for the fit is high and right. Whilst using the same parameters onto an image with erroneously binarised background, see Fig. 4c, the result is wrong. When combining LSF with RANSAC several ellipses can be fitted onto the data, see Fig. 4e, and the right one can then be determined.

Fig. 4
figure 4

In a and c two images of the same binarised image stack can be seen. Whilst a shows no falsely binarised background c does. b and d show the results of one applied least squares ellipse fitting. Whilst the ellipse fitting in b functions successfully, in d the result is affected by the wrongly binarised background. e shows the result of the combination of RANSAC and least squares ellipse fitting. The ellipses fitted to the falsely binarised background are marked in light rose, the ellipses fitted to the artefact are marked in light blue, the best fitting ellipse is marked in dark blue, and the determined coordinate is marked with a green start

3.3 Coordinate Extraction and Trace Determination

The developed algorithm fits a function multiple times through a certain number of randomly chosen binarised data points and calculates the number of points, so called inliers, within or below a certain distance to this specific function. The function with the highest number of inliers is subsequently chosen as the best result. For this specific issue, the best mathematical function is an ellipse fitted by least squares method. The combination of the two methods eliminates the drawback of the least squares method which is susceptible for outliers. Therefore, the least squares approach was integrated into the RANSAC algorithm to reduce the influence of falsely binarised background and changing artefact shapes. Exemplarily presented in Fig. 5, the one apex (yellow) of the ellipse having the most inliers around it, which is chosen as a coordinate. In a final step, the extracted coordinates are smoothed with an exponentially weighted moving average.

Fig. 5
figure 5

Overview over the three main steps to determine the particle coordinate. a Raw data, b data after applying a Gauss filter, c binarisation and removal of falsely binarised background, d ellipse fitting

4 Results and Discussion

To validate the method, a series of experiments was done. It was shown that it is possible to extract the apex coordinate for almost each layer in z-direction the particle passed, and therefore, a 3D particle trace can be determined through an ellipse fit for each arc-shaped motion artefact. The experiments revealed the importance of the artefact shape, the importance of the particle size and other influencing factors. Furthermore, the findings from sedimentation and filtration experiments are presented and discussed.

4.1 Artefact Shape

In cone beam X-ray micro-CT, the occurrence of motion artefacts of the moving particles is influenced by the X-ray attenuation coefficient of particle and medium, size and velocity of the particle and its position in the cone beam. It is to be assumed that due to the angle of the cone beam the specimen get penetrated in an angle. The reconstruction works by processing the rows of all z-coordinates in a row-wise manner. Therefore, the reconstruction outside the central ray plane causes parabolic motion artefacts. Hence, depending on the position in the beam, the motion artefacts in cone beam X-ray scans appear to be arc shaped or linear.

The arc has the strongest curvature when the particle is at an edge of the field of view, see Fig. 6a, meaning the highest or lowest part of the cone beam. When moving downwards in the direction of the beam centre, see Fig. 6b, of the cone beam the artefact curvature flattens to a streak, see Fig. 6c, before bending to the other side, see Fig. 6d, when moving to the lower edge of the scan, see Fig. 6e, f shows a 3D view of an artefact.

Fig. 6
figure 6

Development of the different motion artefact states in cone beam X-ray tomography along the z axis. From figure a to figure e the particle passes along the symmetry line through the cone beam from top a to bottom e. The closer b the particle comes to the centre c of the cone beam, where the beam is approximately parallel, the more linear the motion artefact becomes. After passing through the middle part c, the motion artefact then bends again but to the other side df shows the 3D visualisation of a motion artefactextracted particle trace

4.2 Validation of Particle Position on the Motion Artefact

In order to verify that the particle position is at the apices of the parabola shaped motion artefacts, experiments in a narrow single channel cell, see Fig. 1c, were carried out. The narrow channel allows the particles only to move straight down and restricts the area for where the apieces are supposed to be. Since the absorption coefficient of polyethylene glycol 400 is similar to that of the used photopolymer the filters are made of, it has been used here for clarification purposes and has no significant influence on the further evaluation of the artefacts. As can be seen in Fig. 7, the apieces of all parabolas can be located exactly in the channel.

Fig. 7
figure 7

Reconstructed data of six particles moving in a 30 s scan through the straight single-channel-cell, see Fig. 1c, in polyethylene glycol 400 with an average velocity of 0,56 mm/s. In a, the particles are in the upper part of the single-channel-cell and cone beam; in b, they are in the middle of the single-channel-cell and in the centre beam, and in c, they are in the lower part of the single-channel-cell and the cone beam. It can be seen that when the motion artefact is bent, the apices stay over the canal whole time and do not shift into the bulk material

4.3 Results of the Method Application Onto the Experimentally Generated Data

The evaluation of the experiments has shown that when comparing particles of the same material, larger particles have a greater X-ray attenuation than the smaller ones and are therefore easier to detect. Smaller particles result in smaller artefacts, leading to a higher possibility that their grey values are close to the surrounding noise and therefore harder to binarise and detect. Another limitation regarding the particle size is the introduction of one particle into the medium. As the particle diameter decreases, it becomes more difficult to selectively introduce individual particles into the system. The more particles there are in the system, and the more likely they are to overlap, which, above a certain quantity, leads to artefact overlaps so that individual artefacts can no longer be separated from one another not even with the human eye. On the other hand, bigger particles move faster than smaller particles due to their weight. As a result, bigger particles cover fewer pixels causing the artefact to approximately be almost linear. It is to be noted that the motion artefacts of the particles do not randomly appear or disappear in the data, and they start to evolve or diminish from one side of the parabola shaped artefact to the other. In consequence, it is not possible to detect the particle during this phase because the artefact is partially not visible at the actual coordinate position on some of the images. Moreover, the deposition of the particles also changes the artefact shape. Due to the deposition process itself, the motion artefact recedes circularly and the higher the X-ray attenuation of the particles in contrast to the other material components results in very bright spots. This makes it difficult to evaluate motion artefacts moving past this deposition site. Furthermore, the particle coordinates determined by the algorithm differ slightly on consecutive images. Nonetheless, even though the determined particle coordinates on sequential images do not match perfectly, they always lie close together on the artefact.

Evaluation of the sedimentation experiments has shown that the idea of simply introducing a particle into a vessel does not lead to the desired straight trace here. The experiments have shown that a small centrifugal force acts on the particles resulting in the particles moving with a minimal screw like deviation in the sedimentation experiments. Nevertheless, it could also be shown that the flow caused by the peristaltic pump is significantly stronger so that the influence of the centrifugal force is insignificant. Figure 8 shows exemplarily the results of a 110 s sedimentation experiment at which the particle had a diameter of 380 µm and an average velocity of 0.136 mm/s. All particle velocities have been determined by calculating the path length and dividing it by the scan duration.

Fig. 8
figure 8

3D visualisation of the determined coordinates (blue) in a glycerine filled sedimentation vessel (Fig. 1a; red) including artefacts (green). The visualisation of the artefact shows the influence of the stepper motor onto the particle movement. Contrary to the expectation that the particle moves linearly downwards, it can be seen here that it moves downwards in a screw like motion

The experimental data shows that the method is not able to evaluate linear artefacts that occur in the middle part of the cone beam, which can also occur when there is not enough data for a correct reconstruction due to high particle velocity.

Due to the restriction of the geometry and the fluid flow caused by a peristaltic pump, it was shown that experiments conducted within the serpentine single-channel-cell, cannot be evaluated with the here presented method. Due to the small diameter of the cell path, the velocity within the system increases so that the data rate of moving particles decreases drastically. This, and most importantly the distinct side movement, of the particle along the X-rays, in the serpentine shape of the cell path, results in anomalies in the artefact reconstruction, where the artefact apex is reconstructed in bulk material and the shape vermiculates. Figure 9 shows exemplarily the evaluation of a 75 s experiment in a single channel cell, with barium titanate particles with a size of 600 µm and an average velocity of 0.23 mm/s.

Fig. 9
figure 9

Visualisation of an evaluation of a single-cell experiment with solely linear artefacts a1, b1. The algorithm is not always able to find a solution at all a2 and if a solution with the apex on the artefact is found b2, the particle position will vary greatly from image to image resulting in a scattered set of coordinates (blue) with a particle trace (green) c which does not represent the original cell geometry

It can be seen in Fig. 7a, b that the artefacts in the raw data (Fig. 9a2, b2) and consequently in the attendant binarised data (Fig. 9a1, b1) as well are linear. Therethrough, the algorithm is not always capable of finding a solution (Fig. 9a2). Furthermore, on linear artefacts, the particle position found is usually somewhere on the artefact shape, but the positions on consecutive images have a very high deviation from each other, leading to widely scattered data, see Fig. 9c. Generally, even manually it is not possible to determine the particle position if the artefact intensity remains the same.

When shifting the region of interest of the experiment up or down in the cone beam, and out of the central ray plane, the image number in which the X-rays penetrate the object in small angles are reduced. Figure 10 depicts exemplarily the visualisation of a filtration cell experiment with a particle diameter of 500 µm which had an average velocity of 0.4 mm/s within a scan time of 75 s. The path of the particle along the particle trace (blue) within the pore system (red) is clearly comprehensible.

Fig. 10
figure 10

3D visualisation of the determined coordinates (blue) in the filtration cell (Fig. 1d; red)

5 Conclusion

This work presents a novel method for the 3D tracing of particles with laboratory µCT systems in opaque systems such as porous media. To overcome the disadvantage of not being able to conduct full 360° X-ray scans within a few seconds, this work presents an innovative method to extract a particle trace from just one scan instead of multiple scans resulting in significant reduction in scan time and cost.

Python programming language was used to perform image processing in order to extract a particle trace in an opaque system. Therefore, through multiple stages of pre-processing and binarisation of raw data, the occurring arc-shaped motion artefacts were effectively separated. So that subsequently least squares ellipse fitting in combination with a RANSAC algorithm was applied on the binarised data.

Combining RANSAC and least squares fitting enables the threshold of the binarisation to be as low as possible in order to lose as few artefact as possible. This is due to the fact that the ellipses fitted with least squares method through falsely binarised background are evaluated by the amount of binarised data around them which are calculated and assessed by the RANSAC algorithm. Lastly, a smoothing operation was performed on the obtained data with an exponentially weighted moving average function to (precisely) determine the particle trace.

The method was tested in a series of experiments in 3D printed sedimentation vessels and in complex filtration cells. It was proven that particle coordinates can be extracted from the artefacts by fitting an ellipse onto them. Thereby, the precision highly depends on the absorption coefficient of chosen medium and particles as well as the number of projections.

Furthermore, it must be noted that when using a cone beam X-ray tube the angle of the X-rays have an influence on the motion artefacts. The smaller the angle and the more orthogonal the rays impinge on the detector the more linear becomes the artefact. A possible solution is given in the displacement of the area of interest upwards or downwards in the cone beam. Nevertheless, it must be taken into account that doing so could reduce the resolution or the size of the structures to be investigated.

However, it was proven with the conducted experiments that it is possible to fit the motion artefacts properly and thereby enable the tracing of particles in porous structures using laboratory X-ray tomography systems. Moreover, the basic method using mathematical procedures in digital image processing could be interesting for other studies, especially when the data can be fitted with geometric primitives.