A method, apparatus, equipment, and readable storage medium for detecting incomplete weld joints.

By calculating the weld edge contour and using image processing technology, the problem of low inspection efficiency in battery production lines caused by inconspicuous weld defects has been solved, achieving efficient and accurate detection of weld defects.

CN115456995BActive Publication Date: 2026-01-30HANGZHOU ANMAISHENG INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211121725.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2026-01-30
Estimated Expiration
2042-09-15

AI Technical Summary

Technical Problem

In existing technologies, batteries with inconspicuous weld defects are difficult to identify effectively, resulting in low inspection efficiency on battery production lines and an inability to meet production requirements.

Method used

By calculating the weld edge contour, the intersection removal area of ​​the inner and outer contours and the final weld area are obtained. Combined with image processing technology, it is determined whether there is a false weld in the weld, including steps such as polar coordinate expansion of RGB and HLS images, threshold segmentation and difference operation.

Benefits of technology

It improves the efficiency and accuracy of weld defect detection, effectively identifies inconspicuous weld defects, and avoids misjudgment of weld defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115456995B_ABST
    Figure CN115456995B_ABST
Patent Text Reader

Abstract

This invention discloses a method for detecting weld defects, applied in the field of visual algorithm detection. The method includes: calculating the weld edge contour based on the acquired contour of the weld area to be detected, obtaining the inner and outer contour intersection removal area and the final weld area; if the inner and outer contour intersection removal area is not zero, then the weld is determined to have defects; if the inner and outer contour intersection removal area is zero, then the width of the final weld area is calculated; the area where the width of the final weld area is less than a width threshold is calculated as the first defective weld area; if the area of ​​the first defective weld area is not zero, then the weld is determined to have defects. This invention determines whether a weld area has defects by using the area of ​​the inner and outer contour intersection removal area and the width of the final weld area, effectively identifying weld defects that are not obvious, thus improving the efficiency of weld defect detection. Furthermore, this invention also provides a weld defect detection device, equipment, and readable storage medium, which also have the above-mentioned beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visual algorithm detection, and in particular to a method, apparatus, equipment, and readable storage medium for detecting weld defects. Background Technology

[0002] During the laser welding process of battery cells, insufficient laser power during welding can prevent normal crystallization at the weld seam. Alternatively, the laser may be blocked by foreign objects or stop output abnormally, resulting in an insufficient contact area between the cell and the electrode post, or even complete failure to weld together. This leads to an increase in the internal resistance of the battery. For the battery, the increased internal resistance due to poor welding reduces the charging and discharging efficiency.

[0003] To prevent batteries with faulty welds from circulating in the market, it is necessary to inspect the weld seams of the batteries for faulty welds. Currently, identifying faulty welds mainly relies on manual visual inspection, judging the length, width, and total length of the weld seam. However, battery production lines operate at high speeds, inspecting more than 100 weld seams at a time, with an inspection cycle of 1 to 2 minutes. Furthermore, while manual visual inspection can identify obvious weld defects, it is difficult to effectively identify less obvious defects. Therefore, it is insufficient to conduct routine inspections on every weld seam to meet production requirements. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method, apparatus, equipment and readable storage medium for detecting weld defects, which solves the problems of difficulty in effectively identifying weld defects that are not obvious and low detection efficiency in the prior art.

[0005] To solve the above-mentioned technical problems, the present invention provides a method for detecting weld defects, comprising:

[0006] Based on the obtained contour of the weld area to be inspected, the weld edge contour is calculated to obtain the intersection removal area of ​​the inner and outer contours and the final weld area.

[0007] If the area to be removed from the intersection of the inner and outer contours is not zero, then it is determined that the weld has a poor weld.

[0008] If the area to be removed from the intersection of the inner and outer contours is zero, then the width of the final weld area is calculated.

[0009] The region whose width is less than a width threshold is calculated and designated as the first poor weld area;

[0010] If the area of ​​the first poorly welded region is not zero, then the weld is determined to have a poor weld.

[0011] Optionally, determining that the weld has a faulty weld if the area of ​​the first faulty weld region is not zero includes:

[0012] The central hole of the plaster is expanded to obtain the expanded region.

[0013] Perform a difference operation between the first cold solder joint area and the expansion area to obtain the second cold solder joint area;

[0014] Determine whether the area of ​​the second cold solder joint is zero;

