A method for detecting the quality of sealing pin welds in complex environments

Through the combination of 2D machine vision and deep learning methods, the problems of mechanical jitter and highlight reflection interference in sealing nail weld quality inspection are solved, efficient weld inspection is achieved, and inspection accuracy and production efficiency are improved.

CN116109587BActive Publication Date: 2024-10-25GUANGZHOU SUPERSONIC AUTOMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310066309.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-12
Publication Date
2024-10-25
Estimated Expiration
2043-01-12

AI Technical Summary

Technical Problem

Existing sealing nail weld quality inspection equipment has mechanical jitter and bright reflective interference signals in complex environments, resulting in reduced detection accuracy. It is difficult for traditional filtering algorithms to effectively remove interference signals, affecting production efficiency and inspection results.

Method used

2D machine vision and deep learning methods are combined to collect point cloud data through 3D cameras, perform mathematical modeling and area division, use ROI rectangular areas for detection, and combine 2D cameras and deep learning algorithms to remove highlight reflective pseudo-defects and mechanical jitter interference. signal to achieve high-quality detection of welds.

Benefits of technology

It improves the accuracy and production efficiency of weld inspection, reduces the misjudgment rate, ensures accurate identification and connectivity analysis of weld defects, and enhances the reliability of inspection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116109587B_ABST
    Figure CN116109587B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting the quality of a sealing nail weld in a complex environment. 3D machine vision collects weld point cloud data, converts it into a depth image, filters the weld, searches and locates the weld position, and then integrates the weld to obtain the specific shape of the weld. The wavy interference signal in the image caused by mechanical jitter is removed, so as to obtain an accurate model of the weld and the specific shape of the weld. According to the mathematical model of the weld, a search is performed in the weld area, and the weld is preliminarily processed, calculated and analyzed. If there are small pits or protrusions, the 3D software sends the searched position and defect shape to the 2D software. The 2D software uses a deep learning method to search the collected grayscale image in the position area sent by the 3D machine vision, calculate and predict, judge and identify whether there are defects, and if there are defects, process the results. The present invention has a high defect judgment accuracy and a low misjudgment rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of weld quality detection, and in particular to a method for detecting the weld quality of a sealing pin in a complex environment. Background Art

[0002] At present, the sealing nail weld quality inspection equipment is generally installed on the sealing nail welding machine equipment. After the welding is completed, it is directly moved to the inspection position for inspection. Due to the large mechanical jitter of the welding equipment, sometimes the peak-to-valley value of these jitter signals is greater than 0.1mm, and the image has a strong wave interference signal. At the same time, the weld has just been welded and the weld surface is relatively smooth. The laser line of the laser profile sensor will produce diffuse reflection on the smooth weld surface, so the collected point cloud data will be lost or mutated. This image will interfere with the subsequent image processing and reduce the detection accuracy. In addition, the interference signal brought by the image processing algorithm itself also affects the processing results. Therefore, in the actual application process, the influence of these interferences must be removed.

[0003] Implementation paths of existing methods: There are two main methods to achieve this. One is to place the detection equipment outside the welding equipment to separate it from the interference signal source to avoid being affected by complex signal interference; the other method is to combine image processing and traditional filtering algorithms to remove signal interference.

[0004] The problems with the first method are as follows:

[0005] 1. The testing equipment takes up additional production space, adds product transmission routes, and occupies space and hardware costs.

[0006] 2. The additional inspection space increases the risk of collision during product handling and reduces production efficiency.

[0007] The problems with the second method are as follows:

[0008] 1. Traditional image filtering algorithms can only process certain interference signals in a targeted manner. For this kind of randomly generated mechanical jitter, it is difficult for traditional filtering methods to eliminate the influence of these interference signals. For example, Gaussian filtering first smoothes the image and removes noise. Although it can obtain a better image edge, it is helpless for this kind of wavy image caused by jitter. Similarly, in the bilateral filtering algorithm of point cloud data, pixels farther away will not affect the pixel values ​​on the edge too much near the edge, thus ensuring the preservation of pixel values ​​near the edge. However, due to the preservation of too much high-frequency information, the bilateral filter cannot cleanly filter out the random high-frequency noise generated by mechanical jitter, and can only filter the low-frequency information better.

