A method for detecting a weld spot width

By acquiring and correcting images during lithium-ion power battery production, using trained feature points and intermediate points to determine polygon detection areas, and processing with blob tools, the problem of interference from noise and speckles in solder joint width detection is solved, thus improving detection accuracy.

CN114049338BActive Publication Date: 2025-11-21SHENZHEN LINGYUN VISION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111374317.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2025-11-21
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

In the production of lithium-ion power batteries, the detection of solder joint width is affected by the vertical and horizontal fluctuations of the tested object, resulting in a large detection range. Impurities and spots interfere with the line-finding search box, reducing the detection accuracy.

Method used

By acquiring the image to be detected, the solder joint detection area is determined. After correction processing, the polygon detection area is determined using training feature points and midpoints. The left and right lines of the solder joint are located using blob tools and expansion processing, and the intersection point is calculated to determine the width of the solder joint.

Benefits of technology

In the process of narrowing the detection range, noise is filtered out, interference is reduced, and the accuracy of solder joint width detection and positioning matching is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114049338B_ABST
    Figure CN114049338B_ABST
Patent Text Reader

Abstract

The application provides a welding spot width detection method, comprising: acquiring a to-be-detected image; determining a welding spot detection area in the to-be-detected image, performing correction processing on the welding spot in the welding spot detection area to obtain a target welding spot; determining a polygon detection area of the target welding spot according to a preset path, taking a training feature point as a starting point and passing through an intermediate point, wherein the polygon detection area is in the welding spot detection area; performing blob tool processing and capacity expansion processing on the polygon detection area to determine a minimum rectangular fitting area of the target welding spot; positioning a welding spot left edge line search frame and a welding spot right edge line search frame in the minimum rectangular fitting area to determine a left edge line and a right edge line of the welding spot; and determining the width of the welding spot according to a first intersection point and a second intersection point. In the process of continuously narrowing the detection range, the application filters out miscellaneous points, reduces interference, and improves the positioning matching accuracy and the welding spot width detection precision in the detection process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial vision, and more particularly to a method for detecting the width of solder joints. Background Technology

[0002] Lithium-ion power batteries are used in industries such as new energy vehicles, electric bicycles, hydropower energy storage, and wind power energy storage. Their manufacturing process includes top cover welding, which involves pre-welding and full welding of the top cover. Figure 1 As shown, after the bare battery cells are paired and installed in the casing, the top cover 102 is pre-fixed to the aluminum shell 103 through multiple pre-welded solder joints 101. Then, all the welds 104 between the top cover 102 and the aluminum shell 103 are welded and sealed. In the process of pre-welding the top cover, the width of the solder joints needs to be checked.

[0003] Currently, the detection of solder joint width mainly involves first binarizing a preset detection range in the image to be detected; within the preset detection range, such as... Figure 2 As shown, the positions of the line-finding search box 105 corresponding to the left line of the weld point, the line-finding search box 106 corresponding to the right line of the weld point, and the line-finding search box 107 corresponding to the top cover edge are determined in the image to be inspected using a geometric positioning tool. Then, the left line 108, the right line 109, and the top cover edge 110 of the weld point are determined using the corresponding line-finding tools. Finally, the width of the weld point, i.e., the distance between the first intersection point and the second intersection point, is determined based on the first intersection point of the left line 108 and the top cover edge 110, and the second intersection point of the right line 109 and the top cover edge 110.

[0004] However, in the production process, the lithium-ion power battery being tested fluctuates in the vertical direction, and the solder joints on the tested object fluctuate in the horizontal direction. This requires a large preset detection range. In particular, impurities and scratches on the top cover, as well as impurities and spots around the solder joints, can easily interfere with the determination of the line-finding search frame and reduce the detection accuracy of the solder joint width. Summary of the Invention

[0005] This application provides a method for detecting solder joint width, in order to solve the technical problem that the detection accuracy is reduced due to the large detection range and numerous interference information during the solder joint width detection process.

[0006] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0007] This application provides a method for detecting the width of a solder joint, the method comprising the following steps:

[0008] Obtain the image to be detected.

[0009] A solder joint detection area is determined in the image to be inspected. The solder joint detection area is determined based on the size of the preset detection area, the edge of the aluminum shell, and the edge of the top cover.