[0015] If the area of ​​the second cold weld region is zero, then it is determined that the weld does not have a cold weld.

[0016] If the area of ​​the second cold weld region is not zero, then the weld is determined to have a cold weld.

[0017] Optionally, the step of calculating the weld edge contour based on the obtained contour of the weld area to be inspected, to obtain the intersection removal area of ​​the inner and outer contours and the final weld area, includes:

[0018] Calculate the outer contour removal area and the inner contour removal area based on the contour of the weld area to be inspected and the weld edge contour;

[0019] The intersection of the outer contour removal region and the inner contour removal region is taken to obtain the inner and outer contour intersection removal region;

[0020] Perform a difference operation on the weld area to be inspected, and subtract the outer contour removal area and the inner contour removal area to obtain the final weld area.

[0021] Optionally, calculating the outer contour removal area based on the contour of the weld area to be detected and the weld edge contour includes:

[0022] The weld area to be detected is expanded in polar coordinates using the B channel image of the RGB image and the S channel image of the HLS image to obtain the first weld polar coordinate image and the second weld polar coordinate image.

[0023] Threshold segmentation is performed on the first and second polar coordinate images of the weld to obtain a first dark region and a second dark region; inverse polar coordinate transformation is performed on the first and second dark regions to obtain a first weld dark region and a second weld dark region; the union of the first and second weld dark regions is taken to obtain a third weld dark region.

[0024] Perform a difference operation between the weld area to be detected and the dark area of ​​the third weld to obtain the bright area of ​​the first weld.

[0025] The bright area of ​​the first weld that intersects with the outer contour line of the weld area to be inspected is determined as the outer contour removal area.

[0026] Optionally, calculating the inner contour removal area based on the contour of the weld area to be detected and the weld edge contour includes:

[0027] The area of ​​the weld to be inspected is filled to obtain a filled area;

[0028] The filled region is expanded in polar coordinates using the S-channel image of the HLS image to obtain a filled polar coordinate image; the filled polar coordinate image is then segmented by thresholding to obtain a fourth dark region; and the fourth dark region is then subjected to inverse polar coordinate transformation to obtain a fourth weld dark region.

[0029] Perform a difference operation on the filled area and the dark area of ​​the fourth weld to obtain the bright area inside the outer contour of the weld, which is used as the bright area of ​​the second weld.

[0030] The bright area of ​​the second weld that intersects with the inner contour line of the weld area to be inspected is determined as the inner contour removal area.

[0031] Optionally, before performing polar coordinate unwrapping on the weld area to be detected using the B-channel image of the RGB image and the S-channel image of the HLS image, the method further includes:

[0032] The B channel of the RGB image is subjected to mean filtering.

[0033] Optionally, after determining that the weld has a poor weld, the method further includes:

[0034] Save the image of the weld seam with the defective weld.

[0035] The present invention also provides a device for detecting weld defects, comprising:

[0036] The first calculation module is used to calculate the weld edge contour based on the obtained contour of the weld area to be detected, and obtain the inner and outer contour intersection removal area and the final weld area.

[0037] The first confirmation module is used to determine that the weld has a poor weld if the area to be removed from the intersection of the inner and outer contours is not zero.

[0038] The second calculation module is used to calculate the width of the final weld area if the area to be removed from the intersection of the inner and outer contours is zero.

[0039] The third calculation module is used to calculate the area where the width of the final weld area is less than the width threshold, and use it as the first poor weld area.

[0040] The second determining module is used to determine that the weld has a poor weld if the area of ​​the first poor weld area is not zero.

[0041] The present invention also provides a weld defect detection device, comprising:

[0042] Memory, used to store computer programs;

[0043] A processor is used to execute the computer program to implement the steps of the above-described method for detecting weld defects.

[0044] The present invention also provides a readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the steps of the above-described method for detecting weld defects.

[0045] As can be seen, this invention calculates the weld edge contour based on the obtained contour of the weld area to be inspected, obtaining the intersection removal area of ​​the inner and outer contours and the final weld area. If the intersection removal area of ​​the inner and outer contours is not zero, it is determined that the weld has a false weld. If the intersection removal area of ​​the inner and outer contours is zero, the width of the final weld area is calculated. The area where the width of the final weld area is less than a width threshold is designated as the first false weld area. If the area of ​​the first false weld area is not zero, it is determined that the weld has a false weld. This invention determines whether there is a false weld in the weld area by using the area of ​​the intersection removal area of ​​the inner and outer contours and the width of the final weld area. Compared with the human eye, it can effectively identify weld defects that are not obvious, thus improving the efficiency of weld false weld detection. In addition, this invention also provides a weld false weld detection device, equipment, and readable storage medium, which also have the above-mentioned beneficial effects. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0047] Figure 1 A flowchart of a method for detecting incomplete weld joints provided in an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of the contour of a weld area to be inspected, provided for an embodiment of the present invention;

