A measuring system and method for the end face of a pipeline
Through the combination of multi-visual vision system and end face adapter, the marking point and control analysis system are used to realize high-precision real-time online detection of pipeline end faces, solving the problem of complex measurement and low accuracy in traditional methods.
Patent Information
- Application Number
- CN202310835488.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2043-07-10
AI Technical Summary
Traditional pipeline end face measurement methods rely on manual operation and low accuracy, making it difficult to achieve high-precision pipeline end face parameter measurement, especially when space is limited or cannot be approached, measurement tools cannot be used.
A multi-eye vision system is used to combine the end face adapter to capture pipeline images from different angles through the marking points on the feature calibration surface and industrial cameras. The control analysis system is used to perform edge extraction and elliptical fitting, and the pipeline bend point and center coordinates are determined, and the pipeline three-dimensional model is reconstructed.
Real-time online detection of pipeline end surfaces is realized, which significantly improves measurement accuracy and solves the problem of insufficient accuracy in traditional methods.
Smart Images

Figure CN116608769B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a measurement system and method for a pipeline end face, belonging to the technical field of pipeline end face measurement. Background Art
[0002] Pipelines are components of products in industries such as aerospace, automotive, and marine, and are important transmission media for fluids such as liquids and gases. The processing quality of pipelines will directly affect the quality, lifespan, and working efficiency of the overall product. Therefore, the parameter measurement of pipelines has become an essential part of pipeline quality inspection. Traditional pipeline measurement relies on manual selection of measurement points, which is not only complex and time-consuming, but may also have problems such as the inability of personnel to approach the pipeline position or the lack of space to insert measurement tools for measurement. In recent years, to solve the pipeline measurement problem, many measurement methods have been proposed and implemented one after another. Among them, the vision measurement system is one of the most efficient and convenient methods currently. Its principle is to capture pipeline images from different angles through one or more cameras, and the computer backend performs processes such as sub-pixel processing, edge extraction, and curve fitting on the images to achieve the quantitative measurement of pipelines.
[0003] The application of the vision measurement system has well solved the geometric parameter problem of pipelines and basically determined the spatial form of pipelines. For pipeline end face measurement, it is necessary to first perform edge extraction and ellipse fitting on the end region of the pipeline image to obtain the two-dimensional coordinates of the end points from the perspectives of each camera, and use the multi-camera reconstruction principle to obtain the end face center coordinates. This method is affected by the shooting angle, and the ellipse fitting accuracy of the end face position is relatively low. Although the fitting accuracy can be improved through algorithm iteration, ultimately, the number of end face points obtained by shooting is limited, and it is difficult to significantly improve the end face fitting accuracy. Summary of the Invention
[0004] According to one aspect of the present application, a measurement system for a pipeline end face is provided, which realizes real-time online detection of pipelines and effectively improves the measurement accuracy of pipeline end faces.
[0005] A measurement system for a pipeline end face, characterized by comprising:
[0006] A plurality of end face adapters for installing the pipeline to be measured, the upper part of the end face adapter having a feature calibration surface, and a marking point for providing feature information is arranged on the feature calibration surface;
[0007] A multi-eye vision system, including a measurement platform and a backlight source, at least four industrial cameras in different orientations in the vertical height direction are arranged inside the measurement platform, and the industrial cameras in different orientations form a stereo vision measurement system for capturing multi-eye images of the pipeline with the end face adapter.
[0008] The calibration plate is used before measurement work. The industrial camera collects images, completes position calibration, and confirms the internal and external parameters of the industrial camera.
[0009] The control and analysis system controls the synchronous acquisition and transmission of images by multiple cameras, processes the pipeline images obtained by the calibrated multi-camera vision system. The processing actions include edge extraction and ellipse fitting, performs landmark point recognition, determines the coordinates of the pipeline bending points and the center coordinates of the end faces, so as to obtain pipeline parameter information and realize pipeline measurement.
[0010] Furthermore, the end face adapter is assembled at the end face of the pipeline to assist in positioning the pipeline end face.
[0011] The end face adapter includes a feature calibration surface, an end face main body, a pipeline adapter group, and a calibration base. The pipeline adapter group is installed on the calibration base and is connected to the end face main body. The pipeline adapter group includes an adjustment handle, a tapered rod, a split body, and an annular spring group. One end of the feature calibration surface is connected to one end of the end face main body to form a right angle. The end face main body has a through hole. The tapered rod passes through the through hole and is fixed to the adjustment handle by a fixing member. The outer circumference of the tapered rod is provided with a split body. The split body is a three-lobe arc structure with the same center, axis, and diameter. The outer circumference of the split body is provided with a plurality of parallel grooves, and an annular spring is installed in the grooves to form an annular spring group.
[0012] Furthermore, the calibration base includes a support part and a clamping part. The clamping part is located above the support part. The clamping part includes a chuck main body and three evenly distributed jaws on the upper surface of the chuck main body. The chuck main body is provided with chutes corresponding to the jaws. The jaws are installed in the chutes and slide radially on the chuck main body along the chutes for clamping / removing the pipeline adapter group.
[0013] A calibration ring gauge is further provided outside the pipeline adapter group. There is a gap between the inner wall of the calibration ring gauge and the annular spring group. The top surface of the calibration ring gauge is attached to the end face main body. The pipeline adapter group is fixed by the clamping jaws through the calibration ring gauge.
[0014] Furthermore, the landmark points on the feature calibration surface are dot matrix landmark points with corresponding two-dimensional point coordinates. The upper surface of the end face main body is provided with a plurality of landmark points with the same outer diameter as that on the feature calibration surface, which is convenient for fitting the pipeline end face.
[0015] According to another aspect of the present application, a method for measuring the pipeline end face is provided, which is characterized by including:
[0016] Calibrate the multi-view vision system to determine the conversion relationship between the industrial camera coordinate system and the world coordinate system. Among them, the calibration board printed with marker points is used as the shooting object. The calibration board is placed on the measurement platform, and the control analysis system is controlled to turn on the backlight source. Multiple industrial cameras simultaneously shoot the calibration board images. Adjust the position of the calibration board, and the industrial cameras shoot the images of different positions of the calibration board and transmit them to the control analysis system. The control analysis system, based on the principle of close-range photogrammetry, identifies the spatial positions of the centers of the marker points on the calibration board, determines the internal and external parameters of the camera system, and unifies the industrial camera coordinate system;
[0017] Use the calibrated multi-view vision system to calibrate the end-face adapter separately, establish the end-face adapter coordinate system, and initially determine the position of the middle axis of the end-face adapter and the coordinates of the intersection point with the end-face body. Among them, use the calibrated multi-view vision system, place the end-face adapter at a fixed position on the measurement platform, control the analysis system to turn on the backlight source, control multiple industrial cameras to simultaneously shoot the end-face adapter images. During the shooting process, the calibration base of the end-face adapter remains stationary, and the state when the end-face adapter does not rotate at all is used as the first photo. Subsequently, turn the handle counterclockwise, and the feature calibration surface, the end-face body, and the pipeline adapter group are locked as a whole. Rotate this whole along the central axis of the calibration base. After rotating a certain angle, then turn the handle clockwise. After the expansion body at the bottom of the end-face adapter expands and fits with the inner wall of the calibration ring gauge, take the next photo. The industrial cameras shoot at least three non-repeating angles of the end-face adapter images. The positions of the industrial cameras are the same as those in the camera position during the calibration stage of the multi-view vision system. The captured end-face adapter images are transmitted to the control analysis system. Based on the edge extraction and ellipse fitting principles, extract the information of the marker points on the feature calibration surface and the end-face body of the end-face adapter, and identify the industrial camera coordinates of the marker points on the feature calibration surface and the end-face body at each shooting angle position;
[0018] The calibrated multi-view vision system shoots the pipeline image assembled with the end-face adapter to determine the center coordinates of the pipeline end face and the axial direction of the pipeline end face position in the current industrial camera coordinate system;
[0019] Based on the seed cylinder model, combined with the pipeline axis and the center origin of the pipeline end face at the pipeline end face, reconstruct the three-dimensional model of the pipeline.
[0020] Furthermore, the marker points on the feature marking surface are dot matrix marker points. The recognition method of the dot matrix marking points is based on the 9-point encoded marker points of the dot, including:
[0021] Make marker points A, E, C, and D form a standard square, where marker points B, A, and C are collinear, Several other points are randomly distributed in the blank area,
[0022] In computer vision, the cross-ratio invariant is a fundamental invariant under perspective projection, that is:
[0023]
[0024] Among them, the points (A', B', C', P') are the corresponding projection points of the landmark points (A, B, C, P) on the target surface of the industrial camera, C r is the definition of the cross-ratio of a straight line;
[0025] The landmark point C r is a fixed value of 1.5.
[0026] Furthermore, the steps of calculating the initial matching value using the landmark points include:
[0027] Step 1, perform edge extraction and ellipse fitting on the obtained landmark point image, complete landmark point recognition, and obtain at least 7 center coordinates of the circular dots;
[0028] Step 2, traverse and search for three collinear landmark points (A, B, C) among the 7 circular dots;
[0029] Step 3, search for the landmark point D and the landmark point E, and obtain the center point P of the two, and judge whether the point P is on the straight line obtained in the previous step If not satisfied, return to Step 2;
[0030] Step 4, calculate the cross-ratio C of the straight line formed by the points (A, B, C, P) r , and judge whether this value is equal to 1.5. If not satisfied, return to Step 2;
[0031] Step 5, use the least squares method to calculate the affine transformation matrix according to the physical coordinates given by the points (A, B, C, P) and the landmark points in the designed model;
[0032] Step 6, match other points on the landmark points according to the affine transformation matrix obtained in Step 5, and output the industrial camera coordinates of all landmark points on the feature calibration surface.
[0033] Furthermore, the determination of the circumferential position of the end face adapter and the intersection point coordinates with the end face body includes:
[0034] Based on the principle of plane fitting, use the camera coordinates of the same landmark point on the feature calibration surface at different positions to fit the rotation circular surface P formed by the same landmark point during the calibration process i to determine the industrial camera coordinates of the center c of the rotation circular surface of the same landmark point, where i represents the number of rotation circles, i and output the industrial camera coordinates of the center c of the rotation circular surface of the same landmark point, i represents the number of rotation circles,
[0035] Let the camera coordinates of the same fiducial point on the first photo be represented as p1(x1, y1, z1), the camera coordinates on the second photo be represented as p2(x2, y2, z2), and the industrial camera coordinates on the nth photo be represented as p n (x n ,y n ,z n ). Then:
[0036]
[0037] Converge and solve. The center c(x c ,y c ,z c ) of the rotation circle formed after the rotation of the same fiducial point, and the radius R of the rotation circle;
[0038] As can be seen from the calibration steps, the fiducial points on the feature calibration surface all rotate around the central axis of the calibration ring gauge. Use all the centers c of the rotation circles on the feature calibration surface Using the least squares method, find an axis that matches all the centers c i and has the optimal position, which is the central axis L of the calibration ring gauge. That is, this axis L satisfies:
[0039]
[0040] Ensure the convergence of the equation set (2) and solve to obtain a set of axes L:
[0041]
[0042] Arbitrarily take the coordinates of all the fiducial points on the end face body at the same shooting angle Perform end face fitting and solve the surface equation of the end face body, that is:
[0043]
[0044] Obtain the surface equation of the end face body:
[0045] a1x + b1y + c1z + d1 = 0 (5)
[0046] Use the principle of the intersection of a line and a plane to solve the intersection point o of the central axis L of the calibration ring gauge on the end face body, that is, solve the intersection point o(o x ,o y ,o z ) by simultaneously solving (3) and (5);
[0047] The top section of the calibration ring gauge is in contact with the bottom of the end face body. The calibration ring gauge is concentric and coaxial with the end face adapter. The central axis L of the ring gauge is the central axis L1 of the end face adapter. The intersection point of the central axis L of the calibration ring gauge on the end face body is the intersection point of the central axis L1 of the end face adapter on the end face body;
[0048] Among them, the intersection point o (o x , o y , o z ), the direction vector of the axis L Determine a set of adapter axes L1 passing through the intersection point o:
[0049]
[0050] Establish an end-face adapter coordinate system, where the origin is set as the intersection point o'(0, 0, 0), the x-y axis plane is the end face O, the positive direction of the Z axis is the direction of the end-face adapter axis and along the end face O to the feature calibration surface, and the intersection point o (o x , o y , o z ), and the intersection point o'(0, 0, 0) are the coordinates of the end-face main body and the axis L' in the industrial camera coordinate system and the end-face adapter coordinate system respectively. Based on the SVD principle, the end-face adapter central axis L1' in the end-face adapter coordinate system and the coordinate set {S j} of each marking point on the feature calibration surface in the end-face adapter coordinate system are obtained, where j represents the number of marking points.
[0051] Furthermore, the center coordinates of the pipeline end face and the axial direction of the pipeline end face position include:
[0052] Adopt a dot matrix marking point recognition method to recognize all the marking points on the feature calibration surface of the end-face adapter, and record the camera coordinates of each marking point on the feature calibration surface as {Q j}, given the corresponding adapter coordinate set {S j}, and the two coordinate sets satisfy the SVD decomposition principle. Solve the transformation relationship between the two coordinate sets:
[0053] (1) Solve the matrix centroid:
[0054] Calculate the centroids of matrices Q and S respectively as Then: (Both matrices are n*n matrices)
[0055]
[0056] (2) Translation matrix:
[0057] Translate matrices Q and S respectively relative to their own centroid positions, and the new matrices are Q' and S'. Then:
[0058]
[0059] (3) SVD decomposition:
[0060] Construct matrix M using matrices Q and S and perform SVD decomposition on it:
[0061]
[0062] (4) Solve for R s and T s
[0063]
[0064] For the direction vector of the central axis of the end face adapter in the end face adapter coordinate system and the intersection point o'(0, 0, 0), using the above conversion relationship, obtain the adapter central axis in the current camera coordinate system and the intersection point wherein, the axis of the end face adapter should coincide with the axis of the pipeline at the end face position of the pipeline, the intersection point coincides with the center of the end face circle, and the axis direction at the end face position of the pipeline is The center of the end face circle is
[0065] The beneficial effects that can be produced by this application include:
[0066] 1) A pipeline end face measurement system and method provided by this application use a calibrated multi-camera vision system to respectively shoot the same pipe type in a way of optimizing end face parameters by algorithms and using an end face adapter for auxiliary measurement, and finally compare the reconstructed pipeline parameters, which can realize real-time online detection of the pipeline and effectively improve the measurement accuracy of the pipeline end face. Brief Description of the Drawings
[0067] Figure 1 is a schematic diagram of the overall pipeline measurement in an embodiment of this application;
[0068] Figure 2 is a schematic diagram of the calibration state of the multi-camera vision system in an embodiment of this application;
[0069] Figure 3 is a schematic structural diagram of the use state of the end face adapter in an embodiment of this application;
[0070] Figure 4 is a schematic structural diagram of the calibration state of the end face adapter in an embodiment of this application;
[0071] Figure 5 is a schematic structural diagram of the end face adapter in the calibration state in an embodiment of this application;
[0072] Figure 6 is a flow chart of the marker point recognition in an embodiment of this application;
[0073] Figure 7 is a schematic principle diagram of the marker point recognition in an embodiment of this application;
[0074] Figure 8 Schematic diagram of axis fitting in an embodiment of the present application;
[0075] Figure 9 Schematic diagram of pipeline parameters after pipeline reconstruction in an embodiment of the present application. Specific embodiments
[0076] The present application will be described in detail below with reference to embodiments, but the present application is not limited to these embodiments.
[0077] See Figures 1-9 , a measurement system for the end face of a pipeline, characterized in that it includes:
[0078] A plurality of end face adapters 100 for installing the pipeline to be measured. The upper part of the end face adapter has a feature calibration surface, and marker points for providing feature information are arranged on the feature calibration surface;
[0079] It should be noted that during use, the end face adapter is assembled at the end face of the pipeline to assist in positioning the end face of the pipeline. The specific number used is determined by the number of pipeline end faces, and the technical principle and operation process will not change due to the number.
[0080] A multi - vision system 200, including a measurement platform 210 and a backlight source. At least four industrial cameras in different orientations are arranged inside the measurement platform in the vertical height direction. The industrial cameras in different orientations form a stereo vision measurement system for taking multi - vision images of the pipeline with the end face adapter;
[0081] It should be noted that to facilitate subsequent pipeline image acquisition and pipe shape reconstruction work, before the formal measurement work, a calibration board is placed on the measurement platform 210, the bottom backlight 220 is turned on, and multiple cameras simultaneously collect images to complete the calibration of the camera positions and determine the internal and external parameters of the cameras; it is required that the cameras are located in the vertically upward direction of the measurement platform 210, and the specific position is not limited.
[0082] A calibration board 300 for the industrial cameras to collect images before measurement work, complete position calibration, and confirm the internal and external parameters of the industrial cameras;
[0083] A control and analysis system 400 controls the synchronous acquisition and transmission of images by multiple cameras, processes the pipeline images obtained by the calibrated multi - vision system. The processing actions include edge extraction and ellipse fitting, identifies marker points, determines the coordinates of the pipeline bending points and the center coordinates of the end face, so as to obtain pipeline parameter information and realize pipeline measurement.
[0084] The end face adapter is assembled at the end face of the pipeline to assist in positioning the end face of the pipeline;
[0085] The end face adapter includes a feature calibration surface, an end face main body, a pipeline adaptation group, and a calibration base. The calibration base is used during the calibration process of the end face adapter. The pipeline adaptation group is installed on the calibration base and connected to the end face main body. The pipeline adaptation group includes an adjustment handle, a tapered rod, a split body, and an annular spring group. One end of the feature calibration surface is connected to one end of the end face main body to form a right angle. The end face main body has a through hole. The tapered rod passes through the through hole and is fixed to the adjustment handle by a fixing member. The fixing member can be a screw, a pin, etc., which is not limited here. The outer periphery of the tapered rod is provided with a split body. The split body is a three-lobe arc structure with the same center, axis, and diameter. The outer periphery of the split body is provided with a number of parallel grooves, and an annular spring is installed in the groove to form an annular spring group.
[0086] Specifically, during use, turning the adjustment handle 131 drives the split body 133 outside the tapered rod 132 and the annular spring group 134 to rotate coaxially. Turning the handle clockwise is for expansion, and turning the handle counterclockwise is for locking. In the locked limit state, the arcs of the split body 133 are in a tightly closed state without gaps; the outer annular spring group 134 has no elastic deformation; conversely, in the expanded limit state, the arc gap of the split body 133 is the largest, and the elastic deformation of the outer annular spring group 134 is the largest.
[0087] The calibration base includes a support part and a clamping part. The clamping part is located above the support part. The clamping part includes a chuck body and three evenly distributed clamping jaws on the upper surface of the chuck body. The chuck body is provided with a chute corresponding to the clamping jaw. The clamping jaw is installed in the chute and slides radially on the chuck body along the chute for clamping / removing the pipeline adaptation group.
[0088] A calibration ring gauge is further provided outside the pipeline adaptation group. There is a gap between the inner wall of the calibration ring gauge and the annular spring group. The top surface of the calibration ring gauge is attached to the end face main body. The pipeline adaptation group is fixed by the clamping jaw through the calibration ring gauge.
[0089] The marking points of the feature calibration surface are dot matrix marking points with corresponding two-dimensional point coordinates. The upper surface of the end face main body is provided with a number of marking points with the same outer diameter as that on the feature calibration surface, which is convenient for fitting the pipeline end face.
[0090] Specifically, before formal calibration, it is necessary to first turn the adjustment handle 131 to drive the split expansion body 133 to expand and fit and fix with the inner wall of the ring gauge 141, and then clamp the ring gauge 141 into the support base 142 fixed by three jaws; after the above operations are completed, start calibrating the end face adapter 100. The ring gauge 141 is a cylindrical alloy part coaxial with the pipeline adapter group 130, and its inner diameter is slightly larger than the outer diameter of the annular spring group 134 in the locked state. The top section of the ring gauge 141 fits with the bottom surface of the end face body 120, and several marking points with the same outer diameter as that on the calibration surface 110 are pasted on the upper surface of the end face body 120. The marking points on both the calibration plate 130 and the end face body 120 are black on the outside and white on the inside or white on the outside and black on the inside, and the marking point recognition technology is different from the points on the feature calibration surface 110, which is convenient for subsequent end face fitting.
[0091] According to another aspect of the present application, there is provided a method for measuring the pipeline end face, which is characterized by including:
[0092] Calibrating the multi-camera vision system to determine the conversion relationship between the industrial camera coordinate system and the world coordinate system. Among them, the calibration plate printed with marking points is used as the shooting object. The calibration plate is placed on the measurement platform, and the control analysis system is controlled to start the backlight source. Multiple industrial cameras simultaneously shoot the images of the calibration plate. The position of the calibration plate is adjusted, and the industrial cameras shoot the images of different positions of the calibration plate and transmit them to the control analysis system. The control analysis system, based on the principle of close-range photogrammetry, identifies the spatial positions of the centers of the marking points on the calibration plate, determines the internal and external parameters of the camera system, and unifies the industrial camera coordinate system;
[0093] After the vision system is calibrated, the conversion relationship from the camera coordinate system to the world coordinate system is determined. This will be the standard reference for subsequent pipeline measurement;
[0094] It should be noted that except for the marking points on the feature calibration surface 110 of the end face adapter 100, which use the specific marking point recognition algorithm of the present application, the marking points at other positions are all identified by means of point cloud processing and registration.
[0095] Calibrate the end face adapter separately using a calibrated multi - vision system, establish the coordinate system of the end face adapter, and preliminarily determine the position of the central axis of the end face adapter and the coordinates of the intersection point with the end face main body. Among them, using the calibrated multi - vision system, place the end face adapter at a fixed position on the measurement platform, control the analysis system to start the backlight source, and control multiple industrial cameras to simultaneously capture images of the end face adapter. During the shooting process, the calibration base of the end face adapter remains stationary, and the state when the end face adapter does not make any twisting is used as the first photo. Subsequently, turn the handle counterclockwise, lock the feature calibration surface, the end face main body, and the pipeline adapter group into a whole, rotate this whole along the central axis of the calibration base. After rotating a certain angle, then turn the handle clockwise. After the expansion body at the bottom of the end face adapter expands and fits with the inner wall of the calibration ring gauge, take the next photo. The industrial cameras capture images of the end face adapter at no less than three non - repeating angles. The positions of the industrial cameras are the same as those in the calibration stage of the multi - vision system. The captured images of the end face adapter are transmitted to the control analysis system. Based on the edge extraction and ellipse fitting principles, extract the information of the feature calibration surface on the end face adapter and the marking points on the end face main body, and identify the industrial camera coordinates of the marking points on the feature calibration surface and the marking points on the end face main body at each shooting angle position;
[0096] The calibrated multi - vision system captures images of the pipeline with the end face adapter assembled, and determines the center coordinates of the pipeline end face and the axial direction of the pipeline end face position in the current industrial camera coordinate system;
[0097] Based on the seed cylinder model, combined with the pipeline axis and the center origin of the pipeline end face at the pipeline end face, reconstruct the 3D model of the pipeline.
[0098] Among them, before measuring the pipeline end face, for the end face adapter 100 that has been calibrated, insert it into the pipeline along the pipeline end face. At the same time, turn the handle 131 to drive the expansion body 133 and the annular spring group 134 in the pipeline adapter group 130 to rotate coaxially. After reaching the state of complete fitting with the pipe wall, stop turning the handle 131, and the adapter assembly is completed. There is no strict requirement for the pipe type of the pipeline for assembly measurement, as long as the outer edge contour of the pipe type is clear and the pipeline end face is circular. After the assembly work is completed, the pipeline measurement work can be carried out;
[0099] Use the calibrated multi - vision system, start the backlight source 220, place the pipeline with the end face adapter 100 assembled (there is no special requirement for the placement position, as long as the calibration surface 110 is facing up and visible to the camera) on the measurement platform 210. Control the analysis system 400 to synchronously control multiple cameras to capture pipeline images, and perform edge extraction, ellipse fitting, and marking point recognition on the pipeline images; According to the pipeline images under multiple cameras, using the multi - camera reconstruction principle, set the gray - scale threshold gradient for the captured pipe component images, and combine the linear interpolation method and the least - squares method to establish a seed cylinder model, and retrieve and reconstruct the pipeline model except for the end face position.
[0100] The fiducial points on the fiducial feature surface are dot matrix fiducial points, and the recognition method of the dot matrix fiducial points is based on the 9-point coded fiducial points of circles, including:
[0101] Make fiducial points A, E, C, and D form a standard square, where fiducial points B, A, and C are collinear. Several other points are randomly distributed in the blank area (the number of random points is not required, generally not less than 2).
[0102] In computer vision, the cross-ratio invariant is a basic invariant under perspective projection, that is:
[0103]
[0104] Among them, the points (A', B', C', P') are the corresponding projection points of the fiducial points (A, B, C, P) on the target surface of the industrial camera. C r is the definition of the cross-ratio of a straight line.
[0105] The fiducial point C r is a fixed value of 1.5.
[0106] The steps for calculating the initial matching value using the fiducial points include:
[0107] Step 1: Perform edge extraction and ellipse fitting on the obtained fiducial point image to complete fiducial point recognition and obtain at least 7 center coordinates of the circles.
[0108] Step 2: Search through the 7 circles to find three collinear fiducial points (A, B, C).
[0109] Step 3: Search for fiducial point D and fiducial point E, and obtain the center point P of the two, and judge whether point P is on the straight line obtained in the previous step. If not satisfied, return to Step 2.
[0110] Step 4: Calculate the cross-ratio C of the straight line formed by the points (A, B, C, P). r Judge whether this value is equal to 1.5. If not satisfied, return to Step 2.
[0111] Step 5: Use the least squares method to calculate the affine transformation matrix according to the points (A, B, C, P) and the physical coordinates given by the fiducial point design model.
[0112] Step 6: Match the other points on the fiducial points according to the affine transformation matrix obtained in Step 5, and output the industrial camera coordinates of all the fiducial points on the feature calibration surface.
[0113] The determination of the circumferential position of the end face adapter and the intersection point coordinates with the end face main body includes:
[0114] Based on the principle of plane fitting, using the camera coordinates of the same fiducial point on the feature calibration plane at different positions, fit the rotating circular plane P formed by the same fiducial point during the calibration process i , so as to determine the center c of the rotating circle of the same fiducial point i of the industrial camera coordinates, where i represents the number of rotating circles
[0115] Let the camera coordinates of the same fiducial point on the first photo be represented as p1(x1, y1, z1), the camera coordinates on the second photo be represented as p2(x2, y2, z2), and the industrial camera coordinates on the nth photo be represented as p n (x n , y n , z n ), then:
[0116]
[0117] Converge and solve. The center c(x c , y c , z c ) of the rotating circle formed after the rotation of the same fiducial point, and the radius R of the rotating circle
[0118] It can be seen from the calibration steps that the fiducial points on the feature calibration plane all rotate around the central axis of the calibration ring gauge. Using all the centers of the rotating circles On the feature calibration plane, use the least squares method to find an axis that matches all the centers c i and has the optimal position, which is the central axis L of the calibration ring gauge, that is, this axis L satisfies:
[0119]
[0120] Ensure the convergence of the equation set (2), and solve to obtain a set of axes L:
[0121]
[0122] Arbitrarily take the coordinates of all the fiducial points on the end face main body at the same shooting angle Perform end face fitting to solve the surface equation of the end face main body, that is:
[0123]
[0124] Obtain the surface equation of the end face main body:
[0125] a1x + b1y + c1z + d1 = 0 (5)
[0126] Using the principle of the intersection of a line and a plane, solve for the intersection point o of the central axis L of the calibration ring gauge on the end face main body, that is, solve the intersection point o(o x , oy , o z );
[0127] The top section of the calibration ring gauge fits against the bottom of the end face body. The calibration ring gauge is concentric and coaxial with the end face adapter. The central axis L of the ring gauge is the central axis L1 of the end face adapter. The intersection point of the central axis L of the calibration ring gauge on the end face body is the same as the intersection point of the central axis L1 of the end face adapter on the end face body;
[0128] wherein, the intersection point o (o x , o y , o z ), and the direction vector of the axis L Determine a set of adapter axes L1 passing through the intersection point o:
[0129]
[0130] Establish an end face adapter coordinate system, where the origin is set as the intersection point o'(0, 0, 0), the x - y axis plane is the end face O, the positive direction of the Z axis is the direction of the end face adapter axis and points towards the feature calibration surface. The intersection point o (o x , o y , o z ), and the intersection point o'(0, 0, 0) are the coordinates of the end face body and the axis L' in the industrial camera coordinate system and the end face adapter coordinate system respectively. Based on the SVD principle, obtain the central axis L1' of the end face adapter in the end face adapter coordinate system and the coordinate set {S j} of each marked point on the feature calibration surface in the end face adapter coordinate system, where j represents the number of marked points.
[0131] The center coordinates of the pipeline end face and the axial direction of the pipeline end face position include:
[0132] Adopt a dot - matrix marked point recognition method to recognize all the marked points on the feature calibration surface of the end face adapter. The camera coordinates of each marked point on the feature calibration surface are recorded as {Q j}, and the known corresponding adapter coordinate set {S j} satisfies the SVD decomposition principle. Solve the transformation relationship between the two coordinate sets:
[0133] (1) Solve the matrix centroid:
[0134] Calculate the centroids of matrices Q and S respectively as Then: (Both matrices are n * n matrices)
[0135]
[0136] (2) Translation matrix:
[0137] Translate the matrices Q and S respectively with respect to their respective centroid positions. The new matrices are Q' and S', then:
[0138]
[0139] (3) SVD decomposition:
[0140] Construct matrix M using matrices Q and S and perform SVD decomposition on it:
[0141]
[0142] (4) Solve for R s and T s
[0143]
[0144] For the direction vector of the central axis of the end face adapter in the end face adapter coordinate system and the intersection point o'(0, 0, 0), use the above conversion relationship to obtain the central axis of the adapter in the current camera coordinate system and the intersection point Among them, the axis of the end face adapter should coincide with the axis of the pipeline at the end face position, the intersection point coincides with the center of the end face circle, and the axis direction at the pipeline end face position is The center of the end face circle is
[0145] The determination of the center of the pipeline end face circle and the central axis of the pipeline at the end face position has significantly optimized important parameters such as the length of the straight line segment, bending angle, and rotation angle near the end face. Compared with the traditional vision measurement method of obtaining the coordinates of points near the end face and fitting the end face circle through an industrial camera; at the same time, through the end face adapter, the requirement for the position of the industrial camera for end face shooting is eliminated, making it easier to operate; meanwhile, its measurement accuracy far exceeds that of the end face fitting algorithm for solving the center of the end face circle and the central axis at the end face position.
[0146] The above are only several embodiments of the present application and do not impose any form of limitation on the present application. Although the present application is disclosed as above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art, without departing from the scope of the technical solution of the present application, making some changes or modifications using the disclosed technical content is equivalent to equivalent implementation cases and all fall within the scope of the technical solution.
Claims
1. A measurement system for the end face of a pipeline, characterized in that, Comprising: A plurality of end face adapters for installing the pipeline to be measured. The upper part of the end face adapter has a feature calibration surface, and marking points for providing feature information are arranged on the feature calibration surface; A multi-camera vision system, including a measurement platform and a backlight source. At least four industrial cameras in different orientations are arranged inside the measurement platform in the vertical height direction. The industrial cameras in different orientations form a stereo vision measurement system for taking multi-camera images of the pipeline with the end face adapter; A calibration board for collecting images by the industrial camera before the measurement work to complete the position calibration; A control and analysis system for controlling the synchronous acquisition and transmission of images by multiple cameras, processing the pipeline images obtained by the calibrated multi-camera vision system. The processing actions include edge extraction and ellipse fitting, identifying the marking points, determining the coordinates of the pipeline bending points and the coordinates of the end face center, so as to obtain the pipeline parameter information and realize the pipeline measurement; The end face adapter is assembled at the end face of the pipeline to assist in positioning the pipeline end face; The end face adapter includes a feature calibration surface, an end face main body, a pipeline adapter group and a calibration base. The pipeline adapter group is installed on the calibration base and is connected to the end face main body. The pipeline adapter group includes an adjustment handle, a tapered rod, a split body and an annular spring group. One end of the feature calibration surface is connected to one end of the end face main body to form a right angle. The end face main body has a through hole. The tapered rod passes through the through hole and is fixed to the adjustment handle by a fixing member. A split body is arranged on the outer periphery of the tapered rod. The split body is a three-lobe arc structure with the same center, axis and diameter. A plurality of parallel grooves are arranged on the outer periphery of the split body, and annular springs are installed in the grooves to form an annular spring group.
2. The measurement system for the end face of a pipeline according to claim 1, characterized in that, The calibration base includes a support part and a clamping part. The clamping part is located above the support part. The clamping part includes a chuck main body and three evenly distributed clamping jaws on the upper surface of the chuck main body. A chute corresponding to the clamping jaw is arranged on the chuck main body. The clamping jaw is installed in the chute and slides radially on the chuck main body along the chute for clamping / removing the pipeline adapter group; A calibration ring gauge is further arranged outside the pipeline adapter group. There is a gap between the inner wall of the calibration ring gauge and the annular spring group. The top surface of the calibration ring gauge is attached to the end face main body. The pipeline adapter group is fixed by the clamping jaw through the calibration ring gauge; 3. The measurement system for the end face of a pipeline according to claim 1, characterized in that, The marking points on the feature calibration surface are dot matrix marking points with corresponding two-dimensional point coordinates. A plurality of marking points with the same outer diameter as that on the feature calibration surface are arranged on the upper surface of the end face main body to facilitate the fitting of the pipeline end face; 4. A measurement method for the end face of a pipeline, characterized in that, Comprising: Calibrate the multi-camera vision system to determine the conversion relationship between the industrial camera coordinate system and the world coordinate system. Among them, the calibration board printed with marker points is used as the shooting object. The calibration board is placed on the measurement platform. The control and analysis system is controlled to turn on the backlight source. Multiple industrial cameras simultaneously shoot the images of the calibration board. Adjust the position of the calibration board. The industrial cameras shoot the images of different positions of the calibration board and transmit them to the control and analysis system. The control and analysis system, based on the principle of close-range photogrammetry, identifies the spatial positions of the centers of the marker points on the calibration board, determines the internal and external parameters of the camera system, and unifies the industrial camera coordinate system; Use the calibrated multi-camera vision system to calibrate the end-face adapter separately, establish the end-face adapter coordinate system, and initially determine the position of the central axis of the end-face adapter and the coordinates of the intersection point with the end-face body. Among them, use the calibrated multi-camera vision system, place the end-face adapter at a fixed position on the measurement platform, control the analysis system to turn on the backlight source, control multiple industrial cameras to simultaneously shoot the images of the end-face adapter. During the shooting process, the calibration base of the end-face adapter remains stationary. The state when the end-face adapter does not undergo any screwing is used as the first photo. Subsequently, turn the handle counterclockwise. The feature calibration surface, the end-face body, and the pipeline adapter group are locked as a whole. Rotate this whole along the central axis of the calibration base. After rotating a certain angle, then turn the handle clockwise. After the expansion body at the bottom of the end-face adapter expands and fits with the inner wall of the calibration ring gauge, take the next photo. The industrial cameras shoot at least three non-repeating angles of the end-face adapter. The positions of the industrial cameras are the same as those in the calibration stage of the multi-camera vision system. The images of the end-face adapter taken are transmitted to the control and analysis system. Based on the edge extraction and ellipse fitting principles, extract the information of the marker points on the feature calibration surface and the end-face body of the end-face adapter, and identify the industrial camera coordinates of the marker points on the feature calibration surface and the end-face body at each shooting angle position; The calibrated multi-camera vision system shoots the images of the pipeline with the end-face adapter assembled, and determines the center coordinates of the pipeline end-face and the axial direction of the pipeline end-face position in the current industrial camera coordinate system; Based on the seed cylinder model, combined with the pipeline axis and the center origin of the pipeline end-face at the pipeline end-face, reconstruct the three-dimensional model of the pipeline.
5. A method for measuring the end face of a pipeline according to claim 4, characterized in that, The marker points on the feature marker surface are dot matrix marker points. The recognition method of the dot matrix marking points is based on the 9-point encoded marker points of the dot, including: Make the fiducial points A, E, C, and D form a standard square, where the fiducial points B, A, and C are collinear. Several other points are randomly distributed in the blank area. In computer vision, the cross-ratio invariant is the basic invariant under perspective projection, that is: Among them, the points (A', B', C', P') are the corresponding projection points of the marked points (A, B, C, P) on the target surface of the industrial camera, and C r is the definition of the cross-ratio of a straight line; The fiducial point C r is a fixed value of 1.
5.
6. A method for measuring the end face of a pipeline according to claim 5, characterized in that, The steps of calculating the matching initial value using the marker points include: Step 1, perform edge extraction and ellipse fitting on the obtained marker point images to complete marker point recognition, and obtain at least 7 center coordinates of the dots; Step 2, traverse and search for three collinear marker points (A, B, C) among the 7 dots; Step 3: Search for fiducial point D and fiducial point E, and obtain the center point P of the two. Determine whether point P lies on the straight line obtained in the previous step. If not satisfied, return to Step 2; If not, return to Step 2; Step 4, calculate the cross-ratio C of the line formed by points (A, B, C, P) r , and determine whether this value is equal to 1.
5. If not satisfied, return to Step 2; Step 5, use the least squares method to calculate the affine transformation matrix according to the points (A, B, C, P) and the physical coordinates given by the marker point design model; Step 6, match other points on the marker points according to the affine transformation matrix obtained in Step 5, and output the industrial camera coordinates of all marker points on the feature calibration surface.
7. A method for measuring the end face of a pipeline according to claim 4 or 6, characterized in that The determination of the circumferential position of the end face adapter and the intersection coordinates with the end face body includes: Based on the principle of plane fitting, using the camera coordinates of the same fiducial point on the feature calibration plane at different positions, fit the rotating circular plane P formed by the same fiducial point during the calibration process i , so as to determine the industrial camera coordinates of the center c of the rotating circle of the same fiducial point i , where i represents the number of rotating circles Let the camera coordinates of the same fiducial point be represented as p1(x1, y1, z1) in the first photo, p2(x2, y2, z2) in the second photo, and p n (x n , y n , z n ) in the nth photo. Then: Convergence solution, the center c(x c , y c , z c ) of the rotation circle formed after the rotation of the same landmark point, and the radius R of the rotation circle; As can be seen from the calibration step, the fiducial points on the feature calibration surface all rotate around the central axis of the calibration ring gauge. Using all the centers of the rotating circles on the feature calibration surface Using the least squares method, find an axis that matches all the centers c i and has the optimal position. This axis is the central axis L of the calibration ring gauge, that is, the axis L satisfies: Ensuring the convergence of the equation set (2) and solving to obtain a set of axis lines L: Arbitrarily take the coordinates of all the landmark points on the end face body at the same shooting angle Perform end face fitting to solve the plane equation of the end face body, that is: Obtaining the surface equation of the end face body: a1x + b1y + c1z + d1 = 0 (5) Using the principle of the intersection of a line and a plane, solve for the intersection point o of the central axis L of the calibration ring gauge on the end face body, that is, solve the simultaneous equations (3) and (5) to obtain the intersection point o (o x , o y , o z ); The top section of the calibration ring gauge fits with the bottom of the end face body. The calibration ring gauge is concentric and coaxial with the end face adapter. The central axis line L of the ring gauge is the central axis line L1 of the end face adapter. The intersection point of the central axis line L of the calibration ring gauge on the end face body is the intersection point of the central axis line L1 of the end face adapter on the end face body; Among them, the intersection point o (o x , o y , o z ), the direction vector of the axis L determines a set of adapter axes L1 passing through the intersection point o: Establish an end-face adapter coordinate system, where the origin is set as the intersection point o'(0,0,0), the x-y axis plane is the end face O, and the positive direction of the Z axis is the axis direction of the end-face adapter and is along the end face O towards the feature calibration surface. The intersection point o(o x ,o y ,o z ), and the intersection point o'(0,0,0) are the coordinates of the end-face main body and the axis L' in the industrial camera coordinate system and the end-face adapter coordinate system respectively. Based on the SVD principle, the central axis L1' of the end-face adapter in the end-face adapter coordinate system and the coordinate set {S j} of each marker point on the feature calibration surface in the end-face adapter coordinate system are obtained, where j represents the number of marker points.
8. A method for measuring the end face of a pipeline according to claim 7, characterized in that The center coordinates of the pipeline end face and the axial direction of the pipeline end face position include: Using the dot matrix marker recognition method, all the marker points on the feature calibration surface of the end face adapter are recognized, and the camera coordinates of each marker point on the obtained feature calibration surface are denoted as {Q j}, given the corresponding adapter coordinate set {S j}, the SVD decomposition principle is satisfied between the two coordinate sets, and the conversion relationship between the two coordinate sets is solved: (1) Solving the matrix centroid: Calculate the centroids of matrices Q and S respectively as where matrices Q and S are both n*n matrices, then: (2) Translating the matrix: Translate the matrices Q and S respectively with respect to their own centroid positions. The new matrices are Q' and S'. Then: (3) SVD decomposition: Construct a matrix M using the matrices Q and S and perform SVD decomposition on it: (4) Solve for R s and T s The direction vector of the central axis of the end face adapter in the end face adapter coordinate system Using the above conversion relationship for the intersection point o'(0, 0, 0), the central axis of the adapter in the current camera coordinate system is obtained And the intersection point Among them, the axis of the end face adapter should coincide with the axis of the pipeline at the end face position of the pipeline, the intersection point coincides with the center of the end face circle, and the axis direction at the end face position of the pipeline is The center of the end face circle is
Citation Information
Patent Citations
High-precision catheter end detecting and positioning method
CN113409395A
Portable elbow measuring device and method
CN114419247A