[0010] The solder joints in the solder joint detection area are corrected to obtain the target solder joint.

[0011] According to the preset path, starting from the training feature point and passing through the intermediate point, the polygon detection area of ​​the target weld point is determined. The polygon detection area is within the weld point detection area. The training feature point is determined according to the geometric positioning tool, and the intermediate point is determined according to the training feature point and the weld point detection area.

[0012] The polygon detection region is processed and expanded using the blob tool to determine the minimum rectangular fitting region of the target weld point.

[0013] Locate the left and right line search boxes of the solder joint within the minimum rectangular fitting area to determine the left and right lines of the solder joint.

[0014] The width of the weld joint is determined based on the first intersection point and the second intersection point, wherein the first intersection point is the intersection point of the left side line and the top cover edge, and the second intersection point is the intersection point of the right side line and the top cover edge.

[0015] In one possible implementation, the aluminum shell edge is determined by the following steps: in a preset aluminum shell edge search box, the solder joint is masked by a first mask area to determine a first remaining area; in the first remaining area, an effective point between the aluminum shell and the background is determined; the aluminum shell edge is determined by the effective point between the aluminum shell and the background; and a reference positioning line is determined by the centroid coordinate Y value and the angle 0° of the aluminum shell edge.

[0016] In one possible implementation, the determination of the top cover edge is achieved through the following steps: determining multiple preset top cover edge search box positions using the reference positioning line; determining the corresponding top cover edge within different preset top cover edge search boxes; and selecting the top cover edge that meets preset judgment conditions.

[0017] In one possible implementation, determining the solder joint detection area in the image to be detected includes determining the size of the solder joint detection area based on the size of a preset detection area; and determining the position of the solder joint detection area based on the center coordinates (X1, Y1) of the preset detection area, wherein the center coordinates (X1, Y1) of the preset detection area are calculated according to the following formula:

[0018]

[0019] In the formula, U is the width of the image to be detected, Y is the Y value of the centroid coordinate of the aluminum shell edge, Dis is the vertical distance from the centroid coordinate of the aluminum shell edge to the top cover edge, H is the height of the preset detection area, and Dis0 is the compensation amount.

[0020] In one possible implementation, the correction process for the solder joints in the solder joint detection area includes performing binarization and etching processes on the solder joint detection area in sequence.

[0021] In one possible implementation, the training feature points are determined using a geometric positioning tool: the outer contour of the tip of the solder joint head is used as the training feature in the training image to determine the relationship between the training feature points and the training feature; in the solder joint detection area, the target solder joint head is determined based on the training feature, and the training feature points are determined based on the relationship between the training feature points and the training feature.

[0022] In one possible implementation, the intermediate point is determined based on the training feature points and the solder joint detection area by the following steps: drawing a perpendicular line through the training feature points; translating the perpendicular line by a preset length to intersect the upper and lower edges of the solder joint detection area, wherein the preset length is greater than the length of the solder joint, and the intersection of the perpendicular line and the lower edge of the solder joint detection area is the intermediate point.

[0023] In one possible implementation, the polygon detection region is processed and expanded using a blob tool; the minimum and maximum values ​​of the solder joints in the X direction and in the Y direction are determined; the vertex coordinates of the minimum rectangular fitting region are determined, wherein the vertex coordinates are pairwise combinations of the minimum and maximum values ​​in the X and Y directions.

[0024] In one possible implementation, determining the width of the solder joint based on the first intersection point and the second intersection point includes obtaining the distance between the first intersection point and the second intersection point; multiplying the distance between the first intersection point and the second intersection point by a pixel equivalent to determine the width of the solder joint.

[0025] In one possible implementation, before acquiring the image to be detected, the method further includes: acquiring a captured image; and preprocessing the captured image to obtain the image to be detected.

[0026] This application provides a method for detecting solder joint width, including acquiring an image to be detected; determining a solder joint detection region in the image to be detected; correcting the solder joints in the solder joint detection region to obtain a target solder joint; determining a polygonal detection region of the target solder joint according to a preset path, starting from a training feature point and passing through an intermediate point, wherein the polygonal detection region is within the solder joint detection region; processing and expanding the polygonal detection region using a blob tool to determine the minimum rectangular fitting region of the target solder joint; locating the left and right line search boxes of the solder joint within the minimum rectangular fitting region to determine the left and right lines of the solder joint; and determining the width of the solder joint based on a first intersection point and a second intersection point. This application, by continuously narrowing the detection range, filters out noise, reduces interference, and improves the accuracy of positioning and matching and the precision of solder joint width detection during the detection process. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in the embodiments of this application 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 some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a schematic diagram of the lithium-ion power battery in the top cover pre-welding process of this application;

