Image processing for identification of vapor phase on a heating surface under the nonstationary boiling conditions

. The paper presents a two-step approach to identify bubbles and their properties such as average sizes, and nucleation frequency in a two-phase liquid flow near the heating surface under the nonstationary boiling conditions. The first step of the approach, namely bubble identification, is based on the conventional cross-correlation algorithm applied to an experimental image acquired from the high-speed camera using the bubble image templates manually assigned in advance. Further post-processing step uses temporal identified bubble data to evaluate bubble dynamic properties and track the evolution of local vaporization sites on the heating surface.


Introduction
Currently, the study of two-phase bubble flows is important in the industrial field, as they are used in many technological and energy devices. The bubbles that form on the surface of the heater washed by the stream of subcooled liquid make a significant contribution to the heat flow, which depends not only on the total fraction of the vapor phase near the surface but also on the size and shape of the bubbles, nucleation rate, and density of nucleation centers [1]. Therefore, optical methods are widely used in studies of the bubble boiling stage [2,3].
Extracting statistical information about bubble boiling parameters requires processing hundreds of video frames with dozens of bubble images in each frame, which calls for automation of the recognition process of bubble images. This process is complicated by the fact that on the surface of the heater, besides the bubbles, there are also various irregularities, shadows and highlights, and the bubbles themselves differ from the surrounding liquid only by the refractive index, and can appear both as lighter and darker circles with/without borders and with/without highlights. Bubbles can also cast shadows on the surface of the heater, and then during the transition to film boiling regime, they merge, forming agglomerations. There are examples of successful identification of bubble images by the methods of segmentation of bubble contours [4] and using artificial neural networks [5]. This paper presents a method for processing bubble images based on the crosscorrelation of each frame with a set of sample bubble images typical of this series of experiments. The developed algorithm allows processing the video results for experiments with non-stationary heat generation in a semi-automatic mode [2]. This mode is characterized by extremely small sizes and short lifetime of bubbles (about 0.05 mm and 0.2 ms, respectively), which creates increased difficulties in shooting and recognizing.

Experimental rig
Experimental data used for the research were obtained in a vertical channel with cylindric coreless heater (length 120 mm, diameter 12 mm and wall thickness -1 mm) sunken in water flow. The heating process is characterized by a very fast temperature growth (2500-6000 K/s) and is accompanied by vaporization under the nonstationary conditions. The heater surface has an average roughness of about 4 μm. For subcooling levels of 12 K, 42 K, and 72 K, the bubble-boiling phase lasted no more than 30 ms and ended with a transition to the coalescence of bubbles. The initial pressure was about 0.11 MPa; the average flow velocity was 0.2 m/s. The lighting scheme proposed in [6] was applied to obtain high-speed and high-quality video. The green lightemitting CVT-120 diode with a nominal power of 77 Watt was subjected to the short pulse current with a 4-5 times excess of the nominal amplitude. Such a short overload does not destroy the light-emitting diode and provides a high brightness light pulse. The short exposition of 5-10 μs improves the sharpness of moving objects in the video frame. The videography rate was equal to 10240 fps at a spatial resolution of 1280×51 pixels. The diode emitting surface was small enough (12 mm 2 ) to form a parallel light beam using a convex lens.
Real-time sample video was converted into an image sequence for the further preprocessing stage. The preprocessing includes conventional background removal and image stabilization using VirtualDub and ImageJ software. An example of a single experimental frame before and after the preprocessing is shown in Figs. 1(a) and 1(b).

