Non-contact steel pipe end face dimension measurement method and system

By employing a non-contact method for measuring the end face dimensions of steel pipes, combined with image edge detection and computer graphics methods, the problem of burr interference was solved, achieving high-precision measurement of the end face dimensions of steel pipes and reducing maintenance costs.

CN120351860BActive Publication Date: 2026-03-27ACADEMY OF PUBLIC SECURITY TECH HEFEI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies cannot effectively eliminate the influence of burrs in seamless steel pipe production, resulting in non-contact measurement methods being unable to accurately measure the specifications, dimensions, and roundness of the steel pipe end face. Furthermore, manual measurement lacks accuracy and has high maintenance costs.

Method used

A non-contact method for measuring the end face dimensions of steel pipes is adopted. By combining image edge detection and graphics methods, the pipe end contour is identified, the positional relationship between contour points and the contour is calculated, and burrs are accurately located and their influence is eliminated. This includes steps such as binarization, morphological gradient calculation, convex hull calculation, and burr judgment.

Benefits of technology

It improves the accuracy of steel pipe end face dimension measurement, reduces sensitivity to burrs, reduces maintenance costs, and achieves high-precision measurement of seamless steel pipe end face dimensions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120351860B_ABST
    Figure CN120351860B_ABST
Patent Text Reader

Abstract

The application provides a non-contact steel pipe end face size measurement method and system, on the basis of acquiring an image and identifying an image contour, traversing the identified contour points, calculating the distance between the contour points, judging the contour points with too far distance as burrs and eliminating the influence of the points, and performing elliptical fitting on the contour, and according to the fitting result of the ellipse, the inner and outer diameters and roundness and other parameters can be calculated. The application identifies the pipe end contour based on the original image of the pipe end, adopts the combination of image edge detection and graphological methods, calculates the position relationship of the contour points and the contour through a self-developed algorithm, accurately positions to the pipe end burrs and excludes the influence of the burrs on the measured pipe end size. The application not only solves the problems of insufficient precision and high maintenance cost of the manual measurement method, but also improves the sensitivity to the burrs and accurately obtains the effective pipe end size.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of steel pipe production detection equipment, in particular to a method and system for non-contact measurement of steel pipe end face size based on high-precision contour recognition. BACKGROUND

[0002] Steel pipes are widely used in industries such as construction, petroleum, and natural gas. The production technology of seamless steel pipes has evolved from traditional hot rolling to cold drawing or cold rolling. Early hot rolling technology, although capable of achieving large deformation, has relatively low precision and surface quality. As industrial applications require higher precision of steel pipe end face size, traditional measurement methods such as the right-angle ruler measurement method and the plumb line method have many limitations. The right-angle ruler measurement method is limited by the size of the pipe diameter and the measurement tool, resulting in large errors. The plumb line method requires rotating the steel pipe for measurement, which is difficult to operate and is limited by the site and equipment, also resulting in large errors. Neither method can meet the needs of industrial applications.

[0003] Currently, rolling mills in the steel pipe industry still rely on manual contact measurement for pipe end size measurement. The measurement data is insufficient, and the uneven wall thickness and roundness cannot be visually judged, and frequent manual tool maintenance is required. Therefore, some steel pipe companies have begun to use non-contact steel pipe end face size detection methods with cameras. For example, CN102141380A discloses a non-contact measurement of steel pipe end size image processing method. This method uses a CCD camera to collect images of the measured steel pipe end, transmits the collected image information to an industrial computer, and calculates the distance between the intersection of the vertical line from the outer contour cut point to the outer contour tangent and the inner contour after fitting the inner and outer contours of the image information. The actual wall thickness of the pipe end is obtained. Although this technology overcomes the damage to manual tools and improves the measurement accuracy of wall thickness through non-contact methods, it requires additional steps to eliminate the effects of burrs and uneven wall thickness caused by cutting operations. In addition, this method cannot measure important parameters such as the size and roundness of the steel pipe end face, and other methods are needed to measure these parameters in industrial production. SUMMARY

[0004] The technical problem to be solved by the present application is how to simultaneously eliminate the effect of burrs while detecting the size of the steel pipe end without contact.

[0005] The present application solves the above technical problems by the following technical means:

[0006] The non-contact steel pipe end face size measurement method comprises the following steps:

[0007] Step 1: for the original image of the pipe end, convert to a binary image and detect the outline using a morphological gradient operation to obtain the effective outline points of the pipe end and judge whether the outline is approximately circular, and then sort the outline to distinguish the inner and outer outline point sets;

[0008] Step 2: traverse the original outline points to calculate the average thickness, maximum and minimum thickness and their positions, and then filter the original outline points to obtain the outline point set smaller than the distance threshold;

[0009] Step 3: according to the outline point set obtained after filtering in step 2, calculate the size of the convex hull, perform ellipse fitting on the convex hull to obtain the fitted ellipse, calculate the average inner and outer diameters and the center point, and calculate the average thickness of the filtered outline, the maximum and minimum thickness and their positions;

[0010] Step 4: according to the convex hull point set obtained in step 3, draw the positions of each point in the outline point set, and judge whether the distance from the outline point to the outline exceeds the threshold, if it exceeds, it is judged as burr;