[0009] 2. The traditional filtering algorithm takes a long time to process, especially for a large-capacity three-dimensional information image. The traditional filtering algorithm consumes a relatively long time and affects the production sequence.

[0010] 3. Traditional filtering algorithms cannot remove interference signals, causing misjudgment of detection results. Summary of the invention

[0011] In view of this, in order to solve the above-mentioned problems in the prior art, the present invention proposes a method and system for detecting the quality of sealing pin welds in a complex environment, adopts an efficient and fast filtering algorithm to remove the interference signal caused by such mechanical jitter, and adopts 2D machine vision and deep learning methods to remove pseudo defects caused by highlight reflections of welds and reduce the interference effects brought by the software algorithm itself, thereby achieving the purpose of high-quality detection of welds.

[0012] The present invention solves the above problems by the following technical means:

[0013] On the one hand, the present invention provides a method for detecting the quality of a sealing pin weld under a complex environment, comprising the following steps:

[0014] S1, initialize system parameters and set hardware parameters, including 3D camera acquisition parameters, 2D camera acquisition parameters and motion mechanism parameters, and the system enters the waiting state to start detection;

[0015] S2. The product moves to the bottom of the 2D camera, captures images, performs deep learning, finds the center of the sealing nail, and sends it to the operating mechanism. The 3D camera moves to the top of the sealing nail center, and the PLC sends it to the position and prepares the signal to the 3D software. After receiving the command, the 3D software feeds back the ready signal to the PLC. After receiving the signal, the PLC drives the 3D camera to rotate around the rotation center, collects point cloud data, and uploads the point cloud data to the computer. The computer converts the point cloud data into a depth image and displays it.

[0016] S3. According to the customer's inspection requirements and the depth image of the defect collected, the weld is mathematically modeled in combination with the profile contour of the weld. The actual performance of the weld is obtained through mathematical modeling. The 3D machine vision searches in the weld area based on these weld mathematical models.

[0017] S4, dividing the depth image into several regions, determining the number of regions according to the actual situation, and performing calculation processing on each region as a separate thread;

[0018] S5. In each inspection area, according to the height image distribution of the product, at a certain distance outside the weld in each area, select a ROI rectangular area as the inspection reference, and generate a regional image;

[0019] S6. In the weld area, the weld is integrated according to the distribution of the weld to obtain a profile contour line of the weld surface, and the weld is located on the profile contour line of the weld according to the welding process and the depth information of the weld;

[0020] S7. If defects are found, record them, and then conduct connectivity analysis on these defects to connect the defect areas and form a whole.

[0021] S8. In the area where defects may occur, randomly select the profile contour lines in the horizontal direction and the vertical direction, calculate the maximum and minimum values ​​of these profile contour lines, and use the maximum value difference in the area as the basis for judging whether there are defects in the area;

[0022] S9, each divided area is processed, analyzed, calculated and identified according to steps S4, S5, S6, S7 and S8; the information in each area is counted by region, and then it is determined whether the entire weld has defects;

[0023] S10. Send the result information to the peripheral device and display the result on the display screen. If there is a defect, an alarm will be issued and the product will be sent to the NG box; if it is an OK product, the product will be sent to the next station.

[0024] Preferably, before step S3, a step of removing highlight reflective false defects is also included, which specifically includes the following steps:

[0025] First, in the 3D camera parameter settings, you need to fully optimize the settings and set the parameters to the best values ​​to avoid interference signals caused by the camera parameter settings;

[0026] Taking advantage of the fact that the grayscale value changes when a 2D camera is imaged at different heights, a clear image is obtained by imaging with a 2D camera under the illumination of a blue bowl light source. If there is a pit, the grayscale value of the image at that location will become darker, thus avoiding defective images caused by high reflection.

[0027] When using a 3D machine vision algorithm to search for pit defects in welds, call the 2D image of the product, map the defect morphology found by the 3D machine vision algorithm onto the 2D image, and use a deep learning algorithm to perform a secondary search, confirmation, and re-judgment of the defects in areas where defects may occur. The re-judgment result is used as the final result.

