Methods, apparatus, storage media and electronic equipment for identifying flow patterns in oil-water two-phase flow

By performing grayscale transformation and wavelet transform on oil-water two-phase flow images, the grayscale co-occurrence matrix is ​​obtained, texture features are extracted, and a Gaussian Naive Bayes classifier is used for weighted optimization processing. This solves the problem of large flow pattern recognition error in existing technologies and achieves efficient and accurate flow pattern recognition.

CN114419446BActive Publication Date: 2025-10-28MAINTENANCE BRANCH COMPANY STATE GRID ZHEJIANG ELECTRIC POWER +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210094190.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2025-10-28
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

Existing methods for identifying flow patterns in oil-water two-phase flows suffer from high workload and large errors in the identification process, resulting in a high error rate.

Method used

By acquiring two-phase flow images in the oil-water channel, performing grayscale transformation and wavelet transform, obtaining the grayscale co-occurrence matrix, extracting multiple texture features, and using a Gaussian Naive Bayes classifier for manifold recognition, the texture features are processed using weighted optimization.

Benefits of technology

It achieves accurate identification of oil-water two-phase flow, reduces the identification error rate, and improves identification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419446B_ABST
    Figure CN114419446B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, storage medium, and electronic device for identifying the flow pattern of an oil-water two-phase flow. The method includes: acquiring a two-phase flow image of an oil-water two-phase flow in an oil-water channel; performing a grayscale transformation on the two-phase flow image to obtain a grayscale image corresponding to the two-phase flow; performing a wavelet transform on the grayscale image to obtain a reconstructed image corresponding to the grayscale image; obtaining a grayscale co-occurrence matrix corresponding to the grayscale image; obtaining multiple texture features of the oil-water two-phase flow based on the reconstructed image and the grayscale co-occurrence matrix; performing weighted optimization processing on each texture feature; and inputting the weighted optimized texture features into a pre-set Gaussian Naive Bayes classifier for processing to determine the flow pattern of the oil-water two-phase flow. By applying the method provided by this invention, multiple texture features are obtained through the identification processing of the oil-water two-phase flow image. Inputting these texture features into the classifier allows for the determination of the flow pattern of the oil-water two-phase flow, resulting in more accurate identification and a lower error rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of flow pattern recognition, and in particular to a method, apparatus, storage medium, and electronic device for flow pattern recognition of oil-water two-phase flow. Background Technology

[0002] Flow pattern refers to the distribution of two-phase media within a pipeline, i.e., the formation of fluid flow. By studying flow pattern recognition algorithms, the flow patterns of oil-water two-phase flows can be effectively predicted and identified, thereby inferring information such as the water content, humidity, and viscosity of the oil-water mixture. This has significant engineering application value for oil-water separation systems.

[0003] Existing methods for identifying the flow patterns of oil-water two-phase flows have limitations. The identification process is labor-intensive and results in significant errors, leading to a high error rate. Summary of the Invention

[0004] In view of the above problems, the present invention provides a method, apparatus, storage medium, and electronic device for identifying the flow pattern of oil-water two-phase flow that overcomes or at least partially solves the above problems. The technical solution is as follows:

[0005] A method for identifying the flow pattern of an oil-water two-phase flow includes:

[0006] Two-phase flow images of oil and water in an oil-water channel are acquired, and grayscale transformation is performed on the two-phase flow images to obtain the grayscale images corresponding to the two-phase flow images.

[0007] Perform wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image;

[0008] Obtain the gray-level co-occurrence matrix corresponding to the gray-level image;

[0009] Based on the reconstructed image and the gray-level co-occurrence matrix, multiple texture features of the oil-water two-phase flow are obtained;

[0010] Each of the texture features is subjected to weighted optimization processing;

[0011] Each of the texture features, after weighted optimization, is input into a pre-set Gaussian Naive Bayes classifier for processing to determine the flow type of the oil-water two-phase flow.

[0012] Optionally, in the above method, performing wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image includes:

[0013] Determine the first image matrix of the grayscale image;

[0014] Perform a one-dimensional wavelet transform on each row of the first image matrix to obtain the low-frequency and high-frequency components of the grayscale image in the horizontal direction, as well as the second image matrix corresponding to the first image matrix.

[0015] Perform a one-dimensional wavelet transform on each column of the second image matrix to obtain the third image matrix corresponding to the second image matrix;

[0016] Perform a one-dimensional discrete wavelet inverse transform on each column of the third image matrix to obtain the fourth image matrix corresponding to the third image matrix;

[0017] Perform a one-dimensional discrete wavelet inverse transform on each row of the fourth image matrix to obtain the reconstructed image corresponding to the grayscale image.