[0049] Figure 3 This is a schematic diagram of a weld defect provided in an embodiment of the present invention;

[0050] Figure 4 A flowchart of another method for detecting weld defects provided in an embodiment of the present invention;

[0051] Figure 5 This is a schematic diagram of a weld defect detection device provided in an embodiment of the present invention;

[0052] Figure 6 This is a schematic diagram of a weld defect detection device provided in an embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0054] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for detecting incomplete weld joints according to an embodiment of the present invention. The method may include:

[0055] S101: Based on the obtained contour of the weld area to be inspected, calculate the weld edge contour to obtain the intersection removal area of ​​the inner and outer contours and the final weld area.

[0056] In this embodiment, the execution subject is a terminal. This embodiment does not limit the type of terminal, as long as it can perform the operation of detecting weld defects. For example, it can be a general-purpose terminal or a dedicated terminal. This embodiment uses one image to be inspected as an example, but there can be multiple images to be inspected. This embodiment does not limit the number of images to be inspected by the terminal.

[0057] In this embodiment, the terminal calculates the weld edge contour based on the obtained contour of the weld area to be inspected, obtaining the intersection removal area of ​​the inner and outer contours of the weld and the final weld area. The contour of the weld area to be inspected can be found in [reference needed]. Figure 2 , Figure 2 This is a schematic diagram of the outline of a weld area to be inspected, provided in an embodiment of the present invention. 41 represents the outer outline of the weld area to be inspected, and 42 represents the inner outline of the weld area to be inspected. The area between the inner and outer outlines is the outline of the weld area to be inspected. The area to be removed by removing the intersection of the inner and outer contours of the weld is the intersection of the unwelded portions inside and outside the welded portion of the weld area within the weld area outline. The welded portion of the weld is the completed welded portion within the weld area outline. Please refer to [reference needed] for details. Figure 3 , Figure 3This is a schematic diagram of a weld defect provided in an embodiment of the present invention. 120 represents the intersection of the unwelded portions inside and outside the welded area, i.e., the area where the intersection of the inner and outer contours of the weld is removed. This embodiment does not limit the start time for acquiring the contour of the weld area to be detected; for example, it can start automatically after receiving the image to be detected, or it can start after receiving a start command. This embodiment does not limit the frequency of acquiring the contour of the weld area to be detected; for example, it can be acquired in real time, or it can be acquired once every preset acquisition time period. This embodiment does not limit the setting value of the preset acquisition time period; for example, it can be 2 seconds, or it can be 4 seconds. This embodiment does not limit the basis for setting the preset acquisition time period; for example, it can be set according to the production line speed, and the faster the production line speed, the smaller the preset acquisition time period setting value. To ensure the efficiency of weld defect detection, this embodiment can adopt a real-time acquisition method.

[0058] Furthermore, to obtain the intersection removal area of ​​the weld's inner and outer contours and the final weld area more accurately, the above-mentioned calculation of the weld edge contour based on the obtained contour of the weld area to be inspected, to obtain the intersection removal area of ​​the inner and outer contours and the final weld area, may include the following steps:

[0059] Step S11: Calculate the outer contour removal area and the inner contour removal area based on the contour of the weld area to be inspected and the weld edge contour.

[0060] In this embodiment, the outer contour removal area refers to the unwelded portion outside the welded part of the weld area within the weld area contour, and the inner contour removal area refers to the unwelded portion inside the welded part of the weld area within the weld area contour. Please refer to [reference needed] for details. Figure 3 , Figure 3 This is a schematic diagram of a weld defect provided in an embodiment of the present invention. 110 is the unwelded portion outside the welded portion of the weld, and 130 is the unwelded portion inside the welded portion of the weld.

[0061] Step S12: Take the intersection of the outer contour removal area and the inner contour removal area to obtain the inner and outer contour intersection removal area.

[0062] In this embodiment, the intersection of the obtained outer contour removal area and inner contour removal area is taken as the inner and outer contour intersection removal area.

