A method for identifying oil bubbles in oil-water two-phase flow with extremely high water content

By using the SGM(1,1) model of grey system theory and the principle of binocular vision, the coordinates of the centroid of oil bubbles are predicted and feature vectors are matched. This solves the problems of slow oil bubble recognition speed and low accuracy in oil-water two-phase flow with ultra-high water content, and achieves a significant improvement in the speed and accuracy of oil bubble recognition.

CN117496498BActive Publication Date: 2024-11-26CHANGSHU INSTITUTE OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311493025.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2024-11-26
Estimated Expiration
2043-11-10

AI Technical Summary

Technical Problem

Existing oil bubble identification methods are slow and have low accuracy in oil-water two-phase flows with extremely high water content. This is mainly because the oil bubble matching area is the entire image, which leads to slow identification speed and makes it difficult to identify oil bubbles with minute deformations.

Method used

The SGM(1,1) model of grey system theory is used to predict the centroid coordinates of the oil bubble and match them in the neighborhood of the centroid position. The three-dimensional centroid coordinates of the oil bubble are obtained by combining the principle of binocular vision. The feature vector of the oil bubble is established for identification and matching.

Benefits of technology

It improved the speed and accuracy of oil bubble recognition, accelerated the matching speed, and increased the accuracy by 34.6%, from 60.8% to 95.4%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117496498B_ABST
    Figure CN117496498B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of petroleum engineering technology, and specifically relates to a method for identifying oil bubbles in an ultra-high water-content oil-water two-phase flow. The invention patent includes the following steps: 1. Building a PIV oil-water two-phase flow oil bubble identification system and selecting initial oil bubbles; 2. Using the grey system theory SGM (1,1) model to predict the position of the oil bubble Oil center of mass coordinates; 3. Identifying and matching the oil bubbles Oil; 4. Globally matching the oil bubbles in any two adjacent frames of images. The present invention improves the speed and accuracy of oil bubble identification, and lays a foundation for the study of the flow characteristics of oil-water two-phase flow.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The invention belongs to the technical field of petroleum engineering, and in particular relates to an oil bubble identification method for an oil-water two-phase flow with extremely high water content. Background technology:

[0002] At present, my country's oil fields have entered a period of extremely high water content, and the flow characteristics of oil-water two-phase flow have changed greatly. The characteristics of oil-water two-phase flow are closely related to the size, shape and distribution of oil bubbles. PIV / PTV is an effective method for studying the flow characteristics of oil-water two-phase flow, and the key to using PIV / PTV to study flow characteristics is the accurate identification of oil bubbles.

[0003] At present, scholars from various countries have proposed various oil bubble identification methods, which have solved some problems. However, the existing oil bubble identification methods mainly have the following two problems:

[0004] (1) The speed of oil bubble recognition is slow. The existing methods need to match the oil bubbles in the entire image, which is the main factor causing the slow speed. The existing research on the location of oil bubbles focuses on calculating the current location of the oil bubbles through instrument measurement and related theories, and rarely predicts the location of the oil bubbles. The oil bubble matching area is the entire image, which results in slow oil bubble matching speed and slow oil bubble recognition speed.

[0005] (2) Most existing oil bubble recognition methods regard oil bubbles as fixed. However, due to droplet collisions and other reasons, oil bubbles in adjacent images may have slight deformations. Existing methods are difficult to identify oil bubbles that have undergone slight deformations, so the accuracy is not high. Summary of the invention:

[0006] The purpose of the present invention is to provide an oil bubble recognition method for oil-water two-phase flow with ultra-high water content in order to overcome the defects of slow recognition speed caused by the oil bubble matching area being the whole image and low recognition rate caused by oil bubble deformation in the existing oil bubble method for oil-water two-phase flow with ultra-high water content.

[0007] The technical solution adopted by the present invention is: a method for identifying oil bubbles in an oil-water two-phase flow with extremely high water content, the method comprising the following steps:

[0008] Step 1: Build a PIV oil-water two-phase flow oil bubble identification system and select the initial oil bubble;

[0009] Step 2: Use the grey system theory SGM (1,1) model to predict the position of the oil bubble's center of mass coordinates;

[0010] Step 3: Identify and match the oil bubble;

[0011] Step 4: Perform global matching on the oil bubbles in any two adjacent frames.

[0012] Furthermore, the method for building the PIV oil-water two-phase flow oil bubble identification system and selecting the initial oil bubble in step 1 is as follows:

[0013] The PIV oil-water two-phase flow oil bubble identification system includes two high-speed cameras with the same parameters, two camera brackets of the same specifications with adjustable high-speed camera height, a transparent glass pipe and a control computer. The two cameras are named high-speed camera No. 1 and high-speed camera No. 2, respectively. High-speed cameras No. 1 and No. 2 are connected by a computer to keep the shooting synchronization. High-speed cameras No. 1 and No. 2 are adjusted to the same height as the transparent glass pipe. After the oil-water two-phase flow in the transparent glass pipe is stable, the oil-water two-phase flow is shot synchronously.

[0014] Synchronously take five adjacent frames of pictures from two high-speed cameras, and record ChuShiNumber1, ChuShiNumber1+1, ChuShiNumber1+2, ChuShiNumber1+3, and ChuShiNumber1+4 as five adjacent frames of images taken by high-speed camera No. 1, where ChuShiNumber1 is the serial number of the first frame of image taken by high-speed camera No. 1; record ChuShiNumber2+1, ChuShiNumber2+2, ChuShiNumber2+3, and ChuShiNumber2+4, where ChuShiNumber2 is five adjacent frames of image taken by high-speed camera No. 2, where ChuShiNumber er2 is the serial number of the first frame image taken by high-speed camera No. 2; ChuShiNumber indicates the frame number of the image where the oil bubble is located. From the five frames of ChuShiNumber1, ChuShiNumber1+1, ChuShiNumber1+2, ChuShiNumber1+3, and ChuShiNumber1+4, the oil bubble with the largest oil bubble area in each frame is selected as the initial oil bubble. The oil bubble is also manually selected from the ChuShiNumber2, ChuShiNumber2+1, ChuShiNumber2+2, ChuShiNumber2+3, and ChuShiNumber2+4 frames. The images of the oil bubble Oil are taken by high-speed cameras No. 1 and No. 2, and the three-dimensional centroid coordinates of the oil bubble Oil are obtained using the binocular vision principle. The method is as follows:

[0015] The spatial coordinate system of high-speed camera No. 1 is o-xyz, which coincides with the world coordinate system (the origin o is the optical center of high-speed camera No. 1, and the spatial coordinate system o-xyz has no rotation), and the effective focal length is f l , the intersection of the optical center o of high-speed camera No. 1 and its image plane is O l , with Ol As the origin, the image coordinate system of high-speed camera No. 1 is established as O l -X l Y l ; The spatial coordinate system of high-speed camera No. 2 is o r -x r y r z r , O r is the optical center of high-speed camera No. 2, the optical center of high-speed camera No. 2 is O r The intersection point with its image coordinate system is O rr , with O rr The image coordinate system of high-speed camera No. 2 is established as O rr -X r Y r ; Through the oil bubble Oil in the No. 1 high-speed camera image coordinate system O l -X l Y l and in the image coordinate system O of the No. 2 high-speed camera rr -X r Y r The image presented is used to calculate the coordinates of the center of mass of the oil bubble Oil in the two image coordinate systems. Combined with the calibration parameters R and T, the three-dimensional center of mass coordinates of the oil bubble Oil in the ChuShiNumber+i frame image ZhiXinP i (xp (0) (i),yp (0) (i),zp (0) (i)), the expression method is as follows:

[0016]

[0017] In the formula, xp (0) (i) yp (0) (i) zp (0) (i) are the X, Y, and Z components of the centroid coordinates of the selected oil bubble Oil in the ChuShiNumber+i frame image, i is the frame number of any 5 frames of images, i is from ChuShiNumber frame to ChuShiNumber+4 frame, ChuShiNumber frame is the first frame image, and each frame contains O l -X l Y l Image coordinate system and O rr -X r Y r Two manually selected pictures of oil bubbles in the image coordinate system; f l is the effective focal length of high-speed camera No. 1, f r is the effective focal length of high-speed camera No. 2; X' l(i), Y' l(i) Respectively represent the image coordinate system O of the No. 1 high-speed camera in the ChuShiNumber+i frame image l -X l Y l Below, the X and Y coordinates of the center of mass of the oil bubble Oil; X' r(i) , Y' r(i) Respectively represent the image coordinate system O of the No. 2 high-speed camera in the ChuShiNumber+i frame image rr -X r Y r Below, the X and Y coordinates of the center of mass of the oil bubble Oil.

[0018] X' l(i) , Y' l(i) , X' r(i) , Y' r(i) The expression is as follows:

[0019]

[0020] In the formula, S l represents the projection area of ​​the oil bubble on the image plane of the No. 1 high-speed camera, which is the sum of the number of pixels covered by the oil bubble area; S r represents the projection area of ​​the oil bubble on the image plane of the No. 2 high-speed camera, which is the sum of the number of pixels covered by the oil bubble area; M lx 、M ly Represents the image coordinate system O of high-speed camera No. 1 l -X l Y l The sum of the X and Y coordinates of the pixels in the lower oil bubble area; M rx 、M ry Represent the image coordinate system O of high-speed camera No. 2 respectively r -X r Y r The sum of the X and Y coordinates of the pixels in the lower oil bubble area.

[0021] The spatial transformation relationship from high-speed camera No. 1 to the spatial coordinate system of camera No. 2 is as follows:

[0022]

[0023] Where R is the rotation matrix between the spatial coordinate systems of high-speed camera No. 1 and camera No. 2; T is the translation matrix between the origins of the spatial coordinate systems of high-speed camera No. 1 and camera No. 2.

[0024] Where θ represents the rotation angle of the spatial coordinate system of camera 1 and the spatial coordinate system of camera 2 along the y-axis; t xIt means that when the spatial coordinate systems of high-speed cameras 1 and 2 coincide, the spatial coordinate system of high-speed camera 2 is o r -x r y r z r Origin O r The amount of translation in the x direction when translating to the origin o of the world coordinate system o-xyz; t z It means that when the spatial coordinate systems of high-speed cameras 1 and 2 coincide, the spatial coordinate system of high-speed camera 2 is o r -x r y r z r Origin O r The amount of translation in the z direction when translating to the origin o of the world coordinate system o-xyz.

[0025] Furthermore, in the step 2, the SGM (1,1) model is used to predict the coordinates of the center of mass of the oil bubble Oil. The three-dimensional center of mass coordinates of the oil bubble Oil in the ChuShiNumber+i frame image are The predicted values ​​are expressed as follows:

[0026]

[0027] In the formula, xp respectively represent the X, Y, and Z components of the predicted value of the center of mass coordinates of the oil bubble Oil in the ChuShiNumber+i frame; (0) (1) yp (0) (1) zp (0) (1) represents the three-dimensional centroid coordinates of the oil bubble Oil in the ChuShiNumber frame; a and b represent the development coefficient and the gray action, respectively. The representation methods of a and b are as follows:

[0028]

[0029] In the formula, A (0) (i) represents the three-dimensional centroid coordinates of the oil bubble in the ChuShiNumber+i frame, i is the frame number of any five frames of images, i is from ChuShiNumber frame to ChuShiNumber+4 frame, ChuShiNumber frame is the first frame of image, each frame contains two manually selected oil bubble pictures, these two oil bubble pictures are taken by high-speed cameras No. 1 and No. 2 respectively.

[0030] A (0) (i) The expression is as follows:

[0031] A (0) (i)=(xp (0) (i),yp(0) (i),zp (0) (i)), i=1,2,3,4,5

[0032] q (1) (i) is A (0) (i) One-time accumulation sequence A (1) (i) is the next generation sequence;

[0033] q (1) (i) The expression method is as follows:

[0034] q (1) (i) = (1-α)A (1) (i)+αA (1) (i-1), i=2,3,4,5

[0035] Where α is the background construction parameter, α∈(0,1), A (1) (i) is the coordinate of the centroid A (0) (i) is the accumulated value of A (1) (i) The expression method is as follows:

[0036]

[0037] Furthermore, the method for identifying and matching the target oil bubble Oil in step three is as follows:

[0038] The oil bubble Oil manually selected in the ChuShiNumber+4 frame is taken as the target oil bubble, and in the ChuShiNumber+5 frame, the target oil bubble Oil is identified and matched in the spherical matching area. The identification method includes two parts: the selection of the spherical matching area and the matching of the oil bubble.

[0039] The method for selecting the spherical matching area is as follows:

[0040] Predict the coordinates of the center of mass of the oil bubble Oil in the ChuShiNumber+5 frame is the center of the circle and the radius is R oil A spherical matching region is established. The spherical matching region must include the complete oil bubble. If the spherical region includes part of the oil bubble, the spherical region is expanded until the complete oil bubble is included. Oil bubbles in the spherical matching region is the candidate oil bubble of oil bubble Oil, β represents the βth oil bubble among the candidate oil bubbles, n number is the total number of oil bubbles contained in the candidate oil bubbles. The spherical matching area expression is as follows:

[0041]

[0042] Where ux(β), uy(β), uz(β) represent the candidate oil bubbles, respectively. The 3D coordinates of the center of mass of the βth candidate matching oil bubble.

[0043] The matching method of oil bubble is as follows:

[0044] The matching of oil bubbles is based on the characteristics of oil bubbles. The matching primitive representing the βth candidate oil bubble feature has an area deformation δ s(β) , maximum height variation δ h(β) , circumference change δ c(β) , at camera 1 O l -X l Y l Plane projection area S l(β) , at camera 2 O rr -X rr Y rr Plane projection area S r(β) . The following oil bubble similarity function F(λ s ,λ h ,λ c ,λ lrs ,δ s(β) ,δ h(β) ,δ c(β) ,f lrs(β) ,f soboil ):

[0045]

[0046] In the formula, λ s is the oil bubble area deformation coefficient, λ h is the coefficient of variation of the maximum height of the oil bubble, λ c is the coefficient of variation of the oil bubble perimeter, λ lrs is the oil bubble projection area coefficient;

