Lithium battery tab black glue edge extraction method, system and equipment and storage medium

Through the vinyl edge extraction method of lithium battery pole ear vinyl, including hole filling, image enhancement and reference area recognition, the problem of low accuracy in vinyl edge detection of lithium battery is solved, and higher detection accuracy and measurement stability are achieved.

CN120013975APending Publication Date: 2025-05-16ZHUHAI HIGRAND ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411922534.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

The accuracy of vinyl edge detection of lithium batteries is low, and is affected by problems such as bubble edge interference, low vinyl edge contrast, local serration and glue fold interference, resulting in low accuracy of measuring glue width and extreme ear welding height.

Method used

A method for extracting vinyl edges of lithium battery electrode ears is proposed, including obtaining an image of the lithium battery detection area, performing hole filling and image enhancement, identifying the protruding areas of the pole area to determine the reference positioning frame, determining the vinyl and protective glue reference areas based on the reference positioning frame, and performing image enhancement to improve the accuracy of vinyl edge detection.

Benefits of technology

By automatically identifying the reference area of ​​vinyl and protective glue on the image and performing adaptive image enhancement, the accuracy of vinyl edge detection of lithium battery is improved, the impact of interference is reduced, and the stability and reliability of measurement are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013975A_ABST
    Figure CN120013975A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a lithium battery tab black glue edge extraction method, system and device and a storage medium, and belongs to the technical field of visual inspection. The method comprises the steps of performing hole filling operation on an obtained first image to improve the quality of the image, then identifying a protruding area relative to a pole piece area in the image, determining a reference positioning frame according to the protruding area, and determining a protection glue reference area on a second image according to the reference positioning frame and a first preset offset parameter. And determining a black adhesive reference area on the second image according to the reference positioning frame and a second preset offset parameter, performing image enhancement on the second image according to the protective adhesive reference area and the black adhesive reference area to obtain a third image, and determining a black adhesive edge on the tab according to the third image. According to the invention, the black glue reference area and the protective glue reference area on the image are automatically identified, and image enhancement is adaptively carried out based on the black glue reference area and the protective glue reference area, so that the accuracy of lithium battery black glue edge detection is improved.
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 technology, and in particular to a method, system, device and storage medium for extracting the edge of black glue on a lithium battery tab. Background Art

[0002] In the field of lithium battery intelligent manufacturing, such as Figure 2 As shown in the figure, lithium batteries generally include a pole piece and a tab. The tab will have black glue to insulate the lithium battery and improve the safety of lithium battery assembly. Green glue and other protective structures will be encapsulated between the black glue from the pole piece to the tab. After assembling the lithium battery, the sealant width on the black glue and the tab welding height need to be accurately measured to ensure the quality of the product. The sealant width and tab welding height dimensions are as follows: Figure 3 At present, there are many interferences on the edge of black glue, such as bubble edge interference, low contrast of black glue edge, black glue edge is often not a straight line with local sawtooth, glue wrinkle interference, especially interference of imaging changes covered by green glue or yellow glue. Due to these interferences, the accuracy of black glue edge detection is low, which leads to low accuracy of glue width and tab welding height measurement. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a method, system, device and storage medium for extracting the edge of the black glue of the lithium battery tab, aiming to improve the accuracy of the black glue edge detection of the lithium battery.

[0004] To achieve the above purpose, one aspect of an embodiment of the present application provides a method for extracting the edge of a black glue on a lithium battery tab, comprising the following steps:

[0005] Acquire a first image of a lithium battery detection area;

[0006] Performing a preprocessing operation on the first image to obtain a second image, wherein the preprocessing operation includes a hole filling operation;

[0007] identifying a protruding region relative to the pole piece region in the second image, and determining a reference positioning frame based on the protruding region;

[0008] Determine a protective glue reference area on the second image according to the reference positioning frame and the first preset offset parameter;

[0009] Determine a vinyl reference area on the second image according to the reference positioning frame and the second preset offset parameter;

[0010] Performing image enhancement on the second image according to the protective glue reference area and the black glue reference area to obtain a third image;

[0011] The edge of the black glue on the tab is determined according to the third image.

[0012] In some embodiments, performing a preprocessing operation on the first image to obtain a second image comprises the following steps:

[0013] Converting the first image into a grayscale image, and performing threshold segmentation on the first image according to a first grayscale range of background pixels to obtain a foreground area of ​​the lithium battery;

[0014] Holes are filled in the foreground area to obtain a second image.

