Keywords

1 Introduction

The multiphasic flows are involved in several industrial processes, and their dysfunctions have been associated to safety issues. In the oil industry, for instance, the involvement of oil, water, gas and even solid particles, such as sand, influence the flow stability. Due to the complexity of shaping, however, this situation is normally simplified by a gas-liquid two-phase flow. It is, though, required the correct rendering and identification of both the flow patterns and the relative properties of the fluids, such as void fractions, fluids velocity, among others. The studies about multiphasic flows are challenging the scientific community in its search for techniques and devices capable of describing the course of fluids in ducts and the establishment of its patterns.

Among the horizontal flow patterns, the slug pattern has been studied since 1969, being present in industrial applications, mainly at the oil industry, where this model is held, frequently, on the production lines. The slug pattern is a periodic flow whose technical features vary in space and time, and that is characterized by a series of liquid pistons followed by an elongated bubble, that could present scattered bubbles or not, depending on the phases velocity. Wallis introduced in 1969 [18] the concept of unit cell as illustrated on Fig. 1, which shows graphically the slug flow model. It can be observed by the illustration, the liquid piston, its adjacent elongated bubble and several bubbles scattered with the respective liquid film. With the description and analysis of an unit cell behaviour, all properties of the slug flow pattern through a duct can be predicted [3].

Fig. 1.
figure 1

Representation of a unit cell in horizontal gas-liquid slug flow as well as the liquid film, the elongated bubble and the liquid piston.

The study of this flow pattern has been done in experimental plants through mathematical shaping and the use of different kinds of sensors such as wire-mesh sensors, conductive and capacitive probes, ultrasound transducers, optical tomography, X-ray and gamma-ray tomography, and high-speed camera. In this context, image processing techniques have been used experimentally, because they allow identification and visual evaluation of important technical features through solutions with relatively simple projecting/implementing.

In relation to the horizontal air-water flow, aim of this article, several guidelines pull out regions of interest in images for later analysis based on basic image processing operations. [2] utilizes mathematical morphology and segmentation by Watershed transformation to extract information from the gas bubbles. In [10] images are used on the measuring of the area, length and volume of gas bubbles. In [14] the flow images are grouped in order to identify shape of the bubbles, but without bubble segmentation for later measuring of their properties.

In this context, this article investigates the typical gas bubbles shape, volume and length as a function of speed and property of the fluid. When studying the bubbles shape on the flow as a function of speed and length, will be possible to represent the fluids behaviour such as the generation of bubbles and disruption due to their dispersion and distribution. With this goal, a sequence of images taken by high definition camera and image processing techniques were used to obtain estimated results of the elongated bubbles shape in gas-liquid flow. For this, the application of an image segmentation method was used to correctly delimit the elongated bubble (or unit cell). The images were overlaid to define the average gas bubble shape, and then segmented by the Restrict Level Set method propose here and finally it was compared to the images generated by the wire-mesh sensor [7] and segmented by Level Set Method proposed in [5].

The segmentation by Level Set method has its application consolidated especially in the medical area [12, 13, 20] where the presence of standard shapes is observed, as well as in different problems associated with object segmentation [1, 11, 19]. Nevertheless, new approaches have been developed in order to contribute to the development of a more efficient solution. As well as in the work of [4] that develops a shape-driven approach for object segmentation. They propose a shape prior constraint term by deep learning to guide variational segmentation, which collaborates with new researches. This work is a continuity of the one published in [17], however this paper contributes to the validation of values by the wire-mesh sensor and the inclusion of the velocity term, that were not previously used.

2 Materials and Methods

2.1 Image Acquisition

The experimental data were collected in a horizontal air-water biphasic flow trial display located in the Thermal Science Laboratory (LACIT) at the Federal Technological University of Parana (UTFPR). The assay is described in [2, 14]. The flow images were captured by a high speed camera Nano Sense MKIII (DantecDynamics) model in \(232 \times 500\) pixels resolution. For this task, the images were taken with the gas superficial velocity varied between 0.5 and 1.5 m/s to a superficial liquid velocity of 0.5 and 0.7 m/s to observe the effect of the bubble shape. Thus, in this study, a total of 5 measuring points are evaluated with 150 air bubbles in each one of them.

2.2 Image Segmentation by Level Set Method

The image segmentation method consists in giving an image in a group of regions non-overlapped and homogenous that must match to significant objects for a certain application. In this article, one new approach of segmentation based on the Level Set method and a priori knowledge of the way it was used in order to separate the gas bubble from the liquid piston.