[0029] Figure 2 This is a schematic diagram illustrating the determination of solder joint width within the preset detection range in this application.

[0030] Figure 3 Images captured by the camera in the embodiments of this application;

[0031] Figure 4 The image to be detected in the embodiments of this application;

[0032] Figure 5 The image to be detected in this embodiment of the application is provided with a preset aluminum shell edge search box;

[0033] Figure 6 This is a schematic diagram illustrating the determination of the aluminum shell edge in an embodiment of this application;

[0034] Figure 7 The image to be detected in this embodiment of the application is provided with a first preset top cover edge search box;

[0035] Figure 8 This is a schematic diagram illustrating the determination of the first candidate top cover edge in an embodiment of this application;

[0036] Figure 9The image to be detected in this embodiment of the application is provided with a second preset top cover edge search box;

[0037] Figure 10 This is a schematic diagram illustrating the determination of the second candidate top cover edge in an embodiment of this application;

[0038] Figure 11 The image to be detected in this embodiment of the application is provided with a third preset top cover edge search box;

[0039] Figure 12 This is a schematic diagram illustrating the determination of the third candidate top cover edge in an embodiment of this application;

[0040] Figure 13 This is a schematic diagram of the solder joint detection area in an embodiment of this application;

[0041] Figure 14 This is a schematic diagram of the solder joint detection area after binarization processing in an embodiment of this application;

[0042] Figure 15 This is a schematic diagram of the weld joint inspection area after corrosion treatment in an embodiment of this application;

[0043] Figure 16 This is a schematic diagram of the solder joint detection area with interference in the embodiments of this application;

[0044] Figure 17 This is a schematic diagram illustrating the acquisition of training features from training images in an embodiment of this application;

[0045] Figure 18 This is a schematic diagram illustrating the acquisition of training features in the solder joint detection area in an embodiment of this application;

[0046] Figure 19 This is a schematic diagram illustrating the determination of the intermediate point in an embodiment of this application;

[0047] Figure 20 This is a schematic diagram of the polygon detection area in an embodiment of this application;

[0048] Figure 21 This is a schematic diagram of a full solder joint in an embodiment of this application;

[0049] Figure 22 This is a schematic diagram of the minimum rectangular fitting region in the embodiments of this application;

[0050] Figure 23 This is a schematic diagram of the search box on the left side of the positioning solder joint in an embodiment of this application;

[0051] Figure 24 This is a schematic diagram of the left side line of the solder joint in an embodiment of this application;

[0052] Figure 25This is a schematic diagram of the search box on the right side of the positioning solder joint in an embodiment of this application;

[0053] Figure 26 This is a schematic diagram of the right side line of the solder joint in an embodiment of this application;

[0054] Figure 27 This is a schematic diagram illustrating the determination of the first and second intersection points in an embodiment of this application;

[0055] Figure 28 This is a schematic diagram showing the width of the solder joint in an embodiment of this application;

[0056] Figure 29 This is a flowchart of a solder joint width detection method according to an embodiment of this application;

[0057] Wherein: 101-weld point; 102-top cover; 103-aluminum shell; 104-weld seam; 105-line search box corresponding to the left line of the weld point; 106-line search box corresponding to the right line of the weld point; 107-line search box corresponding to the edge of the top cover; 108-left line; 109-right line; 110-top cover edge;

[0058] 1-Training image; 2-Training feature points; 3-Training features; 4-Midpoint; 5-Vertex (X) min Y max ); 6-vertex (X) max Y max ); 7-First intersection point; 8-Second intersection point; 10, 11, 12-Weld point; 13-Target weld point; 14-Left side line; 15-Right side line; 20-Top cover; 21-First candidate top cover edge; 22-Second candidate top cover edge; 23-Third candidate top cover edge; 24-Interference; 25-Top cover edge; 30-Weld seam; 40-Aluminum shell; 41-Aluminum shell edge; 50-Background; 60-Preset aluminum shell edge search box; 61-First preset top cover edge search box; 62-Second preset top cover edge search box; 63-Third preset top cover edge search box; 64-Weld point left side line search box; 65-Weld point right side line search box; 70-First mask area; 71-Second mask area; 80-First remaining area; 81-Second remaining area; 90-Weld point detection area; 91-Polygon detection area; 92-Minimum rectangle fitting area. Detailed Implementation