Bubble identification
The experimental images of high-speed nonstationary processes often do not have high enough quality for further image processing due to the low spatial and temporal resolution of the optical system. Thus, the bubble detection becomes a difficult and sophisticated task. There is no universal automatic image processing software to detect bubbles on these images. Therefore, specialized software was developed. It includes two main components: 1. Graphical user interface (GUI) developed in Microsoft Visual Studio C# for viewing experimental image sequences, editing image processing parameters, filling the sets of bubble templates, and visualizing identified bubbles with capabilities of import/export of results for further processing.
2. The second component developed as Matlab.NET library realizes a bubble identification algorithm. The algorithm uses a well-known method of normalized crosscorrelation based on Fast Fourier Transform (FFT) [7]. The normalized FFT cross-correlation is a highly effective algorithm designed to find a template in input image through calculation and peak detection of 2D crosscorrelation function.
To apply the normalized FFT cross-correlation to identification of bubbles, a semiautomatic template-based approach has been developed. The general flowchart of the approach is shown in Fig. 2.
The approach includes the following four main steps carried out for each sample image from the frame sequence: 1. Create a collection of bubble templates as a representative for the certain experiment conditions depending mainly on optic and lighting system. Bubble templates are added to the collection by manually selecting bubbles on the experimental frame image using the GUI component. A single collection of bubble templates can be assigned for a single frame or set of   sequential frames. Fig. 3 shows examples of the bubble templates.
2. Assign image processing parameters (manually or by copying from previous frame processing) including: 2.1. Global threshold value to filter normalized crosscorrelation function peaks. As a rule, this value can be assigned empirically from 0.6 to 0.9.
2.2. Scaling intervals for each bubble template. Since bubble template from a collection should match as many similar bubble images of various sizes as possible, the original bubble template image should be resized to provide a maximal correlation value. Thus, a set of resized template copies is generated. The scaling interval limits the number of such new template copies. Lower and upper interval boundaries correspond to the expected minimal and maximal bubble sizes. Default values of scaling interval boundaries are 0.5 and 2, respectively.
3. Identify bubbles through normalized crosscorrelation using a bubble template set according to the following procedure.
3.1. Generate (for each template from representative collection) a set of additional bubble templates. The bubble image template is resized by bicubic interpolation with a step of one pixel within the scaling interval boundaries. 3 4. Edit manually the records of identified bubbles through the GUI. The step includes adding omitted bubbles and deleting erroneously identified bubbles. Fig. 4 presents an example of a real sample frame similar to that in Fig. 1 with identified bubble images marked as semitransparent orange circles.

Post-processing
To obtain data on the average maximum diameter and average nucleation rate changing with time in each experiment, the following sequence of actions is performed: Step 1. A total set of bubbles from all frames of the given experiment is formed.
Step 2. The set is divided into clusters with a size of not more than the specified size d0.
Step 3. A check is performed for the absence of bubbles, in which both the cluster and the time would coincide. If there are such bubbles, then step 2 is repeated with a smaller value of d0.
Step 4. Each cluster is considered as the history of the appearance and growth of bubbles from one nucleation center. On this basis, for each cluster, a sequence of moments of reaching the maximum diameter and the periods between them are determined. The nucleation rate is taken as the reciprocal of the period.
Step 5. For maximum diameters and frequencies, moving averages are constructed. In this case, for frequencies, the weight is 1, and for diameters, the weight corresponds to the volume of the bubble, since the volume determines to the greatest extent the amount of heat transferred by the bubble.
Step 6. The moving averages are approximated by quadratic functions of time, and the values of the interpolating functions are extracted at N moments evenly filling the period of bubble boiling.
As a result of the post-processing, we have for each experiment a sequence of N values of the average maximum diameter and N values of the average nucleation frequency as functions of time.
In Step 2 of the above algorithm, the total array of bubbles is divided into clusters according to the following rules. a. Initially, the cluster list is empty. b. Bubbles are added to existing clusters one by one. c. If among the existing clusters there is such that the distance from its centroid to the bubble is less than d0, then the bubble is added to this cluster, otherwise, the bubble gives rise to a new cluster. Fig. 5 shows Step 5 of processing the maximum diameter values for an experiment conducted with a pressure in the cross-section of the video recording of 0.175 MPa, an initial flow rate of 0.19 m/s, and an initial water temperature of 64° C.
The density of nucleation centers and the fraction of the area occupied by the vapor phase are found by directly summing over the initial total set of bubbles before clustering and extracting maximum diameters. Thus, bubbles are taken into account in all stages of growth, not only when achieving the maximum size. Fig. 6 shows the change in the diameters of the bubbles and the density of nucleation centers depending on the fraction of the area occupied by the bubbles in the same experiment.

Conclusion
To identify bubbles and their characteristics for the case of nonstationary surface boiling, an approach based on normalized cross-correlation with previously created bubble templates has been developed and implemented for real experimental images of poor quality. As a result of the processing, the dynamic characteristics of bubble boiling such as the density of nucleation centers, the fraction of the surface occupied by the vapor phase, the average maximum diameter, and the nucleation frequency, were extracted from video frames in a semiautomatic mode.
The work was carried out under State Assignment, Project 17.1.3 (reg. number АААА-А17-117030310443-5) of Fundamental Research of Siberian Branch of the Russian Academy of Sciences and partly supported by the