7th International Conference on Multiphase Flow
ICMF 2010, Tampa, FL USA, May 30June 4, 2010
Image Texture Features of Gas/Iiquid Twophase Flow in Horizontal Pipes
Hongyi Wang, Feng Dong
Tianjin Key Laboratory of Process Measurement and Control, School of Electrical Engineering and Automation
Tianjin University. Tianjin 300072, China
Keywords: gas/1iquid twophase flow, highspeed image, texture feature, LempelZiv complexity, flow regime
Abstract
The gasliquid twophase flow in horizontal pipeline was studied by highspeed image texture analysis. A method for flow
regime recognition based on texture feature and how to choose an effective feature were introduced in this paper. Gas/liquid
twophase flow experiments were practiced and highspeed images were captured. A set of textural features were extracted
based on GLGCM. Examples of experimental results confirm the effectiveness of several features among them by LempelZiv
complexity calculation and flow regime recognition. Gray Asymmetry, Energy, Correlation, Gray Entropy, Entropy, and Inertia
most effective in gas/1iquid twophase flow regime recognition. The experimental results have shown that the feature which is
effective in flow regime recognition is of low LempelZiv complexity, but not all of the texture features with low LempelZiv
complexity are effective in classifying gas/liquid flow regime.
Introduction
Gas/1iquid twophase flow research has received great
attention in the research field of multiphase flow for its
conmen appearance in many industry processes and
fundamental role to multiphase flow (Hewitt 1978). The
widespread presence of these multifluid systems suggests
the utility of a general technique of description to
understand their behavior.
There are already some detecting methods for two phase
flow measurement. Such as, microwave, radiation, process
tomography, correlation technology, and so on (Yang 1997,
Cilliers 2001). However, all these methods have their
application limits. In the present study we focus on studying
gasliquid twophase flow characters by image texture
analysis method.
Texture is an important property for the classification of
images and can be regarded as the pattern of gray level
tones present in an image. Image analysis has been used
extensively to detect texture features in biomedical
applications (Dutta 1995, Zhu 2004, Zhu 2006, Honeycutt
2008) and terrain classification applications (Kanda 2004,
L~tal 2003, Xia 1999). Texture feature features have been
evaluated by several methods with statistical method,
structure method and frequency spectrum method in general.
In twophase flow filed, Zhou (2007) and Wang (2008) have
already successfully used the gray level cooccurrence
matrix in image features extraction for flow regime
recognition.
In this paper, gray levelgradient cooccurrence matrix
(GLGCM) was applied to analyze the flow texture of the
gas/liquid twophase flow. Experiments were carried out
with highspeed camera recording system. Gas/1iquid
twophase flow images were processed by digital image
processing method. Texture features of the experimental
images were extracted and analyzed GLGCM. The features
which could reflect gasliquid flow characters clearly were
shown in the paper. All the texture features were estimated
by LempelZiv complexity. And flow regime recognition
was realized with these features by SVM.
Nomenclature
Normalized gray matrix
Normalized gradient image
Normalized GLGCM matrix
Normalized maximum value
string
string
Texture feature
Limit complexity
complexity
Gray matrix
Gradient matrix
GLGCM matrix
coordinate
coordinate
Superficial gas velocity (m/s)
Superficial liquid velocity (m/s)
Greek letters
r Normalized value
Subsripts
g gray
max Maximum
n number
r number
s gradient
v number
7th International Conference on Multiphase Flow
ICMF 2010, Tampa, FL USA, May 30June 4, 2010
which at different superficial gas velocity, but with the same
superficial liquid velocity about 1.26 m/s, were shown in
Figure 2.
ww~ugg 19 aguages ~ K~Ci ~ *CYT~
(1) Bubble flow
~ ,
(2) Short slug flow
Experiment
(A) Experimental facility
The gaswater twophase flow experiments were conducted
at the Multiphase Flow Laboratory of Tianjin University in
Che sorzoa 11pe s matanufactured of Plexiglas, so that the
flow regime and flow process could be observed more
clearly in the experiment. The pipe is about 20m long and
the inner diameter is 50mm. The total length of this pipeline
between entrance nozzle and the outlet is approximately
16.56m, consists of two horizontal legs with the length of
7.22 and 7.30m respectively, connected by a horizontal
Ubend with the length of 2.04m.
The volume flow rate of water is about 0.116.0 m /h and
gas is 0.0682.0 in3/h The average temperature was
15.7 C" Different flow regime could be formed by
controlling the valve of water and gas pipe, such as bubble
flow, plug flow, slug flow, wavy flow, annular flow and so
on.
The multisensor system is installed at the downstream of
the pipe where the flow regime is well developed and flow
state is more stable.
A MiniVis ECO2 highspeed video camera with frame rates
up to 32000 fps was used to record the ascent bubbles in
two phase flow. The biggest resolution of the camera is
1280x1024. However, higher spatial resolutions result in
longer recording times and fewer video frames per unit time.
A compromise between recording speed and image
resolution has to be found. Experimentally, special
resolution of 640 x480 and frame frequency of 500 fps could
satisfy the measurements and was adopted in all
experiments reported in this study. Auxiliary backlighting
with 5400K color temperature was also used as back light in
the experiment. The camera is about 0.72m far from the
front wall of pipeline. The effective shooting coverage is
50mm in vertical and 95mm in horizontal. The whole
experiment system of gasliquid two phase flow was shown
as Figure 1.
; ~ ~ _
Figure 2: Gas/1iquid twophase flow images
100 images of each case were transformed into gray value
image. They were denoised by both shadow subtraction
method and wavelet filter.
Image Texture Feature Extraction
There are mainly two types of texture features: the statistical
method and structural analysis method. The statistical
character analysis of texture is a widely used technique for
image texture analysis. Both GLCM and GLGCM, which
are statistical method, capture the second order statistics of
local image features. The difference is that GLCM captures
the second order statistics of gray level values while
GLGCM captures that of gray level gradients. The GLCM
method is commonly used example of this type of 2D
histogram. But the gray levelgradient cooccurrence matrix
(GLGCM) takes into account the information of both gray
level and gradient among each pixel in an image. Wang and
Dong [16] have already verified that the texture feature of
GLGCM is better than that of GLCM in gas/1iquid
twophase flow. So the texture features based on GLGCM
were described in the following section for experimental
image analysis.
(A) Gray levelgradient cooccurrence matrix
The element h(i, j) of GLGCM is defined ad the
probability of the pixel number which has gray value I in
the normalized gray image F(m,n) and gradient value j
in the normalized gradient image G(m,n). Therefore, the
gray levelgradient cooccurrence matrix provides the space
relationship between each pixel and its adjacent pixel.
In the gasliquid two phase flow image, Sobel operator with
windowsize of 3*3 was adopted to get the gradient image.
Hence, the gradient normalized is shown as:
1 Water tank; 2 Gas tank; 3 Temperature; 4 Pressure gauge:
5 Flow meter; 6 Valve; 7 IVixing ejector; 8 Stainless
horizontal pipe; 9 Perspex horizontal pipe; 10 Highspeed
camera; 11Light; 12 Separation tank
Figure 1: Schematic view for the experimental system
(B) Highspeed image of gasliquid two phase flow
Examples of gas/1iquid twophase flow experiment images,
G(m,n) =INT[g(m,n) xNs /gmax]+1
Where, g(m,n) is the gradient image, gmax is the
(3) Long slug flow
7th International Conference on Multiphase Flow
ICMF 2010, Tampa, FL USA, May 30June 4, 2010
10 ICorrelation T iT (jLH
11 Gray Entropy T, = CH, logH
12 Grads ~ Entop T Hlog Hi~
13 EntropyT= H T
14 Inertia T= 0j
15 IHomogeneity T=H
=1 =11 (i j
(B) Texture features of gasliquid two phase flow image
The highspeed images recorded in the experiment were
preprocessed by digital image processed method. Then
texture features of flow images will be extracted by GLCM
and GLGCM separately. 6 cases were shown to explain the
method. The examples of gas/1iquid twophase flow
experiment images, which at different superficial gas
velocity (sg) in the range from 0.025m/s to 4.317m/s, but
with the same superficial liquid velocity (sl) about 1.26 m/s,
were shown in table 2.
Table 2: flow parameters of 6 cases
number S 1(m s) S (m s)
Bubble fow 1 1.263 0.048
Bubble lw 2 1.276 0.047
Short slug 1 1.269 0.051
Short slug 2 1.275 0.050
Long slug 1 1.261 0.086
Long slug 2 1.270 0.089
Textural features were extracted to measure useful
information form gasliquid flow images. All features which
introduced in Table 2 were calculated in this research. The
results of were shown in figure 3. The same texture feature
of 6 cases was plotted in one figure for comparing.
Not all the texture features could reflect the flow character
of gas/1iquid twophase flow as shown in figure 3.
Intuitively, several texture features are changing regularly,
such as: Gray Asymmetry, Energy, Gray Mean, Correlation,
Gray Entropy, Entropy, and Inertia. The other features seem
more disorderly and unsystematic. However, it is not
enough comment on these features subjectively. An
evaluation method is necessary to estimate the effectiveness
of these features, which is LempelZir complexity analyse
method.
Where, f (m, n) is the gray value image, fmax is the
maximum gray value of matrix f And Ng is the
maximum gray value after normalization, set Ny = 16 .
Then, count the number of pixels which satisfy
F(m,n)=i and G;(m,n)= j, take it as H~. The total
amount of H, were calculated by (3):
H = ffHl (3)
I=1 ]=1
Then the normalized GLGCM IT can be calculated by
formula (4):
H,, =H,, (N, N,)(4)
where, i = 1 2,Ng, j=l 12,Ns.
Fifteen texture features can be proposed by Haralick (1973).
Such as smallgrads advantage, biggrads advantage, gray
asymmetry, and so on. The feature computing formula is
described in table 1. The representative meaning for each
parameter was not too much to explain here.
Table 1: Texture features by GLGCM
Serial
Texture Features C J.i, ,llr ; formula
No.
Small Grads ;[s"H
Dominance ]
2 Big Grads ,2, H
3 Gray Asymmetry T3 = H ,/H
4 Asymmetny~i~ T =ij H, /iH
SEnergy T5 = CE ,
6 Gray Mean T6= H
7 Grads Mean J = j He n
8 Gray Variance T iT) ,J2
maximum gradient value in matrix g Ns is normalized
maximum gradient value, for the presented study, we set
Ns = 16 .
Similarly, the gray levels normalize transformation is
following formula (2):
F(m, n)= INT[J(m, n)x Ng / fnax]+1
7th International Conference on Multiphase Flow
ICMF 2010, Tampa, FL USA, May 30June 4, 2010
r n~~2b~ an oo
t 1bubble i
r bubble 2
D elong slug 1
I ~longselug2
200 400 no0 800 190 1200
t(ms)
(1) Small Grads Dominance
c8o 1 bubble 1
o o bbubble2
*shortslug1
coo eshorts~ug 2
n long slug 1
Sln l 2
t(ms)
(2) Big Grads Dominance
t(ms)
(3) Gray Asymmetry
110 tbubble21
x *shortslug1
qg.eshon slug2 xa
oooo
oo *hotMu1
longslug1
2U3 4U3 600 800 1000 1200
t(ms)
(5) Energy
29 49PP 600 100 120
sububble 2
*shon slug 1
oo oeshonslug2
%ega o oo *long slug 1
o~~~~ *** o ong slug 2
20 400~~~~. 60 0 00 10
t pms)~
(11)Gra Enrop
t(ms)
(6) Gray Mean
1200
t(ms)
(4) Grads Asymmetry
(7) Grads Mean
(9) Grads Variance
S200 400 600
t(ms)
800 1000 1200 I
(10) Correlation
18~ Boo lbubbilog1
e short slug 2
(14 Inerti su
opoo, '
200 40 BU 80 100 1200
(13) Entropy
t(ms)
(15) Homogeneity
Figure 3: Texture features contrast of 6 flow situation
xx xxxx +bubl 1 200
* short slug 1 60
C lng .lg 1 1
7th International Conference on Multiphase Flow
ICMF 2010, Tampa, FL USA, May 30June 4, 2010
completely covered. Then, the resulting cM(n) is the
complexity of a given string.
The complexity obtained above is equal to the number of
nullifications of Q. This is, to a certain extent, affected by
the length of the string, or the number of data samples n .
To find a robust complexity measure, Lempel and Ziv
suggested a normalized LempelZiv complexity measure
after their names, c, (n) defined by
Flow Regime Recognition Based on Texture
Features
(A) The LempelZiv complexity of texture features
Lempel and Ziv introduced an easily calculable measure of
complexity of finite sequences, which adopted two basic
processes: copy and insert (Lempel 1976, Liu 2007, Hong
2009). Consider a string S = {s,, s2, *, Sn } ,. Assume that a
string up to Sr = {s,, s2, **, Sr )(1
cn (r) can be reconstructed by simply copying an inserting
some of the existing vocabulary of
S ~={s1~s2,***,S,} (v
Si? = {sr,l~,,,sr+,**,Sn}) can be reproduced by the same
approach, Lempel and Ziv introduced the following steps:
Step 1: Take Q, = {sr, and ask if this term belongs to
the vocabularyr of S,, = {Sy,,_zs, } If so, string
r+1, = (Sr+1 iS a Simple repetition of an existing substring
of SY,,(i~e., a simple 'copy' of existing vocabulary can
restore it), and hence the complexity remains unchanged or
cn (r + 1)= cn (r).
Step 2: Read the next string and take Qr+2 = (Sr+1Sr+2 '
Check if Qr+2 = Sr+1Sr+2 } belongs to
S ~, = {S~,,_z.ss,,s,, (obtained by augmentling S, with
S, I ).
Step 3: If the term Qr+2 does not belong to S,,,,
increase the complexity by one, i.e.,
ci? (r + 2)= ci? (r + 1)+ 1, nullify Qr+2 =( { read the next
string and take Qr+3 = Sr+3 '
Repeats the above procedure until Si? = {s,, s2, ***,Sn) iS
c, (n) = ci? (n) /bi (n)
Where
b, (n) = him c, (n) = n / log 2M
If n is large enough, the complexity of all finite sequences
will verge on a certain value bi (n) .
The LempelZiv complexity of the 15 texture features for
the six kind of flow situation is shown in figure 4.
As shown in figure 4, for the 6 flow situation referred in this
paper, different texture feature represent different
LempelZiv complexity. The LempelZiv complexity of
Gray Asymmetry, Energy, Gray Mean, Correlation, Gray
Entropy, Entropy, and Inertia are smaller than the others,
which shown better orderliness. The results shown in figure
4, is good agreement with figure 3. Therefore, this 5 texture
features could be viewed as effective parameter for the
character study of gas/1iquid two phase flow. Flow regime
recognition is a basic useful aspect of texture feature, which
will describe in the following section.
bubble 1
H bubble 2
short slug1
O short slug2
O long slug 1
H long slug 2
p 0.8
8
.1 0.6
~0.4
0.2
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Texture features
Figure 4: LempelZiv complexity for texture features
As shown in figure 4, for the 6 flow situation referred in this
paper, different texture feature represent different
LempelZiv complexity. The LempelZiv complexity of
Gray Asymmetry, Energy, Gray Mean, Correlation, Gray
Entropy, Entropy, and Inertia are smaller than the others,
which shown better orderliness. The results shown in figure
4, is good agreement with figure 3. Therefore, this 5 texture
features could be viewed as effective parameter for the
character study of gas/1iquid two phase flow. Flow regime
recognition is a basic useful aspect of texture feature, which
will describe in the following section.
(B) Flow regime recognition by SVM
Based on the texture feature extracted above, the support
vector machine (SVM) was adopted to classify the
gas/1iquid twophase flow regime. The theory of SVM was
introduced by Peng (2002), and will not repeat in this paper.
The recognition rates based on every texture feature by
SVM are calculated, as shown in table 3.
Ta ale 3: Recognition rate base texture features by SVM
Textural feature F...;tr. ae
1 Small Grads Dominance 0.8967
2 Big Grads Dominance 0.6033
3 IGra Asynunetry 0.9667
4 Grads Asynunetry 0.8833
5 IEnergy 0.9733
6 Grave Mean 0.8967
7 Grads Mean 0.7567
8 Gray Variance 0.8533
9 Grads Variance 0.5167
10 Correlation 0.9733
11 Grav Entropy 0.9700
12 Grads Entropy 0.8100
13 Entropy 0.9633
14 Inertia 0.9700
15 Homogeneity 0.8467
As shown in table 3, Gray Asymmetry, Energy, Correlation'
Gray Entropy, Entropy, and Inertia most effective in
gas/1iquid twophase flow regime recognition. The result of
SVM is a little different from that of the estimation method
of LempelZir complexity. The Gray Mean, which presents
small complexity in figure 4, is not working well in
gas/1iquid twophase flow regime recognition by SVM.
On conclusion, the LempelZir method is not a prefect
method to determine the effective of texture features. Not all
of the texture features with low LempelZir complexity is
effective in studying gas/1iquid flow character. But all
texture features which are effective in flow regime
recognition are of low LempelZir complexity. Therefore'
LempelZir complexity can be viewed as a useful
preprocessing method in texture feature selection.
Conclusions
The highspeed image could represent gas/1iquid twophase
flow process. Texture features of highspeed image were
used to analysis gas/1iquid twophase flow character.
Gas/1iquid twophase flow experiments were carried out at
Multiphase Flow Laboratory of Tianjin University.
Experimental example with 6 cases at the same superficial
liquid velocity but different superficial gas velocity was
presented to illuminate the relationship between the flow
states and texture features.15 texture features were extracted
based on GLGCM and the LempelZir complexity of all
texture features were calculated for estimating their
effectiveness. The texture feature with low LempelZir
complexity is more orderliness, which could used for
gas/1iquid flow character analysis. The LempelZir method
is not a prefect method to determine the effective of texture
features. LempelZir complexity can only be viewed as a
7th International Conference on Multiphase Flow
ICMF 2010, Tampa, FL USA, May 30June 4, 2010
useful preprocessing method in texture feature selection.
Finally, the texture features of highspeed images were used
in flow regime recognition by SVM. The results show that
some texture features are successfully in flow regime
recognition. And, it verified that the feature which is
effective in flow regime recognition is of low LempelZir
complexity, but not all of the texture features with low
LempelZir complexity are effective in classifying
gas/1iquid flow regime.
Acknowledgements
The author appreciates the support from National Natural
Science Foundation of China (No. 50776063) and Program
for New Century Excellent Talents in University of China
(No. NCET060230)
References
Cilliers, J. J.; Xie, W.; Neething, S. J. Electrical Resistance
Tomography Using a BiDirectional Current Pulse
Technique, Meas. Sci. Techn., Vol. 12, No. 8, 9971001
(2001)
Dutta, S.; Barber, B. J.; Parameswaran, S. Texture Analysis
of Protein Distribution Images to Find Differences. Ann.
Biomed. Eng., Vol. 23, No. 6, 772786 (1995).
Haralick; Shamnugam K.; Its'hak Dinstein, Textural
Features for image classification. IEEE T. Syst. Man Cy.
C., Vol. SMC3, No. 6, 610621 (1973)
Hewitt, G F. Measurement of Two Phase Flow Parameters.
Academic Press, (1978)
Honeycutt, C. E. & Plotnick, R. S. Image Analysis
Techniques and GrayLevel Cooccurrence Matrices
(GLCM) for Calculating Bioturbation Indices and
Characterizing Biogenic Sedimentary Structures. Comput.
& Geosci., Vol. 34, No. 11, 14611472 (2008)
Hong, H.; Liang, M. Fault severity assessment for rolling
element bearings using the LempelZir complexity and
continuous wavelet transform. Journal of Sound and
Vibration, Vol. 320, No. 12, 452468 (2009)
Kanda, F.; Kubo M.; Muramoto, K. Watershed
Segmentation and Classification of Tree Species Using High
Resolution Forest Imagery. International Geoscience and
Remote Sensing Symposium (IGARSS), Vol. 6, 38223825
Lempel, A.; Zir, J. On the complexity of finite sequences.
IEEE. T. Inform. Theory., Vol. 22, No. 1, 7581 (1976)
L~tal, J.; Jirikb, D.; Uderlovia L.; Hajekb, M. MRI
'Texture' Analysis of MR Images of Apples During
Ripening and Storage. LebensmittelWissenschaft
undTrechnologie, Vol. 36, No. 7, 719727 (2003)
Liu, F. T.; He, G G Complexity measure of traffic flow
based on approximate entropy and statistical complexity.
China journal of higluray and transport, Vol. 20, No. 4,
108112 (2007)
Peng, B. B.; Sun, Z. X.; Xu, X. G SVMbased incremental
active learning for user adaptation for online graphics
recognition system. Proceedings of 2002 Intemnational
Conference on Machine Leamning and Cybemnetics, Vol. 3,
13791386 (2002)
Wang, Z. Y.; Jin, N. D.; Wang, C.; Wang, J. X. Temporal and
Spatial Evolution Characteristics of Twophase Flow Pattemn
7th International Conference on Multiphase Flow
ICMF 2010, Tampa, FL USA, May 30June 4, 2010
Based on Image Texture Analysis. J. Chem. Ind. Eng.
(China), Vol. 59, No. 5, 11221130 (2008)
Xia, D. S.; Jin, S.; Wang, J. Fractal Dimension and GGCM
Meteorology Cloud Pictures Recognition. J. Nanjing U. Sci.
Techn., Vol. 23, No. 4, 289292 (1999)
Yang, M. H.; Schlaberg, I.; Hoyle, B. S. Parallel Image
Reconstruction in RealTime Ultrasound Process
Tomography for TwoPhased Flow Measurements.
Realtime imaging, Vol. 3, No. 4, 295303 (1997)
Zhu, F. Z. & Wu, B. BScan Ultrasonic Image Feature
Extraction of Fatty Liver Based on Gray Level
Cooccurrence Matrix. Chin J. Med. Imaging Tech., Vol. 22,
No.2, 287289 (2006)
Zhu, H. Q. Segmentation of Blood Vessels in Retinal Images
Using 2D Entropies of Gray LevelGradient Cooccurrence
Matrix. Proceedings IEEE International Conference on
Acoustics, Speech and Signal Processing Proceedings
(ICASSP), Vol. 3, III509III512 (21 114)
Zhang, L.; Lu, W. Application of Segmentation Algorithm
Based on Wavelet MulScale Symbiotic Matrix in
Residential Area Extraction. J. Anhui Institute of
Mechanical & Electrical Engineering, Vol. 17, No. 2, 4347
(2002)
Zhou, Y. L.; Chen, F.; Sun, B. Identification Method of
GasLiquid TwoPhase Flow Regime Based on Gray Level
Cooccurrence Matrix and Support Vector Machine. J.
Chem. Ind. Eng. (China), Vol. 58, No. 9, 22322237 (2007)