[0028] If there is a pit defect in the area, the pixel value in the corresponding 2D image will change significantly. The 2D algorithm determines whether there is a defect based on the principle that the pit causes the grayscale value of the image to darken.

[0029] Preferably, after step S3, a step of removing mechanical vibration is further included, which specifically includes the following steps:

[0030] When calculating the flatness of the sealing nail, the sealing nail plane is evenly divided into several areas, and the average height value in each area is calculated respectively. The maximum and minimum values ​​of these areas are used as the flatness of the sealing nail, and the average value method is used for filtering.

[0031] When the weld is positioned, the reference is selected on the profile contour line of the weld, and the average height value of the contour line that is relatively flat to a certain section of the profile contour line outside the weld is calculated as the reference of the contour line; this reference value is used to calculate the characteristic parameters of the weld, including the position points on both sides of the weld, the highest point of the weld and the lowest point of the weld;

[0032] Search for the weld point on the step side of the weld sealing nail, determine the penetration range according to the welding process, and find the intersection of the weld and the base material within the penetration range; on each profile contour line, determine the possible edge points according to the height difference between the reference and the weld edge, save each possible edge point of the weld area image in an array, and then filter these possible edge points; select the first several point positions, calculate the mean value of the position x of these points, and then compare the adjacent edge points of each contour line. If the difference between the front and rear positions meets the requirements, the current point is the actual edge point of the contour line; if it exceeds the range, the point is within the first N points, then the average value of the first N points is taken as the current edge point value; otherwise, the average value of the N / 2 values ​​before and after the point is taken as the edge value of the point;

[0033] When searching for other key feature points of the weld, consider removing the influence of some outliers to obtain values ​​close to the actual ones.

[0034] Preferably, before step S7, a step of processing interference signals caused by the algorithm is also included, specifically including the following steps:

[0035] After searching through the software, the distribution position of weld defects is obtained. Due to various reasons, there will be some disconnections between defects. The connectivity analysis and calculation of these discrete defects are carried out. Taking a certain defect as the center, the distance between it and the surrounding adjacent defects is calculated. The connectivity of the defects is judged by these distance values, so as to carry out connectivity analysis and calculation of the small defects separated from the algorithm and obtain the actual edge of the defect.

[0036] In a second aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for detecting the quality of sealing pin welds under a complex environment as described in the first aspect of the present invention are implemented.

[0037] In a third aspect, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for detecting the quality of sealing pin welds under complex environments as described in the first aspect of the present invention.

[0038] Compared with the prior art, the beneficial effects of the present invention include at least:

[0039] 1. The present invention removes the influence of interference signals caused by mechanical jitter on the image, removes the influence of virtual defects such as pits on the image surface caused by high-brightness reflections on the weld, eliminates interference signals that affect the detection results during the calculation process of the algorithm itself, improves the accuracy of the detection results, and reduces the misjudgment rate of the system caused by interference signals.

[0040] 2. 3D machine vision will have pits in the imaging of highly reflective welds, and 2D machine vision will cause the grayscale value of the image to darken or brighten in uneven locations. This eliminates the problem of 3D vision misjudging welds as pits due to high reflection, thereby greatly improving the accuracy of the weld detection algorithm.

[0041] 3. Perform connectivity tests on the defects detected by the algorithm and connect the defective areas together, which greatly improves the accuracy of algorithm detection and avoids misjudgment caused by the algorithm.

[0042] 4. Carry out connectivity tests and calculations on the areas where possible weld defects are detected, connect the defects together, and avoid the loss of some characteristic values ​​of weld defects.

[0043] 5. The present invention has high accuracy in defect judgment and low misjudgment rate. Because the algorithm filters the possible interference signals respectively, the correct features of the weld can be directly extracted to avoid feature loss due to interference signals. Defects are searched through the mathematical model of the defects. The entire process of finding defects uses 3D point cloud information, avoiding misjudgment caused by converting 3D into 2D.

