A method and device for visually detecting a seal pin welding defect

By using image sensors and image recognition technology, the battery sealing plate images before and after welding are segmented to determine the area of ​​cracks in the weld and substrate, thus solving the problem of poor sealing caused by cracks during the welding process and improving the safety and quality of battery welding.

CN118858285BActive Publication Date: 2025-11-07SHENZHEN GEYUAN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410803745.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2025-11-07
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

During the welding process of battery sealing nails, volume changes at the weld and substrate locations can lead to cracks, affecting sealing performance and posing safety hazards. Existing technologies make it difficult to effectively detect and assess welding defects.

Method used

Image sensors are used to acquire images of the battery sealing plate before and after welding. The images are divided into pre-welding area and substrate area using the target area contour map. Image recognition technology is used to determine whether the crack area on the substrate and weld is less than the preset value to ensure welding quality.

Benefits of technology

It improves the safety of battery sealing nail welding, effectively detects cracks in the weld and substrate through image recognition technology, ensures qualified welding quality, and reduces safety risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118858285B_ABST
    Figure CN118858285B_ABST
Patent Text Reader

Abstract

The application provides a kind of sealing nail welding defect visual detection method, belong to image detection technical field, method includes: based on image sensor obtains first detection image and second detection image;Obtain target area contour map, first detection image is mapped to target area contour map, to make first detection image divide into pre-welding area image and first base material area image;Second detection image is mapped to target area contour map, to make second welding image divide into weld area image and second base material area image;Determine whether the battery sealing plate after welding meets first determination condition and second determination condition;Based on the determination result obtained according to first determination condition and second determination condition, determine whether the battery sealing plate after welding is qualified.The application also provides a kind of sealing nail welding defect visual detection device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of visual inspection, in particular to a method and device for visual inspection of sealing pin welding defects. BACKGROUND

[0002] With the continuous progress of science and technology, as a key component of energy storage and supply, the sealing technology in the manufacturing process of batteries has attracted more and more attention. Among them, battery sealing pin welding, as a key connection technology, is crucial to ensure the safety and performance of the battery. Battery sealing pin welding is a process of firmly connecting the sealing pin and the battery shell by welding. This welding technology uses advanced welding equipment to achieve efficient and reliable connection between the sealing pin and the shell by precisely controlling the welding parameters. Sealing pin welding not only ensures the stability of the internal components of the battery, but also effectively prevents safety hazards such as battery leakage and gas leakage.

[0003] During the welding process of the battery sealing pin, due to the sudden change in temperature during welding, the volume of the weld position and the base material position changes, and internal stress exists after welding cooling, causing cracks to appear. Excessive cracks can lead to poor sealing and cause safety problems. Therefore, how to detect defects caused by cracks during sealing pin welding is a problem to be solved. SUMMARY

[0004] The embodiments of the present application provide a sealing pin welding defect visual inspection method and device to improve the above problems.

[0005] The first aspect of the embodiments of the present application provides a sealing pin welding defect visual inspection method, the method comprising:

[0006] obtaining a first detection image and a second detection image based on an image sensor, wherein the first detection image is an image of a battery sealing plate to be welded, and the second detection image is an image of the battery sealing plate after sealing pin welding;

[0007] obtain a target area contour map, the target area contour map is a map formed by the boundary contour of the area where the weld needs to be formed, map the target area contour map to the first detection image to divide the first detection image into a pre-welding area image and a first base material area image; map the target area contour map to the second detection image to divide the second welding image into a weld area image and a second base material area image;

[0008] compare the first base material area image and the second base material area image, and determine whether the welded battery sealing plate meets the first determination condition based on the difference image between the first base material area image and the second base material area image, wherein the first determination condition includes that the base material crack image area is less than a first preset area;

[0009] determine a weld crack image based on the weld region image, and determine whether the battery cover plate after welding meets a second determination condition based on the weld crack image, wherein the second determination condition comprises that an area of the weld crack image is less than a second preset area;

[0010] determine whether the battery cover plate after welding is qualified based on determination results obtained according to the first determination condition and the second determination condition.

[0011] Optionally, after the target region contour map is mapped to the second detection image so that the second weld image is divided into the weld region image and the second base material region image, the method comprises:

[0012] obtain an actual weld contour map based on the second detection image;

[0013] compare the actual weld contour map with the weld region image, and determine whether the battery cover plate after welding meets a third determination condition according to a comparison result, wherein the third determination condition comprises that a weld actual size and a position are consistent with an expected position;