[0018] Optionally, in the above method, obtaining the gray-level co-occurrence matrix corresponding to the gray-level image includes:

[0019] Determine the matrix window corresponding to the grayscale image;

[0020] Using the matrix window, the grayscale image is traversed from a preset starting position in the grayscale image according to a preset traversal order;

[0021] At each traversal position of the matrix window, determine the first gray-level co-occurrence matrix corresponding to the matrix window in each preset statistical direction at that traversal position;

[0022] Determine the probability matrix corresponding to each of the first gray-level co-occurrence matrices;

[0023] Calculate the matrix eigenvalues ​​of each probability matrix, and determine the averaged eigenvalues ​​of the matrix window at the traversal position based on the matrix eigenvalues.

[0024] When the matrix window completes the traversal process of the grayscale image, the grayscale co-occurrence matrix corresponding to the grayscale image is obtained based on the averaged feature value corresponding to each traversal position of the matrix window.

[0025] Optionally, the above method may include performing weighted optimization processing on each texture feature, which includes:

[0026] Calculate the likelihood observation result corresponding to each texture feature;

[0027] Based on the likelihood observation results corresponding to each texture feature, calculate the likelihood observation peak value corresponding to each texture feature;

[0028] The weight of each texture feature is calculated based on the likelihood observation peak value corresponding to each texture feature;

[0029] The weights of each texture feature are normalized to complete the weighted optimization process for each texture feature.

[0030] Optionally, the oil-water two-phase flow described above can be classified as trickle, jet, plunger, sausage, satellite trickle, or parallel flow.

[0031] Optionally, in the above method, performing a one-dimensional wavelet transform on each row of the first image matrix to obtain the low-frequency and high-frequency components of the grayscale image in the horizontal direction includes:

[0032] Convolve the one-dimensional vector corresponding to each row of the first image matrix with the system function of the high-pass filter to obtain the high-frequency components of the grayscale image in the horizontal direction;

[0033] The low-frequency component of the grayscale image in the horizontal direction is obtained by convolving the one-dimensional vector corresponding to each row of the first image matrix with the system function of the low-pass filter.

[0034] Optionally, in the above method, determining the probability matrix corresponding to each of the first gray-level co-occurrence matrices includes:

[0035] Calculate the sum of the elements of the first gray-level co-occurrence matrix;

[0036] The probability matrix corresponding to the first gray-level co-occurrence matrix is ​​determined by dividing the value of each matrix element in the first gray-level co-occurrence matrix by the sum value.

[0037] A flow pattern identification device for oil-water two-phase flow includes:

[0038] The acquisition unit is used to acquire two-phase flow images of oil and water in the oil-water channel, and to perform grayscale transformation on the two-phase flow images to obtain grayscale images corresponding to the two-phase flow images.

[0039] A transformation unit is used to perform wavelet transform on the grayscale image to obtain a reconstructed image corresponding to the grayscale image;

[0040] The first acquisition unit is used to acquire the gray-level co-occurrence matrix corresponding to the gray-level image;

[0041] The second acquisition unit is used to obtain multiple texture features of the oil-water two-phase flow based on the reconstructed image and the gray-level co-occurrence matrix.

[0042] A weighting unit is used to perform weighted optimization processing on each of the texture features;

[0043] The processing unit is used to input the weighted and optimized texture features into a pre-set Gaussian Naive Bayes classifier for processing to determine the flow type of the oil-water two-phase flow.

[0044] A storage medium comprising stored instructions, wherein, when the instructions are executed, the device containing the storage medium is controlled to perform the above-described flow pattern identification method for oil-water two-phase flow.

[0045] An electronic device includes at least one processor, at least one memory and a bus connected to the processor; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the above-mentioned flow pattern identification method for oil-water two-phase flow.

[0046] Compared with existing technologies, the present invention has the following advantages: a flow pattern identification method for oil-water two-phase flow includes: acquiring a two-phase flow image of oil-water two-phase flow in an oil-water channel, and performing grayscale transformation on the two-phase flow image to obtain a grayscale image corresponding to the two-phase flow image; performing wavelet transform on the grayscale image to obtain a reconstructed image corresponding to the grayscale image; obtaining a grayscale co-occurrence matrix corresponding to the grayscale image; obtaining multiple texture features of the oil-water two-phase flow based on the reconstructed image and the grayscale co-occurrence matrix; performing weighted optimization processing on each texture feature; and inputting each texture feature after weighted optimization processing into a pre-set Gaussian Naive Bayes classifier for processing to determine the flow pattern to which the oil-water two-phase flow belongs. In the method provided by the embodiments of the present invention, by acquiring a two-phase flow image of oil-water two-phase flow, performing grayscale transformation on the acquired image, and obtaining multiple texture features of the oil-water two-phase flow through corresponding processing, and then processing them through a set classifier, the flow pattern of the oil-water two-phase flow can be determined, resulting in more accurate identification and a reduced identification error rate.