[0059] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0060] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0061] Lithium-ion power batteries are used in industries such as new energy vehicles, electric bicycles, hydropower energy storage, and wind power energy storage. Their production process includes the following steps: raw material mixing, coating, die-cutting and slitting, winding, cold pressing, adapter welding, Mylar film coating, bare cell pairing and casing, top cover pre-welding, top cover full welding, liquid injection formation, pack assembly, and testing. In the top cover pre-welding process, the width of the pre-welded joints needs to be inspected. Whether the pre-welding meets the requirements affects the result of the top cover full welding and ultimately whether the lithium-ion power battery leaks. Therefore, the weld joint width plays a crucial role in whether the final lithium-ion power battery product has the risk of leakage.

[0062] Because the tested object fluctuates vertically in the production line, and the weld points on the tested object also fluctuate horizontally, the preset detection range is large. In particular, there are impurities and scratches on the top cover, as well as impurities and spots around the weld points, which can easily interfere with the determination of the line-finding search box, and thus interfere with the detection results of the weld point width. The misjudgment of the line-finding search box makes it easy for the edge determined by the line-finding tool to be wrong in the detection of the weld point width, which further affects the accuracy of the weld point width detection results.

[0063] To address the aforementioned issues, this application will now be described in further detail with reference to the accompanying drawings.

[0064] This application provides a method for detecting solder joint width in some embodiments, such as... Figure 29 As shown, the detection method includes the following steps:

[0065] S1001. Obtain the image to be detected.

[0066] When the object to be detected reaches the detection position, the camera is controlled to capture an image of the object to be detected, and the size of the image to be detected is determined to be U*V; wherein, the camera can be a CCD (Charge Coupled Device) camera.

[0067] In the production line, there may be an orientation misalignment between the camera and the object being inspected. If the image captured by the camera is in a different position from the image of the product being inspected, preprocessing of the captured image may be necessary. For example, ... Figure 3 The image shown is a photograph taken by a camera. The result is obtained by rotating the image around its center. Figure 4 The image shown is the image to be inspected, which contains weld point 10, top cover 20, weld seam 30, aluminum shell 40 and background 50.

[0068] Among them, the preprocessing of the captured image can be mirroring the image with the image center, or it can be rotation plus mirroring; the image to be detected after preprocessing is clear and intuitive.

[0069] An O-XY coordinate system is established for the image to be detected, with the upper left point of the image to be detected being (0, 0), the positive X direction being to the right, and the positive Y direction being downward.

[0070] S1002. Determine the aluminum shell edge and the reference positioning line in the image to be detected.

[0071] The image to be detected is first binarized. This binarization can be performed using an automatic thresholding method, such as... Figure 5 As shown, in the preset aluminum shell edge search box 60, after the solder joint is masked by the first mask area 70, the first remaining area 80 is determined. The preset aluminum shell edge search box 60 is the location determined by the wire-finding tool using a first preset value. Figure 6 As shown, valid points between the aluminum shell and the background are determined in the first remaining region 80, the corresponding aluminum shell edges are determined by the valid points between the aluminum shell and the background, and the reference positioning lines are determined based on the aluminum shell edges.

[0072] exist Figure 6 In the search box 60 along the aluminum shell 40 and the background 50, valid points are obtained from black to white according to arrow A. Valid points that deviate too far from the concentration area are removed. Figure 6 The valid points marked with dark plus signs in the middle are connected to the remaining valid points to form the corresponding aluminum shell edges. That is, the valid points marked with light plus signs in the diagram are connected to the corresponding aluminum shell edges 41.

[0073] The baseline positioning line is determined based on the aluminum shell edge 41. By taking the Y value of the centroid coordinate of the aluminum shell edge, a two-dimensional coordinate (0, Y) of a point is generated. A two-dimensional linear transformation line is generated using the two-dimensional coordinate (0, Y) of this point and the angle 0°, which is the positioning baseline.