[0011] Step 5: according to the fitted ellipse obtained in step 4, calculate the maximum and minimum inner and outer diameters, ellipticity, and draw the maximum and minimum thickness points.

[0012] The present application is based on the original image of the pipe end, adopts the combination of image edge detection and graph method to identify the pipe end outline, calculates the position relationship between the outline point and the outline through self-developed algorithm, accurately locates the pipe end burr and excludes the influence of burr on the measured pipe end size. The present application not only solves the problems of insufficient precision and high maintenance cost of manual measurement method, but also improves the sensitivity to burr and accurately obtains the effective pipe end size.

[0013] As an optimization scheme of the above scheme, the step 1 comprises the following processes:

[0014] Step 1.1: first, convert the image to a binary image by using the inverse binary method, second, perform a morphological gradient operation to highlight the image edge and retrieve all outlines, third, remove small noise outlines by calculating the area of the outline and find the smallest rectangle surrounding the outline, then select the rectangle with a specific aspect ratio, sort the outline surrounded by the rectangle and select the largest and third largest outlines as the outer diameter and inner diameter outlines and add them to the effective outline, wherein the resolution of the outline point is the resolution of the original image;

[0015] Step 1.2: according to the two outline point sets obtained in step 1.1, let the zeroth moment of the outline be m 00, , the first moments of the outline on the x-axis and y-axis be m 10 and m 01 , and the centroid coordinates of the outline be ( , );

[0016] Step 1.3: According to the two contour centroid coordinates obtained in step 1.2, the Euclidean distance between the coordinates is calculated to determine whether the distance exceeds the threshold value, and if it exceeds the threshold value, it is directly returned, otherwise the two contours are sorted to distinguish the inner and outer contour point sets.

[0017] As an optimization scheme of the above scheme, the step 2 includes the following processes:

[0018] Step 2.1: Traverse the inner diameter original contour point set obtained in step 1.1, calculate the distance of each inner diameter point to the outer diameter contour as the thickness, get the maximum distance as the maximum thickness, the minimum distance as the minimum thickness and save the maximum and minimum thickness point positions, and the average of the sum of all distances as the average thickness;

[0019] Step 2.2: According to the original contour point set obtained in step 1.1, use the least square algorithm to find the best fitting ellipse; to filter the contour points far from the contour center, traverse the original contour point set, record the coordinate of each current traversal point as p0(x0, y0), take the two points on the left and right sides of the point with a distance of N1 (N1 takes a larger value of about 10, which can provide stronger smoothing effect and improve the robustness of the algorithm, suitable for fitting ellipses with relatively simple contour shapes) The two points are recorded as p1(x1, y1) and p2(x2, y2), and the distance dist of the line L p1,p2 connecting p0 to p1 and p2 is calculated. p1,p2 The general equation of the straight line L is: where A=y1-y2, B=x2-x1, C=x1 y2-y1 x2, the distance dist of each point to p0(x0, y0) to the straight line L p1,p2 is: Similarly, connect the two points on the left and right sides of the point with a distance of N2 (N2 takes half of N1, which provides an additional condition to more accurately determine whether the current point should be retained and more accurately retain important contour features) The distance between the two points is calculated, and the average distance between all points between p1 and p2 to the center point of the fitting ellipse is calculated. Finally, the three distances obtained are compared with the set threshold value one by one, and if the threshold value is exceeded, the current traversal point is filtered; a preliminary filtered contour point set is obtained.

[0020] Step 2.3: Traverse the original contour point set obtained in step 1.1, calculate the distance between each point in the point set and the preliminary filtered contour point set, and mark the points with a distance not exceeding the set threshold as missing points and recombine them with the filtered contour; To ensure that the subsequent contour point traversal order is consistent with their position order on the contour, traverse the combined contour, and for each traversed contour point, subtract the contour center to obtain the direction vector from the contour center to the point, and normalize the direction vector using the Euclidean norm to obtain the unit vector; Take the first unit vector as the initial vector and the x positive direction as the standard direction, calculate the angles between the initial vector and the unit vector of the current traversed contour point and the x positive direction respectively, and then subtract the two angles to obtain the angle between the direction vector of each contour point and the initial point direction vector, and sort these angles in ascending order to obtain a contour point set with consistent traversal order and position order;

[0021] Step 2.4: As in step 2.2, filter the contour again to obtain a filtered contour point set to ensure that there are no contour points that are too far from the contour center.

[0022] As an optimization of the above scheme, the step 3 includes the following process:

[0023] Step 3.1: To simplify the contour shape and improve the robustness of the algorithm and accurately calculate the subsequent pipe end size, according to the final filtered contour point set obtained in step 2.4, convert the final filtered contour point set to a convex hull using Graham's scan method; Use the least squares method to convert the point set saved in the convex hull to a fitted ellipse and obtain the center points of the two fitted ellipses, and calculate the average of the major and minor axes of the fitted ellipses of the large and small contours respectively and multiply by the pixel size to obtain the values of the outer diameter and the inner diameter;

[0024] Step 3.2: As in step 2.1, obtain the average thickness, maximum and minimum thickness and their positions of the filtered contour points.

