A Monitoring Method for the Displacement and Torsion Angle of the Central Axis of a Large Industrial Pipeline
By pasting circular markers at both ends of large industrial pipelines and calculating their contour centroid coordinates using binocular cameras, the problem of difficulty in monitoring pipeline displacement and torsion angles in the prior art is solved, real-time assessment and safety guarantee of pipeline operation status is achieved.
Patent Information
- Application Number
- CN202210833635.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-07-15
AI Technical Summary
The prior art is difficult to monitor the displacement and torsion angles of the central axis of large industrial pipelines in real time, resulting in the inability to effectively evaluate the operating stability of the pipeline, and the contact monitoring method is time-consuming and labor-intensive.
A binocular camera is used to paste circular artificial markers on both ends of the pipeline. By calculating the contour centroid coordinates at different moments of the markers, combining coordinate conversion and computer processing, the displacement and torsion angle of the pipeline central axis are monitored in real time.
Real-time three-dimensional coordinate monitoring of the central axis of large industrial pipelines is realized, which can accurately evaluate the operating status of the pipeline and ensure safe and stable operation.
Smart Images

Figure CN115222694B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of pipeline displacement monitoring, and specifically to a method for monitoring the displacement and torsional angle of the central axis of a large industrial pipeline. Background Art
[0002] During the operation of many large industrial pipelines, excessive displacement or torsional angle can cause many industrial equipment to have poor output, and even lead to pipe burst accidents. For the displacement and torsion monitoring of large industrial pipelines, the most widely used is contact monitoring, such as dial gauges, wire-drawing displacement sensors, linear variable differential pressure sensors, magnetostrictive displacement sensors, liquid level gauges, etc. This method often requires the construction of special support facilities, and also requires on-site laying of pipelines and installation of sensors, which is time-consuming and laborious.
[0003] With the continuous progress and development of computer vision technology and image acquisition equipment, non-contact monitoring methods for large industrial pipelines have gradually been applied. The non-contact monitoring method mainly involves setting up a binocular camera at a distance, eliminating the disadvantages of the contact displacement monitoring that requires a special installation frame, troublesome debugging and maintenance, and saving time and effort. In recent years, the pipeline monitoring by computer vision is mostly for single monitoring point measurement, and the double monitoring points can only judge whether the large industrial pipeline has three-dimensional torsion through the existing methods, and cannot determine the displacement amount and torsional angle of the central axis of the large industrial pipeline. Summary of the Invention
[0004] Aiming at the problems existing in the prior art, the present invention provides a method for monitoring the displacement and torsional angle of the central axis of a large industrial pipeline, which can compare the relative positions of two different monitoring points at different times, determine the displacement amount and torsional angle of the central axis of the large industrial pipeline, and further evaluate the operation stability of the large industrial pipeline.
[0005] The present invention is realized through the following technical solutions:
[0006] A method for monitoring the displacement and torsional angle of the central axis of a large industrial pipeline, comprising the following steps:
[0007] Step 1, paste 1 circular artificial marker at each end of the central axis of the large industrial pipeline to form point A and point B. Use the first binocular camera to collect images of point A, and use the second binocular camera to collect images of point B. Then detect the contours of the corresponding artificial markers at different times, and calculate the centroid coordinates of the contours of the corresponding artificial markers at different times to obtain the pixel coordinates of the left eye and the right eye of the first binocular camera at different times, and the pixel coordinates of the left eye and the right eye of the second binocular camera at different times;
[0008] Step 2: Convert the pixel coordinates of the left and right eyes of the first binocular camera at different times into coordinates in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin, obtaining a series of coordinate values of point A.
[0009] First, convert the pixel coordinates of the left and right eyes of the second binocular camera at different times into a series of coordinate values in the world coordinate system with the optical center of the left eye of the second binocular camera as the origin, and then convert the series of coordinate values into a series of coordinate values of point B in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin.
[0010] Step 3: Use the series of coordinate values of point A and the series of coordinate values of point B to respectively obtain the total displacement of the central axis of the large industrial pipeline corresponding to point A and point B at different times, the displacement components along the X-axis, Y-axis, and Z-axis, and the torsion angle of the central axis of the large industrial pipeline at different times.
[0011] Preferably, in step 1, the 2 circular artificial markers have the same shape, and point A and point B are symmetrically distributed along the central axis of the large industrial pipeline and are located at the height center of the large industrial pipeline.
[0012] Preferably, in step 1, the first binocular camera and the second binocular camera are fixed outside the large industrial pipeline. The connection lines between the center points of the left and right eyes of the first binocular camera and point A are perpendicular to the large industrial pipeline, and the connection lines between the center points of the left and right eyes of the second binocular camera and point B are perpendicular to the large industrial pipeline.
[0013] Preferably, in step 1, the first binocular camera forms a first field of view on both sides of point A, and the second binocular camera forms a second field of view on both sides of point B. Identify the artificial markers in the first field of view and the second field of view in the HSV color space, then construct a mask corresponding to the artificial markers according to a threshold, perform erosion and dilation in sequence, and finally detect the contours of the artificial markers at different times.
[0014] Preferably, in step 1, the diameter of the artificial marker is 1% of the outer diameter of the large industrial pipeline, and the distances between the first binocular camera and point A and between the second binocular camera and point B are both 2 - 3m.
[0015] Preferably, step 2 is carried out as follows: convert the pixel coordinates of the left and right eyes of the first binocular camera at different times into coordinates in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin.
[0016] Let the pixel coordinates of the left eye of the first binocular camera at different times be (u l , v l ), and the pixel coordinates of the right eye of the first binocular camera at different times be (u r , v r) The world coordinate system coordinates corresponding to the left eye in the first binocular camera are (X, Y, Z);
[0017] For the left eye, based on the following formula:
[0018]
[0019] There is formula (a):
[0020]
[0021] Where: Z c is the value corresponding to the Z-axis of point A in the camera coordinate system, u and v are the coordinate symbols of the pixel coordinate system, f x is the equivalent focal length of point A in the x-axis direction of the image coordinate system, f y is the equivalent focal length of point A in the y-axis direction, (u0, v0) is the coordinate of the origin of the image coordinate system in the pixel coordinate system, X c 、Y c and Z c are the coordinates of point A in the camera coordinate system, is the value corresponding to Z c corresponding to the left eye, f xl and f yl are respectively f x and f y corresponding to the equivalent focal lengths of the left eye, u 0l and v 0l are respectively the coordinates corresponding to u0 and v0 of the left eye, R l and T l are respectively the rotation matrix and translation vector in the external parameter matrix of the left eye in the first binocular camera;
[0022] Let
[0023] Then there is
[0024] For the right eye, there is the following formula (c), where the unspecified superscripts and subscripts containing r are the abbreviations of the English word "right", and the meanings of the corresponding letters are the same as those in formula (a):
[0025]
[0026] Let
[0027] Then there is
[0028] Expanding and arranging formulas (b) and (d), there are:
[0029]
[0030] Convert equation (e) into matrix form, we get:
[0031]
[0032] Finally, based on equation (f), using the least squares method, convert the pixel coordinates of the left and right eyes of the first binocular camera at different times into the coordinates in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin;
[0033] According to the same process above, convert the pixel coordinates of the left and right eyes of the second binocular camera at different times into the coordinates in the world coordinate system with the optical center of the left eye of the second binocular camera as the origin.
[0034] Preferably, in step 2, add the distance value between point B and point A to a series of X-axis coordinate values in the world coordinate system with the optical center of the left eye of the second binocular camera as the origin, to obtain a series of coordinate values of point B in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin.
[0035] Preferably, step 3 is carried out as follows to obtain the total displacement of point A and the displacement components along the X-axis, Y-axis, and Z-axis at time t = S;
[0036] Let P0 be the position of point A at time t = 0, and at this time, the coordinate values of the large industrial pipeline corresponding to point A along the X-axis, Y-axis, and Z-axis are (x0, y0, z0), and P S be the position of point A at time t = S, and at this time, the coordinate values of the large industrial pipeline corresponding to point A along the X-axis, Y-axis, and Z-axis are (x S , y S , z S ). Then, the displacement components and the total displacement of the large industrial pipeline corresponding to point A along the X-axis, Y-axis, and Z-axis at time t = S are obtained from equations (g) - (j);
[0037] a = x s - x0 (g)
[0038] b = y s - y0 (h)
[0039] c = z s - z0 (i)
[0040]
[0041] In the formula, R is the total displacement of point A at time t = S, and a, b, and c are the displacement components of point A along the X-axis, Y-axis, and Z-axis at time t = S, and the unit is mm;
[0042] The displacement components and total displacement of the large industrial pipeline corresponding to different times of point A except at time t = S and point B at different times along the X-axis, Y-axis, and Z-axis are obtained according to the above process.
[0043] Further, step 3 is carried out as follows to obtain the torsional angle of the central axis of the large industrial pipeline at time t = S;
[0044] Let A0 and B0 be the positions of point A and point B at time t = 0, with coordinates (x A0 , y A0 , z A0 ) and (x B0 , y B0 , z B0 ). The vector from A0 to B0 is Then there is
[0045]
[0046] x0 = x B0 - x A0 (l)
[0047] y0 = y B0 - y A0 (m)
[0048] z0 = z B0 - z A0 (n)
[0049] Let A S and B S be the positions of point A and point B at time t = S. The vector from A S to B S is Then The torsional angle of the central axis of the large industrial pipeline is obtained according to the following formula:
[0050]
[0051] Among them,
[0052] Further, in step 3, through the Python programming language, first perform operation a, and then import the corresponding VBA code written into the edited Excel file, pop up a man-machine interaction interface containing pipe diameter, spacing, data processing, displacement component diagram of point A, total displacement diagram of point A, displacement component diagram of point B, total displacement diagram of point B, torsional angle diagram, and alarm monitoring. In the said man-machine interaction interface, input the pipe diameter of the large industrial pipeline and the spacing between point A and point B, click data processing, and perform operations b, c, and d.
[0053] Operation a: Correspondingly output the coordinate values of a series of point A on the X-axis, Y-axis, and Z-axis to the first three columns of a worksheet in Excel, and output the coordinate values of a series of point B on the X-axis, Y-axis, and Z-axis to the fourth to sixth columns of the worksheet, to obtain an edited Excel file;
[0054] Operation b: Input the displacement components and total displacement of point A along the X-axis, Y-axis, and Z-axis at different times into the seventh to tenth columns of the worksheet respectively, and input the displacement components and total displacement of point B along the X-axis, Y-axis, and Z-axis at different times into the eleventh to fourteenth columns of the worksheet respectively;
[0055] Operation c: Input the calculated torsional angles of the central axis of the large industrial pipeline at different times into the fifteenth column of the worksheet;
[0056] Operation d: Compare the tenth, fourteenth, and fifteenth columns of the worksheet with the allowable total displacement and torsional angle values of the central axis of the large industrial pipeline respectively. If the values in the tenth, fourteenth, and fifteenth columns of the worksheet are greater than the allowable displacement components, total displacement, and torsional angle values of the central axis of the large industrial pipeline, the corresponding rows are marked yellow;
[0057] After that, view the displacement component diagram of point A, the total displacement diagram of point A, the displacement component diagram of point B, the total displacement diagram of point B, and the torsional angle diagram, click on alarm monitoring, and monitor each frame corresponding to the marked yellow part in operation d, where the moment t = 0 corresponds to the first frame.
[0058] Compared with the prior art, the present invention has the following beneficial technical effects:
[0059] A monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to the present invention. First, one circular artificial marker is pasted at each end of the central axis of the large industrial pipeline, so that points A and B can be formed. Then, the first binocular camera and the second binocular camera are used to collect images of points A and B respectively, and the contours of these two artificial markers at different times can be detected. Then, the centroid coordinates of the contours of these two artificial markers at different times are calculated, and the pixel coordinates of the left eye and the right eye of the first binocular camera and the second binocular camera at different times can be obtained. Then, coordinate transformation is required to unify the corresponding data. First, the pixel coordinates of the left eye and the right eye of the first binocular camera at different times are converted into the coordinates in the camera coordinate system with the optical center of the left eye of the first binocular camera as the origin. At this time, a series of coordinate values of point A are obtained. The pixel coordinates of the left eye and the right eye of the second binocular camera at different times are converted into a series of coordinate values in the camera coordinate system with the optical center of the left eye of the second binocular camera as the origin, and then further converted into a series of coordinate values of point B with the optical center of the left eye of the first binocular camera as the origin. Using this series of coordinate values of point A and this series of coordinate values of point B, the total displacement of the central axis of the large industrial pipeline corresponding to points A and B at different times and the displacement components along the X-axis, Y-axis, and Z-axis, as well as the torsional angle, can be obtained through numerical calculation and vector calculation. The present invention can implement related image processing and subsequent calculations through a computer, can monitor the three-dimensional coordinates of the target monitoring points in real time, further obtain the relative positions of the two target monitoring points on the large industrial pipeline, obtain the displacement amount and torsional angle of the central axis of the large industrial pipeline, and then obtain the actual operating conditions of the large industrial pipeline, which can meet the current engineering requirements, make a reasonable assessment of the operating safety and stability of the large industrial pipeline, and achieve good results, which has important significance and value for ensuring the safe and stable operation of the large industrial pipeline. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 It is a structural layout diagram of the binocular camera and the large industrial pipeline in the method of the present invention.
[0061] Figure 2 is Figure 1 a schematic diagram of the size and position of the target monitoring point in
[0062] Figure 3 is Figure 1 a schematic diagram of the relative position between the target monitoring point and the first binocular camera in
[0063] Figure 4 It is a flow chart of the monitoring method described in the present invention.
[0064] Figure 5 It is a schematic diagram of the X / Y / Z axis directions described in the present invention.
[0065] Figure 6This is the human-computer interaction interface described in the present invention.
[0066] Figure 7 This is the pop-up warning diagram described in the present invention.
[0067] Figure 8 This is the torsional angle diagram described in the present invention.
[0068] Figure 9a This is the world coordinate system diagram.
[0069] Figure 9b This is the camera coordinate system diagram.
[0070] Figure 9c This is the principle diagram of pinhole imaging.
[0071] Figure 10 This is the principle diagram for calculating the displacement of a large industrial pipeline described in the present invention.
[0072] Figure 11 This is the principle diagram for calculating the torsional angle of the central axis of a large industrial pipeline described in the present invention.
[0073] In the figure: 1 - the first target monitoring point; 2 - the second target monitoring point; 3 - the large industrial pipeline; 4 - the first binocular camera; 401 - the left eye; 402 - the right eye; 51 - the first field of view, 52 - the second field of view; 6 - the second binocular camera; 7 - the computer; 8 - the ground. Detailed implementation mode
[0074] The following further elaborates on the present invention in conjunction with specific embodiments, which is an explanation rather than a limitation of the present invention.
[0075] A monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to the present invention requires preparatory work before specific implementation, and a corresponding device is built to obtain photos of the first target monitoring point 1 and the second target monitoring point 2, and its schematic diagram is as Figure 1As shown in the figure, it includes a first target monitoring point 1 and a second target monitoring point 2 arranged at both ends of the central axis of a large industrial pipeline 3, as well as a first binocular camera 4, a second binocular camera 6 and a computer 7 installed on the outer side of the large industrial pipeline 3. Artificial markers EGP with the same structure and material are pasted on both the first target monitoring point 1 and the second target monitoring point 2. The EGP is a grade 4 reflective film produced by 3M Company. The EGP is also called an engineering grade reflective film. The shape is selected as a circle, and the diameter size is 2 - 3 cm. The outer diameter of the large industrial pipeline 3 is D, and the diameter of the EGP is 1% of the outer diameter of the large industrial pipeline 3. While saving ECP materials, it is clearly distinguishable from the background on the large industrial pipeline 3, ensuring the accuracy of judgment. The large industrial pipeline 3 is supported above the ground 8. Taking the first target monitoring point 1 as an example, the specific pasting position of the ECP and its relationship with the large industrial pipeline 3 are as Figure 2 shown, located at the central position of the height of the large industrial pipeline 3.
[0076] The first binocular camera 4 and the second binocular camera 6 have the same installation height from the ground 8. The installation method can be a tripod or hoisting, depending on the specific situation. The value is the same as the height of the first target monitoring point 1 and the second target monitoring point 2. The first target monitoring point 1 and the second target monitoring point 2 are symmetrically distributed along the central position of the large industrial pipeline 3. As Figure 3 shown, taking the first target monitoring point 1 as an example, the connection line between the center points of the left eye 401 and the right eye 402 of the first binocular camera 4 and the first target monitoring point 1 is perpendicular to the large industrial pipeline 3. The connection line between the center points of the left eye and the right eye of the second binocular camera 6 and the second target monitoring point 2 is also perpendicular to the large industrial pipeline 3. The first binocular camera 4 forms a first visual field 51 on both sides of the first target monitoring point 1, and the second binocular camera 6 forms a second visual field 52 on both sides of the second target monitoring point 2. The distances between the first binocular camera 4 and the first target monitoring point 1 and between the second binocular camera 6 and the second target monitoring point 2 are both 2 - 3 m. In this way, it will not block the light, which is beneficial to clearly identify the EGP, and because the relative accuracy of the first binocular camera 4 and the second binocular camera 6 is relatively high. The output ends of the first binocular camera 4 and the second binocular camera 6 are respectively connected to the input end of the computer 7 through data lines. In this way, the images of the first visual field 51 captured by the first binocular camera 4 and the images of the second visual field 52 captured by the second binocular camera 6 can be transmitted to the computer 7 respectively, facilitating image processing in the computer 7.
[0077] Therefore, for a monitoring method of the displacement and torsional angle of the central axis of a large industrial pipeline in the present invention, as Figure 4 shown, it specifically includes the following steps:
[0078] Step 1, preprocessing of the camera system
[0079] Adjust the parameters such as the focal length, aperture, white balance, and sensitivity of the purchased first binocular camera 4 and second binocular camera 6 to be relatively appropriate according to the shooting scene, and then take several photos of the checkerboard calibration board to calibrate the first binocular camera 4 and the second binocular camera 6, so as to obtain the external parameter matrix and internal parameter matrix of the first binocular camera 4 and the second binocular camera 6.
[0080] During the shooting process of the camera, it is essentially a mutual transformation between four coordinate systems.
[0081] The first step is to transform the points in the world coordinate system into the camera coordinate system. This is a transformation process from one three-dimensional coordinate system to another three-dimensional coordinate system. Since both coordinate systems are right-angle coordinate systems in three-dimensional space, their positional relationship can be described by a uniquely determined rotation and translation, that is, the rotation matrix R and the translation vector T.
[0082] The world coordinate system and the camera coordinate system are as Figure 9a and Figure 9b shown.
[0083] To describe the position coordinates of the target to be measured in three-dimensional space, a coordinate system for reference needs to be defined in three-dimensional space, that is, the world coordinate system O w -X w Y w Z w , and this coordinate system can be arbitrarily defined according to the actual needs of the test site.
[0084] The coordinate system O c -X c Y c Z c is the camera coordinate system, O c is the origin of the camera coordinate system, that is, the optical center coordinate of the camera. X c is parallel to x and Y c respectively, and Z c is the optical axis of the camera. In an ideal state, the optical axis is perpendicular to the image plane and intersects the image at O1, that is, the origin of the image coordinate system.
[0085] Let the target point to be measured be point P. The coordinates of point P in the camera coordinate system are (X c , Y c , Z c ) T , and the coordinates in the world coordinate system are (X w , Y w , Z w ) T , then their relationship can be described by the following formula.
[0086]
[0087] In the formula, and respectively represent the rotation matrix R and the translation vector T between the two coordinate systems.
[0088] The second step is to project the points in the camera coordinate system onto the image coordinate system. This is a transformation from a three-dimensional coordinate system to a two-dimensional coordinate system, and this step involves the perspective principle, which is generally described by the pinhole imaging model. The pinhole imaging principle diagram is as Figure 9c shown:
[0089] For the pinhole imaging model, the distance between the camera optical center and the image plane is the lens focal length f. Then, the relationship between P'(x, y) and P(X c , Y c , Z c ) can be obtained by the similarity of the perspective principle as the following formula:
[0090]
[0091] Finally, it is the transformation from the image coordinate system to the pixel coordinate system. For the convenience of subsequent processing, it is necessary to convert the coordinates in the image coordinate system to the pixel coordinate system with pixels as the unit. The pixel coordinate system generally defines the pixel in the upper left corner of the image as the origin. For the pinhole imaging model, assuming that the origin of the image coordinate system corresponds to (u0, v0) in the pixel coordinate system, the conversion formula between the pixel coordinates and the image coordinates is:
[0092]
[0093] Combining Equation (2) and Equation (3) and representing them in homogeneous coordinates as a matrix, as shown below:
[0094]
[0095] In the formula, K is the internal parameter matrix of the camera, f x is the equivalent focal length in the x-axis direction, f y is the equivalent focal length in the y-axis direction, and (u0, v0) is the coordinate of the origin of the image coordinate system in the pixel coordinate system. These are all fixed parameters when the camera leaves the factory and do not change with other factors. Therefore, they are called internal parameters.
[0096] By jointly solving (1) and (4), we get:
[0097]
[0098] In the formula, the matrix is the external parameter matrix, and the rotation matrix R and the translation vector T are called external parameters.
[0099] Specifically, the calibration of the first binocular camera 4 and the second binocular camera 6 requires calculating the internal parameters and external parameters of their respective cameras. The internal parameters are determined by the lenses of their respective cameras, and the external parameters are determined by the positions and orientations of their respective cameras. Among them, the external parameter matrix includes the translation vector T and the rotation matrix R.
[0100] Step 2, Monitoring point contour recognition
[0101] Step 21, First, establish the HSV spaces corresponding to the first field of view 51 and the second field of view 52, then collect images of the first field of view 51 (i.e., point A) and the second field of view 52 (i.e., point B), process the captured images, and further identify the contours of the artificial markers in the first field of view 51 and the second field of view 52 through their respective HSV spaces.
[0102] The HSV space refers to a color range interval. This is the result after the numericalization of the three primary colors. The numerical interval of the three primary colors is 0 - 255. The smaller the number, the lighter the color. And all colors can be composed of the three primary colors. Therefore, after specifying the interval of the three primary colors, a color range interval can be obtained.
[0103] When selecting the artificial marker, a color that is clearly distinguishable from the background environment has been chosen. Taking the first binocular camera 4 as an example, in a certain scene, the artificial marker of the first target monitoring point 1 is selected as red, and this red artificial marker is the only red color in the first field of view 51. The purpose of setting the HSV space is to enable the computer 7 to recognize the artificial marker. Then, the captured image is processed, and the specific processing steps are as follows in sequence, and the functions in the Opencv library are called to implement:
[0104] Step a, Construct a mask according to the threshold. The threshold is the color interval set in the HSV space, making the entire image only presented in black and white. The colors within the HSV space are white, and other colors are presented as black;
[0105] To eliminate noise, perform Step b and Step c. Step b, Erosion operation; Step c, Dilation operation;
[0106] Step d, Detect the marker contour
[0107] Step e, Although the pasted artificial marker is round, due to the influence of the shooting angle and the large industrial pipeline 3 itself, the processed contour of the artificial marker captured is not a perfect circle. Therefore, calculate the centroid coordinates of the marker contour, that is, the center position, so as to obtain the pixel coordinates of the first target monitoring point 1 under the left eye 401 and the right eye 402 respectively;
[0108] The processing method for the pixel coordinates of the second target monitoring point 2 under the left eye and the right eye is the same as above.
[0109] Step 3, Target Three-dimensional Coordinate Calculation
[0110] The coordinate system takes the optical center of the left eye of the binocular camera itself as the origin, and the X / Y / Z axis directions are as Figure 5 shown.
[0111] Step 31, Through Python programming, taking the first target monitoring point 1 as an example, calculate the pixel coordinates of the first target monitoring point 1 under the left eye 401 and the right eye 402 through Step 2, and convert the two-dimensional coordinates in the pixel coordinate system into the coordinates in the world coordinate system with the optical center of the left eye 401 as the origin.
[0112] The specific process is as follows:
[0113] Let the pixel coordinates under the left eye 401 be (u l , v l ), the pixel coordinates under the right eye 402 be (u r , v r ), and the coordinates in the world coordinate system be (X, Y, Z).
[0114] According to Equation (5), for the left eye 401, we have:
[0115]
[0116] where,
[0117]
[0118] All elements in M left have obtained specific values through calibration. Then we have:
[0119]
[0120] According to Equation (5), for the right eye 402, we have:
[0121]
[0122] where,
[0123]
[0124] All elements in M right have obtained specific values through calibration. Then we have:
[0125]
[0126] Expanding and arranging Equations (8) and (11), we have:
[0127]
[0128] Converting Equation (18) into matrix form, we have:
[0129]
[0130] Finally, the coordinates of the first target monitoring point 1 are solved by the least squares method. After the calibration in step 1, the world coordinate system is established on the left eye 401.
[0131] Similarly for the second target monitoring point 2, the coordinates in the world coordinate system with the optical center of the left eye of the second binocular camera 6 as the origin are obtained.
[0132] In step 32, the coordinates of the two target monitoring points obtained at this time are with the first binocular camera 4 and the second binocular camera 6 as the origin respectively. It is also necessary to convert the coordinates in the world coordinate system with the optical center of the left eye of the second target monitoring point 2 as the origin to the coordinates in the world coordinate system with the optical center of the left eye 401 of the first binocular camera 4 as the origin through the subsequent step 41.
[0133] In step 33, the calculated three-dimensional coordinates need to be output to an Excel table for subsequent processing. Therefore, the function in the Pandas library is called to output the coordinates to the specified Excel table. The X, Y, and Z coordinates of the first target monitoring point 1 are in the first three columns of the Excel worksheet sheet1 respectively, and one row is input downward for each frame processed. The X, Y, and Z of the second target monitoring point 2 are stored in the fourth to sixth columns respectively. Both the specified position and the name of the table are specified. If there is no table with this name at the specified position, it will also be automatically created and then the data will be stored in it.
[0134] Among them, since the X, Y, and Z coordinates of the second target monitoring point 2 are independent between the two target detection points and need to be converted to the same coordinate system, as shown in the human-computer interaction interface Figure 6 Therefore, it is necessary to input the distance between the two monitoring points in Figure 6 to convert the coordinates of the second target monitoring point 2 to the coordinates in the coordinate system of the first target monitoring point 1. According to Figure 1 and Figure 5 it can be known that the X-axis value of the second target monitoring point 2 plus the distance value between the two monitoring points respectively gives the coordinates of the second target monitoring point 2 in the coordinate system of the first target monitoring point 1. The newly transformed X, Y, and Z coordinates are input to the fourth to sixth columns of the specified table;
[0135] Step 4, use VBA programming for data processing and output warning logic
[0136] Step 41: Calculate the displacement components and total displacement of the two target monitoring points relative to the position of the first frame respectively
[0137] The displacement components refer to the displacement distances of each frame relative to the first frame along the X, Y, and Z directions after the first frame. The total displacement is the total distance calculated from the displacement components in the X, Y, and Z directions according to the Pythagorean theorem. The first target monitoring point 1 is named point A, and the second target monitoring point 2 is named point B. The displacement components of point A along the X, Y, and Z directions are respectively input into the seventh to ninth columns, the total amount is input into the tenth column, the displacement components of point B along the X, Y, and Z directions are respectively input into the eleventh to thirteenth columns, and the total displacement amount is input into the fourteenth column.
[0138] Step 42: Calculate the torsional angle of rotation of the large industrial pipeline 3, and input the calculated torsional angle into the fifteenth column;
[0139] Step 43: Determine whether the displacement and offset exceed the limits
[0140] Extract the data in the tenth and fourteenth columns and compare them with 0.5% of the outer diameter of the large industrial pipeline 3. If it is greater than 0.5%, the row where the data is located is marked yellow. Extract the data in the fifteenth column and compare it with 0.5°. If it is greater than 0.5°, the row where the data is located is marked yellow.
[0141] After the above steps 41, 42, and 43 are used to process the data after importing the written VBA code in Excel, then open the named Excel file. The VBA code has corresponding functions, and a human-computer interaction interface containing pipe diameter, spacing, data processing, displacement component diagram of point A, total displacement diagram of point A, displacement component diagram of point B, total displacement diagram of point B, torsional angle diagram, and alarm monitoring will automatically pop up. After inputting the pipe diameter and spacing in the human-computer interaction interface and clicking data processing, it will automatically run.
[0142] Step 44: Automatically generate a displacement component diagram, a total displacement diagram, and a torsional angle diagram.
[0143] If specific data needs to be analyzed, the vibration situation can be quickly understood through the diagrams.
[0144] Taking the first target monitoring point 1 as an example, click the button for the displacement component diagram of point A. The seventh to ninth columns will be automatically extracted as the ordinate, and time will be used as the abscissa to generate the displacement component diagram of point A, that is, with time as the abscissa, there are three corresponding curves. Click the button for the total displacement diagram of point A, extract the tenth column as the ordinate, and use time as the abscissa to generate the total displacement diagram of point A.
[0145] The principle for point B is the same as that for point A. Just click the corresponding button.
[0146] Click the button for the torsional angle diagram, that is, extract the fifteenth column as the ordinate, and use time as the abscissa to generate the torsional angle diagram.
[0147] The style of the diagrams generated in step 5 is as Figure 8As shown, it is convenient to check which time periods exceed the permitted range.
[0148] Step 6, Alarm Monitoring
[0149] Click the alarm monitoring button, and a warning window as shown in Figure 7 will automatically pop up, which will display each yellow - marked frame and update it once per second.
[0150] The calculation principle of the pipeline displacement is as follows:
[0151] Figure 10 In the figure, P0 is the position of a certain monitoring point at the initial moment, that is, at time t = 0, and the coordinates of the monitoring point are (x0, y0, z0). P S is the position of the monitoring point at time t = S. At this time, the three - dimensional coordinates are (x S , y S , z S ). According to the Pythagorean theorem, we can get:
[0152] a = x s - x0 (14)
[0153] b = y s - y0 (15)
[0154] c = z s - z0 (16)
[0155]
[0156] In the formula, R is the total displacement of the monitoring point at t = 0 and t = S. a is the component of the total amount along the X - axis, b is the component of the total amount along the Y - axis, c is the component of the total amount along the Z - axis, and the unit is mm.
[0157] The calculation principle of the torsional angle of the pipeline center axis is as follows:
[0158] Figure 11 In the figure, A0 and B0 are the positions of two target monitoring points A and B at t = 0. The vector from A0 to B0 is named Set
[0159] Let the coordinates of point A at t = 0 be (x A0 , y A0 , z A0 ), and the coordinates of point B be (x B0 , y B0 , z B0 ). Then:
[0160] x0 = x B0 - x A0 (18)
[0161] y0 = y B0 -y A0 (19)
[0162] z0 = z B0 -z A0 (20)
[0163] A S 、B S are the positions of the two target monitoring points A and B at the moment t = S, and the vector pointing from A S to B S is named as It is set that
[0164] The torsional angle of the central axis of the large industrial pipeline 3 is the included angle between the vector and the vector From A S ’ to B S ’s vector is named as The vector is 's mapping on the plane where is located. As Figure 11 shown, the torsional angle of the central axis of the large industrial pipeline 3 is θ.
[0165]
[0166]
[0167]
[0168]
[0169] From equations (21), (22), (23), and (24), the torsional angle θ of the central axis of the large industrial pipeline 3 can be obtained. Equation (21) is the inner product of vector u and vector v, equation (22) is the length of vector u, and equation (23) is the length of vector v.
Claims
1. A monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline, characterized in that It includes the following steps: Step 1: Paste one circular artificial marker at each end of the central axis of the large industrial pipeline to form point A and point B. Use the first binocular camera to collect images of point A, and use the second binocular camera to collect images of point B. Then, detect the contours of the corresponding artificial markers at different times, and calculate the centroid coordinates of the contours of the corresponding artificial markers at different times to obtain the pixel coordinates of the left and right eyes of the first binocular camera at different times, and the pixel coordinates of the left and right eyes of the second binocular camera at different times. Step 2: Convert the pixel coordinates of the left and right eyes of the first binocular camera at different times into coordinates in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin to obtain a series of point A coordinate values. First, convert the pixel coordinates of the left and right eyes of the second binocular camera at different times into a series of coordinate values in the world coordinate system with the optical center of the left eye of the second binocular camera as the origin, and then convert the series of coordinate values into a series of point B coordinate values in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin. Step 3: Use a series of point A coordinate values and a series of point B coordinate values to respectively obtain the total displacement of the central axis of the large industrial pipeline corresponding to point A and point B at different times and the displacement components along the X-axis, Y-axis, and Z-axis, as well as the torsional angle of the central axis of the large industrial pipeline at different times.
2. The monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to claim 1, characterized in that, The two circular artificial markers described in Step 1 have the same shape, and point A and point B are symmetrically distributed along the central axis of the large industrial pipeline and are located at the height center of the large industrial pipeline.
3. The monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to claim 1, characterized in that, In Step 1, fix the first binocular camera and the second binocular camera outside the large industrial pipeline. The connection line between the central points of the left and right eyes of the first binocular camera and point A is perpendicular to the large industrial pipeline, and the connection line between the central points of the left and right eyes of the second binocular camera and point B is perpendicular to the large industrial pipeline.
4. The monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to claim 1, characterized in that, In Step 1, the first binocular camera forms a first field of view on both sides of point A, and the second binocular camera forms a second field of view on both sides of point B. Use the HSV space to identify the artificial markers in the first field of view and the second field of view, then construct a mask corresponding to the artificial markers according to the threshold, perform erosion and dilation in sequence, and finally detect the contours of the artificial markers at different times.
5. The monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to claim 1, characterized in that, In Step 1, the diameter of the artificial marker is 1% of the outer diameter of the large industrial pipeline, and the distance between the first binocular camera and point A and the distance between the second binocular camera and point B are both 2 - 3m.
6. The monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to claim 1, characterized in that Step 2 is carried out according to the following process to convert the pixel coordinates of the left and right eyes of the first binocular camera at different times into coordinates in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin. Let the pixel coordinates of the left eye of the first binocular camera at different times be (u l , v l ), and the pixel coordinates of the right eye of the first binocular camera at different times be (u r , v r ). The world coordinate system coordinates corresponding to the left eye in the first binocular camera are (X, Y, Z); For the left eye, based on the following formula: There is formula (a): Where: Z c is the value corresponding to the Z-axis of point A in the camera coordinate system, u and v are the coordinate symbols of the pixel coordinate system, and f x is the equivalent focal length of point A in the x-axis direction in the image coordinate system, and f y is the equivalent focal length of point A in the y-axis direction, (u0, v0) is the coordinate of the origin of the image coordinate system in the pixel coordinate system, X c 、Y c and Z c are the coordinates of point A in the camera coordinate system, is the value corresponding to Z c under the left eye, and f xl and f yl are respectively f x and f y corresponding to the equivalent focal lengths under the left eye, u 0l and v 0l are respectively the coordinates of u0 and v0 corresponding to the left eye, R l and T l are respectively the rotation matrix and translation vector in the external parameter matrix of the left eye in the first binocular camera; Suppose Then there is For the right eye, there is the following formula (c), where the r in the unspecified superscripts and subscripts is the abbreviation of the English word "right", and the meanings of the corresponding letters are the same as those in formula (a). Set Then there is Expand and organize formulas (b) and (d), and we get: Convert formula (e) into matrix form, and we get: Finally, based on equation (f), using the least squares method, the pixel coordinates of the left and right eyes of the first binocular camera at different times are converted into the coordinates in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin. According to the same process described above, the pixel coordinates of the left and right eyes of the second binocular camera at different times are converted into the coordinates in the world coordinate system with the optical center of the left eye of the second binocular camera as the origin.
7. The monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to claim 1, characterized in that, In step 2, a series of X-axis coordinate values in the world coordinate system with the optical center of the left eye of the second binocular camera as the origin are respectively added with the distance value between point B and point A to obtain a series of coordinate values of point B in the world coordinate system with the optical center of the left eye of the first binocular camera as the origin.
8. The monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to claim 1, characterized in that, Step 3 is carried out as follows to obtain the total displacement of point A and the displacement components along the X-axis, Y-axis, and Z-axis at time t = S; Let \(P_0\) be the position of point \(A\) at time \(t = 0\). At this time, the coordinate values of the large industrial pipeline corresponding to point \(A\) along the \(X\)-axis, \(Y\)-axis, and \(Z\)-axis are \((x_0, y_0, z_0)\), \(P\) S is the position of point \(A\) at time \(t = S\). At this time, the coordinate values of the large industrial pipeline corresponding to point \(A\) along the \(X\)-axis, \(Y\)-axis, and \(Z\)-axis are \((x\) S , y S , z S ). Then, the displacement components and the total displacement of the large industrial pipeline corresponding to point \(A\) along the \(X\)-axis, \(Y\)-axis, and \(Z\)-axis at time \(t = S\) are obtained from equations (g) - (j); a = x s -x0 (g) b = y s -y0 (h) c = z s -z0 (i) In the formula, R is the total displacement of point A at time t = S, and a, b, and c are the displacement components of point A along the X-axis, Y-axis, and Z-axis at time t = S, respectively, and the unit is mm; The displacement components and total displacements of point A at other different times except t = S and point B at different times along the X-axis, Y-axis, and Z-axis of the large industrial pipeline are obtained according to the above process.
9. The monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to claim 8, characterized in that, Step 3 is carried out as follows to obtain the torsional angle of the central axis of the large industrial pipeline at time t = S; Let A0 and B0 be the positions of point A and point B at the moment t = 0, with coordinates (x A0 , y A0 , z A0 ) and (x B0 , y B0 , z B0 ) respectively. The vector pointing from A0 to B0 is Then there is x0 = x B0 -x A0 (l) y0 = y B0 -y A0 (m) z0 = z B0 -z A0 (n) Let A S and B S be the positions of point A and point B at the moment t = S. The vector pointing from A S to B S is Then the torsional angle of the central axis of the large industrial pipeline is obtained by the following formula: Among them, 10. The monitoring method for the displacement and torsional angle of the central axis of a large industrial pipeline according to claim 9, characterized in that, In step 3, through the Python programming language, first perform operation a, and then import the written corresponding VBA code into the edited Excel file, and a human-computer interaction interface containing pipe diameter, spacing, data processing, displacement component diagram of point A, total displacement diagram of point A, displacement component diagram of point B, total displacement diagram of point B, torsional angle diagram, and alarm monitoring is popped up. In the human-computer interaction interface, input the pipe diameter of the large industrial pipeline and the distance between point A and point B, click data processing, and perform operations b, c, and d. For operation a, the coordinate values of a series of points A along the X-axis, Y-axis, and Z-axis are correspondingly output to the first three columns of a worksheet in Excel, and the coordinate values of a series of points B along the X-axis, Y-axis, and Z-axis are correspondingly output to the fourth to sixth columns of the worksheet to obtain the edited Excel file. For operation b, the displacement components and total displacements of point A along the X-axis, Y-axis, and Z-axis at different times calculated are respectively input into the seventh to tenth columns of the worksheet, and the displacement components and total displacements of point B along the X-axis, Y-axis, and Z-axis at different times calculated are respectively input into the eleventh to fourteenth columns of the worksheet. For operation c, the torsional angles of the central axis of the large industrial pipeline at different times calculated are input into the fifteenth column of the worksheet. For operation d, the tenth, fourteenth, and fifteenth columns of the worksheet are respectively compared with the allowable total displacement and torsional angle values of the central axis of the large industrial pipeline. If there are values in the tenth, fourteenth, and fifteenth columns of the worksheet that are greater than the allowable displacement components, total displacements, and torsional angle values of the central axis of the large industrial pipeline, the corresponding rows are marked in yellow. After that, view the displacement component diagram of point A, the total displacement diagram of point A, the displacement component diagram of point B, the total displacement diagram of point B, and the torsional angle diagram. Click on alarm monitoring to monitor each frame corresponding to the highlighted area of operation d, where the moment t = 0 corresponds to the first frame.
Citation Information
Patent Citations
Dam body surface displacement non-contact measuring method based on binocular vision
CN110332894A
Pipeline flange inner radius visual measurement method based on binocular imaging
CN112082493A