[0047] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0048] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0049] Figure 1 A flowchart illustrating a flow pattern identification method for oil-water two-phase flow provided in this embodiment of the invention;

[0050] Figure 2 An example diagram of a flow pattern identification method for oil-water two-phase flow provided in an embodiment of the present invention;

[0051] Figure 3 A schematic diagram of the structure of a flow pattern identification device for oil-water two-phase flow provided in an embodiment of the present invention;

[0052] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0053] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0054] refer to Figure 1 The following is a flowchart illustrating a flow pattern identification method for oil-water two-phase flow provided in an embodiment of the present invention. Figure 1 The illustrated method execution process is a feasible implementation scheme of the method provided in the embodiments of the present invention. This scheme can be applied to an oil-water two-phase flow identification platform, and its execution subject is the server in the identification platform. The method specifically includes:

[0055] S101: Acquire a two-phase flow image of the oil-water two-phase flow in the oil-water channel, and perform grayscale transformation on the two-phase flow image to obtain a grayscale image corresponding to the two-phase flow image;

[0056] In the method provided by this embodiment of the invention, a high-definition camera is used to capture the two-phase flow of oil and water in the oil-water channel to obtain a two-phase flow image of the two-phase flow in the oil-water channel, and the two-phase flow image is subjected to grayscale transformation to obtain a corresponding grayscale image.

[0057] S102: Perform wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image;

[0058] In the method provided by the embodiments of the present invention, wavelet transform technology is used to perform wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image.

[0059] S103: Obtain the gray-level co-occurrence matrix corresponding to the gray-level image;

[0060] S104: Based on the reconstructed image and the gray-level co-occurrence matrix, obtain multiple texture features of the oil-water two-phase flow;

[0061] In the method provided by the embodiments of the present invention, multiple texture features of oil-water two-phase flow are obtained based on the gray-level co-occurrence matrix corresponding to the reconstructed image and gray-level image that have been acquired.

[0062] S105: Perform weighted optimization processing on each of the texture features;

[0063] S106: The weighted and optimized texture features are input into a pre-set Gaussian Naive Bayes classifier for processing to determine the flow type of the oil-water two-phase flow.

[0064] In the method provided by the embodiments of the present invention, by acquiring two-phase flow images of oil-water two-phase flow, performing grayscale transformation on the acquired images, and obtaining multiple texture features of oil-water two-phase flow after appropriate processing, and then processing them through a set classifier, the flow pattern of oil-water two-phase flow can be determined, the identification is more accurate, and the identification error rate is reduced.

[0065] In the method provided by this embodiment of the invention, the step of performing wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image includes:

[0066] Determine the first image matrix of the grayscale image;

[0067] Perform a one-dimensional wavelet transform on each row of the first image matrix to obtain the low-frequency and high-frequency components of the grayscale image in the horizontal direction, as well as the second image matrix corresponding to the first image matrix.

[0068] Perform a one-dimensional wavelet transform on each column of the second image matrix to obtain the low-frequency components, low-frequency components in the horizontal and vertical directions, high-frequency components in the horizontal and vertical directions, high-frequency components in the horizontal and vertical directions, and high-frequency components in the horizontal and vertical directions of the grayscale image, and obtain the third image matrix corresponding to the second image matrix.

[0069] Perform a one-dimensional discrete wavelet inverse transform on each column of the third image matrix to obtain the fourth image matrix corresponding to the third image matrix;

[0070] Perform a one-dimensional discrete wavelet inverse transform on each row of the fourth image matrix to obtain the reconstructed image corresponding to the grayscale image.

[0071] In the method provided by this embodiment of the invention, obtaining the gray-level co-occurrence matrix corresponding to the gray-level image includes:

[0072] Determine the matrix window corresponding to the grayscale image;

[0073] Using the matrix window, the grayscale image is traversed from a preset starting position in the grayscale image according to a preset traversal order;

[0074] At each traversal position of the matrix window, determine the first gray-level co-occurrence matrix corresponding to the matrix window in each preset statistical direction at that traversal position;

[0075] Determine the probability matrix corresponding to each of the first gray-level co-occurrence matrices;

[0076] Calculate the matrix eigenvalues ​​of each probability matrix, and determine the averaged eigenvalues ​​of the matrix window at the traversal position based on the matrix eigenvalues.