[0074] S1003. Determine the top cover edge according to the reference positioning line.

[0075] A line-finding tool can be set based on the reference positioning line in step S1002. The position of the preset top cover edge search box is determined according to the corresponding preset value. The effective point between the top cover 20 and the gap 30 is determined in the preset top cover edge search box, and the top cover edge is determined according to the effective point between the top cover 20 and the gap 30.

[0076] Multiple line-finding tools can be set based on the baseline positioning line in step S1002. The corresponding preset top cover edge search box position is determined according to the corresponding preset value. The effective point between the top cover 20 and the gap 30 is determined in different preset top cover edge search boxes. Based on the effective point between the top cover 20 and the gap 30, multiple candidate top cover edges corresponding to multiple preset top cover edge search boxes are determined. The optimal top cover edge is selected from multiple candidate top cover edges according to preset judgment conditions. The top cover edge determined by the above method reduces the error.

[0077] The preset judgment conditions include whether the distance between the candidate top cover edge and the aluminum shell edge is within a preset range, and whether the angle of the candidate top cover edge is closest to the angle of the aluminum shell edge. When the distance between the candidate top cover edge and the aluminum shell edge is within the preset range and the angle of the candidate top cover edge is closest to the angle of the aluminum shell edge, the corresponding candidate top cover edge is the optimal top cover edge.

[0078] For example, three candidate top cover edges are determined using three line-finding tools: first candidate top cover edge 21, second candidate top cover edge 22, and third candidate top cover edge 23.

[0079] like Figure 7 As shown, the second remaining area 81 is determined by using a wire-finding tool in the first preset top cover edge search box 61 and the second mask area 71 after masking the solder joints; as shown Figure 8 As shown, the first candidate top cover edge is determined in the second remaining region 81, and the effective points between the top cover 20 and the gap 30 are determined in the second remaining region 81. Effective points that deviate far from the concentration point area are eliminated. Figure 8 The valid points marked with a dark plus sign are connected to the remaining valid points to form the corresponding first candidate top cover edge 21, i.e., the connection... Figure 8 The valid point of the light-colored plus sign in the diagram is the corresponding first candidate top cover edge 21, and the distance between the first candidate top cover edge and the aluminum shell edge, as well as the angle of the first candidate top cover edge, are obtained.

[0080] like Figure 9 and Figure 10 As shown, the second candidate top cover edge 22 is determined in the second preset top cover edge search box 62 using the line-finding tool. Valid points between the top cover 20 and the gap 30 are then identified in the second preset top cover edge search box 62. Valid points that deviate too far from the concentration point area are eliminated. Figure 10 The valid points marked with a dark plus sign are connected to the remaining valid points to form the corresponding second candidate top cover edge 22, i.e., connecting... Figure 10The valid points of the light-colored plus signs in [[ ]] are the corresponding second candidate top cover edges 22, and the distances between the second candidate top cover edges and the aluminum shell edges, as well as the angles of the second candidate top cover edges, are obtained.

[0081] As Figure 11 and Figure 12 shown, the third candidate top cover edge is determined in the third preset top cover edge search box 63 by the line-finding tool, the valid points between the top cover 20 and the gap 30 are determined in the third preset top cover edge search box 63, and the valid points that are far from the concentrated point area are removed, that is, Figure 12 the valid points of the dark-colored plus signs in [[ ]], and the remaining valid points are connected to be the corresponding third candidate top cover edge 23, that is, connecting Figure 12 the valid points of the light-colored plus signs in [[ ]] are the corresponding third candidate top cover edge 23, and the distances between the third candidate top cover edges and the aluminum shell edges, as well as the angles of the third candidate top cover edges, are obtained.

[0082] Judge whether the distances between the three candidate top cover edges and the aluminum shell edges are within the preset range, and whether the angles of the three candidate top cover edges are the closest to the angle of the aluminum shell edge, and select the candidate top cover edge that best meets the judgment conditions as the optimal top cover edge. <000​​​​​​​​​​​​​​​​​​​​

[0089] S1005. Correct the solder joints in the solder joint detection area to obtain the target solder joint.

[0090] The solder joint detection area 90 is subjected to binarization and etching processes in sequence to correct the solder joints in the solder joint detection area 90 into clear target solder joints 13.