[0044] 6. The present invention makes full use of the characteristic advantage of 2D machine vision that shadows are caused in high and low changing areas, solves the problem of 3D machine vision in high-reflective application scenarios, and collects small pits on the surface of the weld. 3D machine vision calculates the position and specific shape of the small pit and sends it to 2D machine vision, and uses 2D machine vision to determine whether there is a small pit defect in the weld at this position, thereby improving the quality and resolution of image imaging. Using the deep learning method, the more samples are tested, the higher the accuracy of the judgment result. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0046] Figure 1 It is a flow chart of the sealing nail weld quality detection method under complex environment of the present invention;

[0047] Figure 2 It is a structural block diagram of the electronic equipment of the present invention. DETAILED DESCRIPTION

[0048] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be pointed out that the described embodiments are only part of the embodiments of the present invention, not all of them. 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.

[0049] Example 1

[0050] like Figure 1 As shown, the present invention provides a method for detecting the quality of a sealing pin weld in a complex environment, comprising the following steps:

[0051] S1. Initialize system parameters and set hardware parameters (3D camera acquisition parameters, 2D camera acquisition parameters, motion mechanism parameters, etc.), and the system enters the waiting state to start detection.

[0052] S2. The product moves to the bottom of the 2D camera, captures images, performs deep learning, finds the center of the sealing nail, and sends it to the operating mechanism. The 3D camera moves to the top of the center of the sealing nail, and the PLC sends it to the position and prepares the signal to the 3D software. After receiving the command, the 3D software feeds back the ready signal to the PLC. After receiving the signal, the PLC drives the 3D camera to rotate around the rotation center, collects point cloud data, and uploads the point cloud data to the computer. The computer converts the point cloud data into a depth image and displays it.

[0053] S3. According to the customer's inspection requirements and the depth image of the defect collected, the weld is mathematically modeled in combination with the profile contour of the weld. The actual appearance of the weld is obtained through mathematical modeling. 3D machine vision searches within the weld area based on these weld mathematical models.

[0054] S4. 3D depth images are 16 bits, and the image calculation amount is very large. Therefore, the depth image can be divided into several areas. The number of areas can be determined according to the actual situation. Each area is calculated and processed as a separate thread, which improves the software operation speed and timing.

[0055] S5. In each inspection area, according to the height image distribution of the product, a ROI rectangular area is selected as the inspection reference at a certain distance (about 2 to 5 mm, preferably 3 mm) outside the weld in each area, and a regional image is generated;

[0056] S6. In the weld area, the weld is integrated according to the distribution of the weld to obtain a profile contour line of the weld surface. On the profile contour line of the weld, the weld is located according to the welding process and the depth information of the weld.

[0057] S7. If defects are found, record them, and then conduct connectivity analysis on these defects to connect the defective areas and form a whole.

[0058] S8. In the area where defects may occur, randomly select the profile contour lines in the horizontal and vertical directions, calculate the maximum and minimum values ​​of these profile contour lines, and use the maximum value difference in the area as the judgment whether there are defects in the area.

[0059] S9, each divided area is processed, analyzed, calculated and identified according to steps S4, S5, S6, S7 and S8, and the information in each area is counted, and then it is determined whether the entire weld has defects.

[0060] S10, send the result information to the peripheral device and display the result on the display screen. If there is a defect, an alarm is issued and the product is sent to the NG box. If it is an OK product, the product is sent to the next station.

[0061] Before step S3, the process also includes a step of removing highlight reflective false defects, which specifically includes the following steps:

[0062] 1. First of all, in the 3D camera parameter settings, you need to fully optimize the settings and try to set the parameters to a reasonable range to avoid pits and protrusions on the weld surface caused by unreasonable camera parameter settings. This can eliminate some problems caused by high brightness and high reflection.

