Non-contact steel pipe end face size measuring device
By using a non-contact measuring device and employing image edge detection and graphics methods to identify the contour of the steel pipe end face, the instability and damage problems of traditional contact measurement are solved, achieving non-destructive and accurate measurement of the steel pipe end face dimensions.
Patent Information
- Application Number
- CN202510434493.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2026-03-03
- Estimated Expiration
- 2045-04-08
AI Technical Summary
Traditional contact-based steel pipe end face measurement methods are easily affected by the operator's subjective factors, cannot eliminate the influence of burrs, and may damage the steel pipe.
A non-contact measuring device is used to capture images of the steel pipe end face using a camera. Image edge detection and graphics methods are combined with a self-developed algorithm to identify the pipe end contour, eliminate the influence of burrs, and calculate the steel pipe end face dimensions.
It achieves non-destructive measurement, accurately eliminates the influence of burrs, and improves measurement accuracy and stability.
Smart Images

Figure CN120351844B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of steel pipe production and testing equipment technology, specifically to a non-contact steel pipe end face dimension measuring device. Background Technology
[0002] In modern manufacturing, steel pipes, as an important basic material, are widely used in construction, transportation, energy, and many other fields. With technological advancements and ever-increasing industrial demands, the requirements for the quality and precision of steel pipes are becoming increasingly stringent. The end face dimensions of steel pipes are a crucial factor affecting their connection performance, sealing properties, and overall structural strength; therefore, accurately measuring the end face dimensions of steel pipes is of paramount importance.
[0003] Traditional methods for measuring the end face dimensions of steel pipes often employ contact measuring tools such as calipers and micrometers. While these methods can meet measurement needs to a certain extent, they have several limitations. First, contact measurements are easily affected by the operator's subjective factors and cannot eliminate the influence of burrs on the results, leading to instability in the measurement outcomes. Second, contact measurements may cause damage to the object being measured during the process, especially in high-precision applications, potentially affecting the performance of the steel pipe. Summary of the Invention
[0004] The technical problem to be solved by this invention is how to prevent damage during the detection process and eliminate the influence of burrs.
[0005] The present invention solves the above-mentioned technical problems through the following technical means:
[0006] A non-contact steel pipe end face dimension measuring device includes an equipment box, a lifting mechanism, a camera, a sensor, and a data processing module. The lifting mechanism is installed inside the equipment box, and a camera is installed at the lifting end of the lifting mechanism. The equipment box is provided with a shooting port for the camera to take pictures. A sensor is installed outside the equipment box. Both the camera and the sensor are electrically connected to the data processing module outside the equipment box.
[0007] The data processing module includes a binarization module, a filtering module, a convex hull calculation module, a burr detection module, and a thickness calculation module.
[0008] Binarization module: Converts the original image of the tube end captured by the camera into a binary image and uses morphological gradient operation to detect the contour, obtain the effective contour points of the tube end, and determine whether the contour is approximately a circle. Then, sorts the contours to distinguish the inner and outer contour point sets.
[0009] Filtering module: Iterate through 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 set of contour points that are less than the distance threshold;
[0010] Convex Hull Calculation Module: Based on the filtered contour point set, calculate the convex hull of the large and small contours, perform ellipse fitting on the convex hull to obtain the fitted ellipse; calculate the average inner and outer diameters and center point, and calculate the average thickness, maximum and minimum thickness and their positions of the filtered contour.
[0011] Burr detection module: Based on the obtained convex hull point set, draw the position of each point in the contour point set, and determine whether the distance from the contour point to the contour exceeds the threshold. If it does, it is judged as a burr.
[0012] Thickness calculation module: Calculates the maximum and minimum inner and outer diameters and ellipticity based on the obtained fitted ellipse, and plots the maximum and minimum thickness points.
[0013] This invention does not require physical contact with the steel pipe. It simply involves capturing a raw image of the pipe end with a camera and sending it to a data processing module. Using a combination of image edge detection and computer graphics methods, the module identifies the pipe end contour. A self-developed algorithm calculates the positional relationship between contour points and the contour itself, accurately locating burrs and eliminating their influence on the measured pipe end dimensions. This invention not only prevents damage to the steel pipe during inspection but also eliminates the impact of burrs on the measured pipe end dimensions.
[0014] Preferably, the binarization module includes the following process:
[0015] Step 1.1: First, the image is converted into a binary image using the debinarization method. Then, morphological gradient operation is performed to highlight the image edges and retrieve all contours. Next, small noisy contours are removed by calculating the area of the contours and the rectangle with the smallest area surrounding the contour is found. Then, rectangles with a specific aspect ratio are selected. The contours surrounded by the rectangle are sorted and the largest and third largest contours are selected as the outer and inner diameter contours and added to the effective contours. The resolution of the contour points is the original image resolution.
[0016] Step 1.2: Based on the two contour point sets obtained in Step 1.1, let m be the zeroth moment of the contour. 00, The area of the contour is represented by m, and the first moments of the contour on the x-axis and y-axis are m respectively. 10 and m 01 The centroid coordinates of the contour are
[0017] Step 1.3: Based on the centroid coordinates of the two contours obtained in Step 1.2, calculate the Euclidean distance between the coordinates and determine 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.
[0018] Preferably, the filtering module includes the following processes:
[0019] Step 2.1: Traverse the original inner diameter contour point set obtained in Step 1.1, calculate the distance from each point to the outer diameter contour and save it as the thickness. The maximum distance is the maximum thickness and the minimum distance is the minimum thickness. Save the positions of the maximum and minimum thickness points. Calculate the average of the sum of all distances as the average thickness.
[0020] 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 distance dist, L p1,p2 The general form of the equation of the straight line is: Ax + Bz + C = 0, where A = y1 - y2, B = x2 - x1, C = x1*y2 - y1*x2, and the distance from each point to p0(x0, y0) is equal to the distance from the point to the line L. p1,p2 distance 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.
[0021] 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 record the points whose distance does not exceed the set threshold as missing points and re-merge them with the filtered contours; to ensure that the traversal order of the subsequent contour points is consistent with their position order on the contours, traverse the merged contours, and for each traversed contour point, obtain the direction vector from the contour center to the point by subtracting the contour point from the contour center. Normalize the direction vector using the Euclidean norm to obtain the unit vector; take the first unit vector as the initial vector and the positive x-direction as the standard direction, calculate the angle between the initial vector and the unit vector of the currently traversed contour point and the positive x-direction, and then subtract the two angles to obtain the angle between the direction vector of each contour point and the direction vector of the initial point. Sort these angles in ascending order to obtain the contour point set whose traversal order is consistent with the position order.
[0022] Step 2.4: Same as step 2.2, filter the contours again to obtain the set of filtered contour points, ensuring that there are no contour points that are too far from the center of the contour.
[0023] Preferably, the convex hull calculation module includes the following process:
[0024] Step 3.1: To simplify the contour shape, improve the robustness of the algorithm, and accurately calculate the subsequent pipe end dimensions, based on the final filtered contour point set obtained in Step 2.4, the final filtered contour point set is converted into a convex hull for storage using the Graham scan method; the point set stored in the convex hull is converted into a fitted ellipse using the least squares method, and the center points of the two fitted ellipses are obtained. The average of the major and minor axes of the fitted ellipses of the large and small contours is calculated and multiplied by the pixel size to obtain the values of the outer diameter and inner diameter.
[0025] Step 3.2: Same as step 2.1, obtain the average thickness, maximum and minimum thickness and position of the filtered contour points;
[0026] Preferably, the burr detection module includes the following process:
[0027] Step 4.1: Based on the point set saved in convex hull form obtained in Step 3, draw the contour points contained in the point set so as to confirm the location of the burr points later.
[0028] Step 4.2: Based on the point set stored in convex hull form obtained in Step 3, traverse both the large and small contours respectively, and determine whether a point is inside the contour and the distance from the point to the contour 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 a threshold. If the distance exceeds the threshold, it is identified as a burr point and drawn on the image; for the small contour point set, determine whether the distance from the point inside the contour to the contour exceeds a threshold. If the distance exceeds the threshold, it is identified as a burr point and drawn on the image.
[0029] Preferably, the thickness calculation module includes the following process:
[0030] Based on the fitted ellipse obtained in step 3.1, the major axis and the broken axis of the large-profile fitted ellipse are denoted as a1 and b1, respectively, and the major axis and the broken axis of the small-profile fitted ellipse are denoted as a2 and b2, respectively. The pixel size is denoted as pix. Maximum outer diameter = a1*pix, minimum outer diameter = b1*pix, maximum inner diameter = a2*pix, minimum inner diameter = b2*pix. Based on the maximum and minimum thickness positions obtained in step 3.2, draw the maximum and minimum thickness points.
[0031] Preferably, the lifting mechanism includes a drive mechanism, a worm gear transmission assembly, and a fixed base. The drive mechanism is fixed inside the equipment housing, and the output end of the drive mechanism is connected to the fixed base through the worm gear transmission assembly. The camera is fixed on the fixed base, and the drive mechanism drives the fixed base to move up and down through the worm gear transmission assembly.
[0032] Preferably, the lifting mechanism further includes a guide rod and a guide seat inside the equipment box. One end of the guide rod is vertically fixed to the bottom of the fixed seat, and the other end passes through the guide seat and can slide vertically on the guide seat.
[0033] The advantages of this invention are:
[0034] This invention does not require physical contact with the steel pipe. It simply involves capturing a raw image of the pipe end with a camera and sending it to a data processing module. Using a combination of image edge detection and computer graphics methods, the module identifies the pipe end contour. A self-developed algorithm calculates the positional relationship between contour points and the contour itself, accurately locating burrs and eliminating their influence on the measured pipe end dimensions. This invention not only prevents damage to the steel pipe during inspection but also eliminates the impact of burrs on the measured pipe end dimensions. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the structure of an embodiment of the present invention;
[0036] Figure 2 This is a partial structural diagram of an embodiment of the present invention;
[0037] Figure 3 This is a flowchart of an embodiment of the present invention;
[0038] Figure 4 This is an enlarged view of the outer diameter profile in an embodiment of the present invention;
[0039] Figure 5 The original data and detection result diagrams are used in the embodiments of the present invention. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0041] See Figure 1 and Figure 2 The present invention provides a non-contact steel pipe end face dimension measuring device, including an equipment box 1, a lifting mechanism 2, a camera 3, a sensor 4 and a data processing module (not shown in the figure). The lifting mechanism 2 is installed inside the equipment box 1, and the camera 3 is installed at the lifting end of the lifting mechanism 2. The equipment box 1 is provided with a shooting port for the camera 3 to take pictures. The sensor 4 is installed outside the equipment box 1. Both the camera 3 and the sensor 4 are electrically connected to the data processing module outside the equipment box 1.
[0042] The lifting mechanism 2 includes a drive mechanism 21, a worm gear transmission assembly 22, a fixed base 23, and a guide rod 24. The drive mechanism 21 is fixed inside the equipment box 1. The output end of the drive mechanism 21 is connected to the fixed base 23 through the worm gear transmission assembly 22. The camera 3 is fixed on the fixed base 23. The drive mechanism 21 drives the fixed base 23 to move up and down through the worm gear transmission assembly 22. Inside the equipment box 1, there is a guide seat 11. One end of the guide rod 24 is vertically fixed to the bottom of the four corners of the fixed base 23, and the other end passes through the guide seat 11 and can slide vertically on the guide seat 11.
[0043] Specifically, the steel pipe is conveyed to the equipment box 1 until the sensor 4 senses it and stops conveying. Then, the lifting mechanism 2 is driven to move the camera 3 vertically until the center of the camera 3 is aligned with the center of the steel pipe and stops lifting. Then, the camera 3 takes a picture of the end of the steel pipe and sends the original image of the end of the pipe to the data processing module.
[0044] The data processing module includes a binarization module, a filtering module, a convex hull calculation module, a burr detection module, and a thickness calculation module. For example... Figure 3 The specific process of the data processing module shown is as follows:
[0045] The binarization module converts the original image of the pipe end captured by camera 3 into a binary image and uses morphological gradient operations to detect contours, obtain valid contour points of the pipe end, and determine whether the contour is approximately a circle. Then, the contours are sorted to distinguish the inner and outer contour point sets. Specifically, the binarization module includes the following processes:
[0046] Step 1.1: First, the image is converted to a binary image using debinarization. Next, morphological gradient operations are performed to highlight image edges and retrieve all contours. Then, small noisy contours are removed by calculating the area of the contours, and the rectangle with the smallest area surrounding each contour is found and filtered to select rectangles with a specific aspect ratio. The contours enclosed by these rectangles are sorted, and the largest and third largest contours are selected as the outer and inner diameter contours and added to the valid contours. The resolution of the contour points is the same as the original image resolution. It should be noted that the outer and inner diameter pixel contours of the steel pipe end face each have two layers; the outermost outer diameter contour and the outermost inner diameter contour are used, hence the largest and third largest contours. Figure 4 The image shown is an enlarged view of the outer diameter profile.
[0047] Step 1.2: Based on the two contour point sets obtained in Step 1.1, let m be the zeroth moment of the contour. 00, The area of the contour is represented by m, and the first moments of the contour on the x-axis and y-axis are m respectively. 10 and m 01 The centroid coordinates of the contour are
[0048] Step 1.3: Based on the centroid coordinates of the two contours obtained in Step 1.2, calculate the Euclidean distance between the coordinates and determine 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.
[0049] The filtering module iterates through the original contour points to calculate the average thickness, maximum and minimum thickness, and their positions, and then filters the original contour points to obtain a set of contour points that are less than a distance threshold. Specifically, the filtering module includes the following process:
[0050] Step 2.1: Traverse the original inner diameter contour point set obtained in Step 1.1, calculate the distance from each point to the outer diameter contour and save it as the thickness. The maximum distance is the maximum thickness and the minimum distance is the minimum thickness. Save the positions of the maximum and minimum thickness points. Calculate the average of the sum of all distances as the average thickness.
[0051] 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 distance dist, L p1,p2 The general form of the equation of the straight line is: Ax + Bz + C = 0, where A = y1 - y2, B = x2 - x1, C = x1*y2 - y1*x2, and the distance from each point to p0(x0, y0) is equal to the distance from the point to the line L. p1,p2 distance 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.
[0052] 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 record the points whose distance does not exceed the set threshold as missing points and re-merge them with the filtered contours; to ensure that the traversal order of the subsequent contour points is consistent with their position order on the contours, traverse the merged contours, and for each traversed contour point, obtain the direction vector from the contour center to the point by subtracting the contour point from the contour center. Normalize the direction vector using the Euclidean norm to obtain the unit vector; take the first unit vector as the initial vector and the positive x-direction as the standard direction, calculate the angle between the initial vector and the unit vector of the currently traversed contour point and the positive x-direction, and then subtract the two angles to obtain the angle between the direction vector of each contour point and the direction vector of the initial point. Sort these angles in ascending order to obtain the contour point set whose traversal order is consistent with the position order.
[0053] Step 2.4: Same as step 2.2, filter the contours again to obtain the set of filtered contour points, ensuring that there are no contour points that are too far from the center of the contour.
[0054] The convex hull calculation module calculates the convex hull of the large and small contours based on the filtered contour point set, performs ellipse fitting on the convex hull to obtain the fitted ellipse, calculates the average inner and outer diameters and the center point, and calculates the average thickness, maximum and minimum thickness and their positions of the filtered contour; specifically, the convex hull calculation module includes the following processes:
[0055] Step 3.1: To simplify the contour shape, improve the robustness of the algorithm, and accurately calculate the subsequent pipe end dimensions, based on the final filtered contour point set obtained in Step 2.4, the final filtered contour point set is converted into a convex hull for storage using the Graham scan method; the point set stored in the convex hull is converted into a fitted ellipse using the least squares method, and the center points of the two fitted ellipses are obtained. The average of the major and minor axes of the fitted ellipses of the large and small contours is calculated and multiplied by the pixel size to obtain the values of the outer diameter and inner diameter.
[0056] Step 3.2: Same as step 2.1, obtain the average thickness, maximum and minimum thickness and position of the filtered contour points.
[0057] The burr detection module draws the positions of each point in the contour point set based on the obtained convex hull point set, and determines whether the distance from the contour point to the contour exceeds a threshold. If it does, it is determined to be a burr. Specifically, the burr detection module includes the following process:
[0058] Step 4.1: Based on the point set saved in convex hull form obtained in Step 3, draw the contour points contained in the point set so as to confirm the location of the burr points later.
[0059] Step 4.2: Based on the point set stored in convex hull form obtained in Step 3, traverse both the large and small contours respectively, and determine whether a point is inside the contour and the distance from the point to the contour 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 a threshold. If the distance exceeds the threshold, it is judged as a burr point and drawn on the image; for the small contour point set, determine whether the distance from the point inside the contour to the contour exceeds a threshold. If the distance exceeds the threshold, it is judged as a burr point and drawn on the image.
[0060] The thickness calculation module calculates the maximum and minimum inner and outer diameters and ellipticity based on the obtained fitted ellipse, and plots the maximum and minimum thickness points; specifically, the thickness calculation module includes the following processes:
[0061] Based on the fitted ellipse obtained in step 3.1, the major axis and the broken axis of the large-profile fitted ellipse are denoted as a1 and b1, respectively, and the major axis and the broken axis of the small-profile fitted ellipse are denoted as a2 and b2, respectively. The pixel size is denoted as pix. Maximum outer diameter = a1*pix, minimum outer diameter = b1*pix, maximum inner diameter = a2*pix, minimum inner diameter = b2*pix. Based on the maximum and minimum thickness positions obtained in step 3.2, draw the maximum and minimum thickness points.
[0062] like Figure 5 As shown, Figure 5 In each row of images, the left image shows the original data, with the aperture representing the end face of the steel pipe. The right image shows the test result report, where purple dots represent the minimum thickness location and yellow dots represent the maximum thickness location. Since no comparison standard was set during the test, all displayed results are unqualified. This does not affect the effectiveness of the method in this embodiment.
[0063] This embodiment does not require physical contact with the steel pipe. It only requires camera 3 to capture the original image of the pipe end and send it to the data processing module. A combination of image edge detection and computer graphics methods is used to identify the pipe end contour. A self-developed algorithm calculates the positional relationship between contour points and the contour, accurately locating burrs on the pipe end and eliminating their influence on the measured pipe end dimensions. This invention not only prevents damage to the steel pipe during inspection but also eliminates the influence of burrs on the measured pipe end dimensions.
[0064] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A non-contact steel pipe end face dimension measuring device, characterized in that, The device includes a housing, a lifting mechanism, a camera, a sensor, and a data processing module. The lifting mechanism is installed inside the housing, and a camera is installed at the lifting end of the lifting mechanism. The housing has a shooting port for the camera to take pictures. A sensor is installed outside the housing. Both the camera and the sensor are electrically connected to the data processing module outside the housing. The data processing module includes a binarization module, a filtering module, a convex hull calculation module, a burr detection module, and a thickness calculation module. Binarization module: Converts the original image of the tube end captured by the camera into a binary image and uses morphological gradient operation to detect the contour, obtain the effective contour points of the tube end, and determine whether the contour is approximately a circle. Then, sorts the contours to distinguish the inner and outer contour point sets. Filtering module: Iterate through 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 set of contour points that are less than the distance threshold; Convex Hull Calculation Module: Based on the filtered contour point set, calculate the convex hull of the large and small contours, perform ellipse fitting on the convex hull to obtain the fitted ellipse; calculate the average inner and outer diameters and center point, and calculate the average thickness, maximum and minimum thickness and their positions of the filtered contour. Burr detection module: Based on the obtained convex hull point set, draw the position of each point in the contour point set, and determine whether the distance from the contour point to the contour exceeds the threshold. If it does, it is judged as a burr. Thickness calculation module: Calculates the maximum and minimum inner and outer diameters and ellipticity based on the obtained fitted ellipse, and plots the maximum and minimum thickness points; The binarization module includes the following processes: Step 1.1: First, the image is converted into a binary image using the debinarization method. Then, morphological gradient operation is performed to highlight the image edges and retrieve all contours. Next, small noisy contours are removed by calculating the area of the contours, and the rectangle with the smallest area surrounding the contour is found and then a rectangle with a specific aspect ratio is selected. The contours surrounded by this rectangle are sorted, and the largest and third largest contours are selected as the outer and inner diameter contours, respectively, and added to the effective contours. The resolution of the contour points is the resolution of the original image. Step 1.2: Based on the two contour point sets obtained in Step 1.1, let m be the zeroth moment of the contour. 00, The area of the contour is represented by m, and the first moments of the contour on the x-axis and y-axis are m respectively. 10 and m 01 The centroid coordinates of the profile are ( , ); Step 1.3: Based on the centroid coordinates of the two contours obtained in Step 1.2, calculate the Euclidean distance between the coordinates and determine 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. The filtering module includes the following processes: Step 2.1: Traverse the original inner diameter contour point set obtained in Step 1.1, calculate the distance from each point to the outer diameter contour and save it as the thickness. The maximum distance is the maximum thickness and the minimum distance is the minimum thickness. Save the positions of the maximum and minimum thickness points. 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 record the points whose distance does not exceed the set threshold as missing points and re-merge them with the filtered contours; to ensure that the traversal order of the subsequent contour points is consistent with their position order on the contours, traverse the merged contours, and for each traversed contour point, obtain the direction vector from the contour center to the point by subtracting the contour point from the contour center. Normalize the direction vector using the Euclidean norm to obtain the unit vector; take the first unit vector as the initial vector and the positive x-direction as the standard direction, calculate the angle between the initial vector and the unit vector of the currently traversed contour point and the positive x-direction, and then subtract the two angles to obtain the angle between the direction vector of each contour point and the direction vector of the initial point. Sort these angles in ascending order to obtain the contour point set whose traversal order is consistent with the position order. Step 2.4: Same as step 2.2, filter the contours again to obtain the set of filtered contour points, ensuring that there are no contour points that are too far from the center of the contour.
2. The non-contact steel pipe end face dimension measuring device according to claim 1, characterized in that, The convex hull calculation module includes the following process: Step 3.1: To simplify the contour shape, improve the robustness of the algorithm, and accurately calculate the subsequent pipe end dimensions, based on the final filtered contour point set obtained in Step 2.4, the final filtered contour point set is converted into a convex hull for storage using the Graham scan method; the point set stored in the convex hull is converted into a fitted ellipse using the least squares method, and the center points of the two fitted ellipses are obtained. The average of the major and minor axes of the fitted ellipses of the large and small contours is calculated and multiplied by the pixel size to obtain the values of the outer diameter and inner diameter. Step 3.2: Same as step 2.1, obtain the average thickness, maximum and minimum thickness and position of the filtered contour points.
3. The non-contact steel pipe end face dimension measuring device according to claim 2, characterized in that, The burr detection module includes the following process: Step 4.1: Based on the point set saved in convex hull form obtained in Step 3, draw the contour points contained in the point set so as to confirm the location of the burr points later. Step 4.2: Based on the point set stored in convex hull form obtained in Step 3, traverse both the large and small contours respectively, and determine whether a point is inside the contour and the distance from the point to the contour 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 a threshold. If the distance exceeds the threshold, it is judged as a burr point and drawn on the image; for the small contour point set, determine whether the distance from the point inside the contour to the contour exceeds a threshold. If the distance exceeds the threshold, it is judged as a burr point and drawn on the image.
4. The non-contact steel pipe end face dimension measuring device according to claim 2, characterized in that, The thickness calculation module includes the following process: Based on the fitted ellipse obtained in step 3.1, the major axis and partial axis of the large-profile fitted ellipse are denoted as a1 and b1, respectively, and the major axis and partial axis of the small-profile fitted ellipse are denoted as a2 and b2, respectively. The pixel size is denoted as pix. The contour wall thickness is then obtained as follows: Ellipticity = Maximum outer diameter = a1 pix, minimum outer diameter = b1 pix, maximum inner diameter = a2 pix, minimum inner diameter = b2 pix, based on the maximum and minimum thickness positions obtained in step 3.2, draw the maximum and minimum thickness points.
5. The non-contact steel pipe end face dimension measuring device according to claim 1, characterized in that, The lifting mechanism includes a drive mechanism, a worm gear transmission assembly, and a fixed base. The drive mechanism is fixed inside the equipment box. The output end of the drive mechanism is connected to the fixed base through the worm gear transmission assembly. The camera is fixed on the fixed base. The drive mechanism drives the fixed base to move up and down through the worm gear transmission assembly.
6. The non-contact steel pipe end face dimension measuring device according to claim 5, characterized in that, The lifting mechanism also includes a guide rod and an internal guide seat in the equipment box. One end of the guide rod is vertically fixed to the bottom of the fixed seat, and the other end passes through the guide seat and can slide vertically on the guide seat.
Citation Information
Patent Citations
Non-contact steel pipe end face size measuring method and system
CN120351860A