The main idea of the Level Set method, introduced by Osher and Sethian [16], consists on the representation of a surface as a zero level interface of a superior dimensional function (called Level Set Function). One of the main advantages of the method is its capacity of dealing with changes or topological discontinuities that can appear during the zero level evolution curve.

The Level Set method is based on two central points: firstly, the incorporation of the surface as the zero level (zero Level Set) of a dimensional superior function, and, secondly, the incorporation (or extension) of the surface velocity F to this more elevated dimension level of function. In this task, a new approach was applied to the image segmentation based on the Level Set method that unites active girth to a priori shape. For this, the shape model of the targeted object was trained and defined by the points distribution model, next, added as a function of extension speed to the zero level curve evolution. The goal of the new approach is to make an structure that consists in three energy terms and an extension velocity function \((\lambda L_g(\phi ) + vA_g(\phi ) + \mu P(0) + \phi _f)\).

The first three terms of this equation are the same terms introduced by [5] and the last \(\phi _f\) (called global restricted shape) is based on the shape representation previously trained. The extension speed function, \(\phi _f\) was introduced, in order to orientate the zero level evolution curve and consist on the shape model trained at first through the points distribution model. Thus, to each new interaction the curve goes toward its normal, respecting the limitation imposed by the initially defined shape, i.e., the function will guide the evolution of the level curve with the annexation of a seed that represents the object to be segmented, taking advantage when it gets closer to the previously trained shape.

2.3 A Priori Shape Definition

The use of the Level Set method to the image segmentation requires the selection of an inner marker (or outer) to the region of interest, which will represent the initial curve \(\phi \), what can be done with simple operations (such as threshold and mathematical morphology). In this work the priori knowledge is defined and used as an inner marker and will be hereafter described.

Firstly, it is made a selection and manual marking of the points that define a data display, or coordinates of what is considered by the expert as being the limits for the observed shape. In this case it is necessary the manual marking of several distinct images. In this work, 20 images for each one of the gas bubble parts were marked, in order to be trained to generate an average shape between the marked images. At the end of this stage, a considerable amount of intercepted shapes are obtained (the points manually marked are align and measured the distances between its points to generate a new mean shape) from the different images that make up the training set, that need to be converted into an only final pattern, able to embrace and recognise images of the same phenomenon, but different from those used during the series of training.

The points aligning stage is a prerequisite so that the statistic values that describe the standard shape can be obtained. By aligning and overlaying every marked point next to the average standard model, it is observed the overlapping of equivalent points as well as the clouds formation with diffuse points, as those reference markings are partially correlated, and do not move independently, the points distribution model (PDM) looks for a pattern of coordinates variation in this diffused points zone or clouds. (Details of the shape model definition can be found in [6]).

2.4 Level Set Priori Shape Restrict - LSR

After the average shape definition it is necessary to consider an image that contains only one object with a shape similar to a sample in the training set. Then the goal is to recognize the area of the image that corresponds to this object. Thus the shape model is defined as initial curve (marker) for the Level Set evolution - MLS [5].

In image segmentation, active contours are dynamic curves that move toward the boundaries of the object. To achieve this goal, it is explicitly set an external energy that can move the zero level curve toward the object boundaries. Consider I as a picture, and g is the boundary indicator function defined by:

$$\begin{aligned} g_I(x,y) = \frac{1}{1 + |\nabla (G_\sigma * I(x,y))|} \end{aligned}$$
(1)

where \(G_\sigma * I\) is the convolution of image I as a Gaussian Kernel with standard deviation \(\sigma \). Term \(\nabla (G_\sigma * I(x,y))\) is essentially zero except near significant variations of the gradient that typically corresponds to the object boundaries. Thus \(g_I(x,y)\) goes to 1 (one) outside the boundaries and goes to 0 (zero) near them.

Consider a velocity function of the form \(F = \pm 1 - \epsilon \kappa \), where \(\epsilon \) is a constant that acts as an advection term and \(\kappa \) denotes the curvature at a point [16]. Note that, when multiplying F by \(g_I\), the flow does not evolve through the edges.

Li et al. proposed the use of an external function energy \(\varepsilon (\phi )\), to drive the movement of the zero level curve, as follows [5]:

$$\begin{aligned} \varepsilon _{g,\lambda ,v}(\phi ) = \lambda L_g(\phi ) + v A_g(\phi ) \end{aligned}$$
(2)