[0015] In some embodiments, the identifying the protruding area relative to the pole piece area in the second image and determining the reference positioning frame according to the protruding area comprises the following steps:

[0016] Performing an opening operation on the second image according to the first rectangular structure element to obtain a pole piece region;

[0017] Obtaining a protruding region relative to the pole piece region according to the foreground region and the pole piece region of the second image;

[0018] The glue layer covering area on the protruding area is identified, and a circumscribed rectangular frame of the glue layer covering area is determined as a reference positioning frame.

[0019] In some embodiments, the step of identifying the glue layer coverage area on the protruding area comprises the following steps:

[0020] Performing an opening operation on the protruding area according to a second rectangular structure element to obtain a tab area, wherein a width of the second rectangular structure element is set according to a width of the protruding area;

[0021] A third rectangular structure element is determined according to the height of the tab area, and an opening operation is performed on the protruding area according to the third rectangular structure element to obtain a glue layer coverage area.

[0022] In some embodiments, performing image enhancement on the second image according to the protective glue reference area and the black glue reference area to obtain a third image comprises the following steps:

[0023] Calculating the average pixel value of the protective glue reference area to obtain a protective glue reference pixel value;

[0024] Calculating the average pixel value of the black LP reference area to obtain a black LP reference pixel value;

[0025] Determine the image enhancement ratio according to the protective glue reference pixel value and the black glue reference pixel value;

[0026] The second image is enhanced according to the image enhancement ratio to obtain a third image.

[0027] In some embodiments, determining the edge of the black glue on the tab according to the third image comprises the following steps:

[0028] Determine a detection frame including the edge of the vinyl record according to the reference positioning frame;

[0029] Cutting out a local area located in the detection frame from the third image;

[0030] Performing threshold segmentation on the local area according to the second grayscale range to obtain a target area whose edge includes the edge of the vinyl;

[0031] The black glue edge on the tab is determined according to the target area.

[0032] In some embodiments, the step of determining the edge of the black glue on the tab according to the target area comprises the following steps:

[0033] Performing an opening operation on the target area according to the fourth rectangular structure element to obtain a rectangular area with one side located at the edge of the vinyl;

[0034] Extracting two pixel coordinate points on the edge of the black vinyl on the rectangular area;

[0035] The edge of the vinyl is located on the second image according to the two pixel coordinate points.

[0036] To achieve the above purpose, another aspect of the embodiment of the present application provides a lithium battery tab black glue edge extraction system, comprising:

[0037] A first module is used to obtain a first image of a lithium battery detection area;

[0038] A second module is used to perform a preprocessing operation on the first image to obtain a second image, wherein the preprocessing operation includes a hole filling operation;

[0039] A third module is used to identify a protruding area relative to the pole piece area in the second image, and determine a reference positioning frame according to the protruding area;

[0040] A fourth module is used to determine a protective glue reference area on the second image according to the reference positioning frame and a first preset offset parameter;

[0041] A fifth module, configured to determine a vinyl reference area on the second image according to the reference positioning frame and a second preset offset parameter;

[0042] A sixth module, configured to perform image enhancement on the second image according to the protective glue reference area and the black glue reference area to obtain a third image;

[0043] The seventh module is used to determine the edge of the black glue on the tab according to the third image.

[0044] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program implements the method described in the above embodiment when executed by the processor.

[0045] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the above embodiment.

[0046] The present application proposes a method, system, device and storage medium for extracting the edge of black glue on the tab of a lithium battery. After acquiring the image to be detected, it performs a hole-filling operation on the image to improve the quality of the image, and then identifies the protruding area relative to the pole piece area in the image, and determines a reference positioning frame based on the protruding area, determines a protective glue reference area on the second image based on the reference positioning frame and a first preset offset parameter, determines a black glue reference area on the second image based on the reference positioning frame and the second preset offset parameter, enhances the second image based on the protective glue reference area and the black glue reference area to obtain a third image, and determines the black glue edge on the tab based on the third image. The present application improves the accuracy of black glue edge detection for lithium batteries by automatically identifying the black glue reference area and the protective glue reference area on the image, and adaptively performing image enhancement based on this. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flow chart of the method for extracting the edge of the black glue of the lithium battery tab provided in an embodiment of the present application;

[0048] Figure 2 It is a schematic diagram of the structure of a lithium battery provided in an embodiment of the present application;

[0049] Figure 3 It is a schematic diagram of the gluing width and the tab welding height provided in the embodiment of the present application;

[0050] Figure 4 It is a schematic diagram of various detection line segments of a lithium battery provided in an embodiment of the present application;

