Detection method, detection device and detection system for welding seam arching defect
By extracting features such as apex angle value, base angle value, offset value and point distance value from the weld depth map, abnormal positions are identified and compared, solving the problem of misjudgment in existing detection methods and achieving highly accurate detection of weld bulging defects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-30
- Publication Date
- 2026-03-31
AI Technical Summary
Existing machine vision inspection methods are prone to misjudgment when detecting bulging defects in power battery welds, resulting in poor detection accuracy and an inability to effectively identify localized, small-scale bulging defects.
By extracting edge contours from the weld depth map at certain intervals, extracting apex angle values, bottom angle values, first offset values, second offset values, and point distance values, abnormal positions are identified, and these values are compared with preset ranges and specification values to determine whether there is an arching defect in the weld.
This improves the accuracy of weld bulging defect detection, avoids misjudgment and missed judgment, and ensures the reliability of the test results.
Smart Images

Figure CN121767347A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual algorithm detection, and in particular to a method for detecting bulging defects, a detection device for implementing the detection method, and a detection system having the detection device. Background Technology
[0002] With the booming development of the new energy vehicle market, the demand for energy storage continues to rise, and the application prospects of power batteries are broad. From a structural perspective, existing power batteries mainly include cylindrical batteries, prismatic batteries, and pouch batteries. Taking cylindrical and prismatic batteries as examples... Figure 1 As shown, cylindrical and prismatic batteries typically include a casing sidewall 1 and a top cover 2 that fits onto the casing sidewall 1. During battery assembly, the top cover 2 needs to be welded to the casing sidewall 1, forming a weld 3 at their junction.
[0003] During the welding process, excessively high welding laser power or excessively slow welding speed may cause localized defects such as those found in weld seam 3. Figure 2 The arching defect is typically located on the weld bead and appears as a discontinuous, irregular, localized, small-scale abnormal protrusion. The presence of arching can disrupt the originally smooth curved surface of the housing sidewall 1 or top cover 2, affecting subsequent module assembly, and may deform upon impact or compression, ultimately potentially causing the electrolyte diaphragm to be punctured.
[0004] To eliminate safety hazards posed by welds with relatively arched structures, the assembled power battery needs to be inspected. Currently, common inspection methods include manual visual inspection and machine vision inspection. However, manual visual inspection is inefficient. Compared to manual visual inspection, existing machine vision inspection is more efficient, but it often involves obtaining cross-sections of one or more locations on the weld where suspected arching defects exist. Then, using the original straight line and its extension of the shell sidewall or top cover contour in the cross-section as a baseline, the maximum distance between the weld contour and the baseline is taken as the arch height. The obtained arch height is then compared with a limit value to determine whether a relative arching defect exists in the weld. However, this method is prone to misjudgment and has poor detection accuracy. Summary of the Invention
[0005] Based on this, the purpose of the present invention is, on the one hand, to provide a method for detecting weld arching defects, which can detect whether there are arching defects in the weld between the top cover of the power battery and the side wall of the casing, with high detection accuracy.
[0006] A method for detecting weld bulging defects includes the following steps:
[0007] S1: Extract the edge contour from the weld depth map at m positions at intervals of the first step distance along the extension direction of the weld, where m≥3. The edge contour consists of the shell sidewall contour, the top cover contour, and the weld contour. The plane containing the edge contour is perpendicular to the extension direction of the weld. S2: Perform feature extraction processing on the edge contour of each cut-off position to obtain the vertex angle value, bottom angle value, point distance value, first offset value and second offset value of the edge contour of each cut-off position; S3: Take the intercepted position corresponding to the edge contour whose vertex value conforms to the first preset range as the conforming position, determine whether the conforming position is an abnormal position based on the bottom corner value, point distance value, first offset value and second offset value of the edge contour of the conforming position, and obtain the abnormal position set; S4: Obtain the bulging value of the edge contour of the abnormal position in the abnormal position set, compare the obtained bulging value with the specification value, and determine whether the weld has bulging defects based on the comparison result.
[0008] On the other hand, the present invention provides a device for detecting weld bulging defects, comprising: The contour acquisition module is used to extract the edge contour at m positions with a first step distance from the weld depth map along the extension direction of the weld, where m≥3. The edge contour is composed of the shell sidewall contour, the top cover contour and the weld contour, and the plane where the edge contour is located is perpendicular to the extension direction of the weld. The feature extraction module is used to perform feature extraction processing on the edge contour of each cut-off position, and obtain the vertex angle value, bottom angle value, point distance value, first offset value, second offset value and point distance value of the edge contour at each cut-off position; The anomaly identification module is used to extract the truncated position corresponding to the edge contour whose vertex value conforms to the first preset range as the conformation position, determine whether the conformation position is an anomaly position based on the bottom corner value, point distance value, first offset value and second offset value of the edge contour of the conformation position, and obtain the set of anomaly positions; The anomaly analysis module is used to obtain the bulging value of the edge contour of the anomaly position in the set of anomaly positions, compare the obtained bulging value with the specification value, and determine whether there is a bulging defect in the weld based on the comparison result.
[0009] In another aspect, the present invention provides a detection system for weld arching defects, including an image acquisition device and a detection device as described above; the image acquisition device generates a weld depth map and transmits it to the detection device, wherein the weld depth map shows the shell sidewall, the top cover, and the weld connecting the shell sidewall and the top cover; the detection device determines whether the weld has an arching defect by analyzing the weld depth map acquired by the image acquisition device.
[0010] The method, apparatus, and system for detecting weld bulging defects described in this invention first identify abnormal locations where bulging defects may exist and obtain the bulging values at these abnormal locations. Then, the bulging values at the selected abnormal locations are compared with the specified values, and the presence of bulging defects in the weld is determined based on the comparison results. In this way, abnormal locations of characteristic values caused by surface flatness defects of the shell sidewall / top cover or assembly process errors can be identified and eliminated, ensuring that the extracted bulging values are reliable, thereby avoiding over-detection and improving detection accuracy.
[0011] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description
[0012] Figure 1 A schematic diagram (side view) of the structure of an existing cylindrical / square-shell power battery. Figure 2 This is an example of a weld arching depression. Figure 3 for Figure 2 The edge contour diagram of section K; Figure 4 This is a schematic diagram of the structure of the detection system of the present invention in the first embodiment; Figure 5 for Figure 3 A schematic diagram showing the positions of the first fitted line, the second fitted line, the apex corner, and the bottom corner in the edge contour shown. Figure 6 for Figure 3 The diagram shows the positions of the first inflection point, the second inflection point, and the first offset distance in the edge contour. Figure 7 for Figure 3 A schematic diagram showing the positions of the first inflection point, the second inflection point, and the second offset distance in the edge contour shown; Figure 8 for Figure 4 A schematic diagram showing the position of the midpoint distance of the edge contour shown; Figure 9 This is a working logic diagram of the anomaly identification module in the first embodiment of the detection system of the present invention; Figure 10 This is a schematic diagram of an abnormal bit and its adjacent cut-off positions in an analysis group in the first embodiment of the detection system of the present invention; Figure 11 This is a working logic diagram of the anomaly analysis module in the first embodiment of the detection system of the present invention; Figure 12 for Figure 3 A schematic diagram of the detection method performed by the detection device shown; Figure 13 for Figure 3The flowchart of the anomaly analysis module in the detection device shown; Figure 14 This is a working logic diagram of the anomaly analysis module in the second embodiment of the detection system of the present invention; Figure 15 This is a schematic diagram showing the position of the feature analysis unit extracting the edge contour in the second embodiment of the detection system of the present invention; Figure label: 1. Shell sidewall; 1a. Shell sidewall profile; 2. Top cover; 2a. Top cover profile; 3. Weld; 3a. Weld profile; h. Protrusion height; K. Section; L1, first fitted line; L2, second fitted line; O, intersection point; Q1, first inflection point; Q2, second inflection point; E, extreme point; R, starting point; α, vertex angle; py1, first offset distance; py2, second offset distance; d, camber height; K, a section perpendicular to the weld extension direction; P, a height reference plane; K 异 The location where abnormal bits are truncated; K 前1 The intercept position located in front of the abnormal position and separated from the abnormal position by one step distance; K 前2 The intercept position located in front of the abnormal position and separated from the abnormal position by two first step distances; K 前3 The intercept position located in front of the abnormal position and separated from the abnormal position by three first step distances; K 后1 The intercept position located behind the abnormal position and separated from the abnormal position by one step distance; K 后2 The intercept position located behind the abnormal position and separated from the abnormal position by two first-step distances; K 后3 A is the intercept position located behind the abnormal position and separated from the abnormal position by three first step distances; 目标 Target area. Detailed Implementation
[0013] It should be understood that the described embodiments are merely some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of the embodiments of this application.
[0014] This invention has discovered that the traditional detection method for assessing weld arching defects by extracting the weld arching height is prone to misjudgment because: (The reason is that...) Figure 3As shown, the traditional inspection method uses the shell sidewall profile 1a / top cover profile 2b and their extensions in the cross-sectional view as reference lines to calculate the protrusion height h of the portion of the weld profile 3a that protrudes from the reference line, and then compares it with the limit value. However, the protrusion height calculated by this method cannot reflect the weld's condition under certain conditions. Figure 3 The bulging at the location marked by the dashed circle can cause some welds with bulging defects to escape inspection and flow into subsequent processes, posing a potential threat to battery reliability.
[0015] To solve the above problems, the present invention compares the morphology of a normal weld conforming to specifications with that of a weld with arching defects (e.g., Figure 2 The morphology of the weld (as shown) is compared and analyzed. Based on the differences in morphological features between normal welds and welds with bulging defects, the bulging value is extracted as a feature value for determining whether a weld has a bulging defect. In actual inspection, reliable feature extraction locations are first screened out. Then, abnormal locations that may have bulging defects are identified from these reliable feature extraction locations, and the bulging value of the edge contour of the abnormal location is calculated. The obtained bulging value is then compared with the specification value, and the presence of a bulging defect in the weld is determined based on the comparison result. In this way, bulging defects can be accurately detected, avoiding missed detections.
[0016] Specifically, this invention first extracts the edge contour from multiple locations at certain intervals along the extension direction of the weld from the weld depth map. It then extracts the apex angle value, base angle value, first offset value, second offset value, and point distance value of the edge contour at each extracted location. The extracted locations with abnormal features are excluded based on the obtained apex angle value. Next, based on the comparison results of the base angle value, offset value, and point distance value with corresponding preset values, abnormal locations that may have bulging defects are identified. The apex angle difference and bulging value corresponding to these abnormal locations are calculated. The reliability of the bulging value of these abnormal locations is determined based on whether the apex angle difference of the abnormal locations is within a preset range. Then, the bulging value of the abnormal locations that conform to the morphological characteristics of bulging defects is calculated. Based on the comparison results of the bulging value and the specification value, it is determined whether the weld has bulging defects: if the bulging value is greater than the specification value, the weld has bulging defects; otherwise, the weld does not have bulging defects.
[0017] Based on the above-mentioned improvement ideas, the present invention will be described in detail below with reference to the accompanying drawings.
[0018] In actual production, the weld seams of prismatic batteries tend to protrude from the top cover surface, while the weld seams of cylindrical batteries tend to protrude from the side wall surface of the casing. The detection system of this invention is applicable to the detection of bulging defects on the weld seams of prismatic batteries, and also applicable to the detection of bulging defects on the weld seams of cylindrical batteries. The working principle of the detection system of this invention will be explained in detail below using the detection of weld seams in cylindrical batteries as an example.
[0019] Figure 4A schematic structure of one embodiment of the detection system of the present invention is shown. Figure 3 As shown, the detection system includes an image acquisition device and a detection device.
[0020] The image acquisition device is specifically a 3D depth camera, located near the inspection station. When the image acquisition device scans the weld 3 at the junction of the top cover 2 and the side wall 1 of the housing at a 30-60° angle, it can obtain images such as... Figure 2 The weld depth diagram shown is partial. The weld depth diagram shows the side wall 1 of the shell, the top cover 2, and the weld 3 at the junction of the side wall 1 and the top cover 2. The obtained weld depth diagram is then transmitted to the detection device for detection.
[0021] The detection device is used to determine whether weld 3 has an arching defect by analyzing the weld depth map obtained by the image acquisition device, specifically including: The contour acquisition module is used to extract the edge contour at m positions with a first step distance from the weld depth map along the extension direction of the weld, where m≥3. The edge contour is composed of the shell sidewall contour, the top cover contour and the weld contour, and the plane where the edge contour is located is perpendicular to the extension direction of the weld. Specifically, the first step distance is 50 pixel units. The number of m and the first step distance can be set according to the length of weld 3. The smaller the first step distance, the more samples are taken and the longer the detection time. The larger the first step distance, the easier it is to skip the defect area, resulting in incorrect detection results.
[0022] The feature extraction module is used to perform feature extraction processing on the edge contour of each cut-off position, and obtain the vertex corner value, bottom corner value, point distance value, first offset value and second offset value of the edge contour of each cut-off position; Specifically, the method for extracting vertex values is as follows: Figure 5 As shown, the shell sidewall 1a is fitted to form the first fitting line L1. At the same time, the top cover contour 2a is fitted to form the second fitting line L2. The second fitting line L2 intersects the first fitting line L1 at point O. The angle between the first fitting line L1 and the second fitting line L2 is the vertex angle α. The angle value of the vertex angle α is extracted to obtain the vertex angle value. The fitting method for the first fitting line L1 and the second fitting line L2 is as follows: Using the shell sidewall contour 1a as a reference, points with a bottom angle range of 30-60° are selected and fitted to form the first fitting line L1; using the top cover contour 2a as a reference, points with a bottom angle range of 30-60° are selected and fitted to form the second fitting line L2. After forming the first fitting line L1, if less than 30% of the fitted points are less than 0.02mm away from the first fitting line L1, the fitting is considered abnormal, and the first 10 points before and after the first fitting point are removed and the first fitting line L1 is refitted. Similarly, after forming the second fitting line L2, if less than 30% of the fitted points are less than 0.02mm away from the second fitting line L2, the fitting is considered abnormal, and the first 10 points before and after the second fitting point are removed and the second fitting line L2 is refitted.
[0023] The method for extracting the base corner value is as follows: Figure 5 As shown, a first inflection point Q1 is obtained at the intersection of the shell sidewall contour 1a and the weld contour 3a, and a second inflection point Q2 is obtained at the intersection of the top cover contour 2a and the weld contour 3a. Connecting the first inflection point Q1 and the second inflection point Q2 forms a connecting line L3. The angle formed between the first fitted line L1 and the connecting line L3 is the first base angle β1, and the angle formed between the second fitted line L2 and the connecting line L3 is the second base angle β2. It should be noted that... Figure 5 The illustration shows the case where the weld contour 3a protrudes from the shell sidewall contour 1a, therefore the aforementioned base angle value is taken as the value of the second base angle β2. If the weld contour 3a protrudes from the top cover contour 2a, then the aforementioned base angle value is taken as the value of the first base angle β1.
[0024] The first inflection point Q1 is obtained as follows: Figure 6 As shown, the weld contour 3a is divided into two parts by taking the highest point E on the weld contour 3a as the dividing point; the vertical distance between each point of the weld contour 3a that is close to the shell contour 1a and the first fitting line L1 is calculated as the first distance value, and the difference between the first distance values of two adjacent points (hereinafter referred to as the first distance difference value) is calculated; at the same time, the angle between the tangent of each point of the weld contour 3a that is close to the shell contour 1a and the first fitting line L1 is calculated to obtain the first angle value. Then, based on the calculated first distance value and first included angle value of each point, as well as the difference between the first distance values of any two adjacent points, the first turning point Q1 is determined. The specific process is as follows: like Figure 6 As shown, taking the orthographic projection of intersection point O on weld contour 3a as the starting point R, and the search direction as the direction closer to shell sidewall 1a, it is determined whether the distance between 5 consecutive points and shell sidewall contour 1a is less than the set value (0.012mm): (1) If so, determine whether the first distance difference value of the next 5 consecutive points after the 5th point is greater than one-fifth of the acquisition resolution, where the acquisition resolution is specifically the acquisition resolution of the 3D depth camera: (a) If the next 5 consecutive first distance difference values are greater than one-fifth of the acquisition resolution, it indicates that the state is increasing. Therefore, the 5th point is not a true fitting point, and the search continues. (b) If the subsequent five consecutive first distance difference values are less than or equal to one-fifth of the acquisition resolution, the fifth point is recorded as the first snap point. Determine whether the first five first distance difference values of the first snap point are less than -1 / 5 of the acquisition resolution: a) If yes, end the search; b) If not, continue searching until the next fitting point is found, and designate it as the second fitting point.
[0025] Then, calculate the vertical distance between the first and second bonding points. If the vertical distance between the first and second bonding points is greater than 7 pixels, then the second bonding point is selected as the pre-selected point; if the vertical distance between the first and second bonding points is less than or equal to 7, then the first bonding point is selected as the pre-selected point. Finally, search from the location of the pre-selected point towards the highest point E. If the first angle between the tangent of three consecutive points and the first fitted line L1 is greater than 0.08°, then the pre-selected point is determined as the first inflection point Q1.
[0026] Here, the highest point E is obtained as follows: Figure 6 As shown, the battery casing sidewall 1 and top cover 2 are approximately perpendicular. Therefore, when the edge contour of the casing sidewall profile 1a and the top cover profile 2a is intercepted along the extension direction of the weld 3, the included angle between them is approximately 90°. Here, a plane with an included angle of 45° between both the casing sidewall 1 and the top cover 2 is set as the height reference plane P. The height value of any point on the weld 3 can be obtained by calculating the distance from the height value of that point to the height reference plane P. In this embodiment, the image acquisition device is a 3D depth camera. In the weld depth map output by the 3D depth camera, the top cover 1 and the casing sidewall 2 are automatically set as inclined surfaces at a 45° angle relative to the horizontal plane. That is to say, Figure 6 The height reference plane P shown is parallel to the horizontal plane, therefore, the cross-section taken along the extension direction of weld 3 will appear as follows. Figure 6 The vertical distance from any point on the edge profile and weld profile 3a shown to the height reference plane P is the height value of that point, and the point with the largest height value is the highest point E.
[0027] The second inflection point Q2 is obtained by: calculating the perpendicular distance between each point of the weld contour 3a near the top cover contour 2a and the second fitting line L2 to obtain the second distance value, and calculating the difference between the second distance values of two adjacent points (hereinafter referred to as the second distance difference value); at the same time, calculating the angle between the tangent of each point on the weld contour 3a and the second fitting line L2 to obtain the second angle value. Then, based on the calculated second distance value and second included angle value of each point, as well as the difference between the second distance values of any two adjacent points, the same search logic as that used to determine the first inflection point Q1 is executed, and the second inflection point Q2 is finally determined. The specific search process will not be repeated here.
[0028] The method for extracting the first offset value is as follows: Figure 6 As shown, the vertical distance from the first inflection point Q1 to the second fitted line L2 is taken as the first offset distance py1. The value of the first offset distance py1 is extracted to obtain the first offset value.
[0029] The method for extracting the first offset value is as follows: Figure 7 As shown, the vertical distance from the second inflection point Q2 to the first fitted line L1 is taken as the second offset distance py2. The value of the second offset distance py2 is extracted to obtain the second offset value.
[0030] The method for extracting point distance values is as follows: Figure 8 As shown, the shortest distance between the intersection point O of the first fitted line L1 and the second fitted line L2 and the weld contour 3a is the point distance Dist. The value of the point distance Dist is extracted to obtain the point distance value.
[0031] The anomaly identification module is used to extract the truncated position corresponding to the edge contour whose vertex value conforms to the first preset range as the conformation position, determine whether the conformation position is an anomaly position based on the bottom corner value, point distance value, first offset value and second offset value of the edge contour of the conformation position, and obtain the set of anomaly positions; Specifically, such as Figure 9 As shown, among the m edge contours obtained, the interception position corresponding to the edge contour whose vertex angle value conforms to the first preset range of 85°~95° (including 85° and 95°) is taken as the conformity position; Next, perform the following analysis steps a) and b) for each conforming edge contour: a) Compare the bottom corner value of each matching edge contour with the first preset value of 70°, and determine whether the matching position is abnormal based on the comparison result: if the bottom corner value is greater than 70°, the matching position is determined to be abnormal and recorded as the first abnormal position; if the bottom corner values of all matching edge contours are less than or equal to 70°, compare the point distance value of each matching edge contour with the second preset value of 0.2 mm, and determine whether the matching position is abnormal based on the comparison result: if the point distance value is less than 0.2 mm, the matching position is abnormal and recorded as the first abnormal position; otherwise, it is not an abnormal position. Collect all first abnormal bits and obtain the first abnormal bit set U1.
[0032] b) Take the coincident position as the current position. Two adjacent cut-off positions (regardless of whether they are coincident positions) at a distance of one step from the current position are designated as the front cut-off position and the back cut-off position, respectively. Take the edge contour of the front cut-off position as the front edge contour and the edge contour of the back cut-off position as the back edge contour. Calculate the difference between the first offset value of the front edge contour and the edge contour of the current position (i.e., the first offset value of the front edge contour - the first offset value of the current position edge contour) and the difference between the second offset value of the front edge contour and the edge contour of the current position (i.e., the second offset value of the front edge contour - the second offset value of the current position edge contour), to obtain the first front offset difference and the second front offset difference. Simultaneously, calculate the difference between the first offset value of the front edge contour and the edge contour of the current position (i.e., the first offset value of the back edge contour - the second offset value of the current position edge contour). The difference between the first offset value and the second offset value (i.e., the second offset value of the rear edge contour minus the second offset value of the current edge contour) is used to obtain the first rear offset difference and the second rear offset difference. Then, the first front offset difference, the first rear offset difference, the second front offset difference, and the second rear offset difference are compared with a third preset value of 0.2mm. Based on the comparison results, it is determined whether the matching position is an abnormal position: if at least one of the first front offset difference, the first rear offset difference, the second front offset difference, and the second rear offset difference is greater than 0.2mm, the matching position is determined to be an abnormal position and recorded as the second abnormal position; otherwise, if the first front offset difference, the first rear offset difference, the second front offset difference, and the second rear offset difference are all less than or equal to 0.2mm, the matching position is determined not to be an abnormal position. Collect all second abnormal bits to obtain the set of second abnormal bits U2.
[0033] Then, take the union of the first set of abnormal bits and the second set of abnormal bits to obtain the set of abnormal bits.
[0034] The aforementioned detection device limits the angle between the first fitting line L1 formed with the housing sidewall profile 1a as a reference and the second fitting line L2 formed with the top cover profile 2b as a reference to an acceptable preset range (85°~95°) to exclude abnormal cut-off positions of feature values caused by assembly process errors of the housing sidewall 1 and the top cover 2, thereby ensuring the reliability of the extracted feature values. Based on this, by comparing the edge contour of a normal weld on a cylindrical battery with the edge contour of a weld with an arching defect, it was found that in most cases, the base angle value of the weld contour with an arching defect is greater than a specific angle threshold (70° in this embodiment). When the base angle value of the weld contour exceeds this angle threshold, the point spacing value of the weld contour will not exceed a specific threshold. Therefore, the detection device sets this angle threshold as a first preset value and the point spacing threshold as a second preset value. By limiting the base angle value of the edge contour at the interception position to be greater than the first preset value, abnormal locations where the weld may have an arching defect can be identified at the interception position. However, if the base angle values of the edge contours at the interception position are all less than the first preset value, the point spacing value is limited to less than 0.2 mm to further identify abnormal locations where an arching defect may occur. In addition, the present invention also found that when the surface flatness of the shell sidewall 1 and the top cover 2 is abnormal (e.g., poor flatness or defects), the first fitting line L1 or the second fitting line L2 formed will have an angular offset, resulting in abnormal extracted feature values. An abnormal surface flatness manifests as a shift in the position of the first inflection point Q1 / second inflection point Q2, causing a larger difference in the first or second offset value between the edge contour of the current position and the edge contour of the adjacent intercepted positions before and after the current position. Therefore, in addition to identifying abnormal positions by limiting the bottom corner value and the point distance value, the aforementioned detection device also determines whether the current position is an abnormal position by limiting whether the difference in the first and second offset values between the edge contour of the adjacent intercepted positions and the edge contour of the current position is greater than a third preset value, in order to identify abnormal positions that may have bulging defects. In this way, by limiting the top corner value to a certain range, positions with abnormal feature values have been excluded, and by using the bottom corner value, point distance value, first offset value, and second offset value, abnormal positions that may have bulging defects are identified, ensuring that the extracted feature values are reliable and that the feature values used for comparison with the limit values can reflect the true condition of the weld, thereby improving the accuracy of subsequent comparisons.
[0035] The anomaly analysis module is used to obtain the bulging value of the edge contour of the anomaly position in the anomaly position set, compare the obtained bulging value with the specification value, and determine whether there is a bulging defect in the weld based on the comparison result. The anomaly analysis module includes: The feature extraction unit is used to perform the following operations: taking the anomaly position in the set of anomaly positions U as the center, selecting the n closest intercept positions along the extension direction of weld 3 to the anomaly position as the neighboring positions of the anomaly position, forming an analysis group with the edge contour of the anomaly position and the corresponding edge contours of the 2n neighboring positions; calculating the difference between the minimum apex angle values of the edge contour of the anomaly position and the edge contours of the 2n neighboring positions in the same analysis group to obtain the apex angle difference value of the anomaly position; and calculating the difference between the point distance values of the edge contour of the anomaly position and the 2n neighboring edge contours respectively, taking the maximum value to obtain the arching value of the anomaly position. Specifically, such as Figure 10 As shown, taking n=3 as an example, the following analysis steps are performed on each abnormal bit in the abnormal bit set U: Take the abnormal bit as the current position K. 异 At current position K 异 Centered on the current position K along the extension direction of weld 3. 异 The three intercept positions closest to the current position (i.e., K located in front of the current position K) 前1 K 前2 and K 前3 And K behind it 后1 K 后2 and K 后3 ), get the current position K 异 The feature extraction module has already extracted the vertex angle and point distance values of the edge contours of the neighboring locations in the previous program, so it will not be repeated here.
[0036] The credibility analysis unit is used to determine whether the abnormal bit is credible based on whether the obtained vertex difference of the abnormal bit conforms to a second preset range. Specifically, the second preset range is -2° to 2° (inclusive). If the difference in the apex angle of the abnormal position is within the range of -2° to 2°, then the abnormal position is reliable, that is, the arch value obtained from the abnormal position is reliable; otherwise, the abnormal position is unreliable and needs to be excluded. Since abnormal apex angle differences can cause bulge values to be too large, reliable abnormal positions are screened out by limiting the apex angle differences to ensure that the bulge values used for comparison with specification values are reliable.
[0037] The feature analysis unit is used to compare the bulging value corresponding to the credible anomaly bit with the specification value, and determine whether there is a bulging defect in the weld based on the comparison result. Specifically, if the bulging value corresponding to all reliable anomaly bits is less than or equal to the specification value, then weld 3 is determined to have no bulging defect; if the bulging value corresponding to any reliable anomaly bit is greater than the specification value, then weld 3 is determined to have a bulging defect.
[0038] Generally speaking, the larger the point spacing value of the edge contour, the flatter the corresponding intercept position is relative to the surface of weld 3. This invention finds relatively flat positions along the weld extension direction before and after the abnormal position, and calculates the bulging height of the relatively flat position of the abnormal position. This can more accurately reflect the bulging situation of the abnormal position and more accurately determine whether the abnormal position is an bulging defect.
[0039] Figure 11 The working logic diagram of the anomaly analysis module in the detection system of the present invention is shown.
[0040] The following example, with m=10, illustrates the judgment logic of the above feature analysis unit: In this embodiment, the specification value is set to 0.2mm. Assume the anomaly identification module filters out 6 anomalies from 10 interception positions; among these 6 anomalies, 3 have an apex angle difference within the range of -2° to 2° (inclusive), indicating that these 3 anomalies and their characteristic values are reliable. The bulging values of these 3 reliable anomalies are compared with the specification value: if the bulging values of all 3 reliable anomalies are less than or equal to 0.2mm, it is determined that weld 3 does not have a bulging weld; if the bulging value of any reliable anomaly is greater than 0.2mm, it is determined that weld 3 has a bulging defect.
[0041] Figure 12-13 It shows Figure 3 The specific flow of the detection method performed by the detection device in the detection system shown.
[0042] Here, the specification values can be adjusted according to actual production needs; the first, second, and third preset values can also be adjusted according to actual production needs to meet the requirements of different types and sizes of batteries and specifications.
[0043] The aforementioned detection device extracts edge contours at multiple locations at regular intervals along the extension direction of weld 3, and extracts the apex angle value, base angle value, first offset value, second offset value, and point distance value for each extracted edge contour. Based on the morphological differences between normal welds and welds with bulging defects, the device excludes locations with characteristic anomalies using the acquired apex angle values. Then, based on the comparison results of the apex angle value, base angle value, first offset value, second offset value, and point distance value with corresponding preset values, abnormal locations that may contain bulging defects are identified. The apex angle difference and bulging value corresponding to these abnormal locations are calculated. The reliability of the bulging values at these abnormal locations is determined by whether the apex angle difference is within a preset range. Finally, the bulging values at reliable abnormal locations are compared with the specified values to determine whether weld 3 has bulging defects. In this way, bulging defects can be accurately detected, reducing false positives.
[0044] Although the detection system of the first embodiment described above can detect bulging defects more accurately than traditional detection methods, in actual detection, in order to balance detection efficiency, the interception interval set by the contour acquisition module is usually large, such as 50 pixel units in the first embodiment. Since bulging defects exist in a small local area of the weld, surface anomalies of the shell sidewall / top cover may also cause the feature value (bulging value) to be accidentally large. Therefore, if the interval distance of the interception position is large, the detection system has difficulty capturing the subtle change trend of weld 3 within a small range, which can easily lead to misjudgment.
[0045] To avoid accidental overestimation of characteristic values caused by surface anomalies in the shell sidewalls / top cover, and to further improve detection accuracy, this invention also provides another embodiment of a detection system for weld bulging defects. Figure 3 Similar to the first embodiment shown, the detection system in this embodiment also includes an image acquisition device and a detection device. The detection device also includes a contour acquisition module, a feature extraction module, an anomaly recognition module, and an anomaly analysis module. The working principles of the contour acquisition module, feature extraction module, and anomaly recognition module of the detection device in this embodiment are the same as those of the detection device in the first embodiment, and therefore will not be described again here. The only difference is that the working principle of the feature analysis unit in the anomaly analysis module in this embodiment is different from that in the first embodiment. The working principle of the anomaly analysis module in this embodiment will be described in detail below.
[0046] In this embodiment, as Figure 14 As shown, the feature analysis unit of the anomaly analysis module is used to perform: Compare the bulging value corresponding to the credible anomaly with the specification value. If the bulging value corresponding to all anomalies is less than or equal to the first specification value, then weld 3 is determined to have no bulging defect. If the bulging value of any credible anomaly is greater than the first specification value, then the credible anomaly is determined to be a suspected defect, and the following analysis steps are performed on the suspected defect: First, the target area is defined with the suspected defect location as the center. Within the target area, the edge contour is cut out at q positions before and after the suspected defect location along the extension direction of weld 3, with a second step distance between them. Where q ≥ 1, the second step distance is less than the first step distance. Specifically, the second step distance is 5 pixel units, such as Figure 15 As shown, with the target bit ( Figure 15 The target area A is defined with the location shown by the thick line as the center. 目标 In target area A 目标 Inside, the edge contours are cut at positions two steps away from each other along the extension direction of weld 3. Figure 15(Location indicated by the dashed line). Compared to the contour acquisition module, the feature analysis unit uses a smaller step size to analyze the subtle changes in the morphology near the suspected defect location, in order to determine whether the morphology near the suspected defect location matches the characteristics of an arching defect, thereby more accurately determining whether there is an arching defect in weld 3.
[0047] Next, feature extraction processing is performed on each captured edge contour to obtain the point distance value of each edge contour; Here, the method for obtaining the point distance value of the edge contour is the same as the method for obtaining the point distance value of the edge contour in the aforementioned feature extraction module, so it will not be repeated here.
[0048] Then, taking the maximum point distance value of the 2n+1 edge contours (including one abnormal edge contour and 2n corresponding adjacent edge contours) in the analysis group where the suspected defect location is located as the base point distance value, the target area A where the suspected defect location is located is calculated respectively. 目标 The difference between the point distance values of the inner 2q+1 edge contours (including one suspected defect edge contour, q edge contours intercepted in front of the suspected defect, and q edge contours intercepted behind the suspected defect) and the basic point distance value is taken as the maximum value of the fine-grained arch value. Then, the fine-grained arch value is compared with the second specification value. Based on the comparison result, it is determined whether weld 3 has an arch defect: if the fine-grained arch value corresponding to all suspected defect positions is less than or equal to the second specification value, it is determined that weld 3 does not have an arch defect; if the fine-grained arch value corresponding to any suspected defect position is greater than the second specification value, it is determined that weld 3 has an arch defect.
[0049] The following example, using m=10, n=3, and q=5, illustrates the judgment logic of the above detection method: In this embodiment, the first specification value is set to 0.12 mm, and the second specification value is set to 0.2 mm. Similar to the first embodiment, it is assumed that the contour extraction unit selects 6 out of the 10 captured positions as anomalous positions. Among these 6 anomalous positions, if the difference between the minimum apex angle value of the edge contour of an anomalous position and the corresponding minimum 6 adjacent edge contours is within ±2°, then the anomalous position is initially determined to be reliable. Assuming that 3 out of the 6 anomalous positions are reliable, the bulge values corresponding to these 3 reliable anomalous positions are compared with the first specification value of 0.12 mm. If the bulge value corresponding to one reliable anomalous position (e.g., 0.13 mm) is greater than the first specification value of 0.12 mm, and the bulge values corresponding to the other two reliable anomalous positions (e.g., 0.11 mm) are less than or equal to the first specification value, then these two reliable anomalous positions with bulge values greater than the first specification value are taken as suspected defect positions, and the following analysis steps are performed on the suspected defect positions: like Figure 15 As shown, the suspected defect position ( Figure 15 The target area A is defined with the location shown by the thick line as the center.目标 and from target area A 目标 Extract 10 edge contours from the inside ( Figure 15 (As shown by the dashed line), take 7 edge contours in the analysis group where the suspected defect is located (e.g., Figure 10 As shown, the maximum point distance value between the edge contour of one abnormal location and the edge contours of six corresponding neighboring locations is used as the base point distance value to calculate the target region A. 目标 The difference between the point distance value and the base point distance value of the 11 intercepted edge contours (including one suspected defect edge contour and 10 edge contours intercepted at the second step distance) is taken, and the maximum value is selected. Assuming the maximum value is 0.11mm, the fine sampling bulge value is 0.11mm. This fine sampling bulge value is then compared with the second specification value. If the fine sampling bulge value is less than the second specification value of 0.2mm, then weld 3 is determined to have no bulge defect; otherwise, if the fine sampling bulge value is greater than or equal to 0.2mm (e.g., 0.21mm), then weld 3 is determined to have a bulge defect. If there are 2 suspected defect positions, and the fine sampling bulge value corresponding to one suspected defect position is greater than 0.2mm, then weld 3 is determined to have a bulge defect; otherwise, if the fine sampling bulge values corresponding to all suspected defect positions are less than or equal to 0.2mm, then weld 3 is determined to have no bulge defect.
[0050] In this embodiment, the second specification value is typically set to be greater than the first specification value to avoid overkill. Similar to the first embodiment, the first and second specification values can be adjusted according to actual production needs; alternatively, the first, second, and third preset values can be adjusted according to actual production needs to meet the requirements of different types and sizes of batteries and their specifications.
[0051] Based on the same inventive concept, this application also provides an electronic device, which can be a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). The device includes one or more processors and a memory, wherein the processor is used to execute a program to implement a detection method based on weld bulging defects; and the memory is used to store computer programs executable by the processor.
[0052] Based on the same inventive concept, this application also provides a computer-readable storage medium corresponding to the aforementioned embodiments of the detection method based on weld arching defects. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the entity relation extraction method described in any of the above embodiments.
[0053] This application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0054] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and the present invention also intends to include these modifications and variations.
Claims
1. A method for detecting weld bulging defects, characterized in that: Includes the following steps: S1: Extract the edge contour from the weld depth map at m positions at intervals of the first step distance along the extension direction of the weld, where m≥3. The edge contour consists of the shell sidewall contour, the top cover contour, and the weld contour. The plane containing the edge contour is perpendicular to the extension direction of the weld. S2: Perform feature extraction processing on the edge contour of each cut-off position to obtain the vertex angle value, bottom angle value, point distance value, first offset value and second offset value of the edge contour of each cut-off position; S3: Take the intercepted position corresponding to the edge contour whose vertex value conforms to the first preset range as the conforming position, determine whether the conforming position is an abnormal position based on the bottom corner value, point distance value, first offset value and second offset value of the edge contour of the conforming position, and obtain the abnormal position set; S4: Obtain the bulging value of the edge contour of the abnormal position in the abnormal position set, compare the obtained bulging value with the specification value, and determine whether the weld has bulging defects based on the comparison result.
2. The method for detecting weld bulging defects according to claim 1, characterized in that: Step S4 specifically includes: S41: Taking the abnormal position in the abnormal position set as the center, take the n intercept positions closest to the abnormal position in front and behind along the extension direction of the weld as the neighboring positions of the abnormal position, and form an analysis group with the edge contour of the abnormal position and the corresponding 2n neighboring position edge contours. Calculate the difference between the minimum vertex angle values of the edge contour of the anomalous position and the 2n neighboring edge contours in the same analysis group to obtain the vertex angle difference value of the anomalous position; and calculate the difference between the point distance values of the edge contour of the anomalous position and the corresponding 2n neighboring edge contours respectively, and take the maximum value to obtain the arching value of the anomalous position. S42: Determine whether the abnormal bit is reliable based on whether the difference between the vertices of the obtained abnormal bit conforms to the second preset range; S43: Compare the bulging value corresponding to the reliable anomaly with the specification value, and determine whether there is a bulging defect in the weld based on the comparison result.
3. The method for detecting weld bulging defects according to claim 2, characterized in that: In step S43, determining whether the weld has an arching defect based on the comparison results specifically includes: If the bulging value corresponding to all reliable anomaly bits is less than or equal to the first specification value, then it is determined that the weld does not have a bulging defect; If the bulge value corresponding to any credible anomaly bit is greater than the first specification value, then the credible anomaly bit is determined to be a suspected defect bit, and the following analysis steps are performed on the suspected defect bit: A target area is defined with the suspected defect location as the center. Within the target area, the edge contour is intercepted at q positions before and after the suspected defect location along the weld extension direction at a second step distance, where q ≥ 1 and the second step distance is less than the first step distance. Feature extraction is performed on each captured edge contour to obtain the point distance value of each edge contour; The maximum value of the point distance of the 2n+1 edge contours in the analysis group where the suspected defect is located is taken as the base point distance value. The difference between the point distance of the 2q+1 edge contours in the target area where the suspected defect is located and the base point distance value is calculated respectively. The maximum value is taken as the fine arch value. Then the fine arch value is compared with the second specification value. Based on the comparison result, it is determined whether the weld has an arch defect.
4. The method for detecting weld bulging defects according to claim 1, characterized in that: In step S3, determining whether a coincident bit is an abnormal bit based on the bottom corner value, point distance value, first offset value, and second offset value of the coincident bit edge contour and obtaining the abnormal bit set specifically includes: Perform analysis steps a) and b) on the matching bits respectively: a) Determine whether the bottom corner value of the edge contour of the conforming bit is greater than the first preset value. If so, determine that the conforming bit is the first abnormal bit. If the bottom corner value of each conforming bit edge contour is less than or equal to the first preset value, then continue to determine whether the point distance value of the conforming bit edge contour is less than the second preset value. If so, determine that the corresponding conforming bit is the first abnormal bit. Collect all first abnormal bits to obtain the set of first abnormal bits; b) Take the edge contours of the intercepted positions adjacent to the conformation position before and after the conformation position along the extension direction of the weld seam, which are the front edge contour and the rear edge contour, respectively. Determine whether at least one of the differences between the first offset value and the second offset value of the front edge contour and the conformation position edge contour, and the differences between the first offset value and the second offset value of the rear edge contour and the conformation position edge contour is greater than a third preset value. If so, determine that the conformation position is a second abnormal position. Collect all second abnormal bits to obtain the set of second abnormal bits; The abnormal bit set is obtained by taking the union of the first abnormal bit set and the second abnormal bit set.
5. A device for detecting weld bulging defects, characterized in that: include: The contour acquisition module is used to extract the edge contour at m positions with a first step distance from the weld depth map along the extension direction of the weld, where m≥3. The edge contour is composed of the shell sidewall contour, the top cover contour and the weld contour, and the plane where the edge contour is located is perpendicular to the extension direction of the weld. The feature extraction module is used to perform feature extraction processing on the edge contour of each cut-off position, and obtain the vertex angle value, bottom angle value, point distance value, first offset value, second offset value and point distance value of the edge contour at each cut-off position; The anomaly identification module is used to extract the truncated position corresponding to the edge contour whose vertex value conforms to the first preset range as the conformation position, determine whether the conformation position is an anomaly position based on the bottom corner value, point distance value, first offset value and second offset value of the edge contour of the conformation position, and obtain the set of anomaly positions; The anomaly analysis module is used to obtain the bulging value of the edge contour of the anomaly position in the set of anomaly positions, compare the obtained bulging value with the specification value, and determine whether there is a bulging defect in the weld based on the comparison result.
6. The detection device for weld bulging defects according to claim 5, characterized in that: The anomaly analysis module specifically includes: The feature extraction unit is used to perform the following: taking the abnormal position in the abnormal position set as the center, taking the n intercept positions closest to the abnormal position along the extension direction of the weld as the neighboring positions of the abnormal position, and forming an analysis group with the edge contour of the abnormal position and the corresponding 2n neighboring position edge contours. Calculate the difference between the minimum vertex angle values of the edge contour of the anomalous position and the 2n neighboring edge contours in the same analysis group to obtain the vertex angle difference value of the anomalous position; and calculate the difference between the point distance values of the edge contour of the anomalous position and the corresponding 2n neighboring edge contours respectively, and take the maximum value to obtain the arching value of the anomalous position. The credibility analysis unit is used to determine whether the abnormal bit is credible based on whether the obtained vertex difference of the abnormal bit conforms to a second preset range. The feature analysis unit is used to compare the bulging value corresponding to the credible anomaly with the specification value, and determine whether there is a bulging defect in the weld based on the comparison result.
7. The detection device for weld bulging defects according to claim 6, characterized in that: The specific steps performed by the feature analysis unit to determine whether the weld has an arching defect based on the comparison results include: If the bulging value corresponding to all reliable anomaly bits is less than or equal to the first specification value, then it is determined that the weld does not have a bulging defect; If the bulge value corresponding to any credible anomaly bit is greater than the first specification value, then the credible anomaly bit is determined to be a suspected defect bit, and the following analysis steps are performed on the suspected defect bit: A target area is defined with the suspected defect location as the center. Within the target area, the edge contour is intercepted at q positions before and after the suspected defect location along the weld extension direction at a second step distance, where q ≥ 1 and the second step distance is less than the first step distance. Feature extraction is performed on each captured edge contour to obtain the point distance value of each edge contour; The maximum value of the point distance of the 2n+1 edge contours in the analysis group where the suspected defect is located is taken as the base point distance value. The difference between the point distance of the 2q+1 edge contours in the target area where the suspected defect is located and the base point distance value is calculated respectively. The maximum value is taken as the fine arch value. Then the fine arch value is compared with the second specification value. Based on the comparison result, it is determined whether the weld has an arch defect.
8. The detection device for weld bulging defects according to claim 5, characterized in that: The anomaly identification module's process of determining whether a coincident bit is an anomaly bit based on the bottom corner value, point distance value, first point distance value, and second point distance value of the coincident bit edge contour and obtaining an anomaly bit set specifically includes: Perform analysis steps a) and b) on the matching bits respectively: Perform analysis steps a) and b) on the matching bits respectively: a) Determine whether the bottom corner value of the edge contour of the conforming bit is greater than the first preset value. If so, determine that the conforming bit is the first abnormal bit. If the bottom corner value of each conforming bit edge contour is less than or equal to the first preset value, then continue to determine whether the point distance value of the conforming bit edge contour is less than the second preset value. If so, determine that the corresponding conforming bit is the first abnormal bit. Collect all first abnormal bits to obtain the set of first abnormal bits; b) Take the edge contours of the intercepted positions adjacent to the conformation position before and after the conformation position along the extension direction of the weld seam, which are the front edge contour and the rear edge contour, respectively. Determine whether at least one of the differences between the first offset value and the second offset value of the front edge contour and the conformation position edge contour, and the differences between the first offset value and the second offset value of the rear edge contour and the conformation position edge contour is greater than a third preset value. If so, determine that the conformation position is a second abnormal position. Collect all second abnormal bits to obtain the set of second abnormal bits; The abnormal bit set is obtained by taking the union of the first abnormal bit set and the second abnormal bit set.
9. A detection system for weld bulging defects, characterized in that: It includes an image acquisition device and a detection device as described in any one of claims 5 to 8; The image acquisition device generates a weld depth map and transmits it to the detection device. The weld depth map shows the shell sidewall, top cover, and the weld connecting the shell sidewall and top cover. The detection device determines whether the weld has an arching defect by analyzing the weld depth map obtained by the image acquisition device.
10. The detection system for weld bulging defects according to claim 9, characterized in that: The weld depth map is formed as follows: the image acquisition device scans the weld between the shell sidewall and the top cover at a certain angle to obtain a weld depth map including the shell sidewall, the top cover and the weld.