[0047] λ s , h , c , lrs It can be obtained by manually selecting multiple pictures and manually matching the oil bubbles, and then through the calibration method.

[0048] The deformation degree of the βth candidate oil bubble area δ s(β) It can be expressed as follows:

[0049] δ s(β) =|S l(β) -S r(β) |

[0050] The maximum height variation of the βth candidate oil bubble δ h(β) It can be expressed as follows:

[0051] δ h(β) =|hl(β) -h r(β) |

[0052] In the formula, h l(β) Indicates that the βth candidate oil bubble is in camera No. 1 O l -X l Y l Maximum height of plane projection, h r(β) Indicates that the βth candidate oil bubble is in camera No. 2 O rr -X rr Y rr The maximum height of the plane projection.

[0053] The variation degree of the βth candidate oil bubble perimeter δ c(β) It can be expressed as follows:

[0054] δ c(β) =|C l(β) -C r(β) |

[0055] In the formula, C l(β) Indicates that the βth candidate oil bubble is in camera No. 1 O l -X l Y l Plane projection perimeter, C r(β) Indicates that the βth candidate oil bubble is in camera No. 2 O rr -X rr Y rr Plane projection perimeter.

[0056] The projection area f of the βth candidate oil bubble lrs(β) It can be expressed as follows:

[0057] f lrs ( β) =S l(β) +S r(β)

[0058] In the formula, S l(β) Indicates that the βth candidate oil bubble is in camera No. 1 O l -X l Y l Projected area of ​​the plane, S r(β) Indicates that the βth candidate oil bubble is located at camera No. 2 at O rr -X rr Y rr Plane projected area.

[0059] The matching primitives representing the target oil bubble Oil features include: the area deformation of the target oil bubble Oil oboil s , the maximum height change of the target oil bubble Oiloboil h , the circumference change of the target oil bubble Oiloboilc , the projected area f of the target oil bubble Oil soboil .

[0060] The area deformation of the target oil bubble Oiloboil s It can be expressed as follows:

[0061] oboil s =|soboil l -soboil r |

[0062] In the formula, soboil l Indicates that the target oil bubble Oil is in camera No. 1 and camera No. l -X l Y l The area of ​​the plane projection, soboil r Indicates that the target oil bubble Oil is in camera No. 2 at O rr -X rr Y rr The area of ​​the plane projection.

[0063] The maximum height variation of the target oil bubble Oiloboil h It can be expressed as follows:

[0064] oboil h =|LOboil h -ROboil h |

[0065] Where, LOboil h Indicates that the target oil bubble Oil is at camera No. 1 O l -X l Y l Maximum height of plane projection, ROboil h Indicates that the target oil bubble Oil is at camera No. 2 O rr -X rr Y rr The maximum height of the plane projection.

[0066] Target oil bubble Oil perimeter change degree oboil c It can be expressed as follows:

[0067] oboil c =|LOboil c -ROboil c |

[0068] Where, LOboil c Indicates that the target oil bubble Oil is at camera No. 1 O l -X l Y lPlane projection perimeter, ROboil c Indicates that the target oil bubble Oil is at camera No. 2 O rr -X rr Y rr Plane projection perimeter.

[0069] Projected area f of target oil bubble Oil soboil It can be expressed as follows:

[0070] f soboil =soboil l +soboil r

[0071] Count all candidate oil bubbles Similarity function value of , find the candidate oil bubble The oil bubble with the smallest similarity function value is the target oil bubble Oil, and the recognition and matching of the target oil bubble Oil is completed.

[0072] Furthermore, in the step 4, for any two adjacent frames of images, optional frame, chushinumberi optional +1 frame oil bubbles are globally matched, i optional is the frame number of any frame image. Global matching includes two parts: establishing a spherical matching area and matching oil bubbles. The specific method is as follows:

[0073] To chushinumberi optional , chushinumberi optional +1 Two adjacent frames of images are grayed out, the background is grayed out, the difference image is detected, and the Canny operator edge detection is performed to extract the characteristic information of the oil bubbles in the image.

[0074] After the treatment, optional The oil bubbles in the frame image are numbered in order from top to bottom and from left to right. optional The coordinates of the center of mass of the oil bubble in the frame are represented by ZhiXinP optional (xp (0) (ω),yp (0) (ω),zp (0) (ω)), ω=1, 2, 3, 4, 5,...m number

[0075] In the formula, xp (0) (ω), yp (0) (ω), zp (0) (ω) represents chushinumberi optionalThe X, Y, and Z components of the coordinates of the center of mass of the oil bubble No. ω in the frame, ω is the number, m number It's chushinumberi optional The total number of oil bubbles in the frame.

[0076] Take the oil bubble No. ω as the target oil bubble and match it as follows:

[0077] The oil bubble in the first chushinumberi optional The predicted value of the center of mass coordinates in frame +1 is by is the center of the circle and the radius is R optional A spherical matching region is established. The spherical matching region must include the complete oil bubble. If the spherical region includes part of the oil bubble, the spherical region is expanded until the complete oil bubble is included. Oil bubbles in the spherical matching region is the candidate oil bubble of the ωth oil bubble, ε represents the candidate oil bubble The εth oil bubble, e number Candidate oil bubble The total number of oil bubbles.

[0078] The spherical matching area is expressed as follows:

[0079]

[0080] ux(ε),uy(ε),uz(ε) are candidate oil bubbles The three-dimensional coordinates of the center of mass of the εth candidate oil bubble in .

[0081] The oil bubble is matched as follows:

[0082] Candidate oil bubble The similarity function F(λ s ,λ h ,λ c ,λ lrs ,δ s(ε) ,δ h(ε) ,δ c(ε) ,f lrs(ε) ,f sobω ):

[0083]

[0084] In the formula, δ s(ε) ,δ h(ε) ,δ c(ε) , S l(ε) , S r(ε) 、f lrs(ε) They represent the area deformation, maximum height change, perimeter change, and the position of the εth candidate oil bubble at camera No. 1,l -X l Y l Plane projection area, camera 2 O rr -X rr Y rr Plane projection area; obω s 、obω h 、obω c 、sobω l 、sobω r 、f sobω They represent the area deformation, maximum height change, perimeter change of the oil bubble No. ω, and the l -X l Y l Plane projection area, camera O rr -X rr Y rr Plane projection area, projection area.

[0085] Calculate candidate oil bubbles Similarity function value of , find the candidate oil bubble The oil bubble with the smallest similarity function value in the equation is:

[0086] min|F(λ s ,λ h ,λ c ,λ lrs ,δ s(ε) ,δ h(ε) ,δ c(ε) ,f lrs(ε) ,f sobω )|≥t escape

[0087] Where, t escape is the oil bubble escape threshold, which is used to determine the chushinumberi optional Oil bubbles in the frame optional +1 parameter of oil bubble escape in frame, t escape It can be manually calibrated from the adjacent frames where oil bubble escape occurs.

[0088] Through the above method, any two adjacent frames can be completed. optional frame, chushinumberi optional Global matching of oil bubbles in +1 frame.

[0089] Beneficial effects of the present invention:

[0090] (1) The grey system theory SGM (1, 1) model is used to predict the centroid coordinates of the oil bubble, and the target oil bubble is matched in the neighborhood of the oil bubble centroid position, which overcomes the defects of long time consumption and slow matching speed caused by oil bubble full image matching, and speeds up the oil bubble recognition and matching speed;

[0091] (2) The characteristic vector of the oil bubble is established, which overcomes the defect of low recognition and matching accuracy caused by the deformation of the oil bubble during its movement, and greatly increases the accuracy of oil bubble matching. Description of the drawings:

[0092] Figure 1 This is an overall flow chart of an oil bubble identification method for oil-water two-phase flow with extremely high water content;

[0093] Figure 2 It is the PIV oil-water two-phase flow oil bubble identification system;

[0094] Figure 3 This is a plan view of the spherical search area;

[0095] Figure 4 Candidate matching oil bubble Schematic diagram of matching primitives;

[0096] Figure 5 Schematic diagram of the target oil bubble Oil matching primitive;

[0097] Figure 6 Any frame of image;

[0098] Figure 7 Next frame image;

[0099] Figure 8 A bar graph showing the number of oil bubbles identified by the existing method and the method of the present invention;

[0100] Fig. 9 It is a line graph showing the time consumption of matching and identifying oil bubbles between the existing method and the method of the present invention. Specific implementation method:

[0101] Embodiment 1

[0102] A method for identifying oil bubbles in an oil-water two-phase flow with extremely high water content, the method comprising the following steps:

[0103] Step 1: Build a PIV oil-water two-phase flow oil bubble identification system and select the initial oil bubble;

[0104] Step 2: Use the grey system theory SGM (1,1) model to predict the position of the oil bubble's center of mass coordinates;

[0105] Step 3: Identify and match the oil bubble;

[0106] Step 4: Perform global matching on the oil bubbles in any two adjacent frames.

[0107] Implementation Method 2

[0108] This embodiment is a further explanation of the first embodiment. The method of building a PIV oil-water two-phase flow oil bubble identification system and selecting initial oil bubbles in step one is as follows:

[0109] Build a PIV oil-water two-phase flow oil bubble identification system, such as Figure 2 . Two high-speed cameras with the same parameters are required, namely, high-speed camera No. 1 and high-speed camera No. 2, two camera brackets of the same specifications with adjustable height of the high-speed cameras, transparent glass pipes, and a computer. Among them, high-speed cameras No. 1 and No. 2 are connected to the computer to keep the shooting synchronization. The specific construction of the PIV oil-water two-phase flow oil bubble identification system and the manual selection of the initial oil bubble method are as follows:

[0110] Adjust the No. 1 and No. 2 high-speed cameras to the same height as the transparent glass pipe, and after the oil-water two-phase flow in the transparent glass pipe is stable, synchronously shoot the oil-water two-phase flow. Synchronously take any five adjacent frames of pictures from the two high-speed cameras, and record the ChuShiNumber1 frame, ChuShiNumber1+1 frame, ChuShiNumber1+2 frame, ChuShiNumber1+3 frame, and ChuShiNumber1+4 frame as the 5 adjacent frames of images taken by the No. 1 high-speed camera, and ChuShiNumber1 is the serial number of the first frame of the image taken by the No. 1 high-speed camera; record them as ChuShiNumber2+1 frame, ChuShiNumber2+2 frame, ChuShiNumber2+3 frame, ChuShiNumber2+4 frame, and ChuShiNumber2 is the 5 adjacent frames of images taken by the No. 2 high-speed camera. Image, ChuShiNumber2 is the serial number of the first frame image taken by high-speed camera No. 2; from the five frames of ChuShiNumber1, ChuShiNumber1+1, ChuShiNumber1+2, ChuShiNumber1+3, and ChuShiNumber1+4, the oil bubble with the largest oil bubble area in each frame is selected as the initial oil bubble, and the oil bubble Oil is also manually selected from the ChuShiNumber2, ChuShiNumber2+1, ChuShiNumber2+2, ChuShiNumber2+3, and ChuShiNumber2+4 frames. The pictures of the oil bubble Oil are taken by high-speed cameras No. 1 and No. 2, and the three-dimensional center of mass coordinates of the oil bubble Oil are obtained using the binocular vision principle. The method is as follows:

[0111] The spatial coordinate system of high-speed camera No. 1 is o-xyz, which coincides with the world coordinate system (the origin o is the optical center of high-speed camera No. 1, and the spatial coordinate system o-xyz has no rotation), and the effective focal length is f l , the intersection of the optical center o of high-speed camera No. 1 and its image plane is O l , with O l As the origin, the image coordinate system of high-speed camera No. 1 is established as O l -X l Y l ; The spatial coordinate system of high-speed camera No. 2 is o r -x r y r z r , O r is the optical center of high-speed camera No. 2, the optical center of high-speed camera No. 2 is O r The intersection point with its image coordinate system is O rr , with O rr The image coordinate system of high-speed camera No. 2 is established as O rr -X r Y r ; Through the oil bubble Oil in the No. 1 high-speed camera image coordinate system O l -X l Y l and in the image coordinate system O of the No. 2 high-speed camera rr -X r Y r The image presented is used to calculate the coordinates of the center of mass of the oil bubble Oil in the two image coordinate systems. Combined with the calibration parameters R and T, the three-dimensional center of mass coordinates of the oil bubble Oil in the ChuShiNumber+i frame image ZhiXinP i (xp (0) (i),yp (0) (i),zp (0) (i)), the expression method is as follows:

[0112]

[0113] In the formula, xp (0) (i) yp (0) (i) zp (0) (i) are the X, Y, and Z components of the centroid coordinates of the selected oil bubble Oil in the ChuShiNumber+i frame image, i is the frame number of any 5 frames of images, i is from ChuShiNumber frame to ChuShiNumber+4 frame, ChuShiNumber frame is the first frame image, and each frame contains O l -X l Y l Image coordinate system and O rr-X r Y r Two manually selected pictures of oil bubbles in the image coordinate system; f l is the effective focal length of high-speed camera No. 1, f r is the effective focal length of high-speed camera No. 2; X' l(i) , Y' l(i) Respectively represent the image coordinate system O of the No. 1 high-speed camera in the ChuShiNumber+i frame image l -X l Y l Below, the X and Y coordinates of the center of mass of the oil bubble Oil; X' r(i) , Y' r(i) Respectively represent the image coordinate system O of the No. 2 high-speed camera in the ChuShiNumber+i frame image rr -X r Y r Below, the X and Y coordinates of the center of mass of the oil bubble Oil.

[0114] X' l(i) , Y' l(i) , X' r(i) , Y' r(i) The expression is as follows:

[0115]

[0116] In the formula, S l represents the projection area of ​​the oil bubble on the image plane of the No. 1 high-speed camera, which is the sum of the number of pixels covered by the oil bubble area; S r represents the projection area of ​​the oil bubble on the image plane of the No. 2 high-speed camera, which is the sum of the number of pixels covered by the oil bubble area; M lx 、M ly Represents the image coordinate system O of high-speed camera No. 1 l -X l Y l The sum of the X and Y coordinates of the pixels in the lower oil bubble area; M rx 、M ry Represent the image coordinate system O of high-speed camera No. 2 respectively r -X r Y r The sum of the X and Y coordinates of the pixels in the lower oil bubble area.