[0063] Step S13: Perform a difference operation on the weld area to be inspected, subtract the outer contour removal area and the inner contour removal area to obtain the final weld area.

[0064] In this embodiment, the difference operation is performed between the area to be detected weld and the outer contour removal area and the inner contour removal area, and the remaining area is used as the final weld area.

[0065] Furthermore, to obtain the outer contour removal area more accurately, the above calculation of the outer contour removal area based on the contour of the weld area to be inspected and the weld edge contour may include the following steps:

[0066] Step S21: Using the B channel image of the RGB image and the S channel image of the HLS image, perform polar coordinate expansion on the weld area to be detected to obtain the first weld polar coordinate image and the second weld polar coordinate image.

[0067] In this embodiment, the weld seam region to be detected in the B channel (B channel is the blue channel in the RGB image) of an RGB image (an image representation where R represents the red channel, G represents the green channel, and B represents the blue channel) is expanded using polar coordinates to obtain a histogram of the weld seam region to be detected in the B channel image of the RGB image, which serves as the first weld seam polar coordinate image. Similarly, the weld seam region to be detected in the S channel (S channel is the hue channel) of an HLS image (an image representation) is expanded using polar coordinates to obtain a histogram of the weld seam region to be detected in the S channel image of the HLS image, which serves as the second weld seam polar coordinate image.

[0068] Furthermore, in order to improve the uniformity of the image and the efficiency of detection, before performing polar coordinate expansion on the weld area to be detected using the B channel image of the RGB image to obtain the first polar coordinate image of the weld, the method may further include: performing mean filtering processing on the B channel image of the RGB image.

[0069] This embodiment does not limit the frequency of mean filtering processing on the B channel image of the RGB image. For example, it can perform mean filtering processing on the B channel image of the RGB image in real time, or it can be performed once every preset processing time period. This embodiment does not limit the setting value of the preset processing time period, as long as the above mean filtering processing operation can be completed in time. For example, it can be 5 seconds or 10 seconds. This embodiment does not limit the setting basis of the preset processing time period. For example, it can be set according to the number of images to be detected per unit time. The more images to be detected per unit time, the smaller the preset processing time period setting value; it can also be customized by the operator. In order to ensure the detection rate of weld defects, this embodiment can perform mean filtering processing on the B channel image of the RGB image in real time.

[0070] Step S22: Perform threshold segmentation on the first weld polar coordinate image and the second weld polar coordinate image to obtain the first dark region and the second dark region; perform inverse polar coordinate transformation on the first dark region and the second dark region to obtain the first weld dark region and the second weld dark region; take the union of the first weld dark region and the second weld dark region to obtain the third weld dark region.

[0071] Step S23: Perform a difference operation between the weld area to be inspected and the dark area of ​​the third weld to obtain the bright area of ​​the first weld.

[0072] In this embodiment, the dark area of ​​the third weld is subtracted from the area of ​​the weld to be inspected to obtain the bright area of ​​the first weld.

[0073] Step S24: The bright area of ​​the first weld that intersects with the outer contour line of the weld area to be inspected is determined as the outer contour removal area.

[0074] Furthermore, to obtain the inner contour removal area more accurately, the above calculation of the inner contour removal area based on the contour of the weld area to be inspected and the weld edge contour may include the following steps:

[0075] Step S31: Fill the area of ​​the weld to be inspected to obtain the filled area.

[0076] In this embodiment, the area of ​​the weld to be inspected is filled to obtain a filled area, which is the area within the outer contour line of the area of ​​the weld to be inspected.

[0077] Step S32: Using the S-channel image of the HLS image, perform polar coordinate expansion on the filled region to obtain the filled polar coordinate image; perform threshold segmentation on the filled polar coordinate image to obtain the fourth dark region; perform inverse polar coordinate transformation on the fourth dark region to obtain the fourth weld dark region.

[0078] In this embodiment, the filled region of the S-channel image of the HLS image is expanded in polar coordinates to obtain the histogram of the filled region, which serves as the filled polar coordinate image. Threshold segmentation is performed on the filled polar coordinate image to obtain the fourth dark region. Inverse polar coordinate transformation is performed on the fourth dark region to obtain the fourth weld dark region, which represents the welded portion of the image to be detected.

[0079] Step S33: Perform a difference operation on the filled area and the dark area of ​​the fourth weld to obtain the bright area inside the outer contour of the weld, which is used as the bright area of ​​the second weld.