[0063] 2. In the highly reflective and high-brightness weld images, the 3D sensor produces diffuse reflections in these bright areas, which causes the loss of the collected point cloud data, thus forming pseudo defects such as pits on the surface of the product. If these pseudo pits are not processed by special algorithms, the 3D algorithm will treat them as pit defects, resulting in a high misjudgment rate. By reasonably adjusting the camera acquisition parameters, some overkill can be reduced, but overkill cannot be fundamentally eliminated. This situation where the 3D camera cannot obtain high-quality images of the inspection area due to high reflection is because when the 2D camera is imaging on an uneven surface, the grayscale brightness values ​​of the convex and concave parts of the image will be different relative to the flat position, becoming slightly brighter or darker. Using the characteristic of 2D imaging at different heights causing grayscale values ​​to change, a clear image can be obtained by using a 2D camera under the illumination of a blue bowl light source. If there is a pit, the grayscale value of the image at that position will become darker, avoiding defective images caused by high reflection. Therefore, to eliminate these defects caused by high reflection of welds, we can combine the advantages of 2D imaging and use 2D imaging processing to identify these areas and reduce overkill.

[0064] 3. When using a 3D machine vision algorithm to search for pit defects in welds, call the 2D image of the product and map the defect morphology found by the 3D machine vision algorithm onto the 2D image. In areas where defects may occur, use a deep learning algorithm to conduct a secondary search, confirmation, and re-evaluation of the defects, and use the re-evaluation result as the final result.

[0065] 4. If there is a pit defect in the area, the pixel value in the corresponding 2D image will change significantly. The 2D algorithm determines whether there is a defect based on the principle that the pit causes the gray value of the image to darken. Through deep learning methods, the reliability and stability of the system's defect recognition can be further improved.

[0066] In the weld depth image, if there is a sinusoidal interference signal caused by mechanical jitter, these interference signals will cause great interference to the subsequent point cloud data processing. Appropriate filtering algorithms must be used to remove the influence of these interference signals.

[0067] After step S3, the step of removing mechanical vibration is also included, which specifically includes the following steps:

[0068] 1. When calculating the flatness of the sealing nail, divide the sealing nail plane into several areas evenly, calculate the average height value in each area respectively, use the maximum and minimum values ​​of these areas as the flatness of the sealing nail, and use the average value method to perform filtering to reduce the influence of ripples.

[0069] 2. Filter the detection benchmark, especially when there is a wave interference signal caused by mechanical jitter in the point cloud data, the accuracy of the benchmark in the detection process becomes particularly important. When the weld is located, the benchmark is selected on the profile contour line of the weld, and the average height value of the contour line that is relatively flat with a certain section of the profile contour line outside the weld is calculated as the benchmark of the contour line. Use this benchmark value to calculate the characteristic parameters of the weld, such as the position points on both sides of the weld, the highest point of the weld, the lowest point of the weld, and other parameters.

[0070] 3. Search for the weld point on the step side of the weld sealing nail, determine the approximate range of the penetration depth according to the welding process, and find the intersection of the weld and the base material within the penetration depth range. On each profile contour line, determine the possible edge points based on the height difference between the reference and the weld edge, save each possible edge point of the weld area image in an array, and then filter these possible edge points. Select the first few point positions, calculate the mean of the position x of these points, and then compare the adjacent edge points of each contour line. If the difference between the front and back positions meets the requirements, the current point is the actual edge point of the contour line. If it exceeds the range and the point is within the first N points, take the average of the first N points as the current edge point value; otherwise, take the average of the N / 2 values ​​before and after the point as the edge value of the point. This can reduce the signal interference caused by mechanical jitter and the inaccurate positioning of the weld edge caused by actual defects.

[0071] 4. When searching for other key feature points of the weld (highest point, lowest point, outer point of the weld, etc.), it is also necessary to consider removing the influence of some outliers to obtain values ​​close to the actual ones.

[0072] During the image processing process, the image processing algorithm will cause loss of some useful information and increase some information, thereby causing misjudgment of the software. In actual application, it is also necessary to reduce the impact of the algorithm.

[0073] Before step S7, the step of processing the interference signal caused by the algorithm is also included, which specifically includes the following steps:

[0074] After searching through the software, the distribution position of weld defects is obtained. Due to various reasons, there will be some disconnections between defects. In order to improve the accuracy of judgment, the connectivity analysis and calculation of these discrete defects can be performed. Taking a certain defect as the center, the distance between it and the surrounding adjacent defects is calculated, and the connectivity of the defects is judged by these distance values, so as to perform connectivity analysis and calculation on the small defects separated by the algorithm and obtain the actual edge of the defect, thereby eliminating the influence caused by the algorithm and improving the accuracy and reliability of system processing and judgment.