[0051] Figure 5It is a schematic diagram of various interference situations of the edge of the black plastic provided in the embodiment of the present application;

[0052] Figure 6 is a schematic diagram of the edge of the vinyl that needs to be detected provided in the embodiment of the present application;

[0053] Figure 7 is a first image schematic diagram provided in an embodiment of the present application;

[0054] Figure 8 is a schematic diagram of a grayscale image after filtering of the first image provided in an embodiment of the present application;

[0055] Fig. 9 is a schematic diagram of a highlighted area on a second image provided in an embodiment of the present application;

[0056] Fig.10 is a schematic diagram of identifying a tab area from a protruding area provided in an embodiment of the present application;

[0057] Fig.11 is a schematic diagram of the adhesive layer coverage area provided in an embodiment of the present application;

[0058] Fig.12 is a schematic diagram of a reference positioning frame provided in an embodiment of the present application;

[0059] Fig.13 is a schematic diagram of rectangular frames of various regions on a second image based on a reference positioning frame provided in an embodiment of the present application;

[0060] Fig.14 is a schematic diagram of a black glue reference area and a protective glue reference area on a second image provided by an embodiment of the present application;

[0061] Fig.15 is a third image schematic diagram provided in an embodiment of the present application;

[0062] Fig.16 It is a schematic diagram of a detection frame and a tab area including a black glue edge on an image provided by an embodiment of the present application;

[0063] Fig.17 is a schematic diagram of a local area image cropped based on a third image provided in an embodiment of the present application;

[0064] Fig.18 is a schematic diagram of a rectangular area on a local area image provided in an embodiment of the present application;

[0065] Fig.19 is a schematic diagram of two relative upper and lower regions in a local region image provided in an embodiment of the present application;

[0066] Fig. 20 is a schematic diagram of two pixel coordinate points on a second image provided by an embodiment of the present application;

[0067] Fig.21 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0068] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0069] It should be noted that, although the functional modules are divided in the system and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0071] In current practical applications, indirect measurement is often used to measure the size of sealant and welding height, such as Figure 4 As shown, the three orange segments from left to right are L1, L2, L3, and the red segment is L4. Among them, the edge grabbing algorithms of L1, L2, and L3 are simple and accurate. Define Lij as the distance between segment Li and segment Lj, define the black glue width dimension to be measured as S=L43, the glue width dimension S1=L42=L43-L23=S-L23, and the tab welding height dimension S2=L14=L13-L43=L13-S. If the red segment L4 can be accurately detected, the glue sealant and tab welding height can be measured.

[0072] However, since the processing precision of black glue is not very high, after visual inspection and imaging, there are many interferences on the edge of black glue in the image, such as bubble edge interference, low contrast of black glue edge, black glue edge is often not a straight line with local jagged edges, glue wrinkle interference, green glue and yellow glue covering imaging change interference, etc. Various interferences on the edge of black glue are as follows: Figure 5 As shown, the edge of the black glue that needs to be detected is Figure 6As shown in the figure. Due to these interferences, the conventional edge-grabbing method often fails, has low accuracy, and poor stability. This further causes the black glue edge detection error to be fully accumulated into the final results of S1 and S2, resulting in poor measurement accuracy of glue width and tab welding height, which is easy to misjudge.

[0073] Based on this, the embodiments of the present application provide a method, system, device and storage medium for extracting the edge of the black glue of the lithium battery tab, aiming to improve the accuracy of the black glue edge detection of the lithium battery.

[0074] The method, system, device and storage medium for extracting the edge of the black glue of the lithium battery tab provided in the embodiments of the present application are specifically illustrated by the following embodiments. First, the method for extracting the edge of the black glue of the lithium battery tab in the embodiments of the present application is described.

[0075] The method for extracting the edge of the black glue of the lithium battery tab provided in the embodiment of the present application relates to the field of visual inspection technology. The method for extracting the edge of the black glue of the lithium battery tab provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or it can be configured as a server cluster or a distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the method for extracting the edge of the black glue of the lithium battery tab, etc., but is not limited to the above forms.

[0076] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0077] Figure 1This is an optional flow chart of the method for extracting the edge of the black glue of the lithium battery tab provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S107.

[0078] Step S101, acquiring a first image of a lithium battery detection area;

[0079] Step S102, performing a preprocessing operation on the first image to obtain a second image, wherein the preprocessing operation includes a hole filling operation;

[0080] Step S103, identifying a protruding area relative to the pole piece area in the second image, and determining a reference positioning frame according to the protruding area;