[0080] In this embodiment, the dark area of ​​the fourth weld is subtracted from the filled area to obtain the bright area inside the outer contour of the weld, which is used as the bright area of ​​the second weld.

[0081] Step S34: The bright area of ​​the second weld that intersects with the inner contour line of the weld area to be inspected is identified as the inner contour removal area.

[0082] S102: If the area to be removed from the intersection of the inner and outer contours is not zero, then the weld is determined to have a false weld.

[0083] In this embodiment, if the area to be removed from the intersection of the inner and outer contours in the weld area to be detected is not zero, it is determined that there is a false weld in the weld, and the detection program can be terminated at this time.

[0084] S103: If the area removed from the intersection of the inner and outer contours is zero, then calculate the width of the final weld area.

[0085] In this embodiment, if the area where the intersection of the inner and outer contours of the weld region to be detected is zero, then the step of calculating the width of the final weld region is performed. This embodiment does not limit the method of calculating the width of the final weld region, as long as the width of the final weld region can be accurately calculated. For example, the width of the final weld region can be calculated by performing polar coordinate transformation on the final weld region and then using a travel algorithm on the transformed region; other methods that can calculate the width of the final weld region can also be used.

[0086] S104: Calculate the area where the width of the final weld region is less than the width threshold, and take it as the first poor weld region.

[0087] S105: If the area of ​​the first cold weld region is not zero, then the weld is determined to have a cold weld.

[0088] In this embodiment, if the area of ​​the first poor weld area is not zero, that is, if the width of the final weld area is too small, then it is determined that the weld has a poor weld.

[0089] Based on the above embodiments, further, in order to prevent the weld seam from being mistakenly judged as a cold weld when it is welded to the center hole, and to improve the accuracy of the detection, the above method of determining that the weld seam has a cold weld if the area of ​​the first cold weld area is not zero may include the following steps, for details please refer to Figure 4 , Figure 4 A flowchart illustrating another method for detecting weld defects provided in an embodiment of the present invention. The method may include:

[0090] S201: Perform an expansion operation on the central hole of the plaster to obtain an expanded area.

[0091] S202: Perform a difference operation on the first cold solder joint area and the expansion area to obtain the second cold solder joint area.

[0092] In this embodiment, the difference operation is performed between the first poor weld area and the expansion area to obtain the area where the actual weld has poor weld, thus obtaining the second poor weld area.

[0093] S203: Determine whether the area of ​​the second cold solder joint is zero. If the area of ​​the second cold solder joint is zero, proceed to step S204; if the area of ​​the second cold solder joint is not zero, proceed to step S205.

[0094] S204: If the area of ​​the second cold weld zone is zero, then the weld is determined to be without cold weld.

[0095] In this embodiment, if the area of ​​the second cold weld region is zero, it is determined that there is no cold weld in the weld region, and the detection procedure can be terminated.

[0096] S205: If the area of ​​the second cold weld region is not zero, then the weld is determined to have a cold weld.

[0097] In this embodiment, if the area of ​​the second cold weld region is not zero, it is determined that there is a cold weld in the weld region, and the detection program can be terminated.

[0098] Furthermore, to facilitate data traceability in the future, after determining that the weld seam has a faulty weld, the method may also include: saving the image of the weld seam with the faulty weld.

[0099] In this embodiment, images of weld seams with incomplete welds detected by the terminal are saved. This embodiment does not limit the frequency of saving images of weld seams with incomplete welds, as long as the step of saving the images of weld seams with incomplete welds can be completed. For example, saving can be performed in real time, or it can be performed once every preset saving time interval. This embodiment does not limit the setting value of the preset saving time interval; for example, it can be 10 seconds or 20 seconds. This embodiment does not limit the basis for setting the preset saving time interval; for example, it can be set according to the production line speed, where a faster production line speed results in a smaller preset saving time interval; it can also be set by the operator. To ensure timely saving of images of weld seams with incomplete welds detected, this embodiment can adopt a real-time saving method.