[0077] When the matrix window completes the traversal process of the grayscale image, the grayscale co-occurrence matrix corresponding to the grayscale image is calculated based on the averaged feature value corresponding to each traversal position of the matrix window.

[0078] In the method provided by this embodiment of the invention, the weighted optimization processing for each texture feature includes:

[0079] Calculate the likelihood observation result corresponding to each texture feature;

[0080] Based on the likelihood observation results corresponding to each texture feature, calculate the likelihood observation peak value corresponding to each texture feature;

[0081] The weight of each texture feature is calculated based on the likelihood observation peak value corresponding to each texture feature;

[0082] The weights of each texture feature are normalized to complete the weighted optimization process for each texture feature.

[0083] In the method provided in this embodiment of the invention, the oil-water two-phase flow belongs to the flow pattern of dripping, jetting, plunger flow, sausage flow, satellite dripping, and parallel flow.

[0084] In the method provided by this embodiment of the invention, performing a one-dimensional wavelet transform on each row of the first image matrix to obtain the low-frequency and high-frequency components of the grayscale image in the horizontal direction includes:

[0085] Convolve the one-dimensional vector corresponding to each row of the first image matrix with the system function of the high-pass filter to obtain the high-frequency components of the grayscale image in the horizontal direction;

[0086] The low-frequency component of the grayscale image in the horizontal direction is obtained by convolving the one-dimensional vector corresponding to each row of the first image matrix with the system function of the low-pass filter.

[0087] In the method provided by this embodiment of the invention, determining the probability matrix corresponding to each of the first gray-level co-occurrence matrices includes:

[0088] Calculate the sum of the elements of the first gray-level co-occurrence matrix;

[0089] The probability matrix corresponding to the first gray-level co-occurrence matrix is ​​determined by dividing the value of each matrix element in the first gray-level co-occurrence matrix by the sum value.

[0090] In the method provided by this invention, a good feature descriptor is a key factor in achieving manifold classification. Wavelet transform, renowned for its multi-resolution decomposition capabilities, is known for its ability to peel away image information layer by layer through low-pass and high-pass filters, and is often referred to as the skeleton of an image microscope. Therefore, it is frequently used in feature extraction, image classification, and other fields.

[0091] The problem that the method provided in this invention aims to solve is that existing manifold recognition algorithms have redundant features, which increases the workload and time required for the recognition process and lacks timeliness.

[0092] In the method provided by the embodiments of the present invention, firstly, for the oil-water detector part of the oil-water separation system, a high-speed camera is used to collect the fluid flow state inside the channel;

[0093] Texture features of manifolds are analyzed based on wavelet transform and gray-level co-occurrence matrix.

[0094] The texture features are normalized and weighted using a weighted approach;

[0095] The weighted and optimized texture features are fed into a Gaussian Naive Bayes classifier to accurately identify six flow patterns in a two-phase flow system: trickle, jet, plunger, sausage, satellite trickle, and parallel flow.

[0096] In the method provided by the embodiments of the present invention, the acquired two-phase flow image is subjected to grayscale transformation to obtain a grayscale image of the flow pattern;

[0097] For the manifold grayscale image, which is a two-dimensional image, the discrete wavelet transform is performed on the two-dimensional image, including the following steps:

[0098] Perform a one-dimensional wavelet transform on each row of the image to obtain the low-frequency component L and high-frequency component H of the original image in the horizontal direction;

[0099] Perform a one-dimensional wavelet transform on each column of the transformed data to obtain the low-frequency components LL in the horizontal and vertical directions, the low-frequency components LH in the horizontal direction and the high-frequency components LH in the vertical direction, the high-frequency components HL in the horizontal direction and the low-frequency components HH in the vertical direction of the original image.

[0100] By performing a one-dimensional discrete wavelet inverse transform on each column of the transformation result, and then performing a one-dimensional discrete wavelet inverse transform on each row of the transformed data, the reconstructed image can be obtained.

[0101] For the obtained manifold grayscale image, the grayscale co-occurrence matrix is ​​calculated, and the steps include:

[0102] Calculate a matrix window for a grayscale image and statistically analyze the grayscale co-occurrence matrix according to a certain direction;

[0103] Divide each element of the matrix by the sum of all elements in the matrix to obtain the probability matrix;

[0104] Calculate the eigenvalues ​​of the gray-level co-occurrence matrix of a single window, and then calculate the eigenvalues ​​corresponding to all statistical directions of the single window;

[0105] Average each feature value to obtain the averaged feature value, and repeat the above steps to calculate the gray-level co-occurrence matrix of the entire image;

[0106] For the extracted multiple texture features, each feature is assigned a weight for observation. The steps include:

[0107] Assign feature weights and calculate their likelihood observations;

[0108] Calculate the likelihood observation peak value for each feature;

[0109] The feature weights are normalized based on the obtained likelihood observations and the observed peaks. The steps include:

[0110] The weight of each feature is calculated based on the peak value of the likelihood observation;

[0111] The obtained feature weights are normalized;

[0112] The weighted texture features are fed into a Gaussian Naive Bayes classifier to accurately identify the six manifolds.

[0113] In the method provided by the embodiments of the present invention, a one-dimensional wavelet transform is performed on each row of the image, and the high-frequency component H is obtained by convolving the one-dimensional vector with the system function of the high-pass filter, and the low-frequency component L is obtained by convolving the one-dimensional vector with the system function of the low-pass filter.

[0114] The inverse discrete wavelet transform is a process of separating and reconstructing a signal according to low frequency and directed high frequency.

[0115] The method provided in this embodiment of the invention calculates the eigenvalues ​​of the gray-level co-occurrence matrix, which mainly include energy, contrast, correlation, and entropy.

[0116] ASM=∑ i ∑ j P(i, j)2

[0117] CON = ∑ i ∑ j (i, j) 2 P(i, j)

[0118] CORRLN=|∑ i ∑ j ((ij)P(i,j))-μ x μ y | / σ x σ y

[0119] ENT=-∑ i ∑ j P(i,j)logP(i,j).

[0120] Where ASM represents energy, which is the sum of squares of the elements of the gray-level co-occurrence matrix; CON represents contrast, which is the moment of inertia near the main diagonal of the gray-level co-occurrence matrix; CORRLN represents correlation, which measures the similarity of the gray levels of an image in the row or column direction; and ENT represents entropy, which is a measure of the randomness of the amount of information contained in an image.

[0121] In the method provided by the embodiments of the present invention, each feature is assigned a weight for likelihood observation;

[0122] Assign a weight of θ to the i-th feature i The likelihood observation results are as follows:

[0123]

[0124] Where x is the input, y is the observed value, and p is the predicted value.

[0125] Calculate the observed peak of the i-th feature:

[0126]

[0127] in, This represents the average value of the likelihood observations;

[0128] In the method provided in this embodiment of the invention, the weights of the texture features are normalized.

[0129] The weight of the i-th feature is calculated as follows:

[0130]

[0131] in, x i It is the spatial location of the likelihood observation peak of the i-th feature, and N is the number of features;

[0132] Calculate the normalized feature weights of the i-th feature:

[0133]

[0134] in, It is the weight of the i-th feature.

[0135] The weighted texture features are fed into a Gaussian Naive Bayes classifier to identify trickle, jet, plunger, sausage, satellite trickle, and parallel flow in a two-phase flow system.

[0136] In the method provided by the embodiments of the present invention, the fluid flow status inside the oil-water detector channel of the oil-water separation system is collected by a high-speed camera and displayed in real time on the computer, which can effectively achieve flow visualization.

[0137] Texture features of manifolds are extracted based on wavelet transform and gray-level co-occurrence matrix, and the correlation characteristics of gray-level space of manifolds are statistically analyzed with multi-resolution characteristics.

[0138] We use a weighted approach to normalize and optimize texture features, adaptively adjusting the coefficients between each feature to allow each feature to be fused and complementary, resulting in effective feature representation.

[0139] The Gaussian Naive Bayes classifier is simple to use and has a fast response time for multi-class classification problems, and can efficiently complete manifold multi-class classification problems.

[0140] The method provided in this embodiment of the invention involves an oil-water separation system where an oil-water mixture enters an oil-water detector. When the oil content exceeds the standard, the mixture enters an oil-water separation tank for separation; when the oil content does not exceed the standard, the mixture enters a water passage. Figure 2 The image displayed shows the hardware components of the oil-water two-phase flow system in the oil-water detector. Multiple flow patterns are identified by capturing liquid flow patterns within the channel using images from a high-speed camera.

[0141] exist Figure 2 Based on this, the flow pattern identification method for oil-water two-phase flow provided in this embodiment of the invention can be specifically implemented as follows:

[0142] For the oil-water detector section of the oil-water separation system, a high-speed camera is used to collect the fluid flow status inside the channel;

[0143] The textural features of manifolds are analyzed based on wavelet transform and gray-level co-occurrence matrix. The specific steps are as follows:

[0144] The acquired two-phase flow image is subjected to grayscale transformation to obtain a grayscale image of the flow pattern;

[0145] For the acquired two-phase flow grayscale image, a one-dimensional wavelet transform is performed on each row and each column of the image, and then the image is separated and reconstructed according to the low frequency and the effective high frequency.

