Portable weld joint quality detector and detection method
Through portable structured light vision sensors and intelligent identification algorithms, the problems of low efficiency and low accuracy in welding quality detection are solved, and efficient, accurate detection and automatic evaluation of welds are achieved, meeting the needs of online intelligent detection.
Patent Information
- Application Number
- CN202411395739.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2024-12-27
AI Technical Summary
The existing welding quality detection methods have problems of low efficiency, low intelligence and low accuracy. In particular, traditional visual inspection and 2D visual inspection are difficult to meet the online intelligent detection requirements, and 3D visual inspection is difficult to detect narrow weld areas and is costly.
The portable structured light vision sensor is used to combine intelligent recognition algorithms and image processing technology to identify the weld geometric dimensions through structured light vision scanning, extract the weld feature points, calculate the weld defect geometric dimensions, and automatically evaluate the weld quality online according to national standards.
It realizes efficient and accurate detection of welds, reduces workers' labor, improves detection efficiency, and can automatically identify weld feature points and defects in real time, with detection accuracy of 10 ~ 2mm and 100% assessment rate.
Smart Images

Figure CN119198554A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of weld nondestructive testing, in particular to an automatic quality testing system for butt and fillet weld joints, and more particularly to a portable weld joint quality testing instrument and testing method. Background Art
[0002] Welding inspection can ensure the quality and reliability of welded structures. By inspecting the weld, defects generated during the welding process, such as excessive convexity, depressions, misalignment, etc., can be discovered in a timely manner to prevent these defects from causing structural failure during use, thereby ensuring the safety of personnel and equipment; in addition, many industries have strict regulations on the quality of welded structures, and inspection is a necessary measure to ensure compliance. Most of the existing welding quality inspection methods are based on visual inspection methods. There are also 2D visual inspection and 3D visual inspection methods for welding quality inspection, which have the following problems: 1. Traditional visual inspection methods have the disadvantages of low efficiency, low intelligence and low precision. The inspection process is also heavily dependent on manual evaluation. Offline methods are easily affected by workers' experience level, sense of responsibility and subjective emotions. They cannot detect all welds efficiently and accurately, and cannot meet the needs of online intelligent inspection.
[0003] 2. 2D vision detection is a more intelligent method, which usually uses various neural networks and image processing algorithms to detect surface defects. However, 2D vision detection makes it difficult to measure and locate the geometric parameters of weld surface defects.
[0004] 3. 3D visual inspection is currently the mainstream inspection method, but a relatively complete measurement system for weld geometric defects has not yet been developed. It is difficult to inspect some relatively narrow weld areas, and 3D visual sensors rely on the clamping of robot arms, which is a very costly method.
[0005] Therefore, it is urgent to develop a portable weld detector and detection method to meet the needs of inspection at any time. Summary of the invention
[0006] The purpose of the present invention is to provide a portable weld joint quality detector and detection method, which solves the problem that the prior art cannot measure welds online anytime and anywhere. The present invention converts the complex weld geometry measurement problem and the cumbersome weld geometry defect identification, classification, positioning and quantitative evaluation problems into a unified structured light visual scanning task. An intelligent recognition algorithm is used to identify butt and fillet welds, an image processing algorithm is used to extract the weld centerline, and then a feature point extraction algorithm is used to extract feature points on the centerline. Finally, based on the extracted feature points, defects are classified and the weld geometry and weld defect geometry are obtained. The quality level of weld defects is automatically evaluated online according to national standards, which reduces the workload of workers and improves weld detection efficiency.
[0007] The above-mentioned object of the present invention is achieved by the following technical solutions: A portable weld joint quality detector includes: a structured light visual sensor, a protective cover shell 3, a handle 4, a connecting frame 12, and an encoder 6. The structured light visual sensor is fixed below the protective cover shell 3, the rear end of the protective cover shell 3 is connected to the handle 4, and a connecting frame 12 is fixed to the bottom end of the protective cover shell 3, and the bottom end of the connecting frame 12 is connected to the encoder 6; the structured light visual sensor includes a line laser generator 1 and a CCD industrial camera 2 located above the weld joint to be detected, the line laser generator 1 is fixed in front of the CCD industrial camera 2 by embedding, the line laser generator 1 emits linear structured light stripes to illuminate the weld surface, and the CCD industrial camera 2 receives the laser stripes reflected back from the weld surface; the protective cover shell 3 is installed by screws 11, a USB data interface 8 is embedded in the front, and a display screen 7 and an integrated chip 9 are embedded inside; a power module 5 is embedded inside the handle 4; and the connecting frame 12 is connected to the encoder 6 by a screw 10.
[0008] Another object of the present invention is to provide a weld joint quality detection method based on a portable weld joint quality detector, comprising the following steps: S1: sensor calibration; S2: portable quality inspection preparation; S3: Collection of structured light on the weld surface; S4: Intelligent recognition and image processing; S5: Extraction of characteristic points of butt and fillet welds; S6: Calculation of weld geometry and weld defect geometry; S7: Quality grade assessment of weld defects; The sensor calibration described in step S1 uses a light source P The emitted laser stripes form a light plane that hits the calibration plate. Z Axis direction andX Calibrate in the axis direction to complete the pixel coordinate system O-UV To image coordinate system O P -X P Z P conversion; S1.1: Z Calibration in the axis direction: exist Z Sensor calibration process in the axial direction: In the pixel coordinate system, the middle structured light stripe is selected as the reference line of the calibration process, and the intersection of the stripe on the weld surface and the cross section at the center of the ellipsoid is the coordinate origin; multiple frames of structured light stripe images are selected in the pixel coordinate system, and the coordinate origin of each frame image is o 1 , o 2 , o 3 ...with the coordinate origin of the reference line o The distance is v 1 , v 2 , v 3 ...; In the image coordinate system, the coordinate origin of each frame image o' 1 , o' 2 , o' 3 ...with the coordinate origin of the reference line o' The corresponding distance is z 1 , z 2 , z 3 …; The coordinate conversion between pixel coordinates and image coordinates in the Z-axis direction is realized according to the first-order polynomial of the least squares method; Constructing the Matrix A , C , D ,matrix A Contains data points v value and the constant term 1, and the matrix C Include z All values, coefficient vector D are the coefficients in the relational expression:
[0009] By constructing the error function I :
[0010] Use the derivative method to find the minimum value of the error function and obtain the coefficient vector D :
[0011] Using the coefficient vector obtained D Determined polynomial f ( u ):
[0012] S1.2: X Calibration in the axis direction: exist X The sensor calibration process in the axis direction: select different calibration points on the calibration board. The selection rule of calibration points is: select a straight line starting from the origin, forming a 45° angle with the positive direction of the X-axis, and another straight line forming a 45° angle with the negative direction of the X-axis. The intersection of the straight line and the structured light stripe is the calibration point. Select n 1 , n 2 , n 3 , n 4 ...calibration points, calibration points n 1 , n 2 , n 3 , n 4 The pixel coordinates of ... are ( u 1 , v 1 )、( u 2 , v 2 )、( u 3 , v 3 )、( u 4 , v 4 )…; In the image coordinate system, these calibration points and the coordinate origin o' The corresponding lateral distance is x 1 , x 2 , x 3 , x 4 …; According to the least squares second-order polynomial, the pixel coordinates and image coordinates are establishedX The corresponding relational expression in the axis direction; the set of basis functions of the second-order polynomial used is:
[0013] First build the matrix M , N , R ,matrix M Contains data points u Value and v value and the constant term 1, and the matrix N Include x All values, coefficient vector R are the coefficients in the relational expression:
[0014] By constructing the error function L :
[0015] Use the derivative method to find the minimum value of the error function to obtain the coefficient vector R :
[0016] Using the coefficient vector obtained R and the polynomial determined by the basis function set f ( u , v ):
[0017] Z Axis direction and X The expressions of the axis directions are:
[0018] The portable quality inspection preparation described in step S2 is: Before using the portable weld joint quality inspection instrument, you need to prepare for quality inspection. Before scanning, you need to set the parameters of the CCD industrial camera. Considering that the exposure rate will affect the difficulty of subsequent center line extraction, set the camera exposure rate to an appropriate parameter in the system. When scanning, make the encoder contact with the weld surface, and the scanning direction is Y At the same time, the display screen is parallel to the weld surface to realize that the structured light stripes are vertically projected on the surface of the weld to be detected, and the direction parallel to the structured light stripes is X Axis direction, the structured light irradiation direction is Z Axis direction.
[0019] The collection of weld surface structured light in step S3 is as follows: Use a portable weld joint quality detector to scan the weld joint to be inspected frame by frame. The line laser generator emits laser stripes vertically on the surface of the weld to be inspected, and the CCD industrial camera scans the weld joint frame by frame. f Take a picture of the weld to be inspected with structured light fringes. T Got it inside f*T An image with structured light stripes.
[0020] The intelligent recognition and image processing described in step S4 are: S4.1: Intelligent Identification: Based on the fact that different types of welding joints will reflect different structured light stripe images, an intelligent recognition algorithm is built into the system. By intelligently recognizing the collected structured light stripe images, the ROI of the weld can be accurately located, and the types of butt joints and fillet welds can be accurately identified and classified.
[0021] S4.2: Image processing: In order to effectively avoid the influence of image impurity information on the accurate search for feature point positions, it is necessary to perform image processing on the structured light stripes with welds. The CCD industrial camera is connected to the integrated chip, and each frame of weld image with structured light stripe shadows is transmitted to the integrated chip and enters the image processing program; image processing includes image preprocessing and centerline extraction. Image preprocessing includes video framing, threshold segmentation, small connected area removal and morphological processing. Image preprocessing is used to eliminate spots and burrs in the image. Finally, the centerline of the structured light stripes is extracted based on the Steger algorithm.
[0022] The feature point extraction in step S5 is to transmit the laser centerline image representing the geometric contour of the weld to the integrated chip, and then the feature points on the surface of the butt weld are detected. E 1 , E 2 , E t , E b , E u and fillet weld surface feature points K 1 , K 2 , K t , K 3 Perform extraction; S5.1: Extraction of surface feature points of butt weld: S5.1.1: Feature points E 1 , E2 The search for: Iterate the calculation from the leftmost side of the structured light. If the point Q 1 Fitting straight line to the left Ql When the absolute distance is less than or equal to 2 pixels, the point Q 1 is an abnormal feature point until point Q 1 Fitting straight line to the left Ql When the absolute distance is greater than 2 pixels, the point Q 1 The real feature point E 1 :
[0023] Where: Length () is the function for calculating the absolute distance from a point to a straight line; Iterate the calculation from the rightmost side of the structured light. If the point Q 2 Fitting straight line to the right Qr When the absolute distance is less than or equal to 2 pixels, the point Q 2 For abnormal feature points, continue to use the iteration method to find feature points. If point Q 2 Fitting straight line to the right Qr When the absolute distance is greater than 2 pixels, the point Q 2 The real feature point E 2 :
[0024] S5.1.2: Feature points E t , E b , E u The search for: Fitting a straight line by using the least squares method E 1 E 2 , and then use an iterative method to calculate the points on the weld surface P E To the fitting line E 1 E 2 The relative distance:
[0025] Where: signedLength () is the function for calculating the relative distance from a point to a straight line; h E For point P E To the fitting line E 1 E 2 The relative distance If the point P E Located in a straight line E 1 E 2 The above calculation result is a positive value. P E Located in a straight line E 1 E 2 The following calculation yields a negative value:
[0026] Where: The coordinates of the representative point in the image coordinate system; Through the feature points E 1 , E 2 The linear equation parameters of the fitted line; will calculate h E The maximum and minimum values are assigned to E t and E b , the value of the lowest point of the undercut defect area is assigned to E u :
[0027] S5.2: Extraction of surface feature points of fillet weld: S5.2.1: Feature points K 1 , K 2 The search for: Fillet weld weld edge feature points K 1 , K 2 The principle of obtaining is the same as that of butt weld E 1 , E 2 same; S5.2.2: Feature pointsK t , K 3 The search for: Fitting a straight line by using the least squares method K 1 K 2 , and then use an iterative method to calculate the points on the weld surface P K To the fitting line K 1 K 2 The relative distance:
[0028] Where: h k For point P k To the fitting line K 1 K 2 The relative distance will calculate h k The maximum value is assigned to K t , the fitted linear equation Ql and Qr The intersection point is K 3 :
[0029] Accurately extract fixed feature points E 1 , E 2 , K 1 , K 2 , while satisfying the dynamic feature points E t , E b , K t , K 3 , E u extraction requirements.
[0030] The calculation of the weld geometry and weld defect geometry described in step S6 is specifically: S6.1: Calculation of weld geometry: According to the extracted feature points E1 , E 2 , E t , K 1 , K 2 , K 3 Determine weld geometry and weld width w , weld reinforcement d , Fillet weld leg dimensions a , b and c : S6.1.1: Weld Width w The calculation formula is:
[0031] Where: Representative Points E 1 Coordinates in the image coordinate system; Representative Points E 2 Coordinates in the image coordinate system; S6.1.2: Weld reinforcement d The calculation formula is:
[0032] Where: Representative Points E t Coordinates in the image coordinate system; S6.1.3: Fillet Weld Leg Dimensions a , b and c The formula for obtaining is:
[0033] Where: Representative Points K 1 Coordinates in the image coordinate system; Representative Points K 2 Coordinates in the image coordinate system; Representative Points K 3 The coordinates are in the image coordinate system.
[0034] S6.2: Calculation of weld imperfection geometry: Feature points identified by feature point extraction algorithm E 1 , E2 , K 1 , K 2 , E t , E u , E b , K t , K 3 Calculate the geometric parameters of weld defects; weld defects include: butt weld convexity defect, concave defect, misalignment defect, fillet weld asymmetry defect, fillet weld convexity defect; the geometric dimensions of weld defects are derived as follows: S6.2.1: The geometrical dimensions of the butt weld convexity defect are calculated as follows: The geometric parameter of the weld convexity is the weld width w and weld reinforcement d , obtained by the geometric dimension formula of the weld.
[0035] S6.2.2: The geometric dimensions of the sink defect are calculated as follows:
[0036] Where: For point E b Coordinates in the image coordinate system.
[0037] S6.2.3: The geometric dimensions of the misalignment are calculated as follows:
[0038] Where: Indicate point E 1 The coordinates in the height direction in the image coordinate system; point E 2 The coordinates in the height direction in the image coordinate system; S6.2.4: Geometric dimensions of undercut discontinuities:
[0039] Where: For point E u Coordinates in the image coordinate system; S6.2.5: The geometric dimensions of asymmetric imperfections in fillet welds are calculated using the following formula:
[0040] S6.2.6: The geometrical dimensions of the excessive convexity defect in a fillet weld are calculated as follows:
[0041] Where: Representative Points K t Coordinates in the image coordinate system; Through the feature points K 1 , K 2 Parameters of the linear equation of the fitted line.
[0042] The quality grade assessment of the weld defects described in step S7 is specifically: Classification of weld defect types: butt weld geometric defects refer to excessive convexity, concave, misalignment, undercut and weld bead; fillet weld geometric defects refer to asymmetric fillet welds, excessive convexity and weld bead. Welding defects can be identified by feature points ( E 1 , E 2 , K 1 , K 2 , E t , E b , K t , K 3 , E u ) to determine; the geometric parameters of all different defects are calculated by the above formula, and the geometric dimensions of weld defects are compared with the national assessment standard ISO 5817:1992 for weld defects in the system to achieve independent assessment of the quality level of weld defects.
[0043] The beneficial effects of the present invention are: 1. The portable weld joint quality inspection device of the present invention is easy to carry and suitable for inspection of various types of metal welds.
[0044] 2. The weld detection device of the present invention can automatically identify and complete coordinate transformation in real time during the detection of welded joints, obtain characteristic points of welds, calculate the geometric dimensions of welds, and determine the type and geometric dimensions of weld defects, thereby realizing online automatic evaluation of defect quality levels in accordance with national standards.
[0045] 3. The present invention proposes a new sensor calibration method to solve the problem that the traditional coordinate calibration method cannot achieve coordinate conversion.
[0046] 4. The present invention proposes a feature point extraction algorithm to locate the feature point strategy, so as to extract a large number of dynamic weld surface geometric feature points.
[0047] 5. The quality inspection technology of the present invention can accurately measure the geometric dimensions of the weld, with a detection accuracy of 10~2mm, and the assessment rate of the quality grade of weld defects reaches 100%. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide further understanding of the present invention and constitute a part of this application. The illustrative examples of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0049] Figure 1 It is a structural schematic diagram of a portable weld joint quality detection device of the present invention; Figure 2 It is a schematic diagram of the laser sensor calibration principle of the present invention; Figure 3 It is a schematic diagram of the structure of the laser sensor of the present invention for collecting images; Figure 4 A schematic diagram of the image collection of butt joint and fillet joint welds in the present invention; Figure 5 It is a schematic diagram of image processing of butt weld structured light of the present invention; Figure 6 It is a schematic diagram of image processing of fillet weld structure light of the present invention; Figure 7 It is a schematic diagram of weld characteristic points and geometric dimensions of a butt weld of the present invention; Figure 8 It is a schematic diagram of weld characteristic points and geometric dimensions of the fillet weld of the present invention; Fig. 9 It is a schematic diagram of the extraction of weld structure light feature points of a butt weld of the present invention; Fig.10 It is a schematic diagram of the extraction of weld structure light feature points of a fillet weld of the present invention; Fig.11 Schematic diagram of geometric defect types of butt welds of the present invention; Fig.12 Schematic diagram of geometric defect types of fillet welds of the present invention; Fig.13 is a process schematic diagram of the quality assessment system of the present invention; Table 1 shows the structured light measurement values and the scale measurement values of the butt weld of the present invention; Table 2 shows the structured light measurement values and the scale measurement values of the fillet weld of the present invention.
[0050] In the figure: 1. Line laser generator; 2. CCD industrial camera; 3. Protective cover shell; 4. Handle; 5. Power module; 6. Encoder; 7. Display screen; 8. USB data interface; 9. Integrated chip; 10. Screw; 11. Screw; 12. Connecting frame. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0052] See also Figures 1 to 13 As shown, the portable weld joint quality detector and detection method of the present invention, the detector includes a protective cover shell, a structured light visual sensor, an integrated chip, and a display screen. The bottom of the protective cover shell is inlaid with a structured light visual sensor, the structured light visual sensor is connected to the integrated chip, and the integrated chip is connected to the display screen. The present invention is suitable for the detection of butt and fillet welds. The structured light stripe information on the weld surface is collected by using a laser sensor and transmitted to the integrated chip. The integrated chip integrates advanced algorithms to process the structured light stripe information with the weld surface captured, and the processed information is transmitted to the display screen. The main interface in the display screen displays the weld type, weld geometric dimensions, and various geometric defects of the weld that are accurately located and classified. It realizes the online automatic evaluation of the quality level of defects in accordance with national standards, and the detection accuracy is high.
[0053] See also Figure 1As shown, the weld joint quality detector of the present invention includes: a structured light visual sensor, a protective cover shell 3, a handle 4, a connecting frame 12, and an encoder 6. The structured light visual sensor is fixed below the protective cover shell 3, the rear end of the protective cover shell 3 is connected to the handle 4, the bottom end of the protective cover shell 3 is fixed with a connecting frame 12, and the bottom end of the connecting frame 12 is connected to the encoder 6; the structured light visual sensor includes a line laser generator 1 and a CCD industrial camera 2 located above the weld joint to be detected, the line laser generator 1 is fixed in front of the CCD industrial camera 2 by embedding, the line laser generator 1 emits linear structured light stripes to illuminate the weld surface, and the CCD industrial camera 2 receives the laser stripes reflected back from the weld surface; the protective cover shell 3 is installed by screws 11, the USB end data interface 8 is embedded in the front, and the display screen 7 and the integrated chip 9 are embedded inside; the power module 5 is embedded inside the handle 4; the connecting frame 12 is connected to the encoder 6 by a screw 10.
[0054] See also Figures 2 to 13 As shown, the weld joint quality detection method of the present invention comprises the following steps: S1: Sensor calibration: Sensor calibration refers to the conversion of the pixel coordinate system on the photographed photo into the image coordinate system to enable the weld joint quality detector to perceive external information. In the process of weld inspection, since the CCD industrial camera is constantly moving during the shooting process, its optical center is also moving. Therefore, the traditional system parameter calibration method cannot be used. This invention proposes a new calibration method, see Figure 2 As shown, the calibration of the sensor of the present invention includes the following steps: using a light source P The emitted laser stripes form a light plane that hits the calibration plate. Z Axis direction and X The pixel coordinate system is completed by calibration in the axis direction ( O-UV ) to the image coordinate system ( O P -X P Z P ) conversion.
[0055] S1.1: Z Calibration in the axis direction: The present invention Z Sensor calibration process in the axial direction: In the pixel coordinate system, the middle structured light stripe is selected as the reference line of the calibration process, and the intersection of the stripe on the weld surface and the cross section at the center of the ellipsoid is the coordinate origin. In the pixel coordinate system, multiple frames of structured light stripe images are selected, and the coordinate origin of each frame image ( o 1 ,o 2 , o 3 ...) and the coordinate origin of the reference line o The distance is v 1 , v 2 , v 3 ...; In the image coordinate system, the coordinate origin of each frame image ( o' 1 , o' 2 , o' 3 ...) and the coordinate origin of the reference line o' The corresponding distance is z 1 , z 2 , z 3 …; The coordinate transformation between pixel coordinates and image coordinates in the Z-axis direction is realized according to the least squares first-order polynomial: Constructing the Matrix A , C , D ,matrix A Contains data points v value and the constant term 1, and the matrix C Include z All values, coefficient vector D are the coefficients in the relational expression:
[0056] By constructing the error function I :
[0057] Use the derivative method to find the minimum value of the error function to obtain the coefficient vector D :
[0058] Using the coefficient vector obtained D To determine the polynomial f ( u ):
[0059] S1.2: X Calibration in the axis direction: exist XThe sensor calibration process in the axis direction: select different calibration points on the calibration board. The selection rule of calibration points is: select a straight line starting from the origin, forming a 45° angle with the positive direction of the X-axis, and another straight line forming a 45° angle with the negative direction of the X-axis. The intersection of the straight line and the structured light stripe is the calibration point. Select n 1 , n 2 , n 3 , n 4 ...calibration points, calibration points n 1 , n 2 , n 3 , n 4 The pixel coordinates of ... are ( u 1 , v 1 )、( u 2 , v 2 )、( u 3 , v 13 )、( u 4 , v 4 )…; In the image coordinate system, these calibration points and the coordinate origin o' The corresponding lateral distance is x 1 , x 2 , x 3 , x 4 …; According to the least squares second-order polynomial, the pixel coordinates and image coordinates are established X The corresponding relational expression in the axis direction; the set of basis functions of the second-order polynomial used is:
[0060] First build the matrix M , N , R ,matrix M Contains data points u Value and v value and the constant term 1, and the matrix N Include x All values, coefficient vector R are the coefficients in the relational expression:
[0061] By constructing the error function L :
[0062] Use the derivative method to find the minimum value of the error function to obtain the coefficient vector R :
[0063] Using the coefficient vector obtained R and the polynomial determined by the set of basis functions f ( u , v ):
[0064] Z Axis direction and X The expressions of the axis directions are:
[0065] S2: Portable quality inspection preparation: See also Figure 3 As shown, the portable quality inspection preparation of the present invention includes the following steps: before scanning, the parameters of the CCD industrial camera need to be set. Considering that the exposure rate will affect the difficulty of the subsequent extraction of the center line, the exposure rate of the camera is selected as 1000EV in the system, the scanning speed is 0.6min / m, and the acquisition frame rate is 50Hz. During scanning, the encoder is brought into contact with the surface of the weld, and the movement direction of the encoder is the Y-axis direction. At the same time, the display screen is parallel to the weld surface to realize that the structured light stripes are vertically projected on the surface of the weld to be inspected, the direction parallel to the structured light stripes is the X-axis direction, and the structured light irradiation direction is the Z-axis direction.
[0066] S3: Collection of structured light on weld surface: See also Figure 4 As shown, the collection of weld surface structured light of the present invention includes the following steps: using a portable weld joint quality detector to scan the weld joint to be inspected frame by frame, a line laser generator emits laser stripes vertically on the weld surface to be inspected, and a CCD industrial camera scans the weld joint to be inspected frame by frame. f Take a picture of the weld to be inspected with structured light fringes. T Got it inside f *TAn image with structured light fringes. The collection objects of the practical case are divided into two categories, including butt joint welds and fillet joint welds. The butt weld selected in the practical case has a groove angle of 90°, the base plate thickness of the welded workpiece is 8mm, the groove width is 8mm, and the length is 120 mm; the selected fillet weld workpiece length is 120 mm, the workpiece thickness is 10 mm, and the angle between the two welding base plates is 90°.
[0067] S4: Intelligent recognition and image processing: S4.1: Intelligent Identification: Based on the fact that different types of welding joints will reflect different structured light stripe images, an intelligent recognition algorithm is built into the system. By intelligently recognizing the collected structured light stripe images, the ROI of the weld can be accurately located, and the types of butt joints and fillet welds can be accurately identified and classified.
[0068] S4.2: Image processing: In order to avoid the influence of image impurity information on the accurate search for feature point positions, it is necessary to process the structured light stripes with welds. The CCD industrial camera is connected to the integrated chip, and each frame of weld image with structured light stripes is transmitted to the integrated chip and enters the image processing program; see Figures 5 and 6 As shown, the image processing of the present invention includes the following steps: image processing includes image preprocessing and centerline extraction, image preprocessing includes video frame acquisition, threshold segmentation, small connected area removal and morphological processing, and image preprocessing is used to eliminate spots and burrs in the image. Finally, the centerline of the structured light stripes is extracted based on the Steger algorithm.
[0069] S5: Extraction of feature points: The laser centerline image representing the geometric contour of the weld is transmitted to the integrated chip for feature point extraction. A feature point extraction method is innovatively designed in the system to realize the surface feature points of the butt weld ( E 1 , E 2 , E t , E b , E u ) and fillet weld surface feature points ( K 1 , K 2 , K t , K 3 ). Figures 7 to 10As shown, the extraction of image feature points of the present invention includes the following steps: S5.1: Extraction of surface feature points of butt weld: S5.1.1: Feature points ( E 1 , E 2 ) is obtained: The core idea is to use RANSAC to fit the straight lines on the left and right sides of the weld. Ql , Qr , and then use an iterative method to find the feature points at the connection between the left and right substrate surfaces E 1 , E 2 , iterate and calculate from the leftmost side of the structured light. If point Q 1 Fitting straight line to the left Ql When the absolute distance is less than or equal to 2 pixels, the point Q 1 is an abnormal feature point until point Q 1 Fitting straight line to the left Ql When the absolute distance is greater than 2 pixels, the point Q 1 The real feature point E 1 :
[0070] Where: Length () is the function for calculating the absolute distance from a point to a straight line; Iterate the calculation from the rightmost side of the structured light. If the point Q 2 Fitting straight line to the right Qr When the absolute distance is less than or equal to 2 pixels, the point Q 2 For abnormal feature points, continue to use the iteration method to find feature points. If point Q 2 Fitting straight line to the right Qr When the absolute distance is greater than 2 pixels, the point Q 2 The real feature point E 2 :
[0071] S5.1.2: Feature points ( E t , E b ,E u ) is obtained: Fitting a straight line by using the least squares method E 1 E 2 , and then use an iterative method to calculate the points on the weld surface P E To the fitting line E 1 E 2 The relative distance:
[0072] Where: signedLength () is the function for calculating the relative distance from a point to a straight line; h E For point P E To the fitting line E 1 E 2 The relative distance If the point P E Located in a straight line E 1 E 2 The above calculation result is a positive value. P E Located in a straight line E 1 E 2 The following calculation yields a negative value:
[0073] Where: Representative Points P E Coordinates in the image coordinate system; Through the feature points E 1 , E 2 The linear equation parameters of the fitted line; will calculate h E The maximum and minimum values are assigned to E t and E b , the value of the lowest point of the undercut defect area is assigned to E u :
[0074] S5.2: Extraction of surface feature points of fillet weld: S5.2.1: Feature points ( K 1 , K 2 ) is obtained: Fillet weld weld edge feature points K 1 , K 2 The principle of obtaining butt weld E 1 , E 2 same; S5.2.2: Feature points ( K t , K 3 ) is obtained: Fitting a straight line by using the least squares method K 1 K 2 , and then use an iterative method to calculate the points on the weld surface P K To the fitting line K 1 K 2 The relative distance:
[0075] Where: h k For point P k To the fitting line K 1 K 2 The relative distance will calculate h k The maximum value is assigned to K t , the fitted linear equation Ql and Qr The intersection point is K 3 :
[0076] This algorithm can not only accurately extract fixed feature points ( E 1 , E 2 , K 1 , K2 ), and can also satisfy dynamic feature points ( E t , E b , K t , K 3 , E u ) extraction requirements.
[0077] S6: Calculation of weld geometry and weld defect geometry: See also Figure 11 to Figure 12 As shown, the calculation of the weld geometry and weld defect geometry of the present invention includes the following: S6.1: Calculation of weld geometry: According to the extracted feature points ( E 1 , E 2 , E t , K 1 , K 2 , K 3 ) to determine the weld geometry and weld width w , weld reinforcement d , Fillet weld leg dimensions a , b and c : (1) Weld width w The calculation formula is:
[0078] Where: Representative Points E 1 Coordinates in the image coordinate system; Representative Points E 2 The coordinates are in the image coordinate system.
[0079] (2) Weld reinforcement d The calculation formula is:
[0080] Where: Representative Points E t The coordinates are in the image coordinate system.
[0081] (3) Fillet weld leg dimensions a , band c The formula for obtaining is:
[0082] Where: Representative Points K 1 Coordinates in the image coordinate system; Representative Points K 2 Coordinates in the image coordinate system; Representative Points K 3 The coordinates are in the image coordinate system.
[0083] S6.2: Calculation of weld imperfection geometry: Feature points identified by feature point extraction algorithm ( E 1 , E 2 , K 1 , K 2 , E t , E b , E u , K t , K 3 ) to calculate the geometric parameters of weld defects. Weld defects include: butt weld convexity defect, concave defect, misalignment defect, fillet weld asymmetry defect, fillet weld convexity defect. The geometric dimensions of the weld defects are derived as follows: (1) Calculation formula for geometric dimensions of excessive convexity defects in butt welds: The geometric parameter of the weld convexity is the weld width w and weld reinforcement d , obtained by the geometric dimension formula of the weld.
[0084] (2) Calculation formula for geometric dimensions of concave defects:
[0085] Where: For point E b Coordinates in the image coordinate system.
[0086] (3) Calculation formula for geometric dimensions of misalignment defects:
[0087] Where: Indicate pointE 1 The coordinates in the height direction in the image coordinate system; Indicate point E 2 The height coordinate in the image coordinate system.
[0088] (4) Calculation formula for geometric dimensions of undercut defects:
[0089] Where: For point E u Coordinates in the image coordinate system.
[0090] (5) Calculation formula for geometric dimensions of asymmetric defects of fillet welds:
[0091] (6) Calculation formula for geometric dimensions of fillet weld convexity defects:
[0092] Where: Representative Points K t Coordinates in the image coordinate system; Through the feature points K 1 , K 2 Parameters of the linear equation of the fitted line.
[0093] S7: Quality assessment of weld geometric defects: Classification of weld defect types: butt weld geometric defects refer to excessive convexity, concave, misalignment, undercut and weld bump; fillet weld geometric defects refer to asymmetric fillet welds, excessive convexity and weld bump. The welding defects can be identified by the characteristic points ( E 1 , E 2 , K 1 , K 2 , E t , E b , K t , K 3 , E u) is determined; the geometric parameters of all different defects are calculated by the above formula. Since the weld with weld nodule defects is non-standard, the geometric parameter calculation of weld nodule defects is omitted. The geometric dimensions of weld defects are compared with the national assessment standard ISO 5817:1992 for weld defects in the system to achieve independent assessment of the quality level of weld defects.
[0094] S8: Quality inspection ends: When the pixel position of the structured light stripes collected by the CCD industrial camera on the display screen changes suddenly, this position is the edge of the weld to be inspected, and the quality inspection end point is 2-5mm away from this edge. Before the weld is about to end contact with the encoder, the power can be turned off, the power supply stops, the CCD industrial camera, line laser generator, and encoder will stop operating, and the quality inspection process of the entire weld is completed.
[0095] Detection effect: As shown in Table 1-2, the weld is first divided into four parts, and the four parts are measured using structured light and a ruler respectively. The average absolute error of these four groups of data reflects the detection accuracy of the present invention.
[0096] Butt weld inspection results: Comparison of the values measured by the two methods, butt weld width w The average absolute error is 0.059mm, the weld height d The average absolute error is 0.037mm, and the geometric dimensions of the concave defects d t The average absolute error is 0.010mm, and the geometric dimensions of the misalignment defect d * The average absolute error is 0.006mm, and the geometric dimensions of the undercut defect d u The average absolute error is 0.018mm. The average absolute error between the structured light measurement and the actual measurement result is 0.026mm; according to the national standard ISO 5817:1992, the weld quality assessment grade is B, as shown in Table 1:
[0097] The detection effect of fillet weld: By comparing the results measured by the two methods, the size of the fillet weld leg a and b The average absolute errors are 0.018mm and 0.073mm respectively. The average absolute error between the structured light measurement and the actual measurement result is 0.046mm; according to the national standard ISO 5817:1992, the weld quality assessment grade is B, as shown in Table 2:
[0098] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made to the present invention shall be included in the protection scope of the present invention.
Claims
1. A portable weld joint quality detector, characterized in that: The structured light vision sensor is fixed below the protective cover shell (3); the rear end of the protective cover shell (3) is connected to the handle (4); a connecting frame (12) is fixed to the bottom end of the protective cover shell (3); the bottom end of the connecting frame (12) is connected to the encoder (6); the structured light vision sensor comprises a line laser generator (1) and a CCD industrial camera (2) located above the weld joint to be detected; the line laser generator (1) is fixed in front of the CCD industrial camera (2) in an embedded manner; the line laser generator (1) emits linear structured light stripes to illuminate the weld surface; the CCD industrial camera (2) receives the laser stripes reflected from the weld surface; the protective cover shell (3) is installed by means of screws (11); a USB data interface (8) is embedded in the front; a display screen (7) and an integrated chip (9) are embedded inside; a power module (5) is embedded inside the handle (4); and the connecting frame (12) is connected to the encoder (6) by means of a screw (10).
2. A weld joint quality inspection method implemented based on the portable weld joint quality inspection instrument according to claim 1, characterized in that: The steps include: S1: sensor calibration; S2: portable quality inspection preparation; S3: Collection of structured light on the weld surface; S4: Intelligent recognition and image processing; S5: Extraction of characteristic points of butt and fillet welds; S6: Calculation of weld geometry and weld defect geometry; S7: Quality grade assessment of weld defects; The sensor calibration described in step S1 uses a light source P The emitted laser stripes form a light plane that hits the calibration plate. Z Axis direction and X Calibrate in the axis direction to complete the pixel coordinate system O-UV To image coordinate system O P -X P Z P conversion; S1.1: Z Calibration in the axis direction: exist Z Sensor calibration process in the axial direction: In the pixel coordinate system, the middle structured light stripe is selected as the reference line of the calibration process, and the intersection of the stripe on the weld surface and the cross section at the center of the ellipsoid is the coordinate origin; multiple frames of structured light stripe images are selected in the pixel coordinate system, and the coordinate origin of each frame image is o 1 , o 2 , o 3 ...with the coordinate origin of the reference line o The distance is v 1. v 2. v 3…; In the image coordinate system, the coordinate origin of each frame image is o' 1 , o' 2 , o' 3 ...with the coordinate origin of the reference line o' The corresponding distance is z 1. z 2. z 3…; A coordinate conversion between pixel coordinates and image coordinates in the Z-axis direction is realized according to the first-order polynomial of the least square method; Constructing the Matrix A , C , D ,matrix A Contains data points v value and the constant term 1, and the matrix C Include z All values, coefficient vector D are the coefficients in the relational expression: ; By constructing the error function I : ; Use the derivative method to find the minimum value of the error function and obtain the coefficient vector D : ; Using the coefficient vector obtained D Determined polynomial f ( u ): ; S1.2: X Calibration in the axis direction: exist X The sensor calibration process in the axis direction: select different calibration points on the calibration board. The selection rule of calibration points is: select a straight line starting from the origin, forming a 45° angle with the positive direction of the X-axis, and another straight line forming a 45° angle with the negative direction of the X-axis. The intersection of the straight line and the structured light stripe is the calibration point. Select n 1 , n 2 , n 3 , n 4 ...calibration points, calibration points n 1 , n 2 , n 3 , n 4 The pixel coordinates of ... are ( u 1, v 1) ( u 2, v 2) ( u 3. v 13 )、( u 4. v 4)…; In the image coordinate system, these calibration points and the coordinate origin o' The corresponding lateral distance is x 1. x 2. x 3. x 4…; According to the least squares method second-order polynomial, the pixel coordinates and image coordinates are established. X The corresponding relational expression in the axis direction; the set of basis functions of the second-order polynomial used is: ; First build the matrix M , N , R ,matrix M Contains data points u Value and v value and the constant term 1, and the matrix N Include x All values, coefficient vector R are the coefficients in the relational expression: ; By constructing the error function L : ; Use the derivative method to find the minimum value of the error function to obtain the coefficient vector R : ; Using the coefficient vector obtained R and the polynomial determined by the basis function set f ( u , v ): ; Z Axis direction and X The expressions of the axis directions are: 。 3. The weld joint quality detection method according to claim 2, characterized in that: The feature point extraction in step S5 is to transmit the laser centerline image representing the geometric contour of the weld to the integrated chip, and then the feature points on the surface of the butt weld are detected. E 1. E 2. E t , E b , E u and fillet weld surface feature points K 1. K 2. K t , K 3. Extraction; S5.1: Extraction of surface feature points of butt weld: S5.1.1: Feature points E 1. E 2 is obtained: Iterate the calculation from the leftmost side of the structured light. If the point Q 1 Fitting straight line to the left Ql When the absolute distance is less than or equal to 2 pixels, the point Q 1 is an abnormal feature point until point Q 1 Fitting straight line to the left Ql When the absolute distance is greater than 2 pixels, the point Q 1 The real feature point E 1: ; Where: Length () is the function for calculating the absolute distance from a point to a straight line; Iterate the calculation from the rightmost side of the structured light. If the point Q 2 Fitting straight line to the right Qr When the absolute distance is less than or equal to 2 pixels, the point Q 2 For abnormal feature points, continue to use the iteration method to find feature points. If point Q 2 Fitting straight line to the right Qr When the absolute distance is greater than 2 pixels, the point Q 2 The real feature point E 2: ; S5.1.2: Feature points E t , E b , E u The search for: Fitting a straight line by using the least squares method E 1 E 2 , and then use an iterative method to calculate the points on the weld surface P E To the fitting line E 1 E 2 The relative distance: ; Where: signedLength () is the function for calculating the relative distance from a point to a straight line; h E For point P E To the fitting line E 1 E 2 The relative distance If the point P E Located in a straight line E 1 E 2 The above calculation result is a positive value. P E Located in a straight line E 1 E 2 The following calculation yields a negative value: ; Where: The coordinates of the representative point in the image coordinate system; Through the feature points E 1 , E 2 The linear equation parameters of the fitted line; will calculate h E The maximum and minimum values are assigned to E t and E b , the value of the lowest point of the undercut defect area is assigned to E u : ; S5.2: Extraction of surface feature points of fillet weld: S5.2.1: Feature points K 1. K 2 is obtained: Fillet weld weld edge feature points K 1 , K 2 The principle of obtaining is the same as that of butt weld E 1 , E 2 same; S5.2.2: Feature points K t , K 3 is obtained: Fitting a straight line by using the least squares method K 1 K 2 , and then use an iterative method to calculate the points on the weld surface P K To the fitting line K 1 K 2 The relative distance: ; Where: h k For point P k To the fitting line K 1 K 2 The relative distance will calculate h k The maximum value is assigned to K t , the fitted linear equation Ql and Qr The intersection point is K 3 : ; Accurately extract fixed feature points E 1. E 2. K 1. K 2. Satisfy dynamic feature points at the same time E t , E b , K t , K 3. E u extraction requirements.
4. The weld joint quality detection method according to claim 2, characterized in that: The calculation of the weld geometry described in step S6 is specifically: According to the extracted feature points E 1. E 2. E t , K 1. K 2. K 3. Determine the weld geometry and weld width w , weld reinforcement d , Fillet weld leg dimensions a , b and c : S6.1.1: Weld Width w The calculation formula is: ; Where: Representative Points E 1 coordinates in the image coordinate system; Representative Points E 2 Coordinates in the image coordinate system; S6.1.2: Weld reinforcement d The calculation formula is: ; Where: Representative Points E t Coordinates in the image coordinate system; S6.1.3: Fillet Weld Leg Dimensions a , b and c The formula for obtaining is: ; Where: Representative Points K 1 coordinates in the image coordinate system; Representative Points K 2 Coordinates in the image coordinate system; Representative Points K 3 Coordinates in the image coordinate system.
5. The weld joint quality inspection method according to claim 2, characterized in that: Calculation of the geometric dimensions of the weld defect described in step S6: Feature points identified by feature point extraction algorithm E 1. E 2. K 1. K 2. E u , E t , E b , K t , K 3. Calculate the geometric parameters of weld defects; weld defects include: butt weld convexity defect, concave defect, misalignment defect, fillet weld asymmetry defect, fillet weld convexity defect; the geometric dimensions of weld defects are derived as follows: S6.2.1: The geometrical dimensions of the butt weld convexity defect are calculated as follows: The geometric parameter of the weld convexity is the weld width w and weld reinforcement d , obtained from the geometric dimension formula of the weld; S6.2.2: The geometric dimensions of the sink defect are calculated using the following formula: ; Where: For point E b Coordinates in the image coordinate system; S6.2.3: The geometric dimensions of the misalignment are calculated using the following formula: ; Where: Indicate point E 1 The coordinates in the height direction in the image coordinate system; Indicate point E 2 The coordinates in the height direction in the image coordinate system; S6.2.4: The geometric dimensions of the undercut are calculated using the following formula: ; Where: For point E u Coordinates in the image coordinate system; S6.2.5: The geometric dimensions of asymmetric imperfections in fillet welds are calculated using the following formula: ; S6.2.6: The geometrical dimensions of the excessive convexity defect in a fillet weld are calculated as follows: ; Where: Representative Points K t Coordinates in the image coordinate system; Through the feature points K 1, K 2 Parameters of the linear equation of the fitted straight line.