where \(\lambda > 0\) and v are constant. Term \(L_g(\phi )\) calculates the length of the zero level curve of \(\phi \) and term \(A_g(\phi )\) is introduced to accelerates the movement of zere level contour during the Level Set evolution that is necessary when the initial contour is located far away from the boundaries of the desired object. The total functional energy defined by the authors is represented as:

$$\begin{aligned} \varepsilon (\phi ) = \mu P(\phi ) + \varepsilon _{g, \lambda ,v}(\phi ) \end{aligned}$$
(3)

The energy \(\varepsilon _{g,\lambda ,v}(\phi )\) is called external energy and it drives the zero Level Set to the boundaries of the object, whereas the energy \(\mu P(\phi )\) is called internal energy and it penalizes the deviation of \(\phi \) from a signaled distance function during its evolution. (To complete understand the implementation of the Level Set curve, see [5]). According to the terms presented above, the proposed approach introduces a restriction to the initial curve imposed by the priori shape knowledge and incorporated to the external energy at each iteration as follows:

$$\begin{aligned} \phi (t+1) = \phi (t) + delt* (\lambda L_g(\phi ) + vA_g(\phi ) + \mu P(0)) + \phi _f \end{aligned}$$
(4)

where delt is the time step and \(\phi _f\) is the velocity function of the evolving form and it is obtained by the difference between the previously trained form \(\phi _i\), it is at the same time defined as a marker initial, and the time-evolving curve \(\phi _t\). The formulation of the curve evolution by the proposed approach is then defined by:

$$\begin{aligned} \phi _f = \lambda _2*(\phi _i - \phi (t)) \end{aligned}$$
(5)

where \(\lambda _2\) is obtained empirically and reflects the weight that must be set to the shape energy. The additional inserted term is set such a way that it does not affect the important property of the signaled distance function developed by Li et al. [5]. That is necessary to ensure a good evolution of the initial curve.

With the inclusion priori shape knowledge the proposed approach evolves the initial curve (shape model) as a function of the average shape of the object and gradient of the image however it takes into account the characteristics of each object of different images. In this case its application facilitates the segmentation of overlapping objects with occlusions or missing parts.

3 Proposed Scheme to Two-Phase Flow Image Segmentation

The development of this new variation of the Level Set method aims to optimize the objects segmentation both in two-phase flow images and in any images that have shape and pose previously known, adding up to the other existing approaches that use priori knowledge and active contour.

To flow images it is executed the manual marking of a set of images that represent each of the three parts of the gas bubble (nose, body and tail, illustrated on Fig. 2(a, b and c)). The goal is to build a model that describes the typical shape, using examples of the Fig. 2 as a training group (60 images divided in: nose, body and tail). The key points are defined by the manual marking and are around the limit between the gas bubble and liquid. This must be done with each shape on the training group. With it, is extracted the representation of each example, as a group of labelled points measuring the points average positions and the main shapes in which the points tend to escape from the average.

Fig. 2.
figure 2

Representation of the image marker (a–c) typicall gas bubble shape, (d–f) gas bubble noise results, (g–i) gas bubble tail results.

In this case, the result will be the average shape that will be used as prior information conducting the segmentation. It is worth pointing out that this is a stage conducted only once. Then, the next step consists of inserting a new image of the two-phase flow set of images. At this point, the system classifies the new image according to one of the three pre-established shapes (nose, body and tail). After that, the algorithm segments part of the gas bubble, using the resultant shape of the ranking. As an effect, the images now segmented are saved into a new file having the complete flow flux. Finally, from the segmented images, the system does the gas bubble overlapping, in order to obtain the definition of an average gas bubble shape to each one of the speeds tested.

The proposed approach to the curve evolution is illustrated in Fig. 2. The Fig. 2(a, b and c) shows the marked points to compose the shape representation. In Fig. 2(d and g) the image overlapping result with the [14] technique. In Fig. 2(e and h) the end of the Level Set curve evolution by \(\phi _f\) function. Finally the Fig. 2(f and i) illustrates the final segmentation by LSR.

4 Experimental Results

The image base is composed by 150 flow horizontal images air-water, to each of the superficial gas velocity that was analyzed (between 0.5 and 1.5 m/s). After the segmentation, the images were overlapped in order to identify the average gas bubble shape (the bubble aligning follows the method developed by [14]), so that they could be optically compared with the images generated by the wire-mesh sensor and by the flow images in gray levels used in [14]. Finally, from the segmentation result the algorithm was developed for the gas bubbles velocity measurement, which were compared to those obtained from the wire-mesh sensor and from the mathematical model developed by Bendiksen [9].