[0014] determine whether the battery cover plate after welding is qualified based on the first determination condition and the second determination condition, and the method further comprises:

[0015] determine whether the battery cover plate after welding is qualified based on the third determination condition.

[0016] Optionally, the method of obtaining the actual weld contour map based on the second detection image comprises:

[0017] cut the first detection image to form a plurality of first sub-images, and determine, based on the target region contour map, that first sub-images of the plurality of first detection images that constitute the first base material region image are target first sub-images;

[0018] cut the second detection image to form a plurality of second sub-images;

[0019] compare the plurality of second sub-images with the target first sub-image, wherein the comparison comprises color temperature parameters, hue parameters, and brightness parameters;

[0020] determine, as target second sub-images, the plurality of second sub-images that have the same data parameters as the target first sub-image, and determine the remaining second sub-images as weld sub-images;

[0021] obtain the actual weld contour map based on the plurality of weld sub-images.

[0022] Optionally, the method of combining the plurality of weld sub-images to form an actual weld image comprises:

[0023] determine, as a boundary sub-image, a weld sub-image of the target second sub-image adjacent second sub-images;

[0024] connecting the plurality of boundary sub-images to form an actual welding contour map.

[0025] Optionally, the connecting the plurality of boundary sub-images to form an actual welding contour map comprises:

[0026] smoothing the actual welding contour map.

[0027] Optionally, the determining the weld crack image based on the weld seam area image, and determining whether the battery cover plate after welding satisfies a second determination condition based on the weld crack image, wherein the second determination condition comprises that the area of the weld crack image is less than a second preset area, comprises:

[0028] acquiring an image parameter of each weld sub-image, the image parameter comprising a color temperature parameter, a color tone parameter and a brightness parameter;

[0029] marking, as a target area sub-image, an adjacent weld sub-image having the same image parameter in the plurality of weld sub-images, wherein a plurality of continuous adjacent weld sub-images constitute an image group;

[0030] based on the positions of the plurality of image groups, determining an image group constituted by weld sub-images formed by the crack image in the plurality of image groups as a target image group, and all weld sub-images constituting the target image group as crack sub-images;

[0031] determining the area of the weld crack image based on the number of the crack sub-images.

[0032] Optionally, based on the positions of the plurality of image groups, determining an image group constituted by weld sub-images formed by the crack image in the plurality of image groups as a target image group, and all weld sub-images constituting the target image group as crack sub-images, comprises:

[0033] determining a position parameter of each image group, the position parameter of the image group being a coordinate parameter of a pattern center of the image group;

[0034] establishing a discrete model based on the coordinate parameters of the plurality of image groups;

[0035] determining, according to a calculation result of the discrete model, that the image parameters of the constituted weld sub-images are the same and that a plurality of image groups with the highest dispersion degree are the target image group.

[0036] In a second aspect, the present application provides a sealing nail welding defect visual detection device, which is configured to:

[0037] acquiring a first detection image and a second detection image based on an image sensor, wherein the first detection image is an image of a battery cover plate to be welded, and the second detection image is an image of the battery cover plate after sealing nail welding;

[0038] obtaining a target region contour map, the target region contour map being a map formed by a region boundary contour of a region in which a weld is to be formed, mapping the target region contour map to the first detection image to divide the first detection image into a pre-welding region image and a first base material region image; mapping the target region contour map to the second detection image to divide the second welding image into a weld region image and a second base material region image;

[0039] comparing the first base material region image and the second base material region image, and determining whether the welded battery cover plate meets a first determination condition based on a difference image between the first base material region image and the second base material region image, wherein the first determination condition includes that an area of a base material crack image is less than a first preset area;

[0040] determining a weld crack image based on the weld region image, and determining whether the welded battery cover plate meets a second determination condition based on the weld crack image, wherein the second determination condition includes that an area of the weld crack image is less than a second preset area;

[0041] determining whether the welded battery cover plate is qualified based on a determination result obtained according to the first determination condition and the second determination condition.

[0042] Optionally, the device is configured to:

[0043] obtaining an actual welding contour map based on the second detection image;

[0044] comparing the actual welding contour map and the weld region image, and determining whether the welded battery cover plate meets a third determination condition according to a comparison result, wherein the third determination condition includes that a weld actual size and a position thereof are consistent with an expected position;

[0045] determining whether the welded battery cover plate is qualified based on the first determination condition and the second determination condition, further includes:

[0046] determining whether the welded battery cover plate is qualified based on the third determination condition.