[0025] As an optimization of the above scheme, the step 4 includes the following process:

[0026] Step 4.1: According to the point set saved in the convex hull obtained in step 3, draw the contour points contained in the point set to facilitate subsequent confirmation of the position of the burr point;

[0027] Step 4.2: According to the point set saved in the convex hull obtained in step 3, traverse the large and small contours respectively, and determine whether a point is inside the contour and the distance from the point to the contour by using the ray projection method; For the large contour point set, determine whether the distance from the point outside the contour to the contour exceeds the threshold, and if it exceeds the distance, determine it as a burr point and draw it on the image; For the small contour point set, determine whether the distance from the point inside the contour to the contour exceeds the threshold, and if it exceeds the distance, determine it as a burr point and draw it on the image.

[0028] As an optimization scheme of the above scheme, the step 5 comprises the following process:

[0029] According to the fitting ellipse obtained in step 3.1, the long axis and the short axis of the large profile fitting ellipse are respectively denoted as a1 and b1, the long axis and the short axis of the small profile fitting ellipse are respectively denoted as a2 and b2, the pixel size is denoted as pix, the profile wall thickness is obtained as , the ellipticity is , the maximum outer diameter is a1 pix, the minimum outer diameter is b1 pix, the maximum inner diameter is a2 pix, the minimum inner diameter is b2 pix; according to the maximum and minimum thickness positions obtained in step 3.2, the maximum and minimum thickness points are drawn.

[0030] The application also provides a non-contact steel pipe end surface size measurement system, comprising:

[0031] The binarization module: for the pipe end original image, the binarization image is converted and the profile is detected by using the morphological gradient operation to obtain the effective profile points of the pipe end and judge whether the profile is approximately circular, and then the profile is sorted to distinguish the inner and outer profile point sets;

[0032] The filtering module: the average thickness, the maximum and minimum thickness and their positions are calculated by traversing the original profile points, and then the original profile points are filtered to obtain the profile point set smaller than the distance threshold;

[0033] The convex hull calculation module: according to the profile point set obtained after filtering, the large and small profile convex hulls are calculated, the convex hulls are fitted to obtain the fitting ellipse, the average inner and outer diameters and the center point are calculated, and the average thickness, the maximum and minimum thickness and their positions of the filtered profile are calculated;

[0034] The burr judgment module: according to the convex hull point set obtained, the positions of each point in the profile point set are drawn, and it is judged whether the distance from the profile point to the profile exceeds the threshold value, and if it exceeds, it is judged as burr;

[0035] The thickness calculation module: the maximum and minimum inner and outer diameters, the ellipticity are calculated according to the fitting ellipse, and the maximum and minimum thickness points are drawn.

[0036] As an optimization scheme of the above scheme, the binarization module comprises the following process:

[0037] Step 1.1: Firstly, the image is converted into a binary image by using the inverse binary method, secondly, the morphological gradient operation is performed to highlight the image edges and retrieve all contours, then the contours are sorted and the largest and the third largest contours are selected as the outer and inner diameter contours respectively, and added to the effective contours, wherein the resolution of the contour points is the original image resolution;

[0038] Step 1.2: According to the two contour point sets obtained in step 1.1, the zeroth moment of the contour is denoted as m 00, , the first moments of the contour on the x-axis and y-axis are denoted as m 10 and m 01 , and the centroid coordinates of the contour are denoted as ( , );

[0039] Step 1.3: According to the two contour centroid coordinates obtained in step 1.2, the Euclidean distance between the coordinates is calculated, and it is determined whether the distance exceeds a threshold value. If the distance exceeds the threshold value, the process is directly returned, otherwise the two contours are sorted to distinguish the inner and outer contour point sets.

[0040] As an optimization scheme of the above scheme, the filtering module includes the following processes:

[0041] Step 2.1: The inner diameter original contour point set obtained in step 1.1 is traversed, and the distance of each point to the outer diameter contour is calculated and saved as the thickness, the maximum distance is obtained as the maximum thickness, the minimum distance is obtained as the minimum thickness, and the maximum and minimum thickness point positions are saved, and the sum of all distances is averaged as the average thickness;

[0042] Step 2.2: According to the original contour point set obtained in step 1.1, the least square algorithm is used to find the best fitting ellipse; in order to filter the contour points far from the contour center, the original contour point set is traversed, and the coordinate of each current traversal point is denoted as p0(x0, y0), the two points on the left and right sides of the point are denoted as p1(x1, y1) and p2(x2, y2), and the distance dist of the line L p1,p2 connecting the points p0 and p2 is calculated, and the general equation of the straight line L p1,p2 is: , wherein A=y1-y2, B=x2-x1, C=x1 y2-y1 x2, the distance dist of each point to the straight line L p1,p2 passing through p0(x0, y0) is calculated as: , similarly, take two points connected by the left and right two sides of the distance N2 (N2 takes N1 half, provides additional conditions, can more accurately determine whether the current point should be retained, more accurately retain important contour features) point position, get the distance, and then calculate the average distance between all points between p1 and p2 and the center point of the fitted ellipse; finally, compare the three distances obtained one by one with the set threshold value, if it exceeds the threshold value, the current traversal point is filtered; get the preliminary filtered contour point set;