[0081] Step S104, determining a protective glue reference area on the second image according to the reference positioning frame and the first preset offset parameter;

[0082] Step S105, determining a vinyl reference area on the second image according to the reference positioning frame and the second preset offset parameter;

[0083] Step S106, performing image enhancement on the second image according to the protective glue reference area and the black glue reference area to obtain a third image;

[0084] Step S107, determining the edge of the black glue on the tab according to the third image.

[0085] In step S101 of some embodiments, the target area such as the pole piece, the pole ear and the glue reaches the shooting position, triggering the camera to take a picture, and obtaining the first image to be processed. For example, the first image containing the black glue taken is as follows: Figure 7 As shown, for the convenience of explanation, this embodiment selects an image example with better imaging of the edge of black glue for illustration. It should be noted that the tab is a raw material for lithium-ion polymer battery products, which is divided into three types of materials: the positive electrode of the battery uses aluminum (Al) material, the negative electrode uses nickel (Ni) material, or the negative electrode also has copper-plated nickel (Ni-Cu) material, which are all composed of two parts: a film and a metal strip. The film is the insulating part on the tab, and its function is to prevent a short circuit between the metal strip and the aluminum-plastic film during battery packaging, and to heat and hot-melt seal the aluminum-plastic film together during packaging to prevent leakage. At present, there are black glue tabs, yellow glue tabs and white glue tabs according to the classification of tab glue. Different types of tabs are suitable for batteries with different functions. The method of the embodiment of the present application is used to identify the tab edge of the black glue tab.

[0086] In step S102 of some embodiments, step S102 may include but is not limited to steps S201 to S202:

[0087] Step S201, converting the first image into a grayscale image, and performing threshold segmentation on the first image according to a first grayscale range of background pixels to obtain a foreground area of ​​the lithium battery;

[0088] Step S202, filling holes in the foreground area to obtain a second image.

[0089] In this embodiment, first, the first color image can be converted into a grayscale image, and the image is subjected to median filtering. The width×height of the rectangular filter kernel can be 3×3. The grayscale image after filtering is as follows: Figure 8 shown.

[0090] Then, the grayscale image is segmented with a fixed threshold, and the first grayscale range is used to segment the foreground part. The first grayscale range can be set according to the background pixel value. For example, the background of the shooting station in this embodiment is a black light-absorbing cloth, so the background grayscale value is about 1 to 3. The pole piece, pole ear and black glue, although the black glue is also dark, the grayscale value is generally about 30. Since it is not sensitive to the low threshold, this embodiment can set the low threshold of the first grayscale range between 5 and 15, and the high threshold is set to 255. Exemplarily, the first grayscale range can be [6,255].

[0091] After performing threshold segmentation on the image to obtain an image of the foreground area, there are often some holes in the segmented area due to the presence of many dark spots on the foreground. Based on this, this embodiment further performs hole filling on the foreground area. By filling the holes, the empty area can be fully covered to obtain a second image of a more complete foreground area.

[0092] In some embodiments of step S103, the protruding area refers to the protruding portion of the foreground area except the pole piece area. Fig. 9 The edge between the pole piece and the pole ear is relatively easy to identify, so the protruding area is first identified from the foreground area, and then the reference positioning frame is determined based on the protruding area, so that the black glue reference area and the protective glue reference area can be accurately determined through the reference positioning frame.

[0093] In some embodiments, step S103 may include but is not limited to steps S301 to S303:

[0094] Step S301, performing an opening operation on the second image according to the first rectangular structure element to obtain a polar region;

[0095] Step S302, obtaining a protruding area relative to the pole area according to the foreground area and the pole area of ​​the second image;

[0096] Step S303 , identifying the glue layer covered area on the protruding area, and determining the circumscribed rectangular frame of the glue layer covered area as a reference positioning frame.

[0097] In some embodiments of step S301, the second image is the foreground area after filling, and the second image is opened using the first rectangular structure element to obtain the polar region. The width × height of the first rectangular structure element can be 1 × (image_h*0.8). The size of the first rectangular structure element can be set according to the characteristics of the image. In order to obtain the polar region, a structure element with a very small width and a large height can be selected for opening, such as the width × height of the first rectangular structure element = 1 × (image_h*0.8), where image_h is the pixel height of the image, 0.8 means taking a smaller height of the image pixel, and it can also be other proportional values, such as 0.85, 0.9, etc.