[0091] The binarization process in step S1005 uses a first preset threshold, which is a stable threshold determined through extensive image processing. Gray values ​​less than or equal to the first preset threshold are set to black (i.e., gray value equal to 0), and gray values ​​greater than the first preset threshold are set to white (i.e., gray value equal to 255). This binarization process removes a portion of the spots in the solder joint detection area 90, resulting in the solder joint 11 appearing as shown below. Figure 14 As shown.

[0092] The solder joint detection area 90 is subjected to etching treatment. The etching treatment expands the black area and fills the solder joint. At this time, the solder joint 12 is as follows: Figure 15 As shown, this makes the solder joints full and facilitates subsequent processing; the etching process is mainly for filling the solder joint heads.

[0093] S1006. According to the preset path, starting from the training feature point and passing through the intermediate point, determine the polygonal detection area of ​​the target weld point.

[0094] like Figure 16 As shown, since there may be some interference 24, such as specks, in the solder joint detection area 90, the area is further narrowed. According to the preset path, starting from the training feature point 2 and passing through the intermediate point, the polygonal detection area 91 of the target solder joint 13 is determined. The polygonal detection area 91 is located within the solder joint detection area 90. In this application, there are specks, scratches, etc. on the top cover, and there are also specks and blemishes around the solder joint. Figure 16 To represent the exhibition, Figures 1-20 Both have this property.

[0095] The training feature points are determined using a geometric positioning tool, and the intermediate point is determined based on the training feature points and the weld joint detection area 90; for example... Figure 17 As shown, using a geometric positioning tool, the outer contour of the weld head tip feature in training image 1 is used as training feature 3. Training feature points 2 that have a relative relationship with training feature 3 are then determined. In some embodiments, training feature points 2 can determine their own positions and have a certain relative relationship with training feature 3. For example... Figure 17 The training feature point 2 shown is located in the upper left corner of the training feature 3, and the relative relationship remains unchanged once it is determined.

[0096] In the solder joint detection area 90, the head of the target solder joint 13 is matched according to the trained features, such as... Figure 18 As shown, the position of training feature point 2 relative to training feature 3 is used to determine the polygon detection region 91, including the following steps:

[0097] First, draw a perpendicular line B through the training feature point 2. For example... Figure 19 As shown, a perpendicular line C is obtained by translating the perpendicular line B according to a preset length. The perpendicular line C intersects the upper and lower edges of the solder joint detection area 90. The preset length is greater than the length of the solder joint. The intersection of the perpendicular line C and the lower edge of the solder joint detection area 90 is the midpoint 4. Then, according to a preset path, starting from the training feature point 2 and passing through the midpoint 4, the polygon detection area 91 of the target solder joint 13 is determined. The preset path is preset according to the shape of the target solder joint 13, and the polygon detection area 91 is within the solder joint detection area 90.

[0098] like Figure 20 As shown, in some embodiments, the polygon detection region 91 takes the training feature point 2 as the starting point and also the first vertex, and the middle point 4 as the fifth vertex, and generates a hexagonal detection region similar to the shape of the target solder joint 13 according to a preset path based on the shape of the target solder joint 13.

[0099] S1007. The polygon detection region is processed and expanded using the blob tool to determine the minimum rectangular fitting region.

[0100] The spots in the polygon detection area 91 are filtered out. Each position (coordinate) in the polygon detection area 91 has a grayscale value (range 0-255). According to a second preset threshold, grayscale values ​​less than or equal to the second preset threshold are set to black (i.e., grayscale value equals 0), and grayscale values ​​greater than the second preset threshold are set to white (i.e., grayscale value equals 255). This allows the solder joints to be segmented. After segmentation, the solder joints have a certain area, which may also include some noise. Noise is filtered out by a preset area range to extract the solder joints. Figure 21 As shown, the extracted solder joints are then etched and filled to obtain full solder joints 13.

[0101] In the O-XY coordinate system, extract the minimum and maximum values ​​in the X direction and the Y direction of the solder joint, i.e., X... min Y min X max Y min By combining the extreme values ​​in pairs, we obtain the coordinates of four points (X, Y, Z). min Y min ), (X max Y min ), (X min Y max ), (X max Y max ),like Figure 22 As shown, the minimum rectangular fitting region 92 is determined by using four points as vertices.