[0043] Step 2.3: Traverse the original contour point set obtained in step 1.1, calculate the distance between each point in the point set and the preliminary filtered contour point set, and record the points whose distance does not exceed the set threshold as missing points and combine them with the filtered contour; To ensure that the traversal order of the subsequent contour points is consistent with their position order on the contour, traverse the combined contour, and for each traversed contour point, subtract the contour center from the contour point to get the direction vector from the contour center to the point, and normalize the direction vector using the Euclidean norm to get the unit vector; Take the first unit vector as the initial vector, take the x positive direction as the standard direction, and calculate the angle between the initial vector and the unit vector of the current traversed contour point and the x positive direction, and then subtract the two angles to get the angle between the direction vector of each contour point and the initial point direction vector. Sort the angles in ascending order to get a contour point set with consistent traversal order and position order;

[0044] Step 2.4: As in step 2.2, filter the contour again to get the filtered contour point set, ensuring that there are no contour points that are too far from the contour center.

[0045] As an optimization of the above scheme, the convex hull calculation module includes the following processes:

[0046] Step 3.1: To simplify the contour shape, improve the robustness of the algorithm, and accurately calculate the subsequent pipe end size, according to the final filtered contour point set obtained in step 2.4, convert the final filtered contour point set to a convex hull using the Graham scan method; Use the least squares method to convert the point set saved by the convex hull to a fitted ellipse and get the center points of the two fitted ellipses, and calculate the average value of the major and minor axes of the fitted ellipses of the large and small contours respectively. Multiply the pixel size to get the outer diameter and inner diameter values;

[0047] Step 3.2: As in step 2.1, get the average thickness, maximum and minimum thickness of the filtered contour points and their positions;

[0048] The burr judgment module includes the following processes:

[0049] Step 4.1: According to the point set saved in the form of convex hull obtained in step 3, draw the contour points contained in the point set to facilitate subsequent confirmation of the position of the burr point;

[0050] Step 4.2: According to the point set saved in the form of a convex hull obtained in step 3, the large and small contours are traversed respectively, and the ray projection method is used to judge whether the point is inside the contour and the distance from the point to the contour; for the point set of the large contour, it is judged whether the distance from the point outside the contour to the contour exceeds the threshold value, and if the distance exceeds, the point is judged as a burr point and is drawn on the image; for the point set of the small contour, it is judged whether the distance from the point inside the contour to the contour exceeds the threshold value, and if the distance exceeds, the point is judged as a burr point and is drawn on the image;

[0051] The thickness calculation module includes the following processes:

[0052] According to the fitted ellipse obtained in step 3.1, the major axis and the minor axis of the large contour fitting ellipse are denoted as a1 and b1 respectively, and the major axis and the minor axis of the small contour fitting ellipse are denoted as a2 and b2 respectively, and the pixel size is denoted as pix, and the contour wall thickness is obtained as , the ellipticity is , the maximum outer diameter is a1 pix, the minimum outer diameter is b1 pix, the maximum inner diameter is a2 pix, the minimum inner diameter is b2 pix. According to the maximum and minimum thickness positions obtained in step 3.2, draw the maximum and minimum thickness points.

[0053] The advantages of the present application are:

[0054] The present application is based on the original image of the pipe end, adopts the combination of image edge detection and graph method, identifies the pipe end contour, calculates the position relationship between the contour point and the contour through self-developed algorithm, accurately locates the pipe end burr and excludes the influence of the burr on the measured pipe end size. The method not only solves the problems of insufficient precision and high maintenance cost of manual measurement method, but also improves the sensitivity to burr and accurately obtains the effective pipe end size. BRIEF DESCRIPTION OF DRAWINGS

[0055] Figure 1 The flowchart of the method in the embodiment of the present application.

[0056] Figure 2 The enlarged view of the outer diameter contour in the embodiment of the present application.

[0057] Figure 3 The detection original data and detection result diagram obtained by using the method in the embodiment of the present application. DETAILED DESCRIPTION

[0058] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0059] The present application provides a method for non-contact measurement of the size of the end face of a steel pipe, which eliminates the influence of burrs while detecting the size of the pipe end, and improves the detection accuracy of the size of the pipe end. Figure 1 As shown in the figure, the specific steps are as follows:

[0060] Step 1: For the original image of the pipe end, convert it into a binary image and use morphological gradient operation to detect the contour to obtain the effective contour points of the pipe end and judge whether the contour is approximately circular, and then sort the contour to distinguish the inner and outer contour point sets.

[0061] Step 1.1: High-precision acquisition of the pipe end contour is the basic step of size measurement. First, the image is converted into a binary image using the inverse binary method, then morphological gradient operation is performed to highlight the image edges and retrieve all contours, then the area of the contour is calculated to remove small noise contours and find the smallest rectangle that encloses the contour, and then the rectangle with a specific aspect ratio is selected, the contour enclosed by the rectangle is sorted and the largest and third largest contours are selected as the outer diameter and inner diameter contours and added to the effective contour, wherein the resolution of the contour points is the resolution of the original image. It should be noted that the outer diameter and inner diameter pixel contours of the steel pipe end have two layers respectively, and the outermost layer of the outer diameter and the outermost layer of the inner diameter are taken, so the largest and third largest contours are taken. As shown in the figure, it is an enlarged view of the outer diameter contour. Figure 2