[0100] The weld defect detection method provided in this invention calculates the weld edge contour based on the obtained contour of the weld area to be detected, obtaining the inner and outer contour intersection removal area and the final weld area. If the inner and outer contour intersection removal area is not zero, the weld is determined to have a defect; if the inner and outer contour intersection removal area is zero, the width of the final weld area is calculated. The area where the width of the final weld area is less than a width threshold is designated as the first defect area. If the area of ​​the first defect area is not zero, the weld is determined to have a defect. This invention determines whether a weld area has a defect by using the area of ​​the inner and outer contour intersection removal area and the width of the final weld area, effectively identifying weld defects that are not obvious, thus improving the efficiency of weld defect detection. By excluding areas in the first defect area that are welded to the center hole, over-detection of weld defects is avoided, improving the accuracy of weld defect detection.

[0101] The following describes the weld defect detection device provided in the embodiments of the present invention. The weld defect detection device described below and the weld defect detection method described above can be referred to in correspondence.

[0102] Please refer to the details. Figure 5 , Figure 5 A schematic diagram of a weld defect detection device provided in an embodiment of the present invention may include:

[0103] The first calculation module 100 is used to calculate the weld edge contour based on the obtained contour of the weld area to be detected, and obtain the inner and outer contour intersection removal area and the final weld area.

[0104] The first confirmation module 200 is used to determine that the weld has a poor weld if the intersection removal area of ​​the inner and outer contours is not zero.

[0105] The second calculation module 300 is used to calculate the width of the final weld area if the intersection removal area of ​​the inner and outer contours is zero.

[0106] The third calculation module 400 is used to calculate the area where the width of the final weld area is less than the width threshold, and use it as the first poor weld area.

[0107] The second determining module 500 is used to determine that the weld has a poor weld if the area of ​​the first poor weld area is not zero.

[0108] Based on the above embodiments, the second determining module 500 may include:

[0109] The first execution unit is used to expand the central hole of the bar to obtain an expanded region.

[0110] The first calculation unit is used to perform a difference operation on the first cold solder joint area and the expansion area to obtain the second cold solder joint area.

[0111] The judgment unit is used to determine whether the area of ​​the second cold solder joint region is zero.

[0112] The first determining unit is configured to determine that the weld does not have a cold weld if the area of ​​the second cold weld area is zero.

[0113] The second determining unit is used to determine that the weld has a poor weld if the area of ​​the second poor weld area is not zero.

[0114] Based on any of the above embodiments, the first calculation module 100 may include:

[0115] The second calculation unit is used to calculate the outer contour removal area and the inner contour removal area based on the contour of the weld area to be detected and the weld edge contour.

[0116] The second execution unit is used to take the intersection of the outer contour removal region and the inner contour removal region to obtain the inner and outer contour intersection removal region.

[0117] The third calculation unit is used to perform a difference operation on the weld area to be detected, subtracting the outer contour removal area and the inner contour removal area to obtain the final weld area.

[0118] Based on any of the above embodiments, the second computing unit may include:

[0119] The first execution subunit is used to perform polar coordinate expansion on the weld area to be detected using the B channel image of the RGB image and the S channel image of the HLS image to obtain a first weld polar coordinate image and a second weld polar coordinate image.

[0120] The second execution subunit is used to perform threshold segmentation on the first weld polar coordinate image and the second weld polar coordinate image to obtain a first dark region and a second dark region; perform inverse polar coordinate transformation on the first dark region and the second dark region to obtain a first weld dark region and a second weld dark region; and take the union of the first weld dark region and the second weld dark region to obtain a third weld dark region.

[0121] The first calculation subunit is used to perform a difference operation between the weld area to be detected and the dark area of ​​the third weld to obtain the bright area of ​​the first weld.

[0122] The first determining subunit is used to determine the first weld bright area that intersects with the outer contour line of the weld area to be detected as the outer contour removal area.

[0123] The third execution subunit is used to fill the weld area to be inspected to obtain a filled area;

[0124] The fourth execution subunit is used to perform polar coordinate expansion on the filled region using the S-channel image of the HLS image to obtain a filled polar coordinate image; perform threshold segmentation on the filled polar coordinate image to obtain a fourth dark region; and perform inverse polar coordinate transformation on the fourth dark region to obtain a fourth weld dark region.

[0125] The second calculation subunit is used to perform a difference operation on the filled area and the dark area of ​​the fourth weld to obtain the bright area inside the outer contour line of the weld, which is used as the second weld bright area.

[0126] The second determining subunit is used to determine the second weld bright area that intersects with the inner contour line of the weld area to be detected as the inner contour removal area.

[0127] Based on any of the above embodiments, the second computing unit may further include:

[0128] The fifth execution subunit is used to perform mean filtering on the B channel image of the RGB image.

