# Study on Two-Phase Mixing Inside Flow Focusing/Blurring Nozzle by Gray Distribution Analysis Method
## 3 Gray Distribution Analysis of Experimental Images  
### Gray Distribution of Image  
The experimental images of the gas-liquid flow in the mixing zone are composed of a large number of pixels. The gray distribution of the experimental images can be obtained by counting the light and shade degree of each pixel. Therefore, the gray distribution is actually the statistical result of the brightness and darkness of the experimental image.  
When the working conditions of the nozzle change, as the gas-liquid flow pattern in the nozzle gradually changes from flow focusing to flow blurring, the liquid cone in the mixing zone gradually distorts and finally breaks, and the mixing degree of gas-liquid two-phase fluid increases. Under different conditions, the distribution of the gas and liquid fluid in the mixing zone is different, and the density and other physical parameters of the fluid in different positions of the mixing zone are different. The most important thing is that the size, quantity and distortion degree of the gas-liquid interface in different positions of the mixing zone are different. The difference of these parameters makes the transmission, refraction and reflection ability of the gas-liquid flow to the light at different positions in the mixing zone different, resulting in different gray distribution of the experimental images. This makes it possible to use the gray distribution of the experimental images to study the two-phase flow in the mixing zone under different conditions.  
In this section, the basic concept of the gray distribution of the experimental images is described. And in Section 3.2, the relationship between the gray distribution of the experimental images and the flow patterns (flow characteristics) inside the nozzle is qualitatively analyzed through several cases. Through the qualitative relationship between the flow patterns (flow characteristics) and the gray distribution curves, we can study the gas-liquid flow and mixing inside the flow focusing/blurring nozzle.  
For each pixel, the gray scale is divided into 0 to 255, total 256, gray levels. Close to 0 level gray, indicating that the image is dark; close to 255 level gray, indicating that the image is bright. Therefore, for an experimental image \(I(M,N)\), its gray histogram can be expressed as [21]:  
\[h(r_{k})=n_{k}\text{ for }k=0,\,1,\,2,\,\ldots\,,\,L \tag{1}\]  
where \(r_{k}\) is the \(k\) level gray of the image \(I(M,N)\), \(n_{k}\) is the number of pixels in image \(I(M,N)\) with grayscale value \(r_{k}\), and \(L\) is the largest gray level of all images.  
When comparing the gray distribution of different images, the image size will have a significant impact on the number of pixels which will reduce the accuracy of the gray histogram. In order to avoid the influence of the image size, we defined the normalized gray histogram as [21]:  
\[\text{P}(r_{k})=\frac{h(r_{k})}{MN}=\frac{n_{k}}{MN}\text{ for }k=0,\,1,\,2,\, \ldots,\,L \tag{2}\]  
where \(M\) and \(N\) are the number of pixels in the row and column of the image, respectively. The components of \(\text{P}(r_{k})\) are estimates of the frequency of gray levels occurring in an image.  
In this paper, the gray histogram and normalized gray histogram of experimental images are obtained by Matlab software. At present, the research results on the gas-liquid flow in the mixing zone of the flow focusing/blurring nozzle using the gray distribution have not been reported. Therefore, the feasibility of using the gray distribution to study the gas-liquid flow in the mixing zone will be analyzed below.