[0117] The spatial transformation relationship from high-speed camera No. 1 to the spatial coordinate system of camera No. 2 is as follows:

[0118]

[0119] Where R is the rotation matrix between the spatial coordinate systems of high-speed camera No. 1 and camera No. 2; T is the translation matrix between the origins of the spatial coordinate systems of high-speed camera No. 1 and camera No. 2.

[0120] Where θ represents the rotation angle of the spatial coordinate system of camera 1 and the spatial coordinate system of camera 2 along the y-axis; t x It means that when the spatial coordinate systems of high-speed cameras 1 and 2 coincide, the spatial coordinate system of high-speed camera 2 is o r -x r y r z r Origin O r The amount of translation in the x direction when translating to the origin o of the world coordinate system o-xyz; t z It means that when the spatial coordinate systems of high-speed cameras 1 and 2 coincide, the spatial coordinate system of high-speed camera 2 is o r -x r y r z r Origin O r The amount of translation in the z direction when translating to the origin o of the world coordinate system o-xyz.

[0121] Implementation Method 3

[0122] This embodiment is a further explanation of the second embodiment. In the above step 2, the SGM (1,1) model is used to predict the coordinates of the center of mass of the oil bubble Oil. The three-dimensional center of mass coordinates of the oil bubble Oil in the ChuShiNumber+i frame image are The predicted values ​​are expressed as follows:

[0123]

[0124] In the formula, xp respectively represent the X, Y, and Z components of the predicted value of the center of mass coordinates of the oil bubble Oil in the ChuShiNumber+i frame; (0) (1) yp (0) (1) zp (0) (1) represents the three-dimensional centroid coordinates of the oil bubble Oil in the ChuShiNumber frame; a and b represent the development coefficient and the gray action, respectively. The representation methods of a and b are as follows:

[0125]

[0126] In the formula, A (0)(i) represents the three-dimensional centroid coordinates of the oil bubble in the ChuShiNumber+i frame, i is the frame number of any five frames of images, i is from ChuShiNumber frame to ChuShiNumber+4 frame, ChuShiNumber frame is the first frame of image, each frame contains two manually selected oil bubble pictures, these two oil bubble pictures are taken by high-speed cameras No. 1 and No. 2 respectively.

[0127] A (0) (i) The expression is as follows:

[0128] A (0) (i)=(xp (0) (i),yp (0) (i),zp (0) (i)), i=1,2,3,4,5

[0129] q (1) (i) is A (0) (i) One-time accumulation sequence A (1) (i) is the next generation sequence;

[0130] q (1) (i) The expression method is as follows:

[0131] q (1) (i) = (1-α)A (1) (i)+αA (1) (i-1), i=2,3,4,5

[0132] Where α is the background construction parameter, α∈(0,1), A (1) (i) is the coordinate of the centroid A (0) (i) is the accumulated value of A (1) (i) The expression method is as follows:

[0133]

[0134] Implementation Method 4

[0135] This embodiment is a further explanation of the third embodiment. The method for identifying and matching the target oil bubble Oil in the above step three is as follows:

[0136] The oil bubble Oil manually selected in the ChuShiNumber+4 frame is taken as the target oil bubble, and in the ChuShiNumber+5 frame, the target oil bubble Oil is identified and matched in the spherical matching area. The identification method includes two parts: the selection of the spherical matching area and the matching of the oil bubble.

[0137] The method for selecting the spherical matching area is as follows:

[0138] Predict the coordinates of the center of mass of the oil bubble Oil in the ChuShiNumber+5 frame is the center of the circle and the radius is R oil Create a spherical matching region, such as Figure 3 , the spherical matching area must contain the complete oil bubble. If the spherical area contains part of the oil bubble, the spherical area is expanded until the complete oil bubble is included. Oil bubble in the spherical matching area is the candidate oil bubble of oil bubble Oil, β represents the βth oil bubble among the candidate oil bubbles, n number is the total number of oil bubbles contained in the candidate oil bubbles. The spherical matching area expression is as follows:

[0139]

[0140] Where ux(β), uy(β), uz(β) represent the candidate oil bubbles, respectively. The 3D coordinates of the center of mass of the βth candidate matching oil bubble.

[0141] The matching method of oil bubble is as follows:

[0142] The matching of oil bubbles is based on the characteristics of oil bubbles. The matching primitive representing the βth candidate oil bubble feature has an area deformation δ s(β) , maximum height variation δ h(β) , circumference change δ c(β) , at camera 1 O l -X l Y l Plane projection area S l(β) , at camera 2 O rr -X rr Y rr Plane projection area S r(β) ,like Figure 4 .

[0143] The following oil bubble similarity function F(λ s ,λ h ,λ c ,λ lrs ,δ s(β) ,δ h(β) ,δ c(β) ,f lrs(β) ,f soboil ):

[0144]

[0145] In the formula, λ s is the oil bubble area deformation coefficient, λ h is the coefficient of variation of the maximum height of the oil bubble, λ c is the coefficient of variation of the oil bubble perimeter, λ lrsis the oil bubble projection area coefficient;

[0146] λ s , h , c , lrs It can be obtained by manually selecting multiple pictures and manually matching the oil bubbles, and then through the calibration method.

[0147] The deformation degree of the βth candidate oil bubble area δ s(β) It can be expressed as follows:

[0148] δ s(β) =|S l(β) -S r(β) |

[0149] The maximum height variation of the βth candidate oil bubble δ h(β) It can be expressed as follows:

[0150] δ h(β) =|h l(β) -h r(β) |

[0151] In the formula, h l(β) Indicates that the βth candidate oil bubble is in camera No. 1 O l -X l Y l Maximum height of plane projection, h r(β) Indicates that the βth candidate oil bubble is in camera No. 2 O rr -X rr Y rr The maximum height of the plane projection.

[0152] The variation degree of the βth candidate oil bubble perimeter δ c(β) It can be expressed as follows:

[0153] δ c(β) =|C l(β) -C r(β) |

[0154] In the formula, C l(β) Indicates that the βth candidate oil bubble is in camera No. 1 O l -X l Y l Plane projection perimeter, C r(β) Indicates that the βth candidate oil bubble is in camera No. 2 O rr -X rr Y rr Plane projection perimeter.

[0155] The projection area f of the βth candidate oil bubble lrs(β) It can be expressed as follows:

[0156] f lrs (β) =S l(β) +S r(β)

[0157] In the formula, S l(β) Indicates that the βth candidate oil bubble is in camera No. 1 O l -X l Y l Projected area of ​​the plane, S r(β) Indicates that the βth candidate oil bubble is located at camera No. 2 at O rr -X rr Y rr Plane projected area.

[0158] The matching primitives representing the target oil bubble Oil features include: the area deformation of the target oil bubble Oil oboil s , the maximum height change of the target oil bubble Oiloboil h , the circumference change of the target oil bubble Oiloboil c , the projected area f of the target oil bubble Oil soboil ,like Figure 5 shown.

[0159] The area deformation of the target oil bubble Oiloboil s It can be expressed as follows:

[0160] oboil s =|soboil l -soboil r |

[0161] In the formula, soboil l Indicates that the target oil bubble Oil is in camera No. 1 and camera No. l -X l Y l The area of ​​the plane projection, soboil r Indicates that the target oil bubble Oil is in camera No. 2 at O rr -X rr Y rr The area of ​​the plane projection.

[0162] The maximum height variation of the target oil bubble Oiloboil h It can be expressed as follows:

[0163] oboil h =|LOboil h -ROboil h |

[0164] Where, LOboil h Indicates that the target oil bubble Oil is at camera No. 1 O l -Xl Y l Maximum height of plane projection, ROboil h Indicates that the target oil bubble Oil is at camera No. 2 O rr -X rr Y rr The maximum height of the plane projection.

[0165] Target oil bubble Oil perimeter change degree oboil c It can be expressed as follows:

[0166] oboil c =|LOboil c -ROboil c |

[0167] Where, LOboil c Indicates that the target oil bubble Oil is at camera No. 1 O l -X l Y l Plane projection perimeter, ROboil c Indicates that the target oil bubble Oil is at camera No. 2 O rr -X rr Y rr Plane projection perimeter.

[0168] Projected area f of target oil bubble Oil soboil It can be expressed as follows:

[0169] f soboil =soboil l +soboil r

[0170] Count all candidate oil bubbles Similarity function value of , find the candidate oil bubble The oil bubble with the smallest similarity function value is the target oil bubble Oil, and the recognition and matching of the target oil bubble Oil is completed.

[0171] Implementation Method 5

[0172] This embodiment is a further explanation of the fourth embodiment. In the above step 4, the number of any two adjacent frames of images is optional frame, chushinumberi optional +1 frame oil bubbles are globally matched, i optional is the frame number of any frame image. Global matching includes two parts: establishing a spherical matching area and matching oil bubbles. The specific method is as follows:

[0173] To chushinumberi optional , chushinumberioptional +1 Two adjacent frames of images are grayed out, the background is grayed out, the difference image is detected, and the Canny operator edge detection is performed to extract the characteristic information of the oil bubbles in the image.

[0174] After the treatment, optional The oil bubbles in the frame image are numbered in order from top to bottom and from left to right. optional The coordinates of the center of mass of the oil bubble in the frame are represented by ZhiXinP optional (xp (0) (ω),yp (0) (ω),zp (0) (ω)), ω=1, 2, 3, 4, 5,...m number

[0175] In the formula, xp (0) (ω), yp (0) (ω), zp (0) (ω) represents chushinumberi optional The X, Y, and Z components of the coordinates of the center of mass of the oil bubble No. ω in the frame, ω is the number, m number It's chushinumberi optional The total number of oil bubbles in the frame.

[0176] Take the oil bubble No. ω as the target oil bubble and match it as follows:

[0177] The oil bubble in the first chushinumberi optional The predicted value of the center of mass coordinates in frame +1 is by is the center of the circle and the radius is R optional A spherical matching region is established. The spherical matching region must include the complete oil bubble. If the spherical region includes part of the oil bubble, the spherical region is expanded until the complete oil bubble is included. Oil bubbles in the spherical matching region is the candidate oil bubble of the ωth oil bubble, ε represents the candidate oil bubble The εth oil bubble, e number Candidate oil bubble The total number of oil bubbles.

[0178] The spherical matching area is expressed as follows:

[0179]

[0180] ux(ε),uy(ε),uz(ε) are candidate oil bubbles The three-dimensional coordinates of the center of mass of the εth candidate oil bubble in .

[0181] The oil bubble is matched as follows:

[0182] Candidate oil bubble The similarity function F(λ s ,λ h ,λ c ,λ lrs ,δ s(ε) ,δ h(ε) ,δ c(ε) ,f lrs(ε) ,f sobω ):

[0183]

[0184] In the formula, δ s(ε) ,δ h(ε) ,δ c(ε) , S l(ε) , S r(ε) 、f lrs(ε) They represent the area deformation, maximum height change, perimeter change, and the position of the εth candidate oil bubble at camera No. 1, l -X l Y l Plane projection area, camera O rr -X rr Y rr Plane projection area; obω s 、obω h 、obω c 、sobω l 、sobω r 、f sobω They represent the area deformation, maximum height change, perimeter change of the oil bubble No. ω, and the l -X l Y l Plane projection area, camera O rr -X rr Y rr Plane projection area, projection area.

[0185] Calculate candidate oil bubbles Similarity function value of , find the candidate oil bubble The oil bubble with the smallest similarity function value in the equation is:

[0186] min|F(λ s ,λ h ,λ c ,λ lrs ,δ s(ε) ,δ h(ε) ,δ c(ε) ,flrs(ε) ,f sobω )|≥t escape

[0187] Where, t escape is the oil bubble escape threshold, which is used to determine the chushinumberi optional Oil bubbles in the frame optional +1 parameter of oil bubble escape in frame, t escape It can be manually calibrated from the adjacent frames where oil bubble escape occurs.

[0188] Through the above method, any two adjacent frames can be completed. optional frame, chushinumberi optional Global matching of oil bubbles in +1 frame.

[0189] Implementation Method 6

[0190] like Figure 6 , Figure 7 As shown, the present invention conducts a matching and identification experiment on oil bubbles in oil-water two-phase flow. Figure 8 It means that when the oil bubble is slightly deformed, 5 experiments are conducted, and the oil bubble is matched and identified by using the existing method and the method of the present invention respectively, and the accuracy of the two methods is compared and analyzed; Fig. 9 Seven experiments were conducted, using the existing method and the method of the present invention to match and identify oil bubbles, and the time consumption of the two methods was counted and compared and analyzed.

[0191] After experiments, when the oil bubbles in the picture were identified and matched, the average accuracy of the matching and identification of the oil bubbles of the present invention reached 95.4%, while the average accuracy of the oil bubble identification of the existing method was 60.8%, which was 34.6% higher than the existing method. In terms of the time consumption of matching and identifying oil bubbles, the method of the present invention took an average of 0.82 seconds, while the existing method took an average of 4.1 seconds, which was 3.28 seconds higher than the existing method. The present invention improves the speed and accuracy of oil bubble identification for oil-water two-phase flow with extremely high water content, and improves the efficiency of oil bubble identification and matching.

Claims

1. A method for identifying oil bubbles in an oil-water two-phase flow with extremely high water content, characterized in that: The method for identifying oil bubbles in an ultra-high water-cut oil-water two-phase flow comprises the following steps: Step 1: Build a PIV oil-water two-phase flow oil bubble identification system and select the initial oil bubble; The method for building the PIV oil-water two-phase flow oil bubble identification system and selecting the initial oil bubble is as follows: The PIV oil-water two-phase flow oil bubble identification system includes two high-speed cameras with the same parameters, two camera brackets with the same specifications and adjustable height of the high-speed cameras, a transparent glass pipe and a control computer; the two cameras are named high-speed camera No. 1 and high-speed camera No. 2, and high-speed cameras No. 1 and 2 are connected by a computer; Synchronously select five adjacent frames of images from two high-speed cameras, select the oil bubble with the largest oil bubble area in each frame of the No. 1 high-speed camera as the initial oil bubble, and select the oil bubble with the largest oil bubble area in each frame of the No. 2 high-speed camera as the initial oil bubble; The spatial coordinate system of high-speed camera No. 1 is o-xyz, which coincides with the world coordinate system. The origin o is the optical center of high-speed camera No. 1, and the spatial coordinate system o-xyz has no rotation. The effective focal length is f l , the intersection of the optical center o of high-speed camera No. 1 and its image plane is O l , with O l As the origin, the image coordinate system of high-speed camera No. 1 is established as O l -X l Y l ; The spatial coordinate system of high-speed camera No. 2 is o r -x r y r z r , O r is the optical center of high-speed camera No. 2, the optical center of high-speed camera No. 2 is O r The intersection point with its image coordinate system is O rr , with O rr The image coordinate system of high-speed camera No. 2 is established as O rr -X r Y r ; ChuShiNumber represents the frame number of the image where the oil bubble is located, and the three-dimensional centroid coordinates of the oil bubble Oil in the ChuShiNumber+i frame image are ZhiXinP i (xp (0) (i),yp (0) (i),zp (0) (i)) is expressed as follows: In the formula, xp (0) (i) yp (0) (i) zp (0) (i) are the X, Y, and Z components of the centroid coordinates of the selected oil bubble Oil in the ChuShiNumber+i frame image, i is the frame number of any 5 frames of images, i is from ChuShiNumber frame to ChuShiNumber+4 frame, ChuShiNumber frame is the first frame image, and each frame contains O l -X l Y l Image coordinate system and O rr -X r Y r Two manually selected pictures of oil bubbles in the image coordinate system; f l is the effective focal length of high-speed camera No. 1, f r is the effective focal length of high-speed camera No. 2; X' l(i) , Y' l(i) Respectively represent the image coordinate system O of the No. 1 high-speed camera in the ChuShiNumber+i frame image l -X l Y l Below, the X and Y coordinates of the center of mass of the oil bubble Oil; X' r(i) , Y' r(i) Respectively represent the image coordinate system O of the No. 2 high-speed camera in the ChuShiNumber+i frame image rr -X r Y r Below, the X and Y coordinates of the center of mass of the oil bubble Oil; X' l(i) , Y' l(i) , X' r(i) , Y' r(i) The expression is as follows: In the formula, S l represents the projection area of ​​the oil bubble on the image plane of the No. 1 high-speed camera, which is the sum of the number of pixels covered by the oil bubble area; S r represents the projection area of ​​the oil bubble on the image plane of the No. 2 high-speed camera, which is the sum of the number of pixels covered by the oil bubble area; M lx 、M ly Represents the image coordinate system O of high-speed camera No. 1 l -X l Y l The sum of the X and Y coordinates of the pixels in the lower oil bubble area; M rx 、M ry Represent the image coordinate system O of high-speed camera No. 2 respectively r -X r Y r The sum of the X and Y coordinates of the pixels in the lower oil bubble area; The spatial transformation relationship from high-speed camera No. 1 to the spatial coordinate system of camera No. 2 is as follows: Where R is the rotation matrix between the spatial coordinate systems of camera 1 and camera 2; T is the translation matrix between the origin of the spatial coordinate system of camera 1 and camera 2; θ represents the rotation angle of the spatial coordinate system of camera 1 and the spatial coordinate system of camera 2 in the y-axis direction; t x It means that when the spatial coordinate systems of high-speed cameras 1 and 2 coincide, the spatial coordinate system of high-speed camera 2 is o r -x r y r z r Origin O r The amount of translation in the x direction when translating to the origin o of the world coordinate system o-xyz; t z It means that when the spatial coordinate systems of high-speed cameras 1 and 2 coincide, the spatial coordinate system of high-speed camera 2 is o r -x r y r z r Origin O r The amount of translation in the z direction when translating to the origin o of the world coordinate system o-xyz; Step 2: Use the grey system theory SGM (1,1) model to predict the position of the oil bubble's center of mass coordinates; The method for predicting the position of the oil bubble mass center coordinates using the grey system theory SGM (1,1) model is as follows: The three-dimensional centroid coordinates of the oil bubble Oil in the ChuShiNumber+i frame image The predicted values ​​are expressed as follows: In the formula, xp respectively represent the X, Y, and Z components of the predicted value of the center of mass coordinates of the oil bubble Oil in the ChuShiNumber+i frame; (0) (1) yp (0) (1) zp (0) (1) represents the three-dimensional centroid coordinates of the oil bubble Oil in the ChuShiNumber frame; a and b represent the development coefficient and the gray action, respectively. The representation methods of a and b are as follows: In the formula, A (0) (i) represents the coordinates of the three-dimensional centroid of the oil bubble in the ChuShiNumber+i frame, i is the frame number of any five frames, i is from ChuShiNumber frame to ChuShiNumber+4 frame, ChuShiNumber frame is the first frame, and each frame contains two manually selected oil bubble pictures, which are taken by high-speed cameras No. 1 and No. 2 respectively; A (0) (i) The expression is as follows: A (0) (i)=(xp (0) (i),yp (0) (i),zp (0) (i)),i=1,2,3,4,5 q (1) (i) is A (0) (i) One-time accumulation sequence A (1) (i) is the next generation sequence; q (1) (i) The expression method is as follows: q (1) (i)=(1-α)A (1) (i)+αA (1) (i-1),i=2,3,4,5 Where α is the background construction parameter, α∈(0,1), A (1) (i) is the coordinate of the centroid A (0) (i) is the accumulated value of A (1) (i) The expression method is as follows: Step 3: Identify and match the oil bubble; The method for identifying and matching the oil bubble Oil is as follows: The oil bubble Oil manually selected in the ChuShiNumber+4 frame is taken as the target oil bubble, and in the ChuShiNumber+5 frame, the target oil bubble Oil is identified and matched in the spherical matching area; the identification method includes two parts: the selection of the spherical matching area and the matching of the oil bubble; The method for selecting the spherical matching area is as follows: Predict the coordinates of the center of mass of the oil bubble Oil in the ChuShiNumber+5 frame is the center of the circle and the radius is R oil Establish a spherical matching area. The spherical matching area must include the complete oil bubble. If the spherical area includes part of the oil bubble, expand the spherical area until it includes the complete oil bubble. The oil bubble in the spherical matching area is the candidate oil bubble of oil bubble Oil, β represents the βth oil bubble among the candidate oil bubbles, n number is the total number of oil bubbles contained in the candidate oil bubbles; the spherical matching area expression is as follows: Where ux(β), uy(β), uz(β) represent the candidate oil bubbles, respectively. The three-dimensional coordinates of the mass center of the βth candidate matching oil bubble; The matching method of oil bubble is as follows: The matching of oil bubbles is based on the characteristics of oil bubbles. The matching primitive representing the βth candidate oil bubble feature has an area deformation δ s(β) , maximum height variation δ h(β) , circumference change δ c(β) , at camera 1 O l -X l Y l Plane projection area S l(β) , at camera 2 O rr -X rr Y rr Plane projection area S r(β) ; Establish the following oil bubble similarity function F(λ s ,λ h ,λ c ,λ lrs ,δ s(β) ,δ h(β) ,δ c(β) ,f lrs(β) ,f soboil ): In the formula, λ s is the oil bubble area deformation coefficient, λ h is the coefficient of variation of the maximum height of the oil bubble, λ c is the coefficient of variation of the oil bubble perimeter, λ lrs is the oil bubble projection area coefficient; λ s , h , c , lrs It can be obtained by manually selecting multiple pictures and manually matching the oil bubbles, thus obtaining them through calibration methods; The deformation degree of the βth candidate oil bubble area δ s(β) It can be expressed as follows: d s(β) =|S l(β) -S r(β) | The maximum height variation of the βth candidate oil bubble δ h(β) It can be expressed as follows: δ h(β) =|h l(β) -h r(β) | In the formula, h l(β) Indicates that the βth candidate oil bubble is in camera No. 1 O l -X l Y l Maximum height of plane projection, h r(β) Indicates that the βth candidate oil bubble is in camera No. 2 O rr -X rr Y rr Maximum height of plane projection; The variation degree of the βth candidate oil bubble perimeter δ c(β) It can be expressed as follows: d c(β) =|C l(β) -C r(β) | In the formula, C l(β) Indicates that the βth candidate oil bubble is in camera No. 1 O l -X l Y l Plane projection perimeter, C r(β) Indicates that the βth candidate oil bubble is in camera No. 2 O rr -X rr Y rr Plane projection perimeter; The projection area f of the βth candidate oil bubble lrs(β) It can be expressed as follows: f lrs(β) =S l(β) +S r(β) In the formula, S l(β) Indicates that the βth candidate oil bubble is in camera No. 1 O l -X l Y l Projected area of ​​the plane, S r(β) Indicates that the βth candidate oil bubble is located at camera No. 2 at O rr -X rr Y rr Plane projection area; The matching primitives representing the target oil bubble Oil features include: the area deformation of the target oil bubble Oil oboil s , the maximum height change of the target oil bubble Oiloboil h , the circumference change of the target oil bubble Oiloboil c , the projected area f of the target oil bubble Oil soboil ; The area deformation of the target oil bubble Oiloboil s It can be expressed as follows: oboil s =|soboil l -soboil r | In the formula, soboil l Indicates that the target oil bubble Oil is in camera No. 1 and camera No. l -X l Y l The area of ​​the plane projection, soboil r Indicates that the target oil bubble Oil is in camera No. 2 at O rr -X rr Y rr The area of ​​the plane projection; The maximum height variation of the target oil bubble Oiloboil h It can be expressed as follows: oboil h =|LOboil h -ROboil h | Where, LOboil h Indicates that the target oil bubble Oil is at camera No. 1 O l -X l Y l Maximum height of plane projection, ROboil h Indicates that the target oil bubble Oil is at camera No. 2 O rr -X rr Y rr Maximum height of plane projection; Target oil bubble Oil perimeter change degree oboil c It can be expressed as follows: oboil c =|LOboil c -ROboil c | Where, LOboil c Indicates that the target oil bubble Oil is at camera No. 1 O l -X l Y l Plane projection perimeter, ROboil c Indicates that the target oil bubble Oil is at camera No. 2 O rr -X rr Y rr Plane projection perimeter; Projected area f of target oil bubble Oil soboil It can be expressed as follows: f soboil =soboil l +soboil r Count all candidate oil bubbles Similarity function value of , find the candidate oil bubble The oil bubble with the smallest similarity function value is the target oil bubble Oil, and the recognition and matching of the target oil bubble Oil is completed; Step 4: Perform global matching on the oil bubbles in any two adjacent frames of images; The method for globally matching oil bubbles in any two adjacent frames of images is as follows: For any two adjacent frames of images, chushinumberi optional frame, chushinumberi optional +1 frame oil bubbles are globally matched, i optional is the frame number of the optional frame image; global matching includes establishing a spherical matching area and matching the oil bubble. The specific method is as follows: To chushinumberi optional , chushinumberi optional +1 Two adjacent frames of images are grayed out, background grayed out, image difference detected, and edge detected by the Canny operator to extract the characteristic information of oil bubbles in the image; After the treatment, optional The oil bubbles in the frame image are numbered in order from top to bottom and from left to right. optional The coordinates of the center of mass of the oil bubble in the frame are represented by ZhiXinP optional (xp (0) (ω),yp (0) (ω),zp (0) (ω)), ω=1, 2, 3, 4, 5,...m number In the formula, xp (0) (ω), yp (0) (ω), zp (0) (ω) represents chushinumberi optional The X, Y, and Z components of the coordinates of the center of mass of the oil bubble No. ω in the frame, ω is the number, m number It's chushinumberi optional The total number of oil bubbles in the frame; Take the oil bubble No. ω as the target oil bubble and match it as follows: The oil bubble in the first chushinumberi optional The predicted value of the center of mass coordinates in frame +1 is is the center of the circle and the radius is R optional Establish a spherical matching area. The spherical matching area must include the complete oil bubble. If the spherical area includes part of the oil bubble, expand the spherical area until it includes the complete oil bubble. The oil bubble in the spherical matching area is the candidate oil bubble of the ωth oil bubble, ε represents the candidate oil bubble The εth oil bubble, e number Candidate oil bubble The total number of oil bubbles in the oil; The spherical matching area is expressed as follows: ux(ε),uy(ε),uz(ε) are candidate oil bubbles The three-dimensional coordinates of the mass center of the εth candidate oil bubble in ; The oil bubble is matched as follows: Candidate oil bubble The similarity function F(λ s ,λ h ,λ c ,λ lrs ,δ s(ε) ,δ h(ε) ,δ c(ε) ,f lrs(ε) ,f sobω ): In the formula, δ s(ε) , δ h(ε) , δ c(ε) , S l(ε) , S r(ε) 、f lrs(ε) They represent the area deformation, maximum height change, perimeter change, and the position of the εth candidate oil bubble at camera O l -X l Y l Plane projection area, camera O rr -X rr Y rr Plane projection area; obω s 、obω h 、obω c 、sobω l 、sobω r 、f sobω They represent the area deformation, maximum height change, perimeter change of the oil bubble No. ω, and the l -X l Y l Plane projection area, camera O rr -X rr Y rr Plane projection area, projection area; Calculate candidate oil bubbles Similarity function value of , find the candidate oil bubble The oil bubble with the smallest similarity function value in the equation is: min|F(λ s ,l h ,l c ,l lrs ,d s(ε) ,d h(ε) ,d c(ε) ,f lrs(ε) ,f sobω )|≥t escape Where, t escape is the oil bubble escape threshold, which is used to determine the chushinumberi optional Oil bubbles in the frame optional +1 parameter of oil bubble escape in frame, t escape It can be manually calibrated from the adjacent frames where the oil bubble escape occurs; Through the above method, any two adjacent frames can be completed optional frame, chushinumberi optional Global matching of oil bubbles in +1 frame.