[0062] Step 1.2: According to the two contour point sets obtained in step 1.1, let the zeroth moment of the contour be m 00, , the first moments of the contour on the x-axis and y-axis be m 10 and m 01 , and the contour centroid coordinates be ( , ).

[0063] Step 1.3: According to the two contour centroid coordinates obtained in step 1.2, calculate the Euclidean distance between the coordinates, judge whether the distance exceeds the threshold, if it exceeds the threshold, return directly, otherwise, sort the two contours to distinguish the inner and outer contour point sets.

[0064] Step 2: Traverse the original contour points to calculate the average thickness, maximum and minimum thickness and their positions, and then filter the original contour points to obtain the contour point set smaller than the distance threshold. ​

[0065] Step 2.1: Traverse the inner diameter original contour point set obtained in step 1.1, calculate the distance of each point to the outer diameter contour, i.e. save it as thickness, get the maximum distance as the maximum thickness, the minimum distance as the minimum thickness and save the maximum and minimum thickness point positions, and take the average of the sum of all distances as the average thickness.

[0066] Step 2.2: According to the original contour point set obtained in step 1.1, find the best fitting ellipse using the least square algorithm. In order to filter the contour points far from the center of the contour, traverse the original contour point set, record the coordinates of each current traversal point as p0(x0, y0), take the two points on the left and right sides of the point with a distance of N1 (N1 takes a larger value of about 10, which can provide stronger smoothing effect and improve the robustness of the algorithm, suitable for fitting ellipse of simple contour shape) as p1(x1, y1) and p2(x2, y2), and calculate the distance dist of the line L connecting p0 and p2. p1,p2 p1,p2 The general equation of the straight line L is: where A=y1-y2, B=x2-x1, C=x1 y2-y1 x2, the distance dist of each point to p0(x0, y0) to the straight line L p1,p2 Similarly, take the two points on the left and right sides of the point with a distance of N2 (N2 takes half of N1, which provides an additional condition to more accurately determine whether the current point should be retained and more accurately retain important contour features) to connect, get the distance dist, and then calculate the average distance of all points between p1 and p2 to the line connecting the current point and the center point of the fitting ellipse. Finally, compare the three distances obtained one by one with the set threshold value, if it exceeds the threshold value, filter the current traversal point. Get the preliminary filtered contour point set. In this embodiment, N1 generally takes about 10 points, and N2 generally takes about 5 points, so the distance calculation is reasonable.

[0067] ​​Step 2.3: Traverse the original contour point set obtained in step 1.1, calculate the distance from each point in the point set to the preliminary filtered contour point set, and mark the points whose distance does not exceed the set threshold as missing points and recombine them with the filtered contour. To ensure that the subsequent contour point traversal order is consistent with their position order on the contour, traverse the combined contour, and for each traversed contour point, obtain the direction vector from the contour center to the point by subtracting the contour center from the contour point, and normalize the direction vector using the Euclidean norm to obtain a unit vector. Take the first unit vector as the initial vector and the x positive direction as the standard direction. By calculating the angles between the initial vector and the unit vector of the current traversed contour point and the x positive direction, and then subtracting the two angles, the angle between the direction vector of each contour point and the initial point direction vector can be obtained. Sorting these angles in ascending order can obtain a contour point set with consistent traversal order and position order.

[0068] Step 2.4: As in step 2.2, filter the contour again to ensure that there are no contour points that are too far from the contour center.

[0069] Step 3: According to the contour point set obtained after filtering in step 2, calculate the size of the convex hull, perform ellipse fitting on the convex hull, calculate the average inner and outer diameters and center point, and calculate the average thickness of the filtered contour, the maximum and minimum thickness and their positions.

[0070] Step 3.1: To simplify the contour shape and improve the robustness of the algorithm and accurately calculate the subsequent pipe end size, convert the final filtered contour point set obtained in step 2.4 into a convex hull using the Graham scan method. Use the least squares method to convert the point set saved by the convex hull into a fitted ellipse and obtain the center points of the two fitted ellipses. Calculate the average of the major and minor axes of the fitted ellipses and multiply by the pixel size to obtain the values of the outer and inner diameters.

[0071] Step 3.2: As in step 2.1, obtain the average thickness of the filtered contour points, the maximum and minimum thickness and their positions.

[0072] Step 4: According to the convex hull point set obtained in step 3, draw the positions of the points in the contour point set, and determine whether the contour point distance exceeds the threshold. If it exceeds, it is judged as a burr and drawn.

[0073] Step 4.1: According to the point set saved in the form of convex hull obtained in step 3, draw the contour points contained in the point set to facilitate subsequent confirmation of the position of the burr point.

[0074] Step 4.2: According to the point set saved in the convex hull form obtained in step 3, the large and small contours are traversed respectively, and the ray projection method is used to judge whether the point is inside the contour and the distance of the point to the contour. For the point set of the large contour, it is judged whether the distance of the point outside the contour to the contour exceeds the threshold value, and if the distance exceeds, the point is judged as a burr point and is drawn on the image. For the point set of the small contour, it is judged whether the distance of the point inside the contour to the contour exceeds the threshold value, and if the distance exceeds, the point is judged as a burr point and is drawn on the image.

[0075] Step 5: Calculate the maximum and minimum inner and outer diameters, ellipticity, and draw the maximum and minimum thickness points according to the fitted ellipse obtained in step 3.

[0076] Step 5.1: According to the fitted ellipse obtained in step 3.1, the major axis and minor axis of the large contour fitting ellipse are denoted as a1 and b1 respectively, and the major axis and minor axis of the small contour fitting ellipse are denoted as a2 and b2 respectively. The pixel size is denoted as pix. The contour wall thickness is obtained as follows: Ellipticity = Maximum outer diameter = a1 pix Minimum outer diameter = b1 pix Maximum inner diameter = a2 pix Minimum inner diameter = b2 pix According to the maximum and minimum thickness positions obtained in step 3.2, draw the maximum and minimum thickness points.

[0077] As shown in Figure 3 , Figure 3 each row of the figure, the left figure is the original data, the aperture in the figure is the end face of the steel pipe, and the right figure is the detection result report. The purple points in the report represent the minimum thickness positions, and the yellow points represent the maximum thickness positions. Since the contrast standard is set during detection, the display results are all unqualified. This does not affect the effectiveness of the method of the present embodiment.

[0078] The present embodiment is based on the original image of the pipe end, and adopts a combination of image edge detection and graph theory method to identify the pipe end contour. The position relationship between the contour points and the contour is calculated by a self-developed algorithm to accurately locate the pipe end burr and exclude the influence of the burr on the measured pipe end size. The present method not only solves the problems of insufficient precision and high maintenance cost of manual measurement method, but also improves the sensitivity to burrs and accurately obtains the effective pipe end size.

[0079] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent substitutions for part of the technical features; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A non-contact method of measuring the dimensions of the end face of a steel pipe, characterized by, The method comprises the following steps: Step 1: for the tube end original image, convert to a binary image and detect the contour using a morphological gradient operation to obtain the effective contour points of the tube end and determine whether the contour is approximately circular, and then sort the contour to distinguish the inner and outer contour point sets; Step 2: traverse the original contour points to calculate the average thickness, maximum and minimum thickness and their positions, and then filter the original contour points to obtain a contour point set smaller than a distance threshold; Step 3: according to the contour point set obtained after filtering in step 2, calculate the size of the contour convex hull, perform ellipse fitting on the convex hull to obtain a fitted ellipse, calculate the average inner and outer diameters and the center point, and calculate the average thickness, maximum and minimum thickness and their positions of the filtered contour; Step 4: according to the convex hull point set obtained in step 3, draw the positions of each point in the contour point set, and determine whether the contour point distance exceeds a threshold value, if it exceeds, it is determined as a burr; Step 5: according to the fitted ellipse obtained in step 4, calculate the maximum and minimum inner and outer diameters, ellipticity, and draw the maximum and minimum thickness points; The step 1 comprises the following processes: Step 1.1: first, convert the image to a binary image using an inverse binary method, second, perform a morphological gradient operation to highlight the image edges and retrieve all contours, then remove small noise contours by calculating the area of the contour, find the smallest rectangle surrounding the contour, and select the rectangle with a specific width-height ratio, sort the contour surrounded by the rectangle and select the largest and third largest contours as the outer and inner diameters, respectively, and add them to the effective contour, wherein the resolution of the contour points is the resolution of the original image; Step 1.2: From the two sets of contour points obtained in step 1.1, let m 00, denote the zeroth moment of the contour, which represents the area of the contour, and m 10 and m 01 denote the first moments of the contour about the x-axis and y-axis respectively, which represent the barycentric coordinates of the contour. , ​ Step 1.3: according to the two contour centroid coordinates obtained in step 1.2, calculate the Euclidean distance between the coordinates, determine whether the distance exceeds a threshold value, if it exceeds, return directly, otherwise, sort the two contours to distinguish the inner and outer contour point sets; The step 2 comprises the following processes: Step 2.1: traverse the inner diameter original contour point set obtained in step 1.1, calculate the distance of each point to the outer diameter contour as the thickness, obtain the maximum distance as the maximum thickness and the minimum distance as the minimum thickness, save the maximum and minimum thickness point positions, and calculate the average thickness as the sum of all distances; Step 2.2: Using the least square algorithm to find the best fitted ellipse according to the original contour point set obtained in step 1.1; to filter the contour points far from the center of the contour, traverse the original contour point set, record the coordinates of each current traversal point as p0(x0, y0), take two points on the left and right sides of the point with a distance of N1 as p1(x1, y1) and p2(x2, y2), and calculate the distance dist of the line L connecting p0 and p2 p1,p2 p1,p2 The general equation of the straight line L connecting p1 and p2 is: where A = y1 - y2, B = x2 - x1, C = x1 y2 - y1 x2, the distance dist of each point to the line L connecting p0(x0, y0) and p2 p1,p2 is dist = |Ax + By + C| / sqrt(A2 + B2), similarly, take two points on the left and right sides of the point with a distance of N2 to obtain the distance dist, and then calculate the average distance between all points between p1 and p2 to the line connecting the current point and the center of the fitted ellipse; finally, compare the obtained distances one by one with the set threshold value, if it exceeds the threshold value, filter the current traversal point; obtain the preliminary filtered contour point set;​​ Step 2.3: traverse the original contour point set obtained in step 1.1, calculate the distance of each point in the point set to the preliminary filtered contour point set, and mark the points with a distance less than a set threshold value as missing points and merge them with the filtered contour; to ensure that the subsequent contour point traversal order is consistent with their position order on the contour, traverse the merged contour, for each traversed contour point, subtract the contour center from the contour point to obtain a direction vector from the contour center to the point, normalize the direction vector using the Euclidean norm to obtain a unit vector; take the first unit vector as the initial vector and the x positive direction as the standard direction, calculate the angles between the initial vector and the x positive direction and the current traversed contour point unit vector, and then subtract the two angles to obtain the angle between the direction vector of each contour point and the initial point direction vector, sort the angles in ascending order to obtain the contour point set with consistent traversal and position orders; Step 2.4: Synchronous with step 2.2, filter the contour again to get the filtered contour point set, and make sure that there is no contour point far away from the center of the contour.

2. The non-contact steel pipe end face dimension measurement method according to claim 1, characterized by, The step 3 includes the following processes: Step 3.1: In order to improve the robustness of the contour shape improving algorithm and accurately calculate the size of the subsequent pipe end, according to the final filtered contour point set obtained in step 2.4, the final filtered contour point set is converted into a convex hull by Graham scan method; the point set saved in the convex hull is converted into a fitted ellipse by using the least square method, and two center points of the fitted ellipse are obtained, and the average of the major and minor axes of the fitted ellipse of the large and small contours is calculated to obtain the values of the outer diameter and the inner diameter multiplied by the pixel size; Step 3.2: Synchronous with step 2.1, the average thickness, maximum and minimum thickness and their positions of the filtered contour points are obtained.

3. The non-contact steel pipe end face dimension measurement method according to claim 2, characterized by, The step 4 includes the following processes: Step 4.1: According to the point set saved in the convex hull obtained in step 3, the contour points contained in the point set are drawn in order to confirm the position of the burr point in the subsequent; Step 4.2: According to the point set saved in the convex hull obtained in step 3, the large and small contours are traversed respectively, and whether the point is inside the contour and the distance from the point to the contour are judged by the ray projection method; for the large contour point set, whether the distance from the point outside the contour to the contour exceeds the threshold value is judged, if the distance exceeds, the point is judged as a burr point and is drawn on the image; for the small contour point set, whether the distance from the point inside the contour to the contour exceeds the threshold value is judged, if the distance exceeds, the point is judged as a burr point and is drawn on the image.

4. The non-contact steel pipe end face dimension measurement method according to any one of claims 1 to 3, characterized by, The step 5 includes the following processes: According to the fitting ellipse obtained in step 3.1, the long axis and the short axis of the large profile fitting ellipse are respectively denoted as a1 and b1, the long axis and the short axis of the small profile fitting ellipse are respectively denoted as a2 and b2, and the pixel size is denoted as pix, the profile wall thickness is obtained as follows: , the ellipticity is , the maximum outer diameter is a1 pix, the minimum outer diameter is b1 pix, the maximum inner diameter is a2 pix, the minimum inner diameter is b2 pix; according to the maximum and minimum thickness positions obtained in step 3.2, the maximum and minimum thickness points are drawn.

5. A non-contact steel pipe end face dimension measuring system characterized by, It includes: Binaryzation module: for the original image of the pipe end, it is converted into a binary image and the contour is detected by using morphological gradient operation to obtain the effective contour points of the pipe end and judge whether the contour is approximately circular, and then the contour is sorted to distinguish the inner and outer contour point sets; Filtering module: the average thickness, maximum and minimum thickness and their positions are calculated by traversing the original contour points, and the original contour points are filtered to obtain the contour point set smaller than the distance threshold value; Convex hull calculation module: according to the contour point set obtained after filtering, the convex hulls of the large and small contours are calculated, the convex hulls are fitted into ellipses to obtain the fitted ellipses; the average inner and outer diameters and the center points are calculated, and the average thickness, maximum and minimum thickness and their positions of the filtered contour are calculated; Burr judgment module: according to the convex hull point set obtained, the positions of each point in the contour point set are drawn, whether the distance from the contour point to the contour exceeds the threshold value is judged, if it exceeds, it is judged as a burr; Thickness calculation module: the maximum and minimum inner and outer diameters, ellipticity are calculated according to the fitted ellipse, and the maximum and minimum thickness points are drawn; The binaryzation module includes the following processes: Step 1.1: first, the image is converted into a binary image by using the inverse binaryzation method, second, the morphological gradient operation is performed to highlight the image edge and retrieve all contours, then the small noise contours are removed by calculating the area of the contour, and the smallest rectangle surrounding the contour is found, and the rectangle with a specific width-height ratio is selected, the contour surrounded by the rectangle is sorted and the largest and third largest contours are selected as the outer diameter and inner diameter contours respectively and added to the effective contour, wherein the resolution of the contour point is the original image resolution; Step 1.2: From the two sets of contour points obtained in step 1.1, let m 00, denote the zeroth moment of the contour, and m 10 and m 01 denote the first moments of the contour along the x-axis and y-axis respectively, and let (x , ) denote the centroid of the contour. Step 1.3: According to the two contour centroid coordinates obtained in step 1.2, the Euclidean distance between the coordinates is calculated to determine whether the distance exceeds the threshold value, and if it does, it is returned directly, otherwise the two contours are sorted to distinguish the inner and outer contour point sets; The filtering module includes the following processes: Step 2.1: Traverse the inner diameter original contour point set obtained in step 1.1, calculate the distance of each point to the outer diameter contour, and save it as thickness, get the maximum distance as the maximum thickness, the minimum distance as the minimum thickness and save the maximum and minimum thickness point positions, and calculate the average of the sum of all distances as the average thickness; Step 2.2: Based on the original contour point set obtained in Step 1.1, use the least squares algorithm to find the best-fit ellipse; to filter out contour points that are too far from the contour center, traverse the original contour point set, and denote the coordinates of each currently traversed point as p0(x0, y0). Take two points on the left and right sides of this point, which are N1 points away, and denote them as p1(x1, y1) and p2(x2, y2) respectively. Calculate the line L connecting point p0 to p1 and p2. p1,p2 The distance dist, L p1,p2 The general form of the equation of a straight line is: Where A = y1 - y2, B = x2 - x1, C = x1 y2-y1 x2, each point to p0(x0, y0) to line L p1,p2 distance dist= Similarly, connect two points that are N2 points away from each other on the left and right sides to obtain the distance. Then calculate the average distance between all points between p1 and p2 and the current point and the center point of the fitted ellipse. Finally, compare the obtained distances with the set threshold one by one. If the threshold is exceeded, the current traversed point is filtered out. A preliminary set of filtered contour points is obtained. Step 2.3: Traverse the original contour point set obtained in step 1.1, calculate the distance of each point in the point set to the preliminary filtered contour point set, and mark the points whose distance does not exceed the set threshold as missing points and merge them with the filtered contour. To ensure that the subsequent contour point traversal order is consistent with their position order on the contour, traverse the merged contour, and for each traversed contour point, subtract the contour center to obtain the direction vector from the contour center to the point, and normalize the direction vector using the Euclidean norm to obtain the unit vector. Take the first unit vector as the initial vector and the x positive direction as the standard direction, calculate the angles between the initial vector and the unit vector of the current traversed contour point and the x positive direction respectively, and then subtract the two angles to obtain the angle between the direction vector of each contour point and the initial point direction vector. Sort the angles in ascending order to obtain the contour point set with consistent traversal order and position order; Step 2.4: Step 2.2, filter the contour again to obtain the filtered contour point set, ensuring that there are no contour points that are too far from the contour center.

6. The non-contact steel pipe end face dimension measurement system of claim 5, wherein, The convex hull calculation module includes the following processes: Step 3.1: To simplify the contour shape and improve the robustness of the algorithm and accurately calculate the subsequent pipe end size, convert the final filtered contour point set obtained in step 2.4 into a convex hull using the Graham scan method; use the least squares method to convert the point set saved in the convex hull into a fitted ellipse and obtain the center points of the two fitted ellipses, and calculate the average of the major and minor axes of the fitted ellipses of the large and small contours respectively and multiply by the pixel size to obtain the values of the outer diameter and the inner diameter; Step 3.2: Step 2.1, obtain the average thickness of the filtered contour points, the maximum and minimum thickness and their positions.

7. The non-contact steel pipe end face size measurement system according to claim 6, characterized in that, The burr judgment module includes the following processes: Step 4.1: According to the point set saved in the convex hull obtained in step 3, draw the contour points contained in the point set to confirm the position of the burr point later; Step 4.2: According to the point set saved in the convex hull obtained in step 3, traverse the large and small contours respectively, and determine whether the points are inside the contour and the distance of the points to the contour by the ray projection method; for the large contour point set, determine whether the distance of the points outside the contour to the contour exceeds the threshold value, and if it does, determine that it is a burr point and draw it on the image; for the small contour point set, determine whether the distance of the points inside the contour to the contour exceeds the threshold value, and if it does, determine that it is a burr point and draw it on the image.

8. The non-contact steel pipe end size measurement system of claim 6, wherein, the thickness calculation module includes the following processes: According to the fitting ellipse obtained in step 3.1, the long axis and the short axis of the large profile fitting ellipse are respectively denoted as a1 and b1, the long axis and the short axis of the small profile fitting ellipse are respectively denoted as a2 and b2, and the pixel size is denoted as pix, the profile wall thickness is obtained as follows: , the ellipticity is , the maximum outer diameter is a1 pix, the minimum outer diameter is b1 pix, the maximum inner diameter is a2 pix, the minimum inner diameter is b2 pix; according to the maximum and minimum thickness positions obtained in step 3.2, the maximum and minimum thickness points are drawn.

Citation Information

Patent Citations

  • Method for processing size and image of pipe end of non-contact measuring steel pipe

    CN102141380A

  • Non-contact steel pipe end face size measuring device

    CN120351844A