[0075] The 3D machine vision of the present invention collects weld point cloud data, converts it into a depth image, filters the weld, then searches and locates the weld position, and then integrates the weld to obtain the specific shape of the weld.

[0076] The present invention filters the weld search area to remove the wavy interference signal in the image caused by mechanical shaking, thereby obtaining an accurate model of the weld and the specific shape of the weld.

[0077] The present invention searches in the weld area according to the mathematical model of the weld, and performs preliminary processing, calculation and analysis on the weld. If small pits or protrusions appear, the 3D software sends the searched position and defect shape to the 2D software system.

[0078] The 2D software of the present invention adopts a deep learning method to search the collected grayscale image in the position area sent by the 3D machine vision, perform calculations and predictions, judge and identify whether there are defects, and if there are defects, process the results.

[0079] The present invention performs connectivity testing and calculation on the area where the possible weld defects are detected, connects the defects together, and avoids the weld defects from losing part of the characteristic values.

[0080] The present invention has high accuracy in defect judgment and low misjudgment rate. This is because the algorithm filters the possible interference signals respectively, thereby directly extracting the correct features of the weld, avoiding feature loss due to interference signals, searching for defects through the mathematical model of the defects, and the entire process of finding defects uses 3D point cloud information, avoiding misjudgment caused by converting 3D into 2D.

[0081] The present invention makes full use of the characteristic advantage of 2D machine vision that shadows are caused in high and low changing areas, solves the problem of 3D machine vision in high-reflective application scenarios, and collects small pits on the surface of the weld. The 3D machine vision calculates the position and specific shape of the small pit and sends it to the 2D machine vision, and uses the 2D machine vision to determine whether there is a small pit defect in the weld at this position, thereby improving the quality and resolution of the image. Using the deep learning method, the more samples are tested, the higher the accuracy of the judgment result.

[0082] Example 2

[0083] Based on the same concept, the present invention also provides a schematic diagram of a physical structure, such as Figure 2As shown, the server may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the steps of the sealing pin weld quality detection method under a complex environment.

[0084] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0085] Example 3

[0086] Based on the same concept, the present invention also provides a non-transitory computer-readable storage medium, which stores a computer program. The computer program includes at least one section of code, which can be executed by a main control device to control the main control device to implement the steps of the sealing pin weld quality detection method under the complex environment.

[0087] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in this application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk SolidStateDisk), etc.

[0088] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

[0089] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for detecting the quality of sealing nail welds in complex environments. It is characterized in that The steps include: S1, initialize system parameters and set hardware parameters, including 3D camera acquisition parameters, 2D camera acquisition parameters and motion mechanism parameters, and the system enters the waiting state to start detection; S2. The product moves to the bottom of the 2D camera, captures images, performs deep learning, finds the center of the sealing nail, and sends it to the operating mechanism. The 3D camera moves to the top of the sealing nail center, and the PLC sends it to the position and prepares the signal to the 3D software. After receiving the command, the 3D software feeds back the ready signal to the PLC. After receiving the signal, the PLC drives the 3D camera to rotate around the rotation center, collects point cloud data, and uploads the point cloud data to the computer. The computer converts the point cloud data into a depth image and displays it. S3. According to the customer's inspection requirements and the depth image of the defect collected, the weld is mathematically modeled in combination with the profile contour of the weld. The actual performance of the weld is obtained through mathematical modeling. The 3D machine vision searches in the weld area based on these weld mathematical models. S4, dividing the depth image into several regions, determining the number of regions according to the actual situation, and performing calculation processing on each region as a separate thread; S5. In each inspection area, according to the height image distribution of the product, at a certain distance outside the weld in each area, select a ROI rectangular area as the inspection reference, and generate a regional image; S6. In the weld area, the weld is integrated according to the distribution of the weld to obtain a profile contour line of the weld surface, and the weld is located on the profile contour line of the weld according to the welding process and the depth information of the weld; S7. If defects are found, record them, and then conduct connectivity analysis on these defects to connect the defect areas and form a whole. S8. In the area where defects may occur, randomly select the profile contour lines in the horizontal direction and the vertical direction, calculate the maximum and minimum values ​​of these profile contour lines, and use the maximum value difference in the area as the basis for judging whether there are defects in the area; S9, each divided area is processed, analyzed, calculated and identified according to steps S4, S5, S6, S7 and S8; the information in each area is counted by region, and then it is determined whether the entire weld has defects; S10. Send the result information to the peripheral device and display the result on the display screen. If there is a defect, an alarm will be issued and the product will be sent to the NG box; if it is an OK product, the product will be sent to the next station.

2. The method for detecting the quality of the sealing nail weld under complex environment according to claim 1, It is characterized in that Before step S3, the process also includes a step of removing highlight reflective false defects, which specifically includes the following steps: First, in the 3D camera parameter settings, you need to fully optimize the settings and set the parameters to the best values ​​to avoid interference signals caused by the camera parameter settings; Taking advantage of the fact that the grayscale value changes when a 2D camera is imaged at different heights, a clear image is obtained by imaging with a 2D camera under the illumination of a blue bowl light source. If there is a pit, the grayscale value of the image at that location will become darker, thus avoiding defective images caused by high reflection. When using a 3D machine vision algorithm to search for pit defects in welds, call the 2D image of the product, map the defect morphology found by the 3D machine vision algorithm onto the 2D image, and use a deep learning algorithm to perform a secondary search, confirmation, and re-judgment of the defects in areas where defects may occur. The re-judgment result is used as the final result. If there is a pit defect in the area, the pixel value in the corresponding 2D image will change significantly. The 2D algorithm determines whether there is a defect based on the principle that the pit causes the grayscale value of the image to darken.

3. The method for detecting the quality of the sealing nail weld under complex environment according to claim 1, It is characterized in that After step S3, the step of removing mechanical vibration is also included, which specifically includes the following steps: When calculating the flatness of the sealing nail, the sealing nail plane is evenly divided into several areas, and the average height value in each area is calculated respectively. The maximum and minimum values ​​of these areas are used as the flatness of the sealing nail, and the average value method is used for filtering. When the weld is positioned, the reference is selected on the profile contour line of the weld, and the average height value of the contour line that is relatively flat to a certain section of the profile contour line outside the weld is calculated as the reference of the contour line; this reference value is used to calculate the characteristic parameters of the weld, including the position points on both sides of the weld, the highest point of the weld and the lowest point of the weld; Search for the weld point on the step side of the weld sealing nail, determine the penetration range according to the welding process, and find the intersection of the weld and the base material within the penetration range; on each profile contour line, determine the possible edge points according to the height difference between the reference and the weld edge, save each possible edge point of the weld area image in an array, and then filter these possible edge points; select the first several point positions, calculate the mean value of the position x of these points, and then compare the adjacent edge points of each contour line. If the difference between the front and rear positions meets the requirements, the current point is the actual edge point of the contour line; if it exceeds the range, the point is within the first N points, then the average value of the first N points is taken as the current edge point value; otherwise, the average value of the N / 2 values ​​before and after the point is taken as the edge value of the point; When searching for other key feature points of the weld, consider removing the influence of some outliers to obtain values ​​close to the actual ones.

4. The method for detecting the quality of the sealing nail weld under complex environment according to claim 1, It is characterized in that Before step S7, the step of processing the interference signal caused by the algorithm is also included, which specifically includes the following steps: After searching through the software, the distribution position of weld defects is obtained. Due to various reasons, there will be some disconnections between defects. The connectivity analysis and calculation of these discrete defects are carried out. Taking a certain defect as the center, the distance between it and the surrounding adjacent defects is calculated. The connectivity of the defects is judged by these distance values, so as to carry out connectivity analysis and calculation of the small defects separated from the algorithm and obtain the actual edge of the defect.

5. An electronic device, It is characterized in that The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for detecting the quality of the sealing pin weld in a complex environment as described in any one of claims 1 to 4 are implemented.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method for detecting the quality of a sealing pin weld under a complex environment as described in any one of claims 1 to 4 are implemented.