[0047] Optionally, the device is configured to:

[0048] slicing the first detection image to form a plurality of first sub-images, and determining, based on the target region contour map, that a first sub-image constituting the first base material region image among the plurality of first sub-images is a target first sub-image;

[0049] slicing the second detection image to form a plurality of second sub-images;

[0050] comparing the plurality of second sub-images and the target first sub-image, wherein the comparison includes a color temperature parameter, a color tone parameter, and a brightness parameter;

[0051] determine a plurality of second sub-images with the same first sub-image data parameters as target second sub-images, and the rest as weld sub-images;

[0052] obtain an actual welding contour map based on the plurality of weld sub-images.

[0053] Optionally, the device is configured to:

[0054] determine the weld sub-image adjacent to the target second sub-image as a boundary sub-image;

[0055] connect the plurality of boundary sub-images to form an actual welding contour map.

[0056] Optionally, the device is configured to:

[0057] smooth the actual welding contour map.

[0058] Optionally, the device is configured to:

[0059] obtain image parameters of each weld sub-image, the image parameters including color temperature parameters, hue parameters and brightness parameters;

[0060] mark the weld sub-images adjacent to the weld sub-images with the same image parameters as target area sub-images, wherein a plurality of continuous adjacent weld sub-images constitute an image group;

[0061] based on the positions of the plurality of image groups, determine an image group constituted by the weld sub-images formed by the crack image in the plurality of image groups as a target image group, and all the weld sub-images constituting the target image group as crack sub-images;

[0062] determine the crack image area of the weld based on the number of crack sub-images.

[0063] Optionally, the device is configured to:

[0064] determine the position parameters of each image group, the position parameters of the image group being the coordinate parameters of the image group pattern center;

[0065] establish a discrete model based on the plurality of image group coordinate parameters;

[0066] determine, according to the calculation result of the discrete model, that the image parameters of the weld sub-images constituting the plurality of image groups are the same and the plurality of image groups with the highest dispersion degree are the target image groups.

[0067] The third aspect of the embodiment of the present application provides an electronic device, which comprises:

[0068] At least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to the first aspect of the embodiments of the present application.

[0069] The fourth aspect of the embodiments of the present application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the method according to the first aspect of the embodiments of the present application.

[0070] To sum up, the above method and device have the following technical effects:

[0071] The method for visually detecting welding defects of a sealing nail provided by the embodiments of the present application first acquires a first detection image before welding and a second detection image after welding based on an image sensor, then acquires a target region contour map, maps the target region contour map to the first detection image, so that the first detection image is divided into a pre-welding region image and a first base material region image, then maps the target region contour map to the second detection image, so that the second welding image is divided into a weld region image and a second base material region image; and determines whether the crack area on the battery sealing plate base material after welding and the crack area on the weld are both smaller than a preset area, and determines whether the battery sealing plate after welding is qualified based on the determination. The method for visually detecting welding defects of a sealing nail provided by the present application acquires the crack proportion on the base material and the crack proportion on the weld through the technology of image recognition, and determines whether the welding is qualified, thereby improving the safety of sealing nail welding. BRIEF DESCRIPTION OF DRAWINGS

[0072] Figure 1 FIG. 1 is a flowchart of a method for visually detecting welding defects of a sealing nail provided by the embodiments of the present application. DETAILED DESCRIPTION

[0073] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0074] The method for visually detecting welding defects of a sealing nail provided by the embodiments of the present application is described below with reference to FIG. 1. Figure 1 , and includes the following steps:

[0075] S101: Acquire a first detection image and a second detection image based on an image sensor, wherein the first detection image is an image of a battery sealing plate to be welded, and the second detection image is an image of the battery sealing plate after sealing nail welding.

[0076] It can be understood that the acquisition of the detection image is the basis of the visual detection technology. In the embodiment, the acquisition angle, illumination condition and the like of the first detection image and the second detection image should be as consistent as possible. The battery sealing plate to be welded can be fixed on a fixture, and images can be captured at the same position, of course, in some other embodiments, some other fixing modes can also be used, which are not limited herein.

[0077] S102: Obtain a target region contour map, the target region contour map is a map formed by a region boundary contour of a region in which a weld is to be formed, map the target region contour map to the first detection image to divide the first detection image into a pre-welding region image and a first base material region image, and map the target region contour map to the second detection image to divide the second welding image into a weld region image and a second base material region image.

