Multiple overlapping bubble image processing method and system
By identifying the concave points and processing overlapping bubbles, clustering the characteristics of the arcs using the optimal arc, and finally fitting the ellipse through the least squares method to obtain bubble morphological information, solving the problem of large errors when processing bubble images with high gas content in the prior art, and achieving efficient and accurate bubble image processing.
Patent Information
- Application Number
- CN202210258869.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-03-16
AI Technical Summary
The prior art is difficult to effectively process bubble images with high gas content, especially when bubble overlap is severe, resulting in large image processing errors, complex methods and high costs.
By obtaining the original grayscale map of the bubbles, image preprocessing is performed to extract the complete boundaries of the bubbles, identify the concave points and process overlapping bubbles, use the optimal arc, detect the characteristics of the arc and connect the concave points to complete the clustering of multiple arcs, and finally obtain the morphological information of the bubbles by fitting the ellipse through the least squares method.
This method greatly reduces the difficulty of building overlapping bubble segmentation algorithm, improves processing efficiency and accuracy, and can quickly and accurately obtain information such as bubble shape and size.
Smart Images

Figure CN114723806B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to a novel multi-overlapping bubble image processing technology, and more particularly to a multi-overlapping bubble image processing method and system. Background Technology
[0002] Gas-liquid two-phase flow is one of the most important types of multiphase flow. Due to its advantages such as high interfacial area, it has been widely used in experimental research and industrial applications, including chemical engineering, energy, and environmental protection. Among these applications, bubbles serve as a crucial medium. Quantitative measurement of bubble shape, trajectory, size, and velocity helps reveal the internal flow mechanisms of gas-liquid two-phase flow, further promoting research and development in bubble breakup and coalescence, heat and mass transfer in two-phase flow, and bubble-induced turbulence. Ultimately, this guides the experimental design, equipment operation, and engineering applications of two-phase flow.
[0003] With the continuous development of visualization measurement technology, the main method for quantifying bubbles is currently high-speed camera experiments. This involves using a high-speed camera to photograph the test section and extracting bubble information from the image using digital image processing technology. When the gas content (bubble concentration) is low, the bubbles are mostly dispersed in the image, and traditional methods can easily extract the bubble information. However, when the gas content is high, the probability of bubbles clustering within the depth of field increases, resulting in overlapping bubbles in the image. These overlapping bubbles often exhibit complex combinations, and when multiple bubbles overlap, there are even more combinations. The key to accurately extracting bubble information from overlapping bubble images lies in the appropriate use of image processing techniques to segment overlapping bubbles and the subsequent reconstruction using bubble reconstruction techniques. Therefore, designing a convenient and feasible overlapping bubble image processing algorithm is a difficult but important task.
[0004] Currently, the main methods for segmenting overlapping bubbles can be divided into three categories: watershed algorithm, morphological algorithm, and concave point segmentation algorithm.
[0005] Although the first two algorithms are simple in structure and fast, they are prone to large errors when processing images with high gas content and severe bubble overlap, and are not suitable for complex situations with many overlapping bubbles.
[0006] While algorithms for concave point segmentation with fine processing yield relatively accurate and reliable results, they still do not adequately address issues such as concave point recognition, bubble segmentation, and segmented arc clustering. To solve these problems, some solutions incorporate complex decision-making, segmentation methods, and reconstruction logic, resulting in cumbersome overall solutions that require significant time and cost.
[0007] The invention patent with publication number CN109741282B discloses a multi-frame bubble flow image processing method based on prediction and correction, including the following steps: 1) Processing the bubble shadow image of the current frame to obtain the arc segment image of the bubble in the current frame; 2) Predicting the centroid size of each target bubble in the current frame bubble shadow image based on the centroid and size data of each target bubble in the known frame bubble shadow image; 3) Grouping and matching each arc segment in the arc segment image based on the predicted centroid and size of each target bubble in the current frame bubble shadow image; 4) Correcting the centroid and size of each target bubble in the arc segment image; 5) Using the corrected centroid and size of each target bubble as the centroid and size data of each target bubble in the known frame bubble shadow image, proceeding to step 1), processing the bubble shadow images of other frames until the correction of the centroid and size of all target bubbles in the multi-frame bubble shadow image is completed. Summary of the Invention
[0008] To address the shortcomings of existing technologies, this invention provides a method and system for processing multi-overlapping bubble images.
[0009] According to the present invention, a method and system for processing multi-overlapping bubble images are provided, the solution of which is as follows:
[0010] In a first aspect, a method for processing multi-overlapping bubble images is provided, the method comprising:
[0011] Step S1: Obtain the original grayscale image of the bubble;
[0012] Step S2: Perform image preprocessing on the original grayscale image of the bubble to extract the complete boundary of the bubble;
[0013] Step S3: Perform concave point identification and overlapping bubble processing on the bubble boundaries obtained after preprocessing;
[0014] Step S4: After the processing in step S3 is completed, bubble reconstruction is performed to obtain bubble morphology information.
[0015] Preferably, step S1 includes: constructing a high-speed camera experimental circuit, wherein the circuit pipe is a circular pipe with an inner diameter d = 50 mm, and a square water tank is set outside the shooting section;
[0016] The liquid phase is deionized water, the gas phase is compressed air, and air bubbles are blown in through a venturi tube.
[0017] A high-speed camera is used to capture bubble information during the shooting segment. The bubble image is exported and saved as a .bmp file to obtain the original grayscale image of the bubble.
[0018] Preferably, the detection of concave points is included in the step S3: Suppose the current connected boundary has n coordinates to form a matrix (X, Y), where both X and Y are n*1 matrices, and each element of the matrix (X, Y) represents a coordinate on the boundary; mask the first k rows and the last k rows of the current matrix, and select the remaining rows for angle tracking.
[0019] Preferably, the tracking method includes: Suppose the current boundary point coordinate is p(x1, y1), and the coordinates of m pixel points (m < k) before and after this boundary point are k(x2, y2) and q(x0, y0) respectively; the current boundary point and the predecessor and successor points form two vectors (x1 - x2, y1 - y2) and (x1 - x0, y1 - y0) respectively, calculate the cosine value of the angle formed by the two vectors, and convert it to the corresponding angle;
[0020] After obtaining the angle, use mean filtering to remove signal noise;
[0021] If the angle of the current point is greater than the concave point angle judgment θ threshold, it is regarded as a concave point; if the predecessors and successors of the concave point are still concave points, then select the point with the largest angle in this series of concave points as the only concave point of the current concave point group.
[0022] Preferably, the overlapping bubble classification is also included in the step S3: According to the number of concave points in the current connected region, the overlapping bubble boundaries are processed in the following situations:
[0023] No concave points: This situation indicates that the bubbles do not overlap. Directly perform least squares ellipse fitting on the boundary to obtain the information of the bubbles;
[0024] Two concave points: Two concave points must be composed of two bubbles. The two concave points will divide the boundary into two parts, and least squares ellipse fitting interfaces are performed on the two parts respectively to obtain the information of the bubbles;
[0025] Three or more concave points: This situation indicates that there are multiple overlapping bubbles. The multiple concave points divide the boundary into multiple arc segments. This situation is a multiple overlapping bubble, and methods of arc segment classification and concave point connection need to be used for processing.
[0026] Preferably, the arc segment classification includes: According to the characteristics of the arc segments, the multiple arc segments of the multiple overlapping bubbles are divided into major arcs, paired arcs and segmented arcs;
[0027] Among them, major arc: refers to an arc segment corresponding to a circumferential angle greater than 270°;
[0028] Paired arc: a combination composed of two arc segments, and the angle difference of the perpendicular bisector vectors of the two arc segments is 180° ± 5°;
[0029] Segmented arc: refers to that the complete boundary of a bubble is divided into multiple scattered arc segments, and these scattered arc segments all belong to the same bubble, and are collectively called segmented arcs.
[0030] Preferably, clustering of segmented arcs by connecting concave points specifically includes:
[0031] For cases with three or more concave points, number the concave points in clockwise order, and then cluster them according to the following principles:
[0032] (1) A dominant arc represents a single bubble, and the two arc segments connected by the endpoints of the dominant arc belong to another bubble.
[0033] (2) The arcs belong to the same bubble and contain four concave points: the two with smaller numbers determine one arc segment and the two with larger numbers determine another arc segment; at the same time, the two arc segments connected by the smallest and largest numbers belong to another bubble; the arc segments with the second smallest and second largest numbers belong to another bubble.
[0034] Preferably, step S4 includes: after completing arc segment clustering, using the least squares method to fit the boundary of arc segments belonging to the same bubble to obtain the morphological information of the bubble.
[0035] Secondly, a multi-overlapping bubble image processing system is provided, the system comprising:
[0036] Module M1: Obtain the original grayscale image of the bubble;
[0037] Module M2: Performs image preprocessing on the original grayscale image of the bubble to extract the complete bubble boundary;
[0038] Module M3: Performs concave point identification and overlapping bubble processing on the pre-processed bubble boundaries;
[0039] Module M4: After module M3 has finished processing, bubble reconstruction is performed to obtain bubble morphology information.
[0040] Preferably, the module M1 includes: constructing a high-speed camera experimental circuit, wherein the circuit pipe is a circular pipe with an inner diameter d = 50 mm, and a square water tank is set outside the shooting section;
[0041] The liquid phase is deionized water, the gas phase is compressed air, and air bubbles are blown in through a venturi tube.
[0042] A high-speed camera is used to capture bubble information during the shooting segment. The bubble image is exported and saved as a .bmp file to obtain the original grayscale image of the bubble.
[0043] The module M3 includes the detection of concave points: Suppose that the current connected boundary has n coordinates forming a matrix (X,Y), where X and Y are both n*1 matrices, and each element of the matrix (X,Y) represents a coordinate on the boundary; The first k rows and the last k rows of the current matrix are masked, and the remaining rows are selected for angle tracking;
[0044] The tracking method includes: setting the current boundary point coordinates as p(x1, y1), and the coordinates of m pixel points (m < k) before and after this boundary point are k(x2, y2) and q(x0, y0) respectively; the current boundary point forms two vectors (x1 - x2, y1 - y2) and (x1 - x0, y1 - y0) with the predecessor and successor points respectively, calculating the cosine value of the included angle formed by the two vectors, and converting the corresponding angle;
[0045] After obtaining the angle, mean filtering is used to remove signal noise;
[0046] If the angle of the current point is greater than the concave point angle judgment θ threshold, it is regarded as a concave point; if the predecessors and successors of the concave point are still concave points, then select the point with the largest angle in this series of concave points as the only concave point of the current concave point group;
[0047] The module M3 also includes overlapping bubble classification: according to the number of concave points in the current connected region, the overlapping bubble boundaries are processed in the following situations:
[0048] No concave points: This situation indicates that the bubbles do not overlap. Directly perform least squares ellipse fitting on the boundary to obtain the information of the bubbles;
[0049] Two concave points: Two concave points must be composed of two bubbles. The two concave points will divide the boundary into two parts, and least squares ellipse fitting interfaces are respectively performed on the two parts to obtain the information of the bubbles;
[0050] Three or more concave points: This situation indicates that there are multiple overlapping bubbles. The multiple concave points divide the boundary into multiple arc segments. This situation is a multiple overlapping bubble, and the methods of arc segment classification and concave point connection need to be used for processing;
[0051] The arc segment classification includes: according to the characteristics of the arc segments, the multiple arc segments of the multiple overlapping bubbles are divided into major arcs, paired arcs and segmented arcs;
[0052] Among them, major arc: refers to an arc segment with a corresponding circumferential angle greater than 270°;
[0053] Paired arc: a combination composed of two arc segments, and the angle difference between the perpendicular bisector vectors of the two arc segments is 180° ± 5°;
[0054] Segmented arc: refers to that the complete boundary of a bubble is divided into multiple scattered arc segments, and these scattered arc segments all belong to the same bubble and are collectively called segmented arcs;
[0055] Cluster the segmented arcs through concave point connection, specifically including:
[0056] For the situation of three or more concave points, number the concave points in clockwise order, and then perform clustering according to the following principles:
[0057] (1) A dominant arc represents a single bubble, and the two arc segments connected by the endpoints of the dominant arc belong to another bubble.
[0058] (2) The arcs belong to the same bubble and contain four concave points: the two smaller numbers determine one arc segment and the two larger numbers determine another arc segment; at the same time, the two arc segments connected by the smallest and largest numbers belong to another bubble; the arc segments with the second smallest and second largest numbers belong to another bubble.
[0059] The module M4 includes: after completing arc segment clustering, using the least squares method to fit the boundary of arc segments belonging to the same bubble to obtain the morphological information of the bubble.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] 1. This invention detects the characteristics of dominant arcs and paired arcs, and connects the concave points of dominant arcs and paired arcs to complete the clustering of the remaining arc segments (multiple arc segments). Compared with other methods, this method greatly reduces the difficulty of building the overlapping bubble segmentation algorithm, and effectively improves the efficiency and convenience of overlapping bubble segmentation while ensuring accuracy.
[0062] 2. This invention is characterized by accuracy, speed, and ease of construction, and can quickly and accurately obtain information such as the current bubble shape and size. Attached Figure Description
[0063] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments with reference to the following drawings:
[0064] Figure 1 This is a schematic flowchart of the entire invention;
[0065] Figure 2 A schematic diagram of the experimental circuit for building a high-speed camera;
[0066] Figure 3 The original bubble image obtained from high-speed photography;
[0067] Figure 4 The background image shows a flow channel without air bubbles.
[0068] Figure 5 An image containing only bubbles with the background removed;
[0069] Figure 6 Image processing for noise reduction;
[0070] Figure 7 To binarize the image;
[0071] Figure 8 Image processing for filling holes;
[0072] Figure 9 Image processing for boundary extraction;
[0073] Figure 10 Image for detecting concave dots;
[0074] Figure 11 Classification of overlapping bubble boundary processing;
[0075] Figure 12 A classification diagram for multi-segment arcs;
[0076] Figure 13 A detailed schematic diagram illustrating the clustering of segmented arcs by connecting concave points;
[0077] Figure 14 This is a schematic diagram of the recognition result in this example embodiment;
[0078] Figure 15 This is a schematic diagram showing the identification results of multiple overlapping bubbles. Detailed Implementation
[0079] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0080] This invention provides a method for processing multi-overlapping bubble images, referring to... Figure 1 As shown, the overall processing flow of this method can be understood as follows: "Acquiring the original bubble image → Preprocessing, extracting the complete bubble boundary → Concave point detection → Classifying and processing according to the number of concave points, first processing bubbles without concave points and those with two concave points → Processing bubbles with multiple concave points → Detecting optimal arcs and parallel arcs → Connecting concave points and clustering multiple arcs → Fitting an ellipse using the least squares method → Obtaining morphological information of the bubble." The specific steps are as follows:
[0081] Step S1: Obtain the original grayscale image of the bubble.
[0082] Build a high-speed camera experimental circuit, such as Figure 2 As shown, the loop pipe is a circular pipe with an inner diameter of d = 50 mm. To reduce the influence of refractive index, a square water tank is set up outside the imaging section. The liquid phase is deionized water, and the gas phase is compressed air, which is bubbled in through a Venturi tube. A high-speed camera is used to capture bubble information in the imaging section, and the bubble image is exported and saved as a .bmp file to obtain the original grayscale image of the bubble.
[0083] Step S2: Image preprocessing, extracting the complete boundary of the bubble. This step specifically includes the following processing:
[0084] Remove image background:
[0085] During high-speed experiments, pipes, impurities, and noise can also be imaged in the bubble image, such as... Figure 3 As shown. These contours affect boundary extraction in bubble image processing, reducing the accuracy of boundary extraction. Therefore, background removal is required for the bubble image. This invention uses background subtraction for background removal: a pre-image of the flow channel without bubbles is taken as the background image, such as... Figure 4 As shown, a subtraction operation is performed between the bubble image and the original image to obtain an image containing only bubbles after removing the background. Figure 5 As shown.
[0086] Noise suppression:
[0087] Median filtering is used to suppress random noise in bubble images: The median filter is convolved with the bubble image to suppress noise. Simultaneously, the median filter makes the bubble boundaries smoother. Figure 6 As shown.
[0088] Binarization:
[0089] The image, after background removal and noise reduction, is subjected to the Otsu method (maximum inter-class variance method) to obtain a binarization threshold. Based on the threshold, bubble regions and non-bubble regions are distinguished using two gray levels, 0 and 1, where 1 represents a bubble and 0 represents the background, resulting in a binarized image, as shown below. Figure 7 As shown.
[0090] Fill the hole:
[0091] Because of the difference in refractive index between bubbles and liquid, each bubble in the obtained image will contain "holes". This invention uses the `imfill` function in MATLAB software to fill these "holes", such as... Figure 8 As shown.
[0092] Boundary extraction:
[0093] In the MATLAB software, the Sobel operator is used to process the binarized, hole-filled image to obtain the connected components of each boundary pixel, and the bwboundaries function is used to obtain the coordinates of each connected boundary, such as... Figure 9 As shown by the dashed line. At this point, the boundary coordinates of each connected component in the image have been obtained and stored in a matrix. The specific storage method for each connected boundary coordinate is as follows: using the top-left coordinate of the current connected boundary as the first coordinate point, the x and y coordinates of the remaining boundary points are stored clockwise.
[0094] Step S3: Identification of concave points and processing of overlapping bubbles.
[0095] Including concave detection:
[0096] like Figure 10As shown in the figure, assume that the current connected boundary consists of n coordinates to form a matrix (X, Y), where both X and Y are n×1 matrices, and each element of the matrix (X, Y) represents a coordinate on the boundary. Since the boundary always takes the top-leftmost point of the current bubble, there must be no concave points within a small pixel range nearby. Therefore, the first k rows and the last k rows of the current matrix can be masked, and the remaining rows can be selected for angle tracking. The tracking method is as follows:
[0097] Let the coordinate of the current boundary point be p(x1, y1), and the coordinates of the points m pixels away (m < k) before and after this boundary point be k(x2, y2) and q(x0, y0) respectively. Two vectors (x1 - x2, y1 - y2) and (x1 - x0, y1 - y0) are formed between the current boundary point and its predecessor and successor points. Calculate the cosine value of the angle formed by the two vectors and convert it to the corresponding angle. After obtaining the angle, mean filtering is used to remove signal noise.
[0098] If the angle of the current point is greater than the concave point angle judgment θ threshold, it is regarded as a concave point. If the predecessors and successors of the concave point are still concave points, then the point with the largest angle among this series of concave points is selected as the only concave point of the current concave point group.
[0099] Specifically in implementation, the judgment threshold can be obtained according to the actual situation. In this example, the value of k is taken as 10, the value of m is taken as 5, and the concave point judgment threshold is set to 210°.
[0100] Classification of overlapping bubbles:
[0101] There must be an arc segment between two concave points, and the endpoints of the arc segment are concave points. According to the number of concave points in the current connected region, the boundaries of overlapping bubbles are processed in the following situations, as Figure 11 shown, where the concave points are represented by "X":
[0102] No concave points: This situation indicates that the bubbles do not overlap, and the boundary can be directly fitted with a least-squares ellipse to obtain the information of the bubbles.
[0103] Two concave points: Two concave points must be composed of two bubbles. Therefore, two concave points will only divide the boundary into two parts, and the least-squares ellipse fitting interface is used for each part to obtain the information of the bubbles.
[0104] Three or more concave points: This situation indicates that there are multiple overlapping bubbles. Multiple concave points divide the boundary into multiple arc segments (>3). This is the case of multiple overlapping bubbles, and it needs to be processed using the methods of arc segment classification and concave point connection.
[0105] First, according to the characteristics of the arc segments, the multiple arc segments of multiple overlapping bubbles are divided into three categories, as Figure 12 shown, including: major arcs, paired arcs, and segmented arcs:
[0106] Among them, the superior arc refers to the arc segment with a corresponding circumferential angle greater than 270°. These arc segments preserve enough morphological information to provide sufficient fitting accuracy for the least squares method. Therefore, the least squares ellipse fitting can be performed directly on the superior arc to obtain the morphological information of the bubble.
[0107] A paired arc is a combination of two arc segments whose perpendicular bisector vectors differ in angle by 180° ± 5°. The perpendicular bisector vector is the perpendicular bisector of the line connecting the endpoints of the arc segments, and its direction is defined as pointing towards the concave part of the arc segment. Paired arcs are prevalent in multi-overlapping bubbles, possess significant characteristics, and are easy to detect. Similarly, paired arcs provide sufficient morphological information for least-squares fitting; therefore, detected paired arcs can be directly used to identify the morphological information of the bubble using least-squares ellipse fitting.
[0108] Segmented arcs: A segmented arc refers to a bubble whose complete boundary is divided into multiple scattered arc segments. These arc segments belong to the same bubble and are collectively referred to as segmented arcs. Segmented arcs do not have uniform characteristics and lack significant morphological features. This invention proposes a concave point connection method to achieve the clustering of segmented arcs.
[0109] For segmented arcs, a method of connecting concave points is needed to complete their clustering:
[0110] like Figure 13 As shown, for the case of three or more concave points mentioned above, refer to... Figure 13 As shown in (a), the concave dots are first numbered in clockwise order. Figure 13 As shown in (b), clustering can then be performed according to the following principles:
[0111] (1) The dominant arc always represents a single bubble, and the two arc segments connected by the endpoints of the dominant arc belong to the same bubble, as shown in the reference. Figure 13 As shown in (c);
[0112] (2) Arcs belong to the same bubble and contain four concave points: the two smaller-numbered points determine one arc segment, and the two larger-numbered points determine another arc segment; simultaneously, the two arc segments connected by the smallest and largest-numbered points belong to the same bubble; the arc segments with the second smallest and second largest numbers also belong to the same bubble, as shown in the reference. Figure 13 As shown in (d).
[0113] By continuously applying the above method to cluster arc segments, segmented arcs of multi-overlapping bubbles can be clustered into their respective bubbles, as shown in the reference. Figure 13 As shown in (f).
[0114] Step S4: Bubble reconstruction.
[0115] After completing arc segment clustering, the least squares method is used to fit the boundaries of arc segments belonging to the same bubble to an ellipse, thus obtaining the morphological information of the bubble (major and minor axes, center point coordinates, etc.). Figure 14 The image shows the recognition result for this example. To highlight the ability of this invention to segment multiple overlapping bubbles, as shown... Figure 15 The image shows an example of the recognition results for multiple overlapping bubbles.
[0116] This invention provides a method and system for processing multi-overlapping bubble images. By classifying the segmented arcs obtained from concave point segmentation into three types—dominant arcs, paired arcs, and multi-segment arcs—the method first considers the characteristics of dominant and paired arcs. Then, it utilizes the proposed concave point connection technique for dominant and paired arcs to connect the concave points, thereby achieving multi-segment arc clustering. This arc segment clustering scheme improves the efficiency of arc segment clustering, reduces the difficulty of overlapping bubble segmentation, and provides a more convenient bubble image processing method for the field of bubble measurement.
[0117] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0118] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A method for processing multiple overlapping bubble images, characterized in that: Including: Step S1: Obtain the original grayscale image of the bubbles; Step S2: Perform image preprocessing on the original grayscale image of the bubbles to extract the complete boundaries of the bubbles; Step S3: Identify concave points and process overlapping bubbles on the bubble boundaries obtained after preprocessing; Step S4: After the processing in Step S3 is completed, perform bubble reconstruction to obtain the morphological information of the bubbles; The detection of concave points in Step S3 includes: Assume that the current connected boundary has n coordinates forming a matrix (X, Y), where both X and Y are n*1 matrices, and each element of the matrix (X, Y) represents a coordinate on the boundary; Mask the first k rows and the last k rows of the current matrix, and select the remaining rows for angle tracking; The tracking method includes: Assume that the current boundary point coordinate is p(x1, y1), and the coordinates of m pixel points (m < k) before and after this boundary point are k(x2, y2) and q(x0, y0) respectively; The current boundary point forms two vectors (x1 - x2, y1 - y2) and (x1 - x0, y1 - y0) with the predecessor and successor points respectively. Calculate the cosine value of the angle formed by the two vectors and convert it to the corresponding angle; After obtaining the angle, use mean filtering to remove signal noise; If the angle of the current point is greater than the concave point angle judgment θ threshold, it is regarded as a concave point; If the predecessors and successors of the concave point are still concave points, then select the point with the largest angle among this series of concave points as the only concave point of the current concave point group; The classification of overlapping bubbles is also included in Step S3: According to the number of concave points in the current connected region, the boundaries of overlapping bubbles are processed in the following situations: No concave points: This situation indicates that the bubbles do not overlap. Directly perform least squares ellipse fitting on the boundary to obtain the information of the bubbles; Two concave points: Two concave points must be composed of two bubbles. The two concave points will divide the boundary into two parts. Perform least squares ellipse fitting on the two parts respectively to obtain the information of the bubbles; Three or more concave points: This situation indicates that there are multiple overlapping bubbles. The multiple concave points divide the boundary into multiple arc segments. This is a multiple overlapping bubble situation and needs to be processed using the methods of arc segment classification and concave point connection; The arc segment classification includes: According to the characteristics of the arc segments, divide the multiple arc segments of the multiple overlapping bubbles into major arcs, paired arcs, and segmented arcs; Among them, major arc: Refers to an arc segment corresponding to a circumferential angle greater than 270°; Paired arc: A combination composed of two arc segments, and the angle difference of the perpendicular bisector vectors of the two arc segments is 180° ± 5°; Segmented arc: Refers to that the complete boundary of a bubble is divided into multiple scattered arc segments, and these scattered arc segments all belong to the same bubble and are collectively called segmented arcs; Cluster the segmented arcs through concave point connection, specifically including: For the situation of three or more concave points, number the concave points in clockwise order, and then perform clustering according to the following principles: (1) A major arc represents a single bubble, and the two arc segments connected by the endpoints of the major arc belong to another bubble; (2) A paired arc belongs to the same bubble. A paired arc contains four concave points: The two with smaller numbers determine one arc segment, and the two with larger numbers determine the other arc segment; At the same time, the other two arc segments connected by the smallest and the largest numbers belong to another bubble; The arc segments of the second smallest and the second largest numbers belong to another bubble.
2. The method for processing multiple overlapping bubble images according to claim 1, characterized in that: The step S1 includes: building a high-speed camera experiment loop. The loop pipeline is a circular pipe with an inner diameter d = 50 mm, and a square water tank is arranged outside the shooting section; The liquid phase is deionized water, and the gas phase is compressed air, and bubbles are injected through a Venturi tube; Use a high-speed camera to capture bubble information in the shooting section, export the bubble images and store them as.bmp files to obtain the original grayscale images of the bubbles.
3. The method for processing multiple overlapping bubble images according to claim 1, characterized in that: The step S4 includes: after completing the arc segment clustering, use the least squares method to perform elliptical fitting on the boundaries of the arc segments belonging to the same bubble, that is, obtain the morphological information of the bubbles.
4. A system for processing multiple overlapping bubble images, characterized in that: It includes: Module M1: Obtain the original grayscale image of the bubble; Module M2: Perform image preprocessing on the original grayscale image of the bubble and extract the complete boundary of the bubble; Module M3: Identify concave points and process overlapping bubbles on the bubble boundary obtained after preprocessing; Module M4: After the processing of Module M3 is completed, perform bubble reconstruction to obtain the morphological information of the bubbles; The detection of concave points in the module M3 includes: Suppose the current connected boundary has n coordinates to form a matrix (X, Y), where both X and Y are n*1 matrices, and each element of the matrix (X, Y) represents a coordinate on the boundary; Mask the first k rows and the last k rows of the current matrix, and select the remaining rows for angle tracking; The tracking method includes: Suppose the current boundary point coordinate is p(x1, y1), and the coordinates of m pixels (m < k) before and after this boundary point are k(x2, y2) and q(x0, y0) respectively; The current boundary point forms two vectors (x1 - x2, y1 - y2) and (x1 - x0, y1 - y0) with the predecessor and successor points respectively, calculate the cosine value of the angle formed by the two vectors, and convert the corresponding angle; After obtaining the angle, use mean filtering to remove signal noise; If the angle of the current point is greater than the concave point angle judgment θ threshold, it is regarded as a concave point; If the predecessors and successors of the concave point are still concave points, then select the point with the largest angle in this series of concave points as the only concave point of the current concave point group; The module M3 also includes the classification of overlapping bubbles: According to the number of concave points in the current connected region, the boundaries of overlapping bubbles are processed in the following situations: No concave points: This situation indicates that the bubbles do not overlap, and directly perform least squares elliptical fitting on the boundary to obtain the information of the bubbles; Two concave points: Two concave points must be composed of two bubbles. The two concave points will divide the boundary into two parts, and perform least squares elliptical fitting on the two parts respectively to obtain the information of the bubbles; Three or more concave points: This situation indicates that there are multiple overlapping bubbles. The multiple concave points divide the boundary into multiple arc segments. This situation is a multiple overlapping bubble, and the methods of arc segment classification and concave point connection need to be used for processing; The arc segment classification includes: According to the characteristics of the arc segments, the multiple arc segments of the multiple overlapping bubbles are divided into major arcs, pair arcs and segmented arcs; Among them, the major arc: refers to the arc segment corresponding to a circumferential angle greater than 270°; The pair arc: a combination composed of two arc segments, and the angle difference between the perpendicular bisector vectors of the two arc segments is 180° ± 5°; The segmented arc: refers to the complete boundary of a bubble being divided into multiple scattered arc segments, and these scattered arc segments all belong to the same bubble and are collectively called segmented arcs; Cluster the segmented arcs through concave point connection, specifically including: For the case of three or more concave points, the concave points are numbered in clockwise order and then clustered according to the following principles: (1) The major arc represents a single bubble, and the two arc segments connected by the endpoints of the major arc belong to the same bubble; (2) A pair of arcs belongs to the same bubble. The pair of arcs contains four concave points: the two with smaller numbers determine one arc segment, and the two with larger numbers determine the other arc segment. At the same time, the other two arc segments connected by the smallest number and the largest number belong to another bubble. The arc segments with the second smallest number and the second largest number belong to another bubble.
5. The multiple overlapping bubble image processing system according to claim 4, characterized in that: The module M1 includes: building a high-speed camera experimental loop, the loop pipeline is a round tube with an inner diameter of d=50mm, and a square water tank is set outside the shooting section; The liquid phase is deionized water, and the gas phase is compressed air, with bubbles blown in through a venturi tube; Use a high-speed camera to capture bubble information in the shooting section, export the bubble image and store it as a .bmp file to obtain the original grayscale image of the bubble; The module M4 includes: after completing the arc segment clustering, using the least square method to perform ellipse fitting on the boundaries of the arc segments belonging to the same bubble, that is, obtaining the morphological information of the bubble.
Citation Information
Patent Citations
A Multi-Frame Bubble Flow Image Processing Method Based on Prediction Correction
CN109741282B
Method for segmenting cervix uteri liquid base cell image
CN102831607A
Gas-liquid two-phase flow overlapped bubble image segmentation method
CN110415257A