[0098] It should be noted that the opening operation is a morphological operation in image processing, which achieves specific image processing effects based on the erosion and expansion operations of the image. The erosion operation is to define a structural element, which can be a kernel of any shape and size. The shape and size of the structural element depends on the specific problem to be processed; the structural element is slid along each pixel of the image; when the center of the structural element completely coincides with the pixel, the pixel will be retained only when all the pixels of the structural element match the pixel at the pixel position; the erosion operation can make the small details, holes and protrusions in the image relative to the structural element disappear. The expansion operation is to expand the eroded image; the structural element is slid along each pixel of the image. When the center of the structural element completely coincides with the pixel, the pixel will be retained as long as at least one pixel of the structural element matches the pixel at the pixel position; the expansion operation can connect the disconnected parts in the image and restore some of the retained shapes. The opening operation can remove isolated noise points or small objects in the image that are smaller than the structural element. Through the process of first erosion and then expansion, the boundaries of larger objects can be smoothed and the small protrusions on the boundaries can be removed.

[0099] In some embodiments of step S302, the foreground area of ​​the second image is subtracted from the pole area to obtain the following: Fig. 9 Further, after subtracting the pole area from the foreground area of ​​the second image, an opening operation is performed on the area, the width×height of the rectangular structure element can be 10×20, and then the area with the largest area is selected as the protruding area relative to the pole area.

[0100] In some embodiments of step S303, identifying the glue layer coverage area on the protruding area in step S303 may include, but is not limited to, steps S401 to S402:

[0101] Step S401, performing an opening operation on the protruding area according to the second rectangular structure element to obtain the tab area, wherein the width of the second rectangular structure element is set according to the width of the protruding area;

[0102] Step S402 , determining a third rectangular structure element according to the height of the tab area, and performing an opening operation on the protruding area according to the third rectangular structure element to obtain the glue layer coverage area.

[0103] In this embodiment, please refer to Fig.10 , the protruding area is opened to obtain the exposed lug area, and the width × height of the second rectangular structure element used in the opening operation can be (area width of the protruding area - 20) × 6. It should be noted that the width of the second rectangular structure element in the opening operation is the area width of the protruding area - 20, and 20 here can also be other values, which can be an empirical value slightly smaller than the overall width of the protruding area; 6 is the height of the second rectangular structure element in the opening operation, which is also an empirical value.

[0104] After obtaining the lug area, the height of the area, that is, the height of the lug ear_height, can be determined based on the exposed lug area. Then, the third rectangular structure element is used to perform an open operation on the protruding area, and the following can be obtained: Fig.11 It should be noted that the width × height of the third rectangular structural element can be 6 × (ear_height + 6), where ear_height + 6 represents a height slightly larger than the tab area, or ear_height plus other empirical values, where the height is also an empirical value.

[0105] Furthermore, the outer bounding rectangle of the adhesive layer coverage area is obtained. Fig.12 As shown in the figure, the circumscribed rectangular frame is the reference positioning frame. Based on the reference positioning frame, the following can be determined: Fig.12 The seats at the upper left corner P1 and the lower right corner P2 are shown as P1(row1,col1) and P2(row2,col2).

[0106] In steps S104 to S105 of some embodiments, the protective glue (such as green glue) reference area on the second image is determined according to the reference positioning frame and the first preset offset parameter pre-stored in the system, and the black glue reference area on the second image is determined according to the reference positioning frame and the second preset offset parameter pre-stored in the system. Fig.13, according to the coordinates P1, P2 of the circumscribed rectangular frame and the upper left corner P3 (row3, col3) and lower right corner P4 (row4, col4) of the outer rectangle of the pole ear, determine the black glue reference area (reg_black) and the protective glue reference area (reg_cover). The upper left corner coordinates of the protective glue reference area are P5 (row5, col5), and the lower right corner coordinates are P6 (row6, col6), where row5 = row3, col5 = col1-50, row6 = row4, col6 = col1-10. The upper left corner coordinates of the black glue reference area are P7 (row7, col7), and the lower right corner coordinates are P8 (row8, col8), where row7 = row3, col7 = col2-55, row8 = row4, col8 = col2-15. Based on the upper left corner and the lower right corner points, a unique rectangular area can be generated. It can be understood that 10, 50, 15, 55 are compatible values ​​adjusted according to the overall compatibility of the on-site products. Fig.14 As shown, the black glue reference area (reg_black) and the protective glue reference area (reg_cover) can be determined on the second image by referring to the positioning frame.

[0107] In step S106 of some embodiments, step S106 may also include but is not limited to steps S501 to S504:

[0108] Step S501, calculating the average pixel value of the protective glue reference area to obtain a protective glue reference pixel value;

[0109] Step S502, calculating the average pixel value of the black LP reference area to obtain a black LP reference pixel value;

[0110] Step S503, determining the image enhancement ratio according to the protective glue reference pixel value and the black glue reference pixel value;

[0111] Step S504, performing image enhancement on the second image according to the image enhancement upscaling ratio to obtain a third image.

[0112] In this embodiment, the average pixel value of the protective glue reference area is calculated to obtain the protective glue reference pixel value, and the average pixel value of the black glue reference area is calculated to obtain the black glue reference pixel value. Then, the image enhancement ratio is determined according to the protective glue reference pixel value and the black glue reference pixel value. The image enhancement ratio rate is calculated by the following formula:

[0113] rate=(255 / gray_cover+150 / gray_black)*0.5;

[0114] Among them, gray_cover represents the reference pixel value of the protective glue, and gray_black represents the reference pixel value of the black glue. 255 / gray_cover means stretching the grayscale value of the protective glue reference area to 255, and 150 / gray_black means stretching the grayscale value of the black glue reference area to 150, and then calculating the average to obtain the stretching ratio. The second image is enhanced by the automatically calculated image enhancement ratio, that is, each pixel value of the second image is multiplied by rate to obtain the third image. The enhanced third image is as follows Fig.15 It is understandable that when the brightness of the image changes, the stretching ratio will be automatically calculated and then automatically stretched to a relatively consistent image level, where the covering protective glue in the second image can be automatically stretched to 255, and the black glue can be automatically stretched to 150, which is convenient for subsequent accurate threshold segmentation.

[0115] In step S107 of some embodiments, the third image can clearly show the edge of the black glue (including the line segment L4), so the edge of the black glue on the tab is determined based on the third image.

[0116] In some embodiments, step S107 includes but is not limited to steps S601 to S604:

[0117] Step S601, determining a detection frame including the edge of the vinyl record according to a reference positioning frame;

[0118] Step S602, cropping a local area located in the detection frame from the third image;

[0119] Step S603, performing threshold segmentation on the local area according to the second grayscale range to obtain a target area whose edge includes the edge of the vinyl;

[0120] Step S604, determining the edge of the black glue on the tab according to the target area.

[0121] In step S601 of some embodiments, a detection frame including the edge of the vinyl (line segment L4) may be determined according to the reference positioning frame and the preset offset. Fig.16 In another embodiment, the Fig.16 The reg_ear area (ear area) of the area is obtained from the bounding rectangle. Then the coordinates of the upper left corner and the lower right corner of the bounding rectangle are obtained, such as Fig.13P3(row3,col3) and P4(row4,col4). The upper left corner points of the rectangular area coordinates of reg_part are P9(row9,col9) and P10(row10,col10), row9=row3-10, col9=col3-50, row10=row4+10, col10=col3+100. It should be noted that 10, 50, 100 are empirical values ​​that can be compatible with different product situations of this project. In specific applications, adjusting these three values ​​can change the position and size of the detection frame, as long as the detection frame reg_part can cover the target black plastic edge (line segment L4).

[0122] In step S602 of some embodiments, the image is cropped on the adaptively enhanced third image according to the detection frame reg_part, and the image of the local area is obtained by cropping the third image based on the detection frame. Fig.17 shown.

[0123] In step S603 of some embodiments, the Fig.17 The local area is segmented by threshold value to obtain the target area whose edge contains the edge of the black glue. Fig.17 The second grayscale range may be [220, 255]. It is understandable that the lower limit of the second grayscale range may be between 200 and 230, and may be set according to different product models, different bubbles, and other actual conditions.

[0124] Furthermore, a closing operation can be performed on the area after segmentation of the second grayscale range. Here, the width × height of the rectangular structure element used in the opening operation can be 1 × 18. Then, an opening operation is performed on the area. Here, the width × height of the rectangular structure element used in the closing operation can be 8 × 1. Then, the area with the largest area is selected to obtain the target area containing the black glue edge. In this embodiment, a closing operation is first performed on the segmented area and then an opening operation is performed. The closing operation can connect the gaps in the vertical direction, etc. The structure element is 1 wide and 18 high, which is convenient for connecting some small gaps in the vertical direction to make the area more complete. Then an opening operation is performed. The structure element is 8 wide and 1 high. The regional interference caused by some bubbles and the like can be filtered out by the opening operation to eliminate the interference.

[0125] In step S604 of some embodiments, step S604 may include but is not limited to steps S701 to S703:

[0126] Step S701, performing an opening operation on the target area according to the fourth rectangular structure element to obtain a rectangular area with one side located at the edge of the vinyl;

[0127] Step S702, extracting two pixel coordinate points on the edge of the rectangular area located at the edge of the vinyl;

[0128] Step S703: locate the edge of the vinyl on the second image according to the two pixel coordinate points.

[0129] In this embodiment, the fourth rectangular structure element is used to perform an opening operation on the target area, and the following is obtained: Fig.18 The rectangular area shown in the green box. The width × height of the fourth rectangular structural element can be set to (width of the target area - 10) × 1, (width of the target area - 10) means that it is slightly smaller than the maximum width of the target area. Both 10 and 1 are empirical values ​​and can be set adaptively according to actual conditions.

[0130] Generate a rectangular area Fig.19 The two relative upper and lower areas shown are generated by a process similar to the aforementioned vinyl reference area, that is, using the upper left corner point and the lower right corner point of the rectangular area, and generating two relatively positioned areas according to the approximate position, width and height of the area.

[0131] After obtaining the upper and lower relative areas, the intersection of the two relative areas and the right side of the target area is calculated to obtain two pixel coordinate points, which are the two points on the edge line of the vinyl (line segment L4). Fig. 20 As shown, the black glue line segment can be identified on the second image according to the two pixel coordinate points.

[0132] In some embodiments of the present application, the present application automatically calculates the image enhancement ratio by the grayscale mean of the automatically followed black glue reference area and the protective glue reference area. For the situation of containing bubbles, different brightness and darkness, and different products, the image consistency after stretching is relatively good, and a stable stretched image is provided for the subsequent image segmentation. Compared with the edge detection technology in the related art, on the one hand, the image enhancement reference image itself uses the grayscale mean of the black glue reference area and the protective glue reference area to automatically calculate the pull-up ratio, and the enhancement operation of each image can highlight the black glue edge. On the other hand, the intersection is obtained by the target area and the upper and lower relative areas, and then two pixel coordinate points are obtained. The line segment formed by the two pixel coordinate points is the black glue edge. The black glue edge obtained in this way is relatively stable, and for some curve textures or concave and convex situations of the black glue edge, it is more suitable for the application needs on site. If a caliper is used to find point fitting or contour fitting, the concave and convex edges often make the target line segment very unstable, and intuitively it does not conform to the black glue edge position. The instability of the target line segment will also lead to the instability of the final line measurement value, which does not meet the needs of real applications.

[0133] The present application also provides a lithium battery tab black glue edge extraction system, comprising:

[0134] A first module is used to obtain a first image of a lithium battery detection area;

[0135] A second module is used to perform a preprocessing operation on the first image to obtain a second image, wherein the preprocessing operation includes a hole filling operation;

[0136] A third module is used to identify a protruding area relative to the pole piece area in the second image, and determine a reference positioning frame according to the protruding area;

[0137] A fourth module is used to determine a protective glue reference area on the second image according to the reference positioning frame and the first preset offset parameter;

[0138] A fifth module is used to determine a vinyl reference area on the second image according to the reference positioning frame and a second preset offset parameter;

[0139] A sixth module is used to enhance the second image according to the protective glue reference area and the black glue reference area to obtain a third image;

[0140] The seventh module is used to determine the edge of the black glue on the tab according to the third image.

[0141] It can be understood that the contents of the above-mentioned lithium battery pole ear black glue edge extraction method embodiment are applicable to the present system embodiment, the functions specifically implemented by the present system embodiment are the same as those in the above-mentioned lithium battery pole ear black glue edge extraction method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned lithium battery pole ear black glue edge extraction method embodiment.

[0142] The embodiment of the present application also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned method for extracting the edge of the black glue of the lithium battery tab. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0143] See also Fig.21 , Fig.21 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0144] The processor 2101 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0145] The memory 2102 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 2102 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 2102, and the processor 2101 calls and executes the method for extracting the edge of the black glue of the lithium battery tab of the embodiment of this application;

[0146] Input / output interface 2103, used to implement information input and output;

[0147] Communication interface 2104, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0148] A bus 2105 that transmits information between the various components of the device (e.g., the processor 2101, the memory 2102, the input / output interface 2103, and the communication interface 2104);

[0149] The processor 2101 , the memory 2102 , the input / output interface 2103 and the communication interface 2104 are connected to each other in communication within the device via the bus 2105 .

[0150] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned method for extracting the edge of the black glue of the lithium battery tab.