[0078] Specifically, the target region contour map is a map formed by a region boundary contour of a region in which a weld is to be formed. The target region contour map can be obtained directly according to welding preset data, or can be drawn in the process of visual marking. The specific obtaining mode is not limited herein. The target region contour map is a frame line map, which divides the position corresponding to the welding region in the image of the entire battery sealing plate. In the embodiment, the frame line map is overlapped on the first detection image and the second detection image by using feature positioning or the like, that is, the target region contour map is mapped to the first detection image and the second detection image. In this way, the first detection image can be divided into a pre-welding region image and a first base material region image, and the second welding image can be divided into a weld region image and a second base material region image.

[0079] S103: Obtain an actual welding contour map based on the second detection image.

[0080] During the welding process, due to uncertain factors such as crystal direction and temperature change of the molten pool part, the stress shrinkage of the welding material base after cooling causes irregular deformation of the weld, resulting in size change. Due to the uncertainty of the deformation, excessive deformation may cause the welding result to not meet the expectation, and safety problems may exist. Therefore, in the embodiment, the actual welding contour map is obtained based on the second detection image, and the actual welding contour map is compared with the size of the expected region. The comparison result can be used to determine the amount of deformation, and then it can be judged whether the size of the weld region after welding is completed meets the expectation.

[0081] Specifically, as an implementation manner, step S103 can include the following steps:

[0082] S1031: Divide the first detection image to form a plurality of first sub-images, and determine, based on the target region contour map, that the first sub-images constituting the first base material region image in the plurality of first detection images are target first sub-images.

[0083] It can be understood that the size of the segmentation is as small as possible within the capacity of the processing device, but the size of each first sub-image is at least greater than the size of a single pixel in the first detection image, affected by the performance of the specific processing device. The segmentation process of the image can be based on equal segmentation of the same size edge, and the algorithm that can be used is Sobel, Canny, etc. The specific segmentation process is not described here. In the embodiment, the first sub-image constituting the first base material area image is determined as the target first sub-image. For which images of the first sub-image constituting the first base material area image are the target first sub-image, specifically, first, the image parameters of each first sub-image can be obtained, including color temperature parameters, hue parameters, and brightness parameters, then, using a feature extraction algorithm, it is determined which sub-image color temperature parameters, hue parameters, and brightness parameters are the same as the first base material area image parameters, thus determining which image first sub-image is the target first sub-image. The first base material area image parameters can be directly calibrated or selected by manual selection, etc. without limitation here.

[0084] S1032: Segmentation of the second detection image to form a plurality of second sub-images.

[0085] The segmentation process of the second detection image is the same as the segmentation process of the first detection image, which is not described here.

[0086] S1033: Comparing the plurality of second sub-images with the target first sub-image, wherein the comparison includes color temperature parameters, hue parameters, and brightness parameters.

[0087] S1034: Determining that the plurality of second sub-images with the same data parameters as the target first sub-image data are target second sub-images, and the rest are weld sub-images.

[0088] S1035: Obtaining an actual welding contour map based on the plurality of weld sub-images.

[0089] It can be understood that the purpose is to determine which second sub-image is the same as the target first sub-image, that is, the image of the base material itself, by feature matching. In addition to the image constituting the base material image, that is, the image constituting the actual weld. Of course, at this time, the actual weld image may also have part of the crack image in the weld, so the boundary determination method can be used to further calibrate the boundary to make the boundary clearer. Specifically, it can be determined that the adjacent second sub-image is the target second sub-image, and the weld sub-image is the boundary sub-image, that is, a weld sub-image image adjacent to a base image sub-image. It can be understood that the second sub-image is a sub-image of the weld boundary position. By connecting these second sub-images, an actual welding contour map can be formed. Of course, in order to avoid the influence of the weld interspersed in the boundary on the connected actual welding contour map, the preliminary connected actual welding contour map can also be smoothed to avoid the influence of the weld on the breakpoint of the actual welding contour map. In this way, the connected multiple boundary sub-images can form an actual welding contour map.

[0090] S104: Comparing the actual welding contour map with the weld area image, and determining whether the welded battery cover plate meets a third determination condition according to the comparison result, wherein the third determination condition includes that the actual size and position of the weld meet the expected position.

[0091] It can be understood that since the weld area image is divided by the target area contour map, the weld area image is the size of the expected weld area. Therefore, in this embodiment, the actual actual welding contour map is compared with the weld area image, and whether the actual size and position of the weld meet the size of the expected weld area can be obtained. At this time, various methods such as boundary coincidence and shadow coincidence can be used, for example, whether the coincidence degree of the boundary meets the expected value, or whether the actual welding contour map is projected onto the weld area image to judge the image difference size. Of course, other ways of determining can also be used in some other embodiments, which are not limited here. Through the above steps, whether the actual size and position of the weld meet the expected position can be determined.