4.1 Validation

Table 1 shows the mean F-Measure index calculated regarding, to precision measuring calculation and recall, only the pixels that belong to the segmented region that better resemble to the aimed objects. Notice that Level Set method without priori knowledge leads the following results to the proposed method, mostly concerning the P precision, indicating one segmentation in which less significative pixels are correctly classified. With regards to R recall, that represents the entire pixels proportion belonging to the object that was properly rated, the segmentation through the approach here presented shows the most promising results. These numbers demonstrate the fact that the Level Set method without priori knowledge shows higher complication when applied on occlusion conditions or overlapped parts.

Table 1. The comparative result by F-measure 40 images set (320 images), to different superficial velocities

4.2 Wire-Mesh Image Comparison and Grey Levels Images

In order to determine the applicability of the method developed on experimental plants, consider the results obtained by the proposed approach regarding the relation to the regenerated images by the wire-mesh sensor [15] and by the obtained mean shape with gray level images overlaid by the [14] essay. Figure 3 illustrates the obtained results by the three methods.

Fig. 3.
figure 3

\(jl = 15\,jG = 10\): (a) Mean image - wire-mesh, (b) Median image - wire-mesh, (c) binary image segmentation, (d) Image gray level overlapping; (e) 3D superficial shape; \(jl = 15\,jG = 15\): (f) Mean image - wire-mesh, (g) Median image - wire-mesh, (h) binary image segmentation, (i) Image gray level overlapping; (j) 3D superficial shape.

4.3 Gas Bubbles Velocity

Besides from the implementation of the new approach of the segmentation already discussed, a system capable of identify some unit cells properties was developed. With the goal of detecting automatically the beginning and the end of each gas bubble two points were defined, based on the lines and columns of the image representation. In order to detect the input and output of the bubble considered, respectively the last and the first column of the image, as shown on Fig. 4.

Fig. 4.
figure 4

Identification of the image column of the initial point (X) and end (Y).

Each time that the nose of the bubble crosses the initial point, the system records the number of the frame in which this event occurs, that means, it is identified in which frame the analyzed bubble had its beginning. From there, the associated properties measuring start, including area, length gas bubble velocity, among others, until its tail hits the finishing point, determining the unit cell finalization. Notice as example the Fig. 4. When the gas bubble is identified by crossing the initial point (Fig. 4(a)) is stored the column on which is held the first pixel that represents the bubble. This procedure is performed on the last frame (Fig. 4(b)) in which is possible to see the nose of the bubble and, from the difference between the two columns distance that the bubble travels can be calculated. To the \(J_G\) bubble velocity the obtained distance is divided by the frame number in this gap.

On the following frames, only the quantity of columns that represent the needed distance to obtain the aggregated values of the bubble areas and the liquid piston is considered. In order to give continuance to the liquid piston value calculation, the system continues to accumulate its values until the new gas bubble arrives, as definition of unit cell [18]. The velocity of the bubble results, obtained in trials, were compared to the Bendiksen horizontal flow model [9]. In Fig. 5 it is possible to verify results graphically, such values are shown satisfactory, in which the mean standard deviation was 0.13 m/s.

Fig. 5.
figure 5

Comparative graphic of the mixture velocity J.

Figure 6 exemplifies the obtained results about the properties associated to the gas length and the liquid piston. To evaluate the approach performance LSR, the values were compared to those generated by wire-mesh sensor [15].

Fig. 6.
figure 6

Comparative graphic of the length of the bubble.

It is possible to see that the achieved measures through the LSR segmentation are quite accurate regarding the values collected from the correlation of Bendiksen and to the wire-mesh sensor.

5 Conclusion

Data from the two-phase flow generated from the image segmentation contains high degree of detail and provide useful information on the flow phenomena. In this article, we investigated the use of two approaches to estimate the shape of elongated gas bubbles. The image segmentation techniques and image analysis by wire-mesh were applied to two sets of gas bubbles.

An image processing method, which can observe the interfacial information directly without disturb the flow while providing a high time-space resolution, has become an important measurement technique along with the development of the computer image processing technology.

We propose an approach for horizontal two-phase flow image segmentation based on Level Set methods and priori knowledge. The obtained results are very good, reaching precision and recall indexes higher than 98%.

We also compare these results against the ones obtained by the wellknown wire-mesh sensor. Preliminary results collaborate with the format proposition of the elongated bubble by [8] and suggest further research on other superficial velocities of gas bubbles.