A method for detecting welding position of axle workpiece
Through the combination of 2D cameras and 3D scanning equipment, efficient and accurate detection of the welding position of the axle workpiece is achieved, and the problems of low detection efficiency and poor accuracy in the prior art are solved, and the consistency and standardization of the detection are improved.
Patent Information
- Application Number
- CN202510827461.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2045-06-20
AI Technical Summary
In the prior art, the welding position detection efficiency of axle workpieces is low and depends on manual experience. The detection accuracy and consistency are poor, and the quality requirements cannot be met.
The bridge packet image of the template axle is taken by a 2D camera for edge detection, combined with Hough transformed circle detection, and obtained precise bridge packet circles, combined with 3D scanning equipment to obtain feature information of the workpiece, and realized precise position detection of the workpiece relative to the center of the circle through feature point matching.
It improves detection efficiency, improves detection accuracy and consistency, reduces dependence on manual experience, and ensures consistency of detection standards.
Smart Images

Figure CN120333303B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of workpiece welding position detection, and in particular relates to a method for detecting the welding position of an axle workpiece. Background Art
[0002] The welded parts on axles can deviate from the intended weld position due to assembly errors or heat-induced deformation during welding. This deviation can negatively impact axle quality, necessitating weld position inspection. Existing inspection methods typically rely on manual labor, resulting in low efficiency and poor accuracy, which relies heavily on manual experience and lacks consistency, failing to meet requirements. Summary of the Invention
[0003] The purpose of the present invention is to provide a method for detecting the welding position of an axle workpiece, which can improve the detection efficiency and detection accuracy.
[0004] The present invention is achieved through the following technical solutions:
[0005] A method for detecting the welding position of an axle workpiece comprises the following steps:
[0006] Step S1: Use a 2D camera to shoot the bridge package of the template bridge to obtain the bridge package image, perform edge detection on the bridge package image to obtain edge information, use the edge information to perform Hough transform circle detection to obtain the initial bridge package circle, and evenly subdivide the initial bridge package circle to obtain n subdivision points, respectively obtain the bridge bag image with each subdivision point as the center and along the direction of the line connecting the subdivision point and the center of the initial bridge bag circle m data points and obtain the m The jump position of the jump in the data array composed of data points is used n Perform Hough transform circle detection on each jump position to obtain the accurate bridge enclosing circle;
[0007] Step S2: for each workpiece welded on the template axle bridge package, obtain the position of the workpiece, use a 3D scanning device to scan the workpiece position as the center to a set length to obtain workpiece scanning data, manually select feature points from the workpiece scanning data, and select several line data up and down with the feature point as a reference point in the workpiece scanning data, respectively search for jump platforms in each line data, and take the position of the starting position and the end position of each jump platform that is within the distance threshold and closer to the feature point as the feature position, and record each feature position and the jump mode and jump height corresponding to the feature position as a feature information, and combine the normalized data of each feature position with the center of the precise bridge package circle to obtain the precise position of the workpiece relative to the center of the circle;
[0008] Step S3: During the inspection, according to the precise position of the workpiece relative to the center of the circle obtained in step S2, the 3D scanning equipment is adjusted with the center of the precise bridge package circle as the reference, so that it is centered on each inspection workpiece of the axle welding to be inspected, and the set length is scanned left and right to obtain the inspection workpiece scanning data. The characteristic information of each inspection workpiece is obtained according to step S2. If the characteristic information of a certain inspection workpiece can match one of the characteristic information recorded in step S2, the welding position of the inspection workpiece is determined to be qualified.
[0009] Furthermore, in step S1, before obtaining the bridge envelope image, the bridge envelope circle diameter of the template axle is obtained according to the CAD file of the template axle, and the bridge envelope circle diameter is converted into pixel diameter information.
[0010] Furthermore, in the step S1, after obtaining the bridge bag image, the bridge bag image is subjected to adaptive histogram equalization and filtering to obtain a preprocessed image, and edge detection is performed on the preprocessed image to obtain the edge information.
[0011] Furthermore, in step S1, the initial bridge encircle is uniformly subdivided by 1° to obtain 360 subdivision points, and the bridge encircle image is obtained with the subdivision point as the center and along the direction close to the center of the initial bridge encircle. m / 2 data points and the direction away from the center of the initial bridge circle m / 2 data points, search for the jump platform in the data array in a direction away from the center of the initial bridge circle, and record the starting end position of the jump platform as the jump position.
[0012] Furthermore, in step S2, the position of each workpiece is obtained according to the CAD file of the template axle.
[0013] Furthermore, in step S2, when searching for a jump platform in the line data, if i +1 The depth of the data and i The difference in depth information of the data is greater than the set depth threshold, i Several consecutive data before the data are consistent with the first i The difference between the depth information of the data is less than the set depth threshold, and the i When the sum of the distances between a data and several consecutive data before it is greater than the set length threshold, it is determined that a jump occurs. The jump mode includes depth rise and depth drop. The jump platform includes the data between the depth rise point and the depth drop point. The jump height is the difference between the average depth information of the data in two adjacent jump platforms.
[0014] Furthermore, in step S2, the coordinates of the manually selected feature points are expressed as ( x , y , z ),byy The coordinate value is the center of the upper and lower three lines of data, respectively, to determine the characteristic position, respectively compare the jump platform first segment position x Coordinate values, end position x Coordinate values and feature points x Whether the distance between the coordinate values is within the distance threshold.
[0015] Furthermore, in step S2, obtaining the precise position of the workpiece relative to the center of the circle refers to the position of the workpiece relative to the center of the precise bridge circle in the horizontal direction of the axle and the height of the workpiece welded on the axle.
[0016] Furthermore, the 2D camera and 3D scanning device are both set on a bracket, which is arranged to slide horizontally along the axle. The 2D camera and the 3D scanning device are set at intervals. Before obtaining the bridge package image, the axle is rotated so that the bridge package can be located within the shooting field of view of the 2D camera and the 3D scanning device.
[0017] The present invention has the following beneficial effects:
[0018] 1. The present invention first obtains a precise bridge enveloping circle based on the acquired bridge enveloping image, and then scans the set length left and right with the position of the workpiece as the center to obtain the workpiece scanning data, manually selects feature points from the workpiece scanning data, and selects a number of line data up and down with the feature point as the center in the workpiece scanning data, respectively searches for the jump platform in each line data, and takes the position of the starting position and the end position of each jump platform that is within the distance threshold and closer to the feature point as the feature position, records the jump mode and jump height corresponding to each feature position as feature information, and combines the normalized data of each feature position with the center of the precise bridge enveloping circle to obtain the workpiece relative to the circle. The precise position of the center is determined by the center of the precise bridge circle. During actual inspection, the 3D scanning equipment is adjusted to make it the center of each inspection workpiece of the axle welding to be inspected, and the set length is scanned left and right to obtain the inspection workpiece scanning data. The feature information of each inspection workpiece is obtained according to the inspection workpiece scanning data. If the feature information of a certain inspection workpiece can match one of the recorded feature information, the welding position of the inspection workpiece is determined to be qualified, thereby realizing the inspection of the welding position of the axle workpiece. Compared with the existing technology, the inspection efficiency is higher, and there is no need to rely on manual experience. The inspection standards are the same, so the inspection accuracy and consistency are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The present invention will be further described in detail below with reference to the accompanying drawings.
[0020] Figure 1 Flowchart of the present invention.
[0021] Figure 2 It is a structural schematic diagram of the axle of the present invention.
[0022] Among them, 1. Axle; 2. Bridge package; 3. Workpiece; 4. 2D camera; 5. 3D scanning equipment. DETAILED DESCRIPTION
[0023] like Figure 1 As shown, the welding position detection method of the axle workpiece includes the following steps:
[0024] Step S1, using a 2D camera 4 to shoot the bridge package 2 of the template bridge 1, obtain the bridge package image, perform edge detection on the bridge package image to obtain edge information, use the edge information to perform Hough transform circle detection to obtain an initial bridge package circle, and evenly subdivide the initial bridge package circle to obtain n subdivision points, respectively obtain the bridge bag image with each subdivision point as the center and along the direction of the line connecting the subdivision point and the center of the initial bridge bag circle m data points and obtain the m The jump position of the jump in the data array composed of data points is used n Perform Hough transform circle detection on each jump position to obtain the accurate bridge enclosing circle;
[0025] like Figure 2 As shown, the 2D camera 4 and the 3D scanning device 5 are both arranged on a bracket, which is arranged to slide horizontally along the axle 1, and the bracket is spaced apart from the axle 1. The 2D camera 4 and the 3D scanning device 5 are spaced apart. Before acquiring the bridge package image, the axle 1 is rotated so that the bridge package 2 can be located within the shooting field of view of the 2D camera 4 and the 3D scanning device 5. In this embodiment, the axle 1 is rotated 90° relative to the direction of the 2D camera 4 and the 3D scanning device 5.
[0026] Before acquiring the bridge envelope image, the CAD file of the template vehicle axle 1 is imported into the server to obtain the bridge envelope diameter of the template vehicle axle 1. This diameter is then converted into pixel diameter information. After camera calibration, the bridge envelope image is acquired using a 2D camera 4. After acquiring the bridge envelope image, adaptive histogram equalization and filtering are performed on the bridge envelope image to obtain a preprocessed image. Edge detection is then performed on the preprocessed image to obtain edge information. The filtering employed in this embodiment uses Gaussian and Kalman filtering. The process of performing edge detection to obtain edge information is conventional.
[0027] The initial bridge circle is evenly subdivided at 1° to obtain 360 subdivision points. a , take the subdivision points from the bridge bag image a Centered and along the subdivision points a The distribution direction of the line connecting the center of the initial bridge circle m ∈[60,80] data points, i.e., take data points along the direction close to the center of the initial bridge circle. m / 2 data points, taken in the direction away from the center of the initial bridge circlem / 2 data points, from this m Data points are formed into a data group. Starting from the data point closest to the center of the circle, the jump platform in the data array is searched in the direction away from the center of the initial bridge circle, and the position of the first end of the jump platform is recorded as the jump position.
[0028] Step S2: for each workpiece 3 welded on the bridge package 2 of the template axle 1, obtain the position of the workpiece 3, and use the 3D scanning device 5 to scan the set length left and right with the position of the workpiece 3 as the center. Length / 2 Obtain the scanning data of workpiece 3, manually select feature points from the scanning data of workpiece 3, and select several line data above and below the feature points in the scanning data of workpiece 3 with the feature points as reference points, search for jump platforms in each line data respectively, and take the position of the starting position and the end position of each jump platform that is within the distance threshold and closer to the feature point as the feature position, and record each feature position and the jump mode and jump height corresponding to the feature position as a feature information, and combine the normalized data of each feature position with the center of the precise bridge circle to obtain the precise position of workpiece 3 relative to the center of the circle, where, Length Set according to the width of the workpiece 3 to be scanned, generally 80-120mm;
[0029] Specifically, the position of each workpiece 3 is acquired based on the CAD file of the template axle 1 that has been imported into the server.
[0030] The coordinates of the manually selected feature points are expressed as ( x , y , z ),choose y The coordinate value is greater than the feature point y 3-line data of coordinate values, and y The coordinate value is smaller than the feature point y 3-line data of coordinate values, same line data y When determining the feature position, the coordinate values are the same, and the position of the first end of the jump platform is compared. x Coordinate values and feature points x The distance between coordinate values, the end position x Coordinate values and feature points x Is the distance between the coordinate values within the distance threshold (the distance threshold setting range is within 1mm)? If both are within the distance threshold, the closer position is selected as the feature position. If only one is within the distance threshold, it is the feature position. If both are not within the distance threshold, neither is selected as a feature position. When manually selecting feature points, select visible jump edges, such as the position where the height of workpiece 3 changes;
[0031] When searching for a jump platform in the same line of data, if i+1 The depth of the data and i The difference in depth information of the first data is greater than the set depth threshold (the depth threshold is set to 2mm), i Several consecutive data before the data are consistent with the first i The difference between the depth information of the data is less than the set depth threshold, and the i When the sum of the distances between a data and several consecutive data before it is greater than the set length threshold (the length threshold is set to 3mm), it is determined that a jump occurs. The jump mode includes depth increase and depth decrease. When a jump occurs, if the first i +1 data has a deeper information than i The depth information of the data, then i +1 data is the depth rising point (i.e. the position of the first end of the jump platform). i The depth information of +1 data is less than i The depth information of the data, then i +1 data is the depth drop point (i.e. the end position of the jump platform). The jump platform includes the data corresponding to the depth rise point and the depth drop point. The jump height is the difference in average depth information of the data in the two adjacent jump platforms.
[0032] Obtaining the precise position of the workpiece 3 relative to the center of the circle refers to the position of the workpiece 3 in the horizontal direction of the axle 1 relative to the center of the precise bridge circle and the height of the workpiece 3 welded on the axle 1, which is the height relative to the 3D scanning device 5.
[0033] Step S3: During the inspection, according to the precise position of the workpiece 3 relative to the center of the circle obtained in step S2, the 3D scanning device 5 is adjusted horizontally with the center of the precise bridge as the reference, so that it is centered on each inspection workpiece 3 of the axle 1 to be inspected, and the set length is scanned left and right. Length / 2 to obtain the scanning data of the inspection workpiece 3, and process the scanning data of the inspection workpiece 3 according to step S2 to obtain the characteristic information of each inspection workpiece 3. If the characteristic information of a certain inspection workpiece 3 can match one of the characteristic information recorded in step S2 (the match includes the characteristic position, jump mode and jump height are all the same), then the welding position of the inspection workpiece 3 is determined to be qualified.
[0034] The specific matching process is: set corresponding matching errors for the feature position and jump height respectively. If the difference between the feature position and jump height of the detected workpiece 3 and the feature position and jump height in the feature information recorded in step S2 is within the matching error range, it is considered to be matched.
[0035] The above description is merely a preferred embodiment of the present invention and therefore cannot be used to limit the scope of the present invention. In other words, equivalent changes and modifications made according to the scope of the patent application and the contents of the specification should still fall within the scope of the patent of the present invention.
Claims
1. A method for detecting the welding position of an axle workpiece, characterized in that: The steps include: Step S1: Use a 2D camera to shoot the bridge package of the template bridge to obtain the bridge package image, perform edge detection on the bridge package image to obtain edge information, use the edge information to perform Hough transform circle detection to obtain the initial bridge package circle, and evenly subdivide the initial bridge package circle to obtain n subdivision points, respectively obtain the bridge bag image with each subdivision point as the center and along the direction of the line connecting the subdivision point and the center of the initial bridge bag circle m data points and obtain the m The jump position of the jump in the data array composed of data points is used n Perform Hough transform circle detection on each jump position to obtain the accurate bridge enclosing circle; Step S2: for each workpiece welded on the template axle bridge package, obtain the position of the workpiece, use a 3D scanning device to scan the workpiece position as the center to a set length to obtain workpiece scanning data, manually select feature points from the workpiece scanning data, and select several line data up and down with the feature point as a reference point in the workpiece scanning data, respectively search for jump platforms in each line data, and take the position of the starting position and the end position of each jump platform that is within the distance threshold and closer to the feature point as the feature position, and record each feature position and the jump mode and jump height corresponding to the feature position as a feature information, and combine the normalized data of each feature position with the center of the precise bridge package circle to obtain the precise position of the workpiece relative to the center of the circle; Step S3: During the inspection, according to the precise position of the workpiece relative to the center of the circle obtained in step S2, the 3D scanning equipment is adjusted with the center of the precise bridge package circle as the reference, so that it is centered on each inspection workpiece of the axle welding to be inspected, and the set length is scanned left and right to obtain the inspection workpiece scanning data. The characteristic information of each inspection workpiece is obtained according to step S2. If the characteristic information of a certain inspection workpiece can match one of the characteristic information recorded in step S2, the welding position of the inspection workpiece is determined to be qualified.
2. The method for detecting the welding position of an axle workpiece according to claim 1, characterized in that: In step S1, before obtaining the bridge envelope image, the bridge envelope circle diameter of the template vehicle axle is obtained according to the CAD file of the template vehicle axle, and the bridge envelope circle diameter is converted into pixel diameter information.
3. The method for detecting the welding position of an axle workpiece according to claim 2, wherein: In the step S1, after the bridge bag image is acquired, adaptive histogram equalization is performed on the bridge bag image and filtering is performed to obtain a pre-processed image, and edge detection is performed on the pre-processed image to obtain the edge information.
4. The method for detecting the welding position of an axle workpiece according to claim 3, wherein: In step S1, the initial bridge encircle is uniformly subdivided by 1° to obtain 360 subdivision points, and the bridge encircle image is obtained with the subdivision point as the center and along the direction close to the center of the initial bridge encircle. m / 2 data points and the direction away from the center of the initial bridge circle m / 2 data points, search for the jump platform in the data array in a direction away from the center of the initial bridge circle, and record the starting end position of the jump platform as the jump position.
5. The method for detecting the welding position of an axle workpiece according to claim 4, characterized in that: In step S2, the position of each workpiece is obtained according to the CAD file of the template axle.
6. The method for detecting the welding position of an axle workpiece according to claim 5, characterized in that: In step S2, when searching for a jump platform in the line data, if i +1 The depth of the data and i The difference in depth information of the data is greater than the set depth threshold, i Several consecutive data before the data are consistent with the first i The difference between the depth information of the data is less than the set depth threshold, and the i When the sum of the distances between a data and several consecutive data before it is greater than the set length threshold, it is determined that a jump occurs. The jump mode includes depth rise and depth drop. The jump platform includes the data between the depth rise point and the depth drop point. The jump height is the difference between the average depth information of the data in two adjacent jump platforms.
7. A method for detecting the welding position of an axle workpiece according to any one of claims 1 to 6, characterized in that: In step S2, the coordinates of the manually selected feature points are expressed as ( x , y , z ),by y The coordinate value is the center of the upper and lower three lines of data, respectively, to determine the characteristic position, respectively compare the jump platform first segment position x Coordinate values, end position x Coordinate values and feature points x Whether the distance between the coordinate values is within the distance threshold.
8. The method for detecting the welding position of an axle workpiece according to any one of claims 1 to 6, characterized in that: In step S2, obtaining the precise position of the workpiece relative to the center of the circle refers to the position of the workpiece relative to the center of the precise bridge circle in the horizontal direction of the axle and the height of the workpiece welded on the axle.
9. The method for detecting the welding position of an axle workpiece according to any one of claims 1 to 6, characterized in that: The 2D camera and 3D scanning device are both set on a bracket, which is arranged to slide horizontally along the axle. The 2D camera and the 3D scanning device are set at intervals. Before obtaining the bridge package image, the axle is rotated so that the bridge package can be located within the shooting field of view of the 2D camera and the 3D scanning device.
Citation Information
Patent Citations
Car door plate welding spot identifying and welding path planning method
CN109514552A
Axle welding area detection method and system based on computer vision
CN116188498A