A three-dimensional velocity field reconstruction method based on binocular particle images
By combining binocular stereoscopic vision method with PIV technology, using a dual-pulse laser and a high-speed CCD camera to acquire images, the three-dimensional velocity field reconstruction of gas-liquid two-phase flow is achieved, solving the problem that traditional PIV technology can only measure two-dimensional velocity field. , reduces equipment cost and calculation complexity and improves measurement accuracy.
Patent Information
- Application Number
- CN202210579250.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-27
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-05-27
AI Technical Summary
The traditional 2D-PIV speed measurement technology can only obtain a two-dimensional velocity field. The 3D-PIV based on tomography technology is complex and costly, making it difficult to cope with flow field measurement in complex environments, limiting the reconstruction of the three-dimensional velocity field of gas-liquid two-phase flow. .
Combining binocular stereoscopic vision method and PIV technology, images are collected through dual-pulse lasers and high-speed CCD cameras, and particle depth information and plane displacement are obtained using polar line constraint method, Census algorithm and triangulation method to achieve reconstruction of the three-dimensional velocity field.
It reduces equipment cost and calculation complexity, improves measurement accuracy, and requires only two cameras to complete three-dimensional flow field measurement, which is suitable for fields such as multiphase flow field detection.
Smart Images

Figure CN115049784B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a three-dimensional velocity field reconstruction method based on binocular particle images, and more specifically, to a gas-liquid two-phase flow three-dimensional velocity field reconstruction method combining binocular vision principle with particle image velocity measurement technology. Background Art
[0002] Particle image velocimetry technology (PIV) is a flow field measurement technology developed in the 1980s. It can accurately measure the instantaneous state of a two-dimensional or three-dimensional flow field without contact, providing an effective visual measurement method for fluid motion. The intuitive interpretation of fluid motion is the basis of many engineering sciences. Now the application field of PIV has surpassed these traditional fluid motion fields and has gradually expanded to fields such as medicine, biology, and oceanography. Due to the high price of equipment and high requirements for experimental environment, the teaching and engineering application scope of this measurement technology is greatly limited. However, whether it is used for the development of engineering applications or experimental teaching of fluid courses, obtaining flow field data and studying fluid motion are key issues that need to be solved urgently, so the research and development of PIV measurement technology has become more urgent. When performing particle image testing, traditional 2D-PIV velocimetry technology can only obtain a two-dimensional velocity field, while 3D-PIV based on tomography technology is often more complicated, requiring three or more cameras, which is expensive and difficult to cope with flow fields in complex environments. Therefore, it is necessary to invent a new PIV test technology to achieve the purpose of saving equipment costs and realizing the reconstruction of the three-dimensional velocity field of gas-liquid two-phase flow. Summary of the invention
[0003] In view of the above-mentioned shortcomings, the present invention designs a three-dimensional velocity field reconstruction method based on binocular particle images.
[0004] The present invention is achieved through the following technical solutions: by combining binocular stereo vision method with PIV technology, the acquisition of particle depth information and plane displacement in the gas-liquid two-phase flow field is achieved, and then the three-dimensional velocity field reconstruction of the flow field is completed.
[0005] The hardware system of the three-dimensional velocity field reconstruction method based on binocular particle images includes: a dual-pulse laser for providing light source for the PIV system, the number of dual-pulse lasers is 1; a high-speed CCD camera for collecting images, the resolution is 1024×1024, the shutter speed is 1 / 2000s, the number of high-speed CCD cameras is 2; a computer for data image processing;
[0006] The present invention designs a three-dimensional velocity field reconstruction method based on binocular particle images, which is characterized by comprising the following steps:
[0007] Step 1: Determine the relative position of the binocular camera and the flow field, and adjust the camera aperture and focal length to ensure that the target is clear;
[0008] Step 2: Perform chessboard calibration on the binocular camera and calculate the calibration parameters of the binocular camera;
[0009] Step 3: Trigger the dual-pulse laser through the synchronous controller, and use the left and right cameras to synchronously shoot high-speed particle images. The sampling time interval of the particle images is Δt; four particle images at different angles and different times are obtained: left camera image A at time T, right camera image B at time T, left camera image C at time T+Δt, and right camera image D at time T+Δt;
[0010] Step 4: According to the binocular camera calibration parameters described in step 2, the left camera image and the right camera image at the same time described in step 3 are calibrated by using the epipolar constraint method to eliminate the deviation in the vertical direction; binocular image calibration is performed on image A and image B to obtain calibrated images A1 and B1; binocular image calibration is performed on C and D at the same time to obtain calibrated images C1 and D1;
[0011] Step 5: Perform image region matching on the particle images of the left and right cameras obtained at the same time by the epipolar constraint method in step 4, and calculate the coordinate difference between the matching areas of the two images to obtain the disparity value p;
[0012] The Census algorithm based on regional stereo matching is used to perform regional particle image matching. Formula (1) is used to encode each particle image region to obtain a bit string.
[0013]
[0014] In the formula, I is the pixel information of the particle image, p is the gray value in the neighborhood, and q is the gray value of the center pixel;
[0015] Calculate the Hamming distance between the bit strings of different image regions in the particle images of the left and right cameras at the same time, and use the Hamming distance as its matching cost. The two regions with the smallest Hamming distance are the particle image regions that match each other.
[0016] After the image area matching is completed, the difference of the pixel coordinates of the center of each matching area is calculated to obtain the disparity map of the particle image at that moment; finally, the disparity map of images A1 and B1 at time T is P1, and the disparity map of images C1 and D1 at T+Δt is P2.
[0017] Step 6: Based on the disparity map obtained in step 5, the depth information of the particle image is calculated using triangulation;
[0018] According to the triangulation method, if the disparity value p of the two image regions is known, the depth value z of the matching region can be calculated by formula (2):
[0019] z=Bf / d Formula (2)
[0020] Where, B is the baseline distance, i.e., the distance between the optical centers of camera 1 and camera 2; f is the focal length of the camera; B and f are obtained through the binocular camera calibration in step 2;
[0021] Traverse all elements in the disparity matrix, perform depth calculation, and obtain the particle image depth matrix; then the depth matrix H1 of the particle image at time T can be obtained based on the disparity map P1, and the depth matrix H2 of the particle image at time T+Δt can be obtained based on the disparity map P2;
[0022] Step 7: Perform cross-correlation calculation based on fast Fourier transform on the two images of the same camera with an interval time Δt after limit constraint correction described in step 4 to obtain the displacement information of the particle;
[0023] Taking the left camera as an example, two images (A1 and C1) of the same camera separated by a time interval of Δt are divided into windows. The image A1 at time T is used as the query image, and the image A1 is divided into n template images I s (x,y),I s Satisfies formula (3):
[0024] A1=I s1 (x,y)∪I s2 (x, y)∪…∪I sn (x, y) and
[0025] Determine the window I to be queried in image C1 q (x, y);
[0026] Using formula (4) to transform the template image I s (x, y) and the query window I q (x+τ x , y+τ y ) performs Fourier transform,
[0027]
[0028] Based on the Wiener-Khinchin theorem, the template image I is calculated using formula (5) s (x, y) and the query window I q (x+τ x , y+τ y )'s Fourier correlation coefficient R F (u, v);
[0029]
[0030] In the formula, * represents conjugate complex number;
[0031] Using formula (6), the result of formula (5) is inversely transformed to obtain the template image I s (x, y) and the query window I q (x+τ x , y+τ y ) 12 (τ x , τ y ),
[0032]
[0033] Assume that the search step is k, and traverse the query window of image C1 from top to bottom and from left to right, then multiple cross-correlation matrices can be obtained within the traversal range; find the peak position in the cross-correlation matrix, and then determine the query window that matches the template image, that is, the matching image area; the peak position in the cross-correlation matrix corresponds to τ x and τ y That is, the displacement Δx and Δy of the particles in the template image area; by performing this operation on all template images in the query image A1, the displacement matrix X (horizontal displacement matrix) and Y (vertical displacement matrix) of the entire particle image can be obtained;
[0034] Step 8: According to the particle image depth matrices H1 and H2 obtained in step 6 and the particle image displacement matrices X and Y obtained in step 7, the three-dimensional velocity vector of the particle image is calculated to achieve reconstruction of the three-dimensional velocity field;
[0035] Taking the template image window divided in step 7 as the reference, the displacement vectors Δx and Δy corresponding to each template image window are determined in the displacement matrices X and Y, and the depth displacement Δz corresponding to each template image window is determined using formula (7).
[0036] Δz=z(T+Δt)-z(T) Formula (7)
[0037] Where z(T) is the average depth of the template image in H1 at time T, and z(T+Δt) is the average depth of the matching area in H2 at time T+Δt;
[0038] Then the three-dimensional velocity vector (v) of each template image window can be calculated using formula (8): x , v y , v z ),
[0039]
[0040] In the formula, v x and v y are the instantaneous velocities of the tracer particles in the horizontal and vertical directions along the displacement calculated by the cross-correlation algorithm, v z is the instantaneous velocity of the tracer particles in the depth direction;
[0041] The three-dimensional velocity vector calculation is performed on all template image regions in the particle image, and the three-dimensional velocity field of the particle image can be reconstructed. The beneficial effect of the present invention is that only two cameras are needed to complete the measurement of the three-dimensional flow field, which not only reduces the equipment cost and the complexity of calculation, but also improves the calculation speed while ensuring the reconstruction accuracy, and can be widely used in related fields such as multiphase flow field detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 :3D-PIV velocity field reconstruction flow chart
[0043] Figure 2 :Mathematical model of binocular vision
[0044] Figure 3 :The cross-correlation calculation result based on fast Fourier transform
[0045] Figure 4 :3D velocity field reconstruction process diagram DETAILED DESCRIPTION
[0046] The present invention provides a three-dimensional velocity field reconstruction method based on binocular particle images. The 3D-PIV velocity field reconstruction flow chart is as follows: Figure 1 The specific implementation method is to first obtain multi-view particle images at different times through the binocular PIV particle image experimental measurement system, and use the epipolar constraint method to correct them. Then, according to the principle of binocular stereo vision, the parallax between the left and right cameras is used to simulate the human eye to measure the depth information, and the change of particle depth information is calculated during the two exposure times. The mathematical model of binocular vision is as follows: Figure 2 Finally, the depth information is combined with the particle plane displacement information obtained by the fast Fourier transform-based cross-correlation algorithm. The calculation results of the fast Fourier transform-based cross-correlation algorithm are shown in Figure 3 As shown, the three-dimensional reconstruction of the velocity field is finally completed. The three-dimensional velocity field reconstruction process is shown in Figure 4 It is characterized in that it comprises the following steps:
[0047] Step 1: Determine the relative position of the binocular camera and the flow field, and adjust the camera aperture and focal length to ensure that the target is clear;
[0048] Step 2: Perform chessboard calibration on the binocular camera and calculate the calibration parameters of the binocular camera;
[0049] Step 3: Trigger the dual-pulse laser through the synchronous controller, and use the left and right cameras to synchronously shoot high-speed particle images. The sampling time interval of the particle images is Δt; four particle images at different angles and different times are obtained: left camera image A at time T, right camera image B at time T, left camera image C at time T+Δt, and right camera image D at time T+Δt;
[0050] Step 4: According to the binocular camera calibration parameters described in step 2, the left camera image and the right camera image at the same time described in step 3 are calibrated by using the epipolar constraint method to eliminate the deviation in the vertical direction; binocular image calibration is performed on image A and image B to obtain calibrated images A1 and B1; binocular image calibration is performed on C and D at the same time to obtain calibrated images C1 and D1;
[0051] Step 5: Perform image region matching on the particle images of the left and right cameras obtained at the same time by the epipolar constraint method in step 4, and calculate the coordinate difference between the matching areas of the two images to obtain the disparity value p;
[0052] The Census algorithm based on regional stereo matching is used to perform regional particle image matching. Formula (1) is used to encode each particle image region to obtain a bit string.
[0053]
[0054] In the formula, I is the pixel information of the particle image, p is the gray value in the neighborhood, and q is the gray value of the center pixel;
[0055] Calculate the Hamming distance between the bit strings of different image regions in the particle images of the left and right cameras at the same time, and use the Hamming distance as its matching cost. The two regions with the smallest Hamming distance are the particle image regions that match each other.
[0056] After the image area matching is completed, the difference of the pixel coordinates of the center of each matching area is calculated to obtain the disparity map of the particle image at that moment; finally, the disparity map of images A1 and B1 at time T is P1, and the disparity map of images C1 and D1 at T+Δt is P2.
[0057] Step 6: Based on the disparity map obtained in step 5, the depth information of the particle image is calculated using triangulation;
[0058] According to the triangulation method, if the disparity value p of the two image regions is known, the depth value z of the matching region can be calculated by formula (2):
[0059] z=Bf / d Formula (2)
[0060] Where, B is the baseline distance, i.e., the distance between the optical centers of camera 1 and camera 2; f is the focal length of the camera; B and f are obtained through the binocular camera calibration in step 2;
[0061] Traverse all elements in the disparity matrix, perform depth calculation, and obtain the particle image depth matrix; then the depth matrix H1 of the particle image at time T can be obtained based on the disparity map P1, and the depth matrix H2 of the particle image at time T+Δt can be obtained based on the disparity map P2;
[0062] Step 7: Perform cross-correlation calculation based on fast Fourier transform on the two images of the same camera with an interval time Δt after limit constraint correction described in step 4 to obtain the displacement information of the particle;
[0063] Taking the left camera as an example, two images (A1 and C1) of the same camera separated by a time interval of Δt are divided into windows. The image A1 at time T is used as the query image, and the image A1 is divided into n template images I s (x,y),I s Satisfies formula (3):
[0064] A1=I s1 (x,y)∪I s2 (x, y)∪…∪I sn (x, y) and
[0065] Determine the window I to be queried in image C1 q (x, y);
[0066] Using formula (4) to transform the template image I s (x, y) and the query window I q (x+τ x , y+τ y ) performs Fourier transform,
[0067]
[0068] Based on the Wiener-Khinchin theorem, the template image I is calculated using formula (5) s (x, y) and the query window I q (x+τ x , y+τ y )'s Fourier correlation coefficient R F (u, v);
[0069]
[0070] In the formula, * represents conjugate complex number;
[0071] Using formula (6), the result of formula (5) is inversely transformed to obtain the template image Is (x, y) and the query window I q (x+τ x , y+τ y ) 12 (τ x , τ y ),
[0072]
[0073] Assume that the search step is k, and traverse the query window of image C1 from top to bottom and from left to right, then multiple cross-correlation matrices can be obtained within the traversal range; find the peak position in the cross-correlation matrix, and then determine the query window that matches the template image, that is, the matching image area; the peak position in the cross-correlation matrix corresponds to τ x and τy are the displacements Δx and Δy of the particles in the template image area; by performing this operation on all template images in the query image A1, the displacement matrices X (horizontal displacement matrix) and Y (vertical displacement matrix) of the entire particle image can be obtained;
[0074] Step 8: According to the particle image depth matrices H1 and H2 obtained in step 6 and the particle image displacement matrices X and Y obtained in step 7, the three-dimensional velocity vector of the particle image is calculated to achieve reconstruction of the three-dimensional velocity field;
[0075] Taking the template image window divided in step 7 as the reference, the displacement vectors Δx and Δy corresponding to each template image window are determined in the displacement matrices X and Y, and the depth displacement Δz corresponding to each template image window is determined using formula (7).
[0076] Δz=z(T+Δt)-z(T) Formula (7)
[0077] Where z(T) is the average depth of the template image in H1 at time T, and z(T+Δt) is the average depth of the matching area in H2 at time T+Δt;
[0078] Then the three-dimensional velocity vector (v) of each template image window can be calculated using formula (8): x , v y , v z ),
[0079]
[0080] In the formula, v x and v y are the instantaneous velocities of the tracer particles in the horizontal and vertical directions along the displacement calculated by the cross-correlation algorithm, v z is the instantaneous velocity of the tracer particles in the depth direction;
[0081] By calculating the three-dimensional velocity vectors of all template image regions in the particle image, the three-dimensional velocity field of the particle image can be reconstructed.
[0082] The beneficial effect of the present invention is that only two cameras are needed to complete the measurement of the three-dimensional flow field, which not only reduces the equipment cost and the complexity of calculation, but also ensures the reconstruction accuracy while improving the calculation speed. It can be widely used in related fields such as multiphase flow field detection.
[0083] The above is a schematic description of the present invention and its implementation mode, which is not limited. The drawings are only one of the implementation modes of the present invention. Therefore, if a person skilled in the art is inspired by it, and adopts other forms of similar components or other forms of component layouts without departing from the purpose of the invention, and designs a technical solution and embodiment similar to the technical solution without creativity, they should all fall within the protection scope of the present invention.
Claims
1. A three-dimensional velocity field reconstruction method based on binocular particle images, characterized in that: The following steps are involved: Step 1: Determine the relative position of the binocular camera and the flow field, and adjust the camera aperture and focal length to ensure that the target is clear; Step 2: Perform chessboard calibration on the binocular camera and calculate the calibration parameters of the binocular camera; Step 3: Trigger the dual-pulse laser through the synchronous controller, and use the left and right cameras to synchronously shoot high-speed particle images. The sampling time interval of the particle images is Δt; four particle images at different angles and different times are obtained: left camera image A at time T, right camera image B at time T, left camera image C at time T+Δt, and right camera image D at time T+Δt; Step 4: According to the binocular camera calibration parameters described in step 2, the left camera image and the right camera image at the same time in step 3 are calibrated by using the epipolar constraint method to eliminate the deviation in the vertical direction; binocular image calibration is performed on image A and image B to obtain calibrated images A1 and B1; binocular image calibration is performed on C and D at the same time to obtain calibrated images C1 and D1; Step 5: Perform image region matching on the particle images of the left and right cameras obtained at the same time by the epipolar constraint method in step 4, and calculate the coordinate difference between the matching areas of the two images to obtain the disparity value p; The Census algorithm based on regional stereo matching is used to perform regional particle image matching. Formula (1) is used to encode each particle image region to obtain a bit string. In the formula, I is the pixel information of the particle image, p is the gray value in the neighborhood, and q is the gray value of the center pixel; Calculate the Hamming distance between the bit strings of different image regions in the particle images of the left and right cameras at the same time, and use the Hamming distance as its matching cost. The two regions with the smallest Hamming distance are the particle image regions that match each other. After the image area matching is completed, the difference of the pixel coordinates of the center of each matching area is calculated to obtain the disparity map of the particle image at that moment; finally, the disparity map of images A1 and B1 at time T is P1, and the disparity map of images C1 and D1 at T+Δt is P2; Step 6: Based on the disparity map obtained in step 5, the depth information of the particle image is calculated using triangulation; According to the triangulation method, if the disparity value p of the two image regions is known, the depth value z of the matching region can be calculated by formula (2): z=Bf / d Formula (2) Where, B is the baseline distance, i.e., the distance between the optical centers of camera 1 and camera 2; f is the focal length of the camera; B and f are obtained through the binocular camera calibration in step 2; Traverse all elements in the disparity matrix, perform depth calculation, and obtain the particle image depth matrix; then the depth matrix H1 of the particle image at time T can be obtained based on the disparity map P1, and the depth matrix H2 of the particle image at time T+Δt can be obtained based on the disparity map P2; Step 7: Perform cross-correlation calculation based on fast Fourier transform on the two images of the same camera with an interval time Δt after limit constraint correction in step 4 to obtain the displacement information of the particle; Taking the left camera as an example, the two images A1 and C1 of the same camera with an interval of Δt are divided into windows, and the image A1 at time T is used as the query image. The image A1 is divided into n template images I s (x,y),I s Satisfy formula (3): A1=I s1 (x,y)∪I s2 (x,y)∪...∪I sn (x, y) and Determine the window I to be queried in image C1 q (x, y); Using formula (4) to transform the template image I s (x, y) and the query window I q (x+τ x , y+τ y ) performs Fourier transform, Based on the Wiener-Khinchin theorem, the template image I is calculated using formula (5) s (x, y) and the query window I q (x+τ x , y+τ y )'s Fourier correlation coefficient R F (u, v); In the formula, * represents conjugate complex number; Using formula (6), the result of formula (5) is inversely transformed to obtain the template image I s (x, y) and the query window I q (x+τ x , y+τ y ) 12 (τ x , τ y ), Assume that the search step is k, and traverse the query window of image C1 from top to bottom and from left to right, then multiple cross-correlation matrices can be obtained within the traversal range; find the peak position in the cross-correlation matrix, and then determine the query window that matches the template image, that is, the matching image area; the peak position in the cross-correlation matrix corresponds to τ x and τ y That is, the displacement Δx and Δy of the particles in the template image area; by performing this operation on all template images in the query image A1, the horizontal displacement matrix X and vertical displacement matrix Y of the entire particle image can be obtained; Step 8: According to the particle image depth matrices H1 and H2 obtained in step 6 and the particle image displacement matrices X and Y obtained in step 7, the three-dimensional velocity vector of the particle image is calculated to achieve reconstruction of the three-dimensional velocity field; Taking the template image window divided in step 7 as the reference, the displacement vectors Δx and Δy corresponding to each template image window are determined in the displacement matrices X and Y, and the depth displacement Δz corresponding to each template image window is determined using formula (7). Δz=z(T+Δt)-z(T) Formula (7) Where z(T) is the average depth of the template image in H1 at time T, and z(T+Δt) is the average depth of the matching area in H2 at time T+Δt; Then the three-dimensional velocity vector (v) of each template image window can be calculated using formula (8): x , v y , v z ), In the formula, v x and v y are the instantaneous velocities of the tracer particles in the horizontal and vertical directions along the displacement calculated by the cross-correlation algorithm, v z is the instantaneous velocity of the tracer particles in the depth direction; By calculating the three-dimensional velocity vectors of all template image regions in the particle image, the three-dimensional velocity field of the particle image can be reconstructed.