[0129] Based on any of the above embodiments, the weld defect detection device may further include:

[0130] The storage module is used to save the images of the welds with poor weld quality.

[0131] It should be noted that the order of the modules, units, and sub-units in the above-mentioned weld defect detection device can be changed without affecting the logic.

[0132] The weld defect detection device provided in this embodiment of the invention comprises a first calculation module 100 for calculating the weld edge contour based on the acquired contour of the weld area to be detected, obtaining the inner and outer contour intersection removal area and the final weld area. A first confirmation module 200 is used to determine that the weld has a defect if the inner and outer contour intersection removal area is not zero. A second calculation module 300 is used to calculate the width of the final weld area if the inner and outer contour intersection removal area is zero. A third calculation module 400 is used to calculate the area where the width of the final weld area is less than a width threshold, as the first defect area. A second determination module 500 is used to determine that the weld has a defect if the area of ​​the first defect area is not zero. This invention determines whether a weld area has a defect by using the area of ​​the inner and outer contour intersection removal area and the width of the final weld area. It can effectively identify weld defects that are not obvious, improving the efficiency of weld defect detection. By excluding areas in the first defect area that are welded to the center hole, over-detection of weld defects is avoided, improving the accuracy of weld defect detection.

[0133] The following describes the weld defect detection equipment provided in the embodiments of the present invention. The weld defect detection equipment described below and the weld defect detection method described above can be referred to in correspondence.

[0134] Please refer to Figure 6 , Figure 6 A schematic diagram of the structure of the weld defect detection equipment provided in the embodiments of the present invention may include:

[0135] Memory 10 is used to store computer programs;

[0136] The processor 20 is used to execute computer programs to implement the above-mentioned method for detecting weld defects.

[0137] The memory 10, processor 20, and communication interface 31 all communicate with each other through the communication bus 32.

[0138] In this embodiment of the invention, the memory 10 is used to store one or more programs. The programs may include program code, which includes computer operation instructions. In this embodiment, the memory 10 may store programs for implementing the following functions:

[0139] Based on the obtained contour of the weld area to be inspected, the weld edge contour is calculated to obtain the intersection removal area of ​​the inner and outer contours and the final weld area.

[0140] If the area to be removed from the intersection of the inner and outer contours is not zero, then it is determined that the weld has a poor weld.

[0141] If the area to be removed from the intersection of the inner and outer contours is zero, then the width of the final weld area is calculated.

[0142] The region whose width is less than a width threshold is calculated and designated as the first poor weld area;

[0143] If the area of ​​the first poorly welded region is not zero, then the weld is determined to have a poor weld.

[0144] In one possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store the operating system and applications required for at least one function; and the data storage area may store data created during use.

[0145] Furthermore, memory 10 may include read-only memory and random access memory, providing instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores operating systems and operating instructions, executable modules, or data structures, or subsets thereof, or extended sets thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and handling hardware-based tasks.

[0146] Processor 20 can be a central processing unit (CPU), an application-specific integrated circuit, a digital signal processor, a field-programmable gate array, or other programmable logic device. Processor 20 can be a microprocessor or any conventional processor. Processor 20 can call programs stored in memory 10.

[0147] The communication interface 31 can be the interface of the communication module, used to connect with other devices or systems.

[0148] Of course, it should be noted that, Figure 6 The structure shown does not constitute a limitation on the weld defect detection equipment in the embodiments of this application. In practical applications, the weld defect detection equipment may include more advanced technologies. Figure 6 More or fewer components as shown, or combinations of certain components.

[0149] The readable storage medium provided in the embodiments of the present invention is described below. The readable storage medium described below can be referred to in correspondence with the weld defect detection method described above.

[0150] The present invention also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for detecting weld defects.

[0151] The readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0152] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0153] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0154] Finally, it should be noted that in this document, relationships such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0155] The above provides a detailed description of the weld seam insufficiency detection method, apparatus, equipment, and readable storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method of detecting a false weld in a weld seam, characterized in that The method comprises the following steps: According to the contour of the obtained weld area to be detected, the weld edge contour is calculated to obtain an inner-outer contour intersection removal area and a final weld area; If the inner-outer contour intersection removal area is not zero, it is determined that the weld has a false weld; If the inner-outer contour intersection removal area is zero, the width of the final weld area is calculated; The area where the width of the final weld area is less than a width threshold is calculated as a first false weld area; If the area of the first false weld area is not zero, it is determined that the weld has a false weld.