[0102] S1008. Locate the left and right line search boxes of the solder joint within the minimum rectangular fitting area to determine the left and right lines of the solder joint.

[0103] In the minimum rectangular fitting area 92, locate the left line search box 64 and the right line search box 65 of the solder joint, and determine the left line 14 and the right line 15 of the solder joint. The left line 14 is determined in the left line search box 64 of the solder joint by the line finding tool, and the right line 15 is determined in the right line search box 65 of the solder joint by the line finding tool.

[0104] like Figure 22 , Figure 23 and Figure 25 As shown, the vertex (X) of the fitted region 92 with the minimum rectangle is... min Y max )5 and (X max Y max 6. Determine the positions of the search box 64 on the left side of the solder joint and the search box 65 on the right side of the solder joint, respectively.

[0105] In the search box 64, the left edge 14 of the solder joint is determined, such as... Figure 24 As shown, the valid point is determined in the search box 64 on the left side of the solder joint using the line finding tool, and the left side line 14 is determined based on the valid point.

[0106] The right edge of the solder joint is determined in search box 65 on the right side of the solder joint. For example... Figure 26 As shown, the valid point is determined in the search box 65 on the right side of the solder joint using the line finding tool, and the right side line 15 is determined based on the valid point.

[0107] S1009. Determine the width of the weld point based on the first intersection point and the second intersection point, wherein the first intersection point is the intersection point of the left side line and the top cover edge, and the second intersection point is the intersection point of the right side line and the top cover edge.

[0108] like Figure 27 As shown, in the image to be detected, based on the first intersection point 7 of the left line 14 and the top cover edge 25, and the second intersection point 8 of the right line 15 and the top cover edge 25, as follows: Figure 28 As shown, the distance between the first intersection point 7 and the second intersection point 8 is calculated, and then multiplied by the pixel equivalent to determine the width of the solder joint.

[0109] This application provides a method for detecting solder joint width, including acquiring an image to be detected; determining a solder joint detection region in the image to be detected; correcting the solder joints in the solder joint detection region to obtain a target solder joint; determining a polygonal detection region of the target solder joint according to a preset path, starting from a training feature point and passing through an intermediate point, wherein the polygonal detection region is within the solder joint detection region; processing and expanding the polygonal detection region using a blob tool to determine the minimum rectangular fitting region of the target solder joint; locating the left and right line search boxes of the solder joint within the minimum rectangular fitting region to determine the left and right lines of the solder joint; and determining the width of the solder joint based on a first intersection point and a second intersection point. This application, by continuously narrowing the detection range, filters out noise, reduces interference, and improves the accuracy of positioning and matching and the precision of solder joint width detection during the detection process.

[0110] The above content is only for illustrating the technical concept of this application and should not be used to limit the scope of protection of this application. Any modifications made to the technical solution based on the technical concept proposed in this application shall fall within the scope of protection of the claims of this application.

[0111] Furthermore, unless expressly stated in the claims, the order of processing elements and sequences, the use of numbers and letters, or other names described in this application are not intended to limit the order of the processes and methods of this application. Although some embodiments that are currently considered useful have been discussed through various examples in the foregoing disclosure, it should be understood that such details are for illustrative purposes only, and the appended claims are not limited to the disclosed embodiments. Rather, the claims are intended to cover all modifications and equivalent combinations that conform to the substance and scope of the embodiments of this application. For example, while the system components described above can be implemented by hardware devices, they can also be implemented solely by software solutions, such as installing the described system on existing servers or mobile devices.

[0112] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of the present application requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.

[0113] For each patent, patent application, patent application publication, and other material such as articles, books, specifications, publications, and documents referenced in this application, the entire contents of that patent are incorporated herein by reference. This excludes historical application documents that are inconsistent with or conflict with the content of this application, as well as documents that limit the broadest scope of the claims in this application (currently or subsequently appended to this application). It should be noted that if there are any inconsistencies or conflicts between the descriptions, definitions, and / or terminology used in the supplementary materials of this application and the content of this application, the descriptions, definitions, and / or terminology used in this application shall prevail.

Claims

1. A method for detecting the width of a solder joint, characterized in that, The detection method includes: Acquire the image to be detected; In the image to be inspected, a solder joint detection area is determined, which is determined based on the size of a preset detection area, the edge of the aluminum shell, and the edge of the top cover. The solder joints in the solder joint detection area are corrected to obtain the target solder joint; According to the preset path, starting from the training feature point and passing through the intermediate point, the polygon detection area of ​​the target weld point is determined. The polygon detection area is within the weld point detection area. The training feature point is determined according to the geometric positioning tool, and the intermediate point is determined according to the training feature point and the weld point detection area. The polygon detection region is processed and expanded using the blob tool to determine the minimum rectangular fitting region of the target weld point; Locate the left and right line search boxes of the solder joint within the minimum rectangular fitting area to determine the left and right lines of the solder joint. The width of the weld point is determined based on the first intersection point and the second intersection point, wherein the first intersection point is the intersection point of the left side line and the top cover edge, and the second intersection point is the intersection point of the right side line and the top cover edge; The training feature points are determined using a geometric localization tool, including: In the training image, the outer contour of the tip of the solder joint head is used as the training feature to determine the relationship between the training feature points and the training features. In the solder joint detection area, the target solder joint head is determined according to the training features, and the training feature points are determined according to the relationship between the training feature points and the training features. The intermediate point is determined based on the training feature points and the solder joint detection area, including: Draw a perpendicular line through the trained feature points; A vertical line is translated according to a preset length and intersects the upper and lower edges of the weld joint detection area. The preset length is greater than the length of the weld joint, and the intersection of the vertical line and the lower edge of the weld joint detection area is the midpoint.

2. The method for detecting weld joint width according to claim 1, characterized in that, The determination of the aluminum shell edge includes: Within the preset aluminum shell edge search box, the first remaining area is determined by masking the solder joints through the first mask area. Determine the effective points between the aluminum shell and the background in the first remaining region; The edge of the aluminum shell is determined by the effective points between the aluminum shell and the background; The reference positioning line is determined by the Y-coordinate of the centroid of the aluminum shell edge and the angle 0°.

3. The method for detecting weld joint width according to claim 2, characterized in that, The determination of the top cover edge includes: The positions of multiple preset top cover edge search boxes are determined by the reference positioning line; Determine the corresponding top cover edge in different preset top cover edge search boxes; Select the top cover edge that meets the preset judgment conditions.

4. The method for detecting weld joint width according to claim 1, characterized in that, Determining the solder joint detection area in the image to be detected includes: The size of the weld joint inspection area is determined based on the size of the preset inspection area. The location of the weld joint detection area is determined based on the center coordinates of the preset detection area. The center coordinates (X1, Y1) of the preset detection area are calculated using the following formula: In the formula, U is the width of the image to be detected, Y is the Y value of the centroid coordinate of the aluminum shell edge, Dis is the vertical distance from the centroid coordinate of the aluminum shell edge to the top cover edge, H is the height of the preset detection area, and Dis0 is the compensation amount.

5. The method for detecting weld joint width according to claim 1, characterized in that, The correction process for the solder joints in the solder joint detection area includes performing binarization and etching processes on the solder joint detection area in sequence.

6. The method for detecting weld joint width according to claim 1, characterized in that, The polygon detection region is processed and expanded using the blob tool to determine the minimum rectangular fitting region of the target weld point; The polygon detection region is processed and expanded using the blob tool; Determine the minimum and maximum values ​​of the solder joint in the X direction, and the minimum and maximum values ​​in the Y direction; Determine the vertex coordinates of the minimum rectangular fitting region, wherein the vertex coordinates are pairwise combinations of the minimum and maximum values ​​in the X direction and the minimum and maximum values ​​in the Y direction.

7. The method for detecting weld joint width according to claim 1, characterized in that, Determining the width of the weld joint based on the first intersection point and the second intersection point includes: Obtain the distance between the first intersection point and the second intersection point; The width of the solder joint is determined by multiplying the distance between the first intersection point and the second intersection point by the pixel equivalent.

8. The method for detecting weld joint width according to claim 1, characterized in that, Before acquiring the image to be detected, the method further includes: Acquire the captured images; The captured image is preprocessed to obtain the image to be detected.

Citation Information

Patent Citations

  • Complex fillet weld joint position detecting method based on laser binocular vision

    CN103759648A

  • Patch element positioning identification method based on minimum enclosing rectangle

    CN105809705A