[0146] For the acquired two-phase flow grayscale image, calculate its grayscale co-occurrence matrix, and the specific feature values ​​include energy, contrast, correlation and entropy;

[0147] For multiple texture features, weights are assigned to each feature to adaptively adjust the coefficients between them, allowing each feature to be fused and complementary, resulting in effective feature representation. The specific steps are as follows:

[0148] Weights are assigned to various texture features, and their likelihood observations and the likelihood observation peaks of each feature are calculated.

[0149] The characteristic weights are calculated based on the likelihood observation results and the likelihood observation peak, and then normalized.

[0150] The weighted texture features are used as feature vectors and fed into a Gaussian Naive Bayes classifier to accurately identify six flow patterns in a two-phase flow system: trickle, jet, plunger, sausage, satellite trickle, and parallel flow.

[0151] This invention also provides a flow pattern identification device for oil-water two-phase flow corresponding to a flow pattern identification method for oil-water two-phase flow. The flow pattern identification device is used to implement the flow pattern identification method for oil-water two-phase flow in practice. A structural diagram of the flow pattern identification device for oil-water two-phase flow can be found here. Figure 3 The flow pattern identification device for the oil-water two-phase flow includes:

[0152] The acquisition unit 201 is used to acquire two-phase flow images of oil and water two-phase flow in the oil-water channel, and to perform grayscale transformation on the two-phase flow images to obtain grayscale images corresponding to the two-phase flow images.

[0153] Transformation unit 202 is used to perform wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image;

[0154] The first acquisition unit 203 is used to acquire the gray-level co-occurrence matrix corresponding to the gray-level image;

[0155] The second acquisition unit 204 is used to obtain multiple texture features of the oil-water two-phase flow based on the reconstructed image and the gray-level co-occurrence matrix.

[0156] Weighting unit 205 is used to perform weighted optimization processing on each of the texture features;

[0157] The processing unit 206 is used to input the various texture features that have undergone weighted optimization into a pre-set Gaussian Naive Bayes classifier for processing in order to determine the flow type to which the oil-water two-phase flow belongs.

[0158] In the device provided in this embodiment of the invention, by acquiring two-phase flow images of oil-water two-phase flow and performing grayscale transformation on the acquired images, multiple texture features of the oil-water two-phase flow are obtained after corresponding processing. Then, by processing through a set classifier, the flow pattern of the oil-water two-phase flow can be determined, making the identification more accurate and reducing the identification error rate.

[0159] The flow pattern identification device for oil-water two-phase flow provided in this embodiment of the invention includes a processor and a memory. Each of the above-mentioned units is stored in the memory as a program unit, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.

[0160] The processor contains a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured, and by adjusting kernel parameters, the flow pattern identification process for oil-water two-phase flow can be dynamically executed, improving identification efficiency.

[0161] This invention provides a storage medium storing a program that, when executed by a processor, implements the flow pattern identification method for oil-water two-phase flow.

[0162] This invention provides a processor for running a program, wherein the program executes the flow pattern identification method for oil-water two-phase flow.

[0163] like Figure 4 As shown, this embodiment of the invention provides an electronic device 30, which includes at least one processor 301, at least one memory 302 connected to the processor 301, and a bus 303. The processor 301 and the memory 302 communicate with each other via the bus 303. The processor 301 is used to call program instructions in the memory 302 to execute the aforementioned flow pattern identification method for oil-water two-phase flow. The device described herein can be a server, PC, PAD, mobile phone, etc.

[0164] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that initializes the following method steps, including:

[0165] Two-phase flow images of oil and water in an oil-water channel are acquired, and grayscale transformation is performed on the two-phase flow images to obtain the grayscale images corresponding to the two-phase flow images.

[0166] Perform wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image;

[0167] Obtain the gray-level co-occurrence matrix corresponding to the gray-level image;

[0168] Based on the reconstructed image and the gray-level co-occurrence matrix, multiple texture features of the oil-water two-phase flow are obtained;

[0169] Each of the texture features is subjected to weighted optimization processing;

[0170] Each of the texture features, after weighted optimization, is input into a pre-set Gaussian Naive Bayes classifier for processing to determine the flow type of the oil-water two-phase flow.

[0171] Optionally, in the above method, performing wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image includes:

[0172] Determine the first image matrix of the grayscale image;

[0173] Perform a one-dimensional wavelet transform on each row of the first image matrix to obtain the low-frequency and high-frequency components of the grayscale image in the horizontal direction, as well as the second image matrix corresponding to the first image matrix.

[0174] Perform a one-dimensional wavelet transform on each column of the second image matrix to obtain the third image matrix corresponding to the second image matrix;