2. The false weld detection method of a weld seam according to claim 1, characterized in that, The step of determining that the weld has a false weld if the area of the first false weld area is not zero comprises the following steps: An inflation operation is performed on the center hole of the gasket to obtain an inflation area; A difference set operation is performed on the first false weld area and the inflation area to obtain a second false weld area; It is judged whether the area of the second false weld area is zero; If the area of the second false weld area is zero, it is determined that the weld does not have a false weld; If the area of the second false weld area is not zero, it is determined that the weld has a false weld.

3. The false weld detection method of a weld seam according to claim 1, characterized by, The step of calculating the weld edge contour according to the contour of the obtained weld area to be detected comprises the following steps: According to the contour of the weld area to be detected and the weld edge contour, an outer contour removal area and an inner contour removal area are calculated; The outer contour removal area and the inner contour removal area are intersected to obtain the inner-outer contour intersection removal area; A difference set operation is performed on the weld area to be detected to subtract the outer contour removal area and the inner contour removal area to obtain the final weld area.

4. The false weld detection method of a weld seam according to claim 3, characterized in that, The step of calculating the outer contour removal area according to the contour of the weld area to be detected and the weld edge contour comprises the following steps: The weld area to be detected is polar coordinate expanded through the B channel image of the RGB image and the S channel image of the HLS image to obtain a first weld polar coordinate image and a second weld polar coordinate image; The first weld polar coordinate image and the second weld polar coordinate image are threshold segmented to obtain a first dark area and a second dark area; the first dark area and the second dark area are inverse polar coordinate transformed to obtain a first weld dark area and a second weld dark area; and the first weld dark area and the second weld dark area are intersected to obtain a third weld dark area; A difference set operation is performed on the weld area to be detected and the third weld dark area to obtain a first weld bright area; The first weld bright area intersecting with the outer contour line of the weld area to be detected is determined as the outer contour removal area.

5. The false weld detection method of a weld seam according to claim 3, characterized in that, The step of calculating the inner contour removal area according to the contour of the weld area to be detected and the weld edge contour comprises the following steps: The weld area to be detected is filled to obtain a filled area; The filled area is polar coordinate expanded through the S channel image of the HLS image to obtain a filled polar coordinate image; the filled polar coordinate image is threshold segmented to obtain a fourth dark area; and the fourth dark area is inverse polar coordinate transformed to obtain a fourth weld dark area; Performing a difference set operation on the filling region and the fourth welding seam dark region to obtain a bright region inside an outer contour line of the welding seam as a second welding seam bright region; The second welding seam bright region intersecting with the inner contour line of the welding seam region to be detected is determined as the inner contour removal region.

6. The false weld detection method of a weld seam according to claim 4, characterized in that, Before the polar coordinate expansion on the welding seam region to be detected through the B channel image of the RGB image and the S channel image of the HLS image, the method further includes: Performing mean filtering processing on the B channel image of the RGB image.

7. The false weld detection method of any one of claims 1 to 6, wherein, After the determination that the welding seam has virtual welding, the method further includes: Saving the welding seam image having virtual welding.

8. A false weld detection device for a weld, characterized by The method includes: A first calculation module configured to calculate a welding seam edge contour according to the obtained contour of the welding seam region to be detected, to obtain an inner-outer contour intersection removal region and a final welding seam region; A first confirmation module configured to determine that the welding seam has virtual welding if the inner-outer contour intersection removal region is not zero; A second calculation module configured to calculate the width of the final welding seam region if the inner-outer contour intersection removal region is zero; A third calculation module configured to calculate a region in which the width of the final welding seam region is less than a width threshold value as a first virtual welding region; A second determination module configured to determine that the welding seam has virtual welding if the area of the first virtual welding region is not zero.

9. A weld miss detection apparatus, characterized by, The method includes: A memory configured to store a computer program; A processor configured to execute the computer program to implement the steps of the welding virtual welding detection method according to any one of claims 1 to 7.

10. A readable storage medium, characterized by, The readable storage medium has a computer program stored therein, and the computer program is executed by the processor to implement the steps of the welding virtual welding detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Laser brazing weld surface defect detection method based on envelope line recognition

    CN110987944A

  • Method for extracting pole welding annular region

    CN112200786A

  • Wave-soldering spot defect detection method and system

    CN113724216A