[0092] S105: Comparing the first base material area image with the second base material area image, and determining whether the welded battery cover plate meets a first determination condition based on the difference image between the first base material area image and the second base material area image, wherein the first determination condition includes that the base material crack image area is less than a first preset area.

[0093] It can be understood that, in this step, since the first base material region image is an original image and the second base material region image is an image with cracks, the difference value algorithm can be directly used to determine the area of the cracks in the second base material region image, for example, by image comparison or the like to identify sub-images with differences. The specific algorithm is disclosed in the prior art, and will not be described here. By the above-mentioned manner, it can be determined whether the battery sealing plate after welding meets the first determination condition, wherein the first determination condition includes that the base material crack image area is less than a first preset area, and the first preset area is the minimum area when the total amount of cracks on the base meets the qualified condition.

[0094] S106: determining a weld crack image based on the weld region image, and determining whether the battery sealing plate after welding meets a second determination condition based on the weld crack image, wherein the second determination condition includes that the weld crack image area is less than a second preset area.

[0095] It can be understood that, for the cracks in the weld, since there is no condition like only the crack variable on the base, the image recognition process cannot be directly obtained by image comparison, therefore, in this embodiment, the image recognition manner is used to recognize the crack image in the weld. It can be understood that, the same as the first preset area principle, the second preset area is the minimum area when the total amount of cracks on the weld meets the qualified condition.

[0096] Specifically, as an implementation manner, step S106 can include the following steps:

[0097] S1061: obtaining image parameters of each weld sub-image, the image parameters including color temperature parameters, color tone parameters and brightness parameters.

[0098] It can be understood that, under uniform illumination conditions, the image parameters of the sub-images forming the cracks in the weld are nearly consistent, therefore, by identifying the image parameters of the weld sub-images, it can be determined which sub-images are the sub-images constituting the cracks.

[0099] S1062: marking the adjacent weld sub-images with the same image parameters in the plurality of weld sub-images as target region sub-images, wherein a plurality of continuously adjacent weld sub-images constitute an image group.

[0100] It can be understood that, since the image of the weld is different from the image of the base, it is not a uniform image, therefore, the weld sub-image identified by identifying the image parameters of the weld sub-image includes some other areas in the weld image, such as highlight points, concave points, etc., so further identification of the weld sub-image is required. Based on the characteristics of the discrete distribution of cracks, in this embodiment, the adjacent weld sub-images with the same image parameters are marked as target area sub-images, wherein a plurality of continuous adjacent weld sub-images constitute an image group, that is, an image group is a single crack image, or an image of other highlight points or concave points, etc.

[0101] S1063: Based on the positions of the plurality of image groups, determine that the image group formed by the weld sub-image of the crack image in the plurality of image groups is marked as a target image group, and all weld sub-images constituting the target image group are crack sub-images.

[0102] It can be understood that, according to the discreteness of the cracks, it can be determined which of the plurality of image groups are target image groups, that is, image groups formed by weld cracks, i.e. target image groups. Specifically, in this embodiment, the position parameters of each image group can be determined, and the position parameters of the image group can be the coordinate parameters of the image group pattern center or the edge coordinate parameters, which are not limited here. Then, a discrete model is established based on the coordinate parameters of the plurality of image groups. The discrete model is a function model for measuring the degree of dispersion of a plurality of points, and finally the plurality of image groups with the same image parameters of the formed weld sub-image and the highest dispersion degree are determined as the target image group according to the calculation result of the discrete model. It can be understood that, since the image parameters of the sub-image formed by the crack in the weld are nearly consistent under uniform lighting conditions, the plurality of image groups with the same image parameters of the formed weld sub-image and the highest dispersion degree must be the target image group, that is, the image group formed by the crack.

[0103] S1064: Determine the crack image area of the weld based on the number of crack sub-images.

[0104] After determining the number of crack sub-images, the crack image area of the weld can be finally obtained by combining and other methods, and it is determined that the crack image area of the weld is less than the second predetermined area.

[0105] S107: Determine whether the battery cover plate after welding is qualified based on the determination results obtained according to the first determination condition, the second determination condition and the third determination condition.

[0106] It can be understood that, in the first determination condition, the second determination condition and the third determination condition, if any condition does not meet, it proves that the result after welding is unqualified, and the battery cover plate is a defective workpiece.

[0107] The sealing nail welding defect visual detection method provided in the embodiment of the application first acquires a first detection image before welding and a second detection image after welding based on an image sensor, then acquires a target region contour map, maps the target region contour map to the first detection image, so that the first detection image is divided into a pre-welding region image and a first base material region image, then maps the target region contour map to the second detection image, so that the second welding image is divided into a weld seam region image and a second base material region image; whether the crack area on the battery sealing plate base material after welding and the crack area on the weld seam are both smaller than a preset area is determined, and whether the battery sealing plate after welding is qualified is determined based on the determination result. The sealing nail welding defect visual detection method provided in the application acquires the crack proportion on the base material and the crack proportion on the weld seam through the image recognition technology, and determines whether the welding is qualified, thereby improving the safety of the sealing nail welding.

[0108] Based on the same inventive concept, the embodiment of the application also provides a sealing nail welding defect visual detection device, which is configured to:

[0109] acquire a first detection image and a second detection image based on an image sensor, wherein the first detection image is an image of a battery sealing plate to be welded, and the second detection image is an image of the battery sealing plate after sealing nail welding;

[0110] acquire a target region contour map, the target region contour map being a map formed by a region boundary contour of a region in which a weld seam is to be formed, map the target region contour map to the first detection image, so that the first detection image is divided into a pre-welding region image and a first base material region image, and map the target region contour map to the second detection image, so that the second welding image is divided into a weld seam region image and a second base material region image;

[0111] compare the first base material region image and the second base material region image, and determine whether the battery sealing plate after welding satisfies a first determination condition based on a difference image between the first base material region image and the second base material region image, wherein the first determination condition includes that a base material crack image area is smaller than a first preset area;

[0112] determine a weld seam crack image based on the weld seam region image, and determine whether the battery sealing plate after welding satisfies a second determination condition based on the weld seam crack image, wherein the second determination condition includes that a weld seam crack image area is smaller than a second preset area;

[0113] determine whether the battery sealing plate after welding is qualified based on a determination result obtained according to the first determination condition and the second determination condition.

[0114] Optionally, the device is configured to:

[0115] acquire an actual welding contour map based on the second detection image;

[0116] The actual welding contour map is compared with the weld area image, and according to the comparison result, it is determined whether the welded battery cover plate meets the third determination condition, wherein the third determination condition includes that the actual size and position of the weld meet the expected position;

[0117] Based on the first determination condition and the second determination condition, it is determined whether the welded battery cover plate is qualified, and the method further comprises:

[0118] Based on the third determination condition, it is determined whether the welded battery cover plate is qualified.

[0119] Optionally, the device is configured to:

[0120] The first detection image is cut to form a plurality of first sub-images, and based on the target area contour map, the first sub-image constituting the first base material area image in the plurality of first detection images is determined as a target first sub-image;

[0121] The second detection image is cut to form a plurality of second sub-images;

[0122] The plurality of second sub-images are compared with the target first sub-image, wherein the comparison includes color temperature parameters, color parameters and brightness parameters;

[0123] The plurality of second sub-images with the same data parameters as the target first sub-image data parameters are determined as target second sub-images, and the rest are weld sub-images;

[0124] Based on the plurality of weld sub-images, an actual welding contour map is obtained.

[0125] Optionally, the device is configured to:

[0126] The weld sub-image of the adjacent second sub-image determined as the target second sub-image is determined as a boundary sub-image;

[0127] The plurality of boundary sub-images are connected to form an actual welding contour map.

[0128] Optionally, the device is configured to:

[0129] The actual welding contour map is smoothed.

[0130] Optionally, the device is configured to:

[0131] Image parameters of each weld sub-image are obtained, and the image parameters include color temperature parameters, color parameters and brightness parameters;

[0132] In the plurality of weld sub-images, the adjacent weld sub-images with the same image parameters are marked as target area sub-images, wherein a plurality of continuous adjacent weld sub-images constitute an image group;

[0133] Based on the positions of the plurality of image groups, an image group composed of the weld sub-images formed by the crack images in the plurality of image groups is determined as a target image group, and all the weld sub-images constituting the target image group are crack sub-images.

[0134] Based on the number of the crack sub-images, the crack image area of the weld is determined.

[0135] Optionally, the device is configured to:

[0136] The position parameters of each image group are determined, and the position parameter of the image group is the coordinate parameter of the image group pattern center;

[0137] Based on the coordinate parameters of the plurality of image groups, a discrete model is established;

[0138] According to the calculation result of the discrete model, the image parameters of the constituting weld sub-images are determined to be the same, and the plurality of image groups with the highest dispersion degree are the target image group.

[0139] The sealing nail welding defect visual detection device provided in the embodiment of the application first acquires a first detection image before welding and a second detection image after welding based on an image sensor, then acquires a target region contour map, maps the target region contour map to the first detection image, so that the first detection image is divided into a pre-welding region image and a first base material region image, then maps the target region contour map to the second detection image, so that the second welding image is divided into a weld region image and a second base material region image; whether the crack area on the battery sealing plate base material after welding and the crack area on the weld are both less than a preset area is determined, and whether the battery sealing plate after welding is qualified is determined based on the determination. The sealing nail welding defect visual detection device provided in the application acquires the crack proportion on the base material and the crack proportion on the weld through the image recognition technology, and determines whether the welding is qualified, thereby improving the safety of the sealing nail welding.

[0140] Based on the same inventive concept, the embodiments of the application also provide an electronic device, which comprises:

[0141] At least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the sealing nail welding defect visual detection method of the embodiments of the application.

[0142] In addition, to achieve the above-mentioned purpose, the embodiments of the application also provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the sealing nail welding defect visual detection method of the embodiments of the application.

[0143] The various constituent components of the electronic device will be specifically introduced as follows:

[0144] The processor is the control center of the electronic device, and can be one processor or a collective term of multiple processing elements. For example, the processor is one or more central processing units (CPUs), can be an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application, such as one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs).

[0145] Optionally, the processor can execute various functions of the electronic device by running or executing software programs stored in the memory and calling data stored in the memory.

[0146] The memory is used to store software programs for implementing the solutions of the present application, and is controlled by the processor to execute. The specific implementation manner can refer to the above method embodiments, and will not be described here.

[0147] Optionally, the memory can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, an optical disc storage (including a compact disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program codes in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory can be integrated with the processor or exist independently and coupled with the processor through an interface circuit of the electronic device, and the embodiments of the present application do not make a specific limitation in this regard.

[0148] The transceiver is configured to communicate with the network device or the terminal device.

[0149] Optionally, the transceiver can include a receiver and a transmitter. Wherein the receiver is configured to implement the receiving function, and the transmitter is configured to implement the transmitting function.

[0150] Optionally, the transceiver can be integrated with the processor, or can exist independently and be coupled with the processor through the interface circuit of the router, and the embodiments of the present application do not make specific limitations hereon.

[0151] In addition, the technical effects of the electronic device can refer to the technical effects of the data transmission method of the above-mentioned method embodiments, which will not be repeated here.

[0152] It should be understood that the processor in the embodiments of the present application can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0153] It should also be understood that the memory in the embodiments of the present application can be volatile or nonvolatile memory, or can include both volatile and nonvolatile memory. The nonvolatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be random access memory (RAM) used as external cache. By way of example, and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0154] The above-described embodiments can be implemented in part or in whole through software, hardware (e.g., circuitry), firmware, or any combination thereof. When implemented in software, the above-described embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When loaded and executed by a computer, the computer instructions or computer programs can generate the flow or function according to the embodiments of the present application in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, such as from one website site, computer, server, or data center to another website site, computer, server, or data center through a wired (e.g., infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, data center, etc. containing a set of one or more available media. The available media can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state disk.

[0155] It should be understood that the term "and / or" used herein is merely an association relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after it, but it can also represent an "and / or" relationship, which can be understood in the context before and after it.

[0156] In the present application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or the like means any combination of the items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0157] It should be understood that in various embodiments of the present application, the size of the sequence number of the above-described processes does not mean the order of execution, and the execution order of the processes should be determined by their functions and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0158] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on specific applications and design constraints. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

Claims

1. A visual inspection method for welding defects in sealing nails, characterized in that, The method comprises: acquiring a first detection image and a second detection image based on an image sensor, wherein the first detection image is an image of a battery cover plate to be welded, and the second detection image is an image of the battery cover plate after sealing nail welding; acquiring a target region contour map, which is a map formed by a region boundary contour of a region needing to form a weld, mapping the target region contour map to the first detection image to divide the first detection image into a pre-welding region image and a first base material region image, and mapping the target region contour map to the second detection image to divide the second detection image into a weld region image and a second base material region image; acquiring an actual welding contour map based on the second detection image; segmenting the first detection image to form a plurality of first sub-images, and determining, based on the target region contour map, that the first sub-images constituting the first base material region image in the plurality of first detection images are target first sub-images; segmenting the second detection image to form a plurality of second sub-images; comparing a plurality of the second sub-images with the target first sub-image, wherein the comparison includes color temperature parameters, hue parameters, and brightness parameters; determining that a plurality of the second sub-images having the same data parameters as the target first sub-image data parameters are target second sub-images, and the rest are weld sub-images; acquiring the actual welding contour map based on a plurality of the weld sub-images; comparing the actual welding contour map with the weld region image, and determining, according to the comparison result, whether the battery cover plate after welding meets a third determination condition, wherein the third determination condition includes that the actual size of the weld corresponds to the expected position; comparing the first base material region image with the second base material region image, determining, based on a difference image between the first base material region image and the second base material region image, whether the battery cover plate after welding meets a first determination condition, wherein the first determination condition includes that the base material crack image area is less than a first preset area; acquiring image parameters of each of the weld sub-images, wherein the image parameters include color temperature parameters, hue parameters, and brightness parameters; labeling, in a plurality of the weld sub-images, a target region sub-image as a weld sub-image adjacent to a weld sub-image having the same image parameters, wherein a plurality of continuously adjacent weld sub-images constitute an image group; determining, based on the positions of a plurality of the image groups, that an image group constituted by a weld sub-image formed by a crack image in a plurality of the image groups is labeled as a target image group, and all the weld sub-images constituting the target image group are crack sub-images; determining a position parameter of each of the image groups, wherein the position parameter of the image group is a coordinate parameter of a pattern center of the image group; establishing a discrete model based on a plurality of the image group coordinate parameters; determining, according to a calculation result of the discrete model, that a plurality of the image groups having the same image parameters of the weld sub-images and the highest dispersion degree are the target image groups, and determining a crack image area of the weld based on the number of the crack sub-images. determine a weld crack image based on the weld seam area image, and determine whether the battery cover plate after welding meets a second determination condition based on the weld crack image, wherein the second determination condition comprises that an area of the weld crack image is less than a second preset area; determine whether the battery cover plate after welding is qualified based on determination results obtained according to the first determination condition and the second determination condition, and determine whether the battery cover plate after welding is qualified based on the third determination condition.

2. The method of claim 1, wherein the method comprises: the actual welding contour map is obtained based on a plurality of the weld seam sub-images, comprising: the actual welding contour map is smoothed.

3. A device for visual inspection of seal pin weld defects, characterized in that The device is used to execute the sealed nail welding defect visual detection method according to claim 1, and the device is configured to: obtain a first detection image and a second detection image based on an image sensor, wherein the first detection image is an image of a battery cover plate to be welded, and the second detection image is an image of the battery cover plate after sealed nail welding; obtain a target area contour map, which is a map formed by a region boundary contour of a region needing to form a weld seam, map the target area contour map to the first detection image, so that the first detection image is divided into a pre-welding region image and a first base material region image, and map the target area contour map to the second detection image, so that the second detection image is divided into a weld seam region image and a second base material region image; compare the first base material region image and the second base material region image, determine whether the battery cover plate after welding meets a first determination condition based on a difference image between the first base material region image and the second base material region image, wherein the first determination condition comprises that an area of a base material crack image is less than a first preset area; determine a weld crack image based on the weld seam area image, and determine whether the battery cover plate after welding meets a second determination condition based on the weld crack image, wherein the second determination condition comprises that an area of the weld crack image is less than a second preset area; determine whether the battery cover plate after welding is qualified based on the first determination condition and the second determination condition.

4. The apparatus for visual inspection of a seal weld defect of claim 3, wherein, The device is configured to: obtain an actual welding contour map based on the second detection image; compare the actual welding contour map and the weld seam region image, and determine whether the battery cover plate after welding meets a third determination condition according to a comparison result, wherein the third determination condition comprises that the actual size and position of the weld seam are consistent with an expected position; determine whether the battery cover plate after welding is qualified based on the first determination condition and the second determination condition, and determine whether the battery cover plate after welding is qualified based on the third determination condition. The electronic device comprises:

5. An electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; the memory is used to store a computer program, and the processor is used to execute the program stored on the memory to realize the method steps according to any one of claims 1-2. ​

Citation Information

Patent Citations

  • Welding seam based image identification method and image identification system

    CN105427295A

  • Quality detection method and device of inductance element, electronic equipment and storage medium

    CN115797303A