[0175] Perform a one-dimensional discrete wavelet inverse transform on each column of the third image matrix to obtain the fourth image matrix corresponding to the third image matrix;

[0176] Perform a one-dimensional discrete wavelet inverse transform on each row of the fourth image matrix to obtain the reconstructed image corresponding to the grayscale image.

[0177] Optionally, in the above method, obtaining the gray-level co-occurrence matrix corresponding to the gray-level image includes:

[0178] Determine the matrix window corresponding to the grayscale image;

[0179] Using the matrix window, the grayscale image is traversed from a preset starting position in the grayscale image according to a preset traversal order;

[0180] At each traversal position of the matrix window, determine the first gray-level co-occurrence matrix corresponding to the matrix window in each preset statistical direction at that traversal position;

[0181] Determine the probability matrix corresponding to each of the first gray-level co-occurrence matrices;

[0182] Calculate the matrix eigenvalues ​​of each probability matrix, and determine the averaged eigenvalues ​​of the matrix window at the traversal position based on the matrix eigenvalues.

[0183] When the matrix window completes the traversal process of the grayscale image, the grayscale co-occurrence matrix corresponding to the grayscale image is obtained based on the averaged feature value corresponding to each traversal position of the matrix window.

[0184] Optionally, the above method may include performing weighted optimization processing on each texture feature, which includes:

[0185] Calculate the likelihood observation result corresponding to each texture feature;

[0186] Based on the likelihood observation results corresponding to each texture feature, calculate the likelihood observation peak value corresponding to each texture feature;

[0187] The weight of each texture feature is calculated based on the likelihood observation peak value corresponding to each texture feature;

[0188] The weights of each texture feature are normalized to complete the weighted optimization process for each texture feature.

[0189] Optionally, the oil-water two-phase flow described above can be classified as trickle, jet, plunger, sausage, satellite trickle, or parallel flow.

[0190] Optionally, in the above method, performing a one-dimensional wavelet transform on each row of the first image matrix to obtain the low-frequency and high-frequency components of the grayscale image in the horizontal direction includes:

[0191] Convolve the one-dimensional vector corresponding to each row of the first image matrix with the system function of the high-pass filter to obtain the high-frequency components of the grayscale image in the horizontal direction;

[0192] The low-frequency component of the grayscale image in the horizontal direction is obtained by convolving the one-dimensional vector corresponding to each row of the first image matrix with the system function of the low-pass filter.

[0193] Optionally, in the above method, determining the probability matrix corresponding to each of the first gray-level co-occurrence matrices includes:

[0194] Calculate the sum of the elements of the first gray-level co-occurrence matrix;

[0195] The probability matrix corresponding to the first gray-level co-occurrence matrix is ​​determined by dividing the value of each matrix element in the first gray-level co-occurrence matrix by the sum value.

[0196] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0197] In a typical configuration, the device includes one or more processors (CPUs), memory, and a bus. The device may also include input / output interfaces, network interfaces, etc.

[0198] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM, and memory includes at least one memory chip. Memory is an example of computer-readable media.

[0199] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0200] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0201] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0202] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for identifying the flow pattern of an oil-water two-phase flow, characterized in that, include: Two-phase flow images of oil and water in an oil-water channel are acquired, and grayscale transformation is performed on the two-phase flow images to obtain the grayscale images corresponding to the two-phase flow images. Perform wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image; Obtain the gray-level co-occurrence matrix corresponding to the gray-level image; Based on the reconstructed image and the gray-level co-occurrence matrix, multiple texture features of the oil-water two-phase flow are obtained; Each of the texture features is subjected to weighted optimization processing; Each of the texture features that has undergone weighted optimization is input into a pre-set Gaussian Naive Bayes classifier for processing to determine the flow pattern of the oil-water two-phase flow, which includes trickle flow, jet flow, plunger flow, sausage flow, satellite trickle flow, and parallel flow. The step of obtaining the gray-level co-occurrence matrix corresponding to the gray-level image includes: Determine the matrix window corresponding to the grayscale image; Using the matrix window, the grayscale image is traversed from a preset starting position in the grayscale image according to a preset traversal order; At each traversal position of the matrix window, determine the first gray-level co-occurrence matrix corresponding to the matrix window in each preset statistical direction at that traversal position; Determine the probability matrix corresponding to each of the first gray-level co-occurrence matrices; Calculate the matrix eigenvalues ​​of each probability matrix, and determine the averaged eigenvalues ​​of the matrix window at the traversal position based on the matrix eigenvalues. When the matrix window completes the traversal process of the grayscale image, the grayscale co-occurrence matrix corresponding to the grayscale image is obtained based on the averaged feature value corresponding to each traversal position of the matrix window.

2. The method according to claim 1, characterized in that, The step of performing wavelet transform on the grayscale image to obtain the reconstructed image corresponding to the grayscale image includes: Determine the first image matrix of the grayscale image; Perform a one-dimensional wavelet transform on each row of the first image matrix to obtain the low-frequency and high-frequency components of the grayscale image in the horizontal direction, as well as the second image matrix corresponding to the first image matrix. Perform a one-dimensional wavelet transform on each column of the second image matrix to obtain the third image matrix corresponding to the second image matrix; Perform a one-dimensional discrete wavelet inverse transform on each column of the third image matrix to obtain the fourth image matrix corresponding to the third image matrix; Perform a one-dimensional discrete wavelet inverse transform on each row of the fourth image matrix to obtain the reconstructed image corresponding to the grayscale image.

3. The method according to claim 1, characterized in that, The weighted optimization process for each texture feature includes: Calculate the likelihood observation result corresponding to each texture feature; Based on the likelihood observation results corresponding to each texture feature, calculate the likelihood observation peak value corresponding to each texture feature; The weight of each texture feature is calculated based on the likelihood observation peak value corresponding to each texture feature; The weights of each texture feature are normalized to complete the weighted optimization process for each texture feature.

4. The method according to claim 2, characterized in that, The step of performing a one-dimensional wavelet transform on each row of the first image matrix to obtain the low-frequency and high-frequency components of the grayscale image in the horizontal direction includes: Convolve the one-dimensional vector corresponding to each row of the first image matrix with the system function of the high-pass filter to obtain the high-frequency components of the grayscale image in the horizontal direction; The low-frequency component of the grayscale image in the horizontal direction is obtained by convolving the one-dimensional vector corresponding to each row of the first image matrix with the system function of the low-pass filter.

5. The method according to claim 3, characterized in that, Determining the probability matrix corresponding to each of the first gray-level co-occurrence matrices includes: Calculate the sum of the elements of the first gray-level co-occurrence matrix; The probability matrix corresponding to the first gray-level co-occurrence matrix is ​​determined by dividing the value of each matrix element in the first gray-level co-occurrence matrix by the sum value.

6. A flow pattern identification device for oil-water two-phase flow, characterized in that, include: The acquisition unit is used to acquire two-phase flow images of oil and water in the oil-water channel, and to perform grayscale transformation on the two-phase flow images to obtain grayscale images corresponding to the two-phase flow images. A transformation unit is used to perform wavelet transform on the grayscale image to obtain a reconstructed image corresponding to the grayscale image; The first acquisition unit is used to determine the matrix window corresponding to the grayscale image; Using the matrix window, the grayscale image is traversed from a preset starting position in the grayscale image according to a preset traversal order; At each traversal position of the matrix window, determine the first gray-level co-occurrence matrix corresponding to the matrix window in each preset statistical direction at that traversal position; Determine the probability matrix corresponding to each of the first gray-level co-occurrence matrices; calculate the matrix eigenvalues ​​of each probability matrix, and determine the averaged eigenvalues ​​of the matrix window at the traversal position based on each matrix eigenvalue; When the matrix window completes the traversal process of the grayscale image, the grayscale co-occurrence matrix corresponding to the grayscale image is obtained based on the averaged feature value corresponding to each traversal position of the matrix window. The second acquisition unit is used to obtain multiple texture features of the oil-water two-phase flow based on the reconstructed image and the gray-level co-occurrence matrix. A weighting unit is used to perform weighted optimization processing on each of the texture features; The processing unit is used to input the various texture features that have undergone weighted optimization into a pre-set Gaussian Naive Bayes classifier for processing to determine the flow pattern to which the oil-water two-phase flow belongs. The flow patterns include dripping, jetting, plunger flow, sausage flow, satellite dripping, and parallel flow.

7. A storage medium, characterized in that, The storage medium includes stored instructions, wherein, when the instructions are executed, the device containing the storage medium is controlled to perform the flow pattern identification method for oil-water two-phase flow as described in any one of claims 1 to 5.

8. An electronic device, characterized in that, It includes at least one processor, and at least one memory and bus connected to the processor; wherein the processor and memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the flow pattern identification method for oil-water two-phase flow as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Methods and apparatus for extracting image texture features

    CN102289671A

  • Wavelet transform, multi-strategy PSO (particle swarm optimization) and SVM (support vector machine) integrated based remote sensing image classification method

    CN104732244A

  • Method for extracting high-resolution SAR image building zone through multi-feature weighted fusion

    CN105205816A