[0151] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0152] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0153] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0154] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0155] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0156] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0157] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0158] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0159] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0160] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0161] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0162] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A method for extracting the edge of black glue of a lithium battery tab, characterized in that: The following steps are involved: Acquire a first image of a lithium battery detection area; Performing a preprocessing operation on the first image to obtain a second image, wherein the preprocessing operation includes a hole filling operation; identifying a protruding region relative to the pole piece region in the second image, and determining a reference positioning frame based on the protruding region; Determine a protective glue reference area on the second image according to the reference positioning frame and the first preset offset parameter; Determine a vinyl reference area on the second image according to the reference positioning frame and the second preset offset parameter; Performing image enhancement on the second image according to the protective glue reference area and the black glue reference area to obtain a third image; The edge of the black glue on the tab is determined according to the third image.

2. The method for extracting the edge of the black glue of the lithium battery tab according to claim 1, characterized in that: The step of performing a preprocessing operation on the first image to obtain a second image comprises the following steps: Converting the first image into a grayscale image, and performing threshold segmentation on the first image according to a first grayscale range of background pixels to obtain a foreground area of ​​the lithium battery; Holes are filled in the foreground area to obtain a second image.

3. The method for extracting the edge of the black glue of the lithium battery tab according to claim 2, characterized in that: The step of identifying a protruding area relative to the pole piece area in the second image and determining a reference positioning frame according to the protruding area comprises the following steps: Performing an opening operation on the second image according to the first rectangular structure element to obtain a pole piece region; Obtaining a protruding region relative to the pole piece region according to the foreground region and the pole piece region of the second image; The glue layer covering area on the protruding area is identified, and a circumscribed rectangular frame of the glue layer covering area is determined as a reference positioning frame.

4. The method for extracting the edge of the black glue of the lithium battery tab according to claim 3, characterized in that: The step of identifying the glue layer coverage area on the protruding area comprises the following steps: Performing an opening operation on the protruding area according to a second rectangular structure element to obtain a tab area, wherein a width of the second rectangular structure element is set according to a width of the protruding area; A third rectangular structure element is determined according to the height of the tab area, and an opening operation is performed on the protruding area according to the third rectangular structure element to obtain a glue layer coverage area.

5. The method for extracting the edge of the black glue of the lithium battery tab according to claim 1, characterized in that: The step of performing image enhancement on the second image according to the protective glue reference area and the black glue reference area to obtain a third image comprises the following steps: Calculating the average pixel value of the protective glue reference area to obtain a protective glue reference pixel value; Calculating the average pixel value of the black LP reference area to obtain a black LP reference pixel value; Determine the image enhancement ratio according to the protective glue reference pixel value and the black glue reference pixel value; The second image is enhanced according to the image enhancement ratio to obtain a third image.

6. The method for extracting the edge of the black glue of the lithium battery tab according to claim 3, characterized in that: Determining the edge of the black glue on the tab according to the third image comprises the following steps: Determine a detection frame including the edge of the vinyl record according to the reference positioning frame; Cutting out a local area located in the detection frame from the third image; Performing threshold segmentation on the local area according to the second grayscale range to obtain a target area whose edge includes the edge of the vinyl; The black glue edge on the tab is determined according to the target area.

7. The method for extracting the edge of the black glue of the lithium battery tab according to claim 6, characterized in that: Determining the edge of the black glue on the tab according to the target area comprises the following steps: Performing an opening operation on the target area according to the fourth rectangular structure element to obtain a rectangular area with one side located at the edge of the vinyl; Extracting two pixel coordinate points on the edge of the black vinyl on the rectangular area; The edge of the vinyl is located on the second image according to the two pixel coordinate points.

8. A lithium battery tab black glue edge extraction system, characterized in that: include: A first module is used to obtain a first image of a lithium battery detection area; A second module is used to perform a preprocessing operation on the first image to obtain a second image, wherein the preprocessing operation includes a hole filling operation; A third module is used to identify a protruding area relative to the pole piece area in the second image, and determine a reference positioning frame according to the protruding area; A fourth module is used to determine a protective glue reference area on the second image according to the reference positioning frame and a first preset offset parameter; A fifth module, configured to determine a vinyl reference area on the second image according to the reference positioning frame and a second preset offset parameter; A sixth module is used to enhance the second image according to the protective glue reference area and the black glue reference area to obtain a third image; The seventh module is used to determine the edge of the black glue on the tab according to the third image.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the method described in any one of claims 1 to 7 are realized.

10. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any one of claims 1 to 7.