Tab detection method, device, electronic equipment, imaging system and storage medium

By acquiring initial images of different depth of field ranges and illumination angles, and using image brightness and clarity information for weighted fusion, the problem of imaging quality degradation caused by high reflection in extreme ear detection is solved, and the detection accuracy is improved.

CN118799316BActive Publication Date: 2025-03-14CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411275079.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-03-14
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

In extreme ear detection, high reflection conditions lead to a decrease in imaging quality and reduce detection accuracy.

Method used

By acquiring initial images of different depth of field ranges and lighting angles, the weighted weight of pixel points is determined using image brightness and clarity information, and weighted fusion is performed to obtain a super-depth of field image to reduce the impact of reflection.

Benefits of technology

It significantly reduces the reflection in ultra-depth of field images and improves the accuracy and accuracy of extreme ear detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799316B_ABST
    Figure CN118799316B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device, imaging system and storage medium for detecting a tab. The method for detecting a tab includes: obtaining a plurality of initial images of different depths of field ranges collected by an image acquisition device for the tab, wherein at least some of the initial images correspond to different illumination angles; determining the weighted weights of at least some of the pixels in each initial image based on the image brightness information and image clarity information of at least some of the pixels in each initial image; performing weighted fusion on each initial image using the weighted weights of at least some of the pixels in each initial image to obtain a super-depth of field image related to the tab; and obtaining a detection result about the tab based on the super-depth of field image. The above scheme can make the obtained tab detection result more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a tab detection method, device, electronic equipment, imaging system and storage medium. Background Art

[0002] In the field of power battery manufacturing, machine vision systems play a vital role. They are responsible for comprehensive monitoring of the battery production process and ensuring that the products produced at each link meet the established production standards. In this process, image quality becomes a key factor affecting detection accuracy.

[0003] In the detection of tab folding, it is necessary to use a machine vision system to capture images of the side of the tab, use the corresponding algorithm to identify the edge of the tab, count the number of tabs, and determine whether the tab is folded. Since the surface of the tab is made of smooth metal, when there are some uneven tabs, high reflection may occur (the light source just happens to be mirror-reflected at the uneven part of the tab), resulting in a decrease in the imaging quality of the high-reflection area and its surrounding areas, and reducing the accuracy of the tab folding detection. Therefore, it is particularly important to remove the high reflection of the tab folding and ensure the imaging effect for the accuracy of the tab folding detection. Summary of the invention

[0004] The present application at least provides a tab detection method, device, electronic equipment, imaging system and storage medium.

[0005] The present application provides a method for detecting a tab, comprising: obtaining a plurality of initial images of different depths of field ranges collected by an image acquisition device for the tab, wherein at least some of the initial images correspond to different illumination angles; determining the weighted weights of at least some of the pixels in each initial image based on the image brightness information and image clarity information of at least some of the pixels in each initial image; and performing weighted fusion on each initial image using the weighted weights of at least some of the pixels in each initial image to obtain a super-depth image related to the tab. According to the super-depth image, a detection result on the tab is obtained.

[0006] In the above scheme, by supplementing the ear with light at different angles and collecting initial images of the ear in different depths of field, the areas where reflections may exist in the collected initial images can be different. Therefore, by determining the weighted weights of each initial image for each pixel according to the image brightness information and image clarity information of at least part of the pixels, and then using the weighted weights to perform weighted fusion on the initial images, the reflections in the fused super-depth-of-field image can be reduced to a great extent.

[0007] In some embodiments, obtaining multiple initial images of the pole ear with different depth of field ranges captured by the image acquisition device includes: controlling the image acquisition device to acquire the initial image including the pole ear according to a preset exposure frequency, the image acquisition device acquiring at least one initial image in each exposure time; controlling the fill light component to adjust the angle of the emergent light between two adjacent exposure times to fill light for the pole ear; controlling the focal length of the lens in the image acquisition device to adjust between two adjacent exposure times.

[0008] In the above scheme, the angle of the output light of the fill light component is controlled to be adjusted during the non-exposure time, so that the illumination angles of the initial images collected during adjacent exposure times are different, and the focal length of the lens is controlled to be adjusted during the non-exposure time, so that the depth of field ranges of at least some of the initial images among the multiple initial images collected according to the preset exposure frequency are different and the corresponding illumination angles are also different, so that the areas where reflective light may exist in different initial images will also be different, thereby greatly reducing the reflection in the fused super-depth of field image.

[0009] In some embodiments, the fill light component includes multiple fill light sources, each of which has a different light emission angle. The fill light component is controlled to adjust the light emission angle between two adjacent exposure times to fill light the pole ear, including: adjusting the state of at least one fill light source that was in a fill light state in the previous exposure time to an off state; and adjusting the state of at least one fill light source that was in an off state in the previous exposure time to a fill light state.

[0010] In the above solution, multiple fill light sources are arranged in the fill light assembly and the switching states of different fill light sources are adjusted in time, so that the reflective areas corresponding to the initial images collected when different fill light sources are turned on are different.

[0011] In some embodiments, the tab detection method includes: in response to the state of at least one fill light source that was in a fill light state during the previous exposure time being adjusted to an off state, executing a step of adjusting the state of at least one fill light source that was in an off state during the previous exposure time to a fill light state after an interval of a preset waiting time.

[0012] In the above solution, after turning off some of the fill-in light sources and waiting for a period of time, turning on other fill-in light sources can reduce the power waste of turning on multiple light sources at the same time.

[0013] In some embodiments, controlling the focal length of a lens in an image acquisition device to adjust between two adjacent exposure times includes: controlling the focal length of a lens in an image acquisition device to increase or decrease between two adjacent exposure times, and the focal length of the lens is different in different exposure times.

[0014] In the above scheme, by sequentially increasing or sequentially decreasing the focal length of the lens, compared with randomly adjusting the focal length of the lens, this scheme can make the focal length adjustment more orderly.

[0015] In some embodiments, based on image brightness information and image clarity information of at least some pixels in each initial image, weighted weights of at least some pixels in each initial image are determined, including: for each pixel of at least some pixels: based on the image brightness information of the pixel in each initial image, a first weight value of the pixel in each initial image is determined; and based on the image clarity information of the pixel in each initial image, a second weight value of the pixel in each initial image is determined; the first weight value is negatively correlated with the image brightness information, and the second weight value is positively correlated with the image clarity information; based on the first weight value and the second weight value of the pixel in each initial image, the weighted weight of the pixel in the initial image is determined.

[0016] In the above scheme, in the process of weight calculation for each pixel point in a single initial image, the first weight is determined according to the image brightness information and the second weight is determined according to the image gradient, and then the first weight and the second weight are weightedly fused to obtain the final weighted weight of the pixel point in the initial image. Compared with using image brightness information alone or gradient information alone, the weighted weight obtained by this scheme is more accurate.

[0017] In some embodiments, based on the image brightness information of the pixel points in each initial image, the first weight value of the pixel point in each initial image is determined, including: taking the area where the highlighted pixel points in each initial image are located as the highlighted area in each initial image, and each highlighted pixel point is a pixel point whose pixel value is greater than or equal to a preset pixel value; for each pixel point in each initial image, in response to the pixel point being in the highlighted area in the initial image, determining that the first weight value of the pixel point in the initial image is a first preset value; in response to the pixel point not being in the highlighted area in the initial image, determining that the first weight value of the pixel point in the initial image is a second preset value, and the first preset value is less than the second preset value.

[0018] In the above scheme, by first determining the highlight area and the non-highlight area of ​​each initial image according to the image brightness information, different weights are set according to the highlight area and the non-highlight area, and the weight of the non-highlight area is greater than the weight of the highlight area, so that the interference of the highlight area can be reduced in the target image finally obtained by fusion.

[0019] In some embodiments, based on the image clarity information of the pixel points in each initial image, the second weight value of the pixel points in each initial image is determined, including: based on the image clarity information of each pixel point in each initial image, respectively determining the clear area in each initial image; for each pixel point in each initial image, in response to the pixel point being in the clear area in the initial image, determining the second weight value of the pixel point in the initial image to be a third preset value; in response to the pixel point not being in the clear area, determining the second weight value of the pixel point in the initial image to be a fourth preset value; the third preset value is greater than the fourth preset value.

[0020] In the above scheme, by first determining the clear area and the unclear area of ​​each initial image according to the image brightness information, different weights are set according to the clear area and the unclear area, and the weight of the unclear area is smaller than the weight of the clear area, so that the interference of the unclear area can be reduced in the target image finally obtained by fusion.

[0021] In some embodiments, based on the image clarity information of each pixel in each initial image, the clear areas in each initial image are determined respectively, including: determining the image gradient of each pixel in each initial image; determining the boundary of the clear area based on the change of the image gradient of each pixel, the image gradient of each pixel in the clear area in each initial image is greater than the image gradient of each pixel in other areas of the initial image except the clear area; or, based on the image clarity information of each pixel in each initial image, the clear areas in each initial image are determined respectively, including: performing wavelet transform on each initial image respectively to obtain multiple high-frequency spectrum images corresponding to each initial image; performing image fusion on multiple high-frequency spectrum images belonging to the same initial image to obtain fused images corresponding to each initial image; performing convolution on each fused image respectively to obtain the clear area in each fused image; obtaining the position of each clear area in each initial image based on the position of each clear area in each fused image.

[0022] In the above scheme, the clearer the part of the image, the higher the image gradient, so the image gradient can be used to determine the clear area in the image. By performing wavelet transform on the image, multiple high-frequency spectrograms of the image can be obtained, but the high-frequency signal may not be extracted for the focused pixel points in the high-frequency spectrogram, so the high-frequency area can be expanded by first fusing the high-frequency spectrograms and then using convolution to obtain a more accurate clear area in the initial image.

[0023] In some embodiments, at least part of the pixels include pixels within the region of interest where the pole lug is located, and the pole lug detection method further includes: performing target detection on each initial image to obtain a region of interest including the pole lug; for the pixels within the region of interest, executing the step of determining the weighted weights of at least part of the pixels in each initial image based on the image brightness information and image clarity information of at least part of the pixels in each initial image; for other pixels except the region of interest, executing a preset weight determination method, the preset weight determination method includes using the preset weight of each initial image as the weighted weight of each other pixel in each initial image, or, determining the weighted weight of each other pixel in each initial image based on the image brightness information and / or image clarity information of each other pixel in each initial image.

[0024] In the above scheme, each initial image is divided into regions and different regions are subjected to different weighted fusion methods, thereby improving the diversity of weighted fusion.

[0025] In some embodiments, weighted fusion is performed on each initial image using weighted weights of at least some pixels in each initial image to obtain a super depth of field image related to the pole ear, including: for each pixel, performing the following steps: multiplying the pixel value of the pixel in different initial images by the corresponding weighted weight to obtain multiple initial pixel values ​​of the pixel; adding the initial pixel values ​​of the pixel to obtain a candidate pixel value; and taking the ratio of the candidate pixel value to the sum of the weighted weights of the pixel in different initial images as the pixel value of the pixel in the super depth of field image.

[0026] In the above scheme, the pixel values ​​of each pixel point in each initial image are first fused according to the weighted weights, and then the cumulative value of the pixel value of each pixel point in each initial image is determined, and the ratio between the fused value and the cumulative value is used as the pixel value of the pixel point in the super depth of field image, so that for each pixel point, the normal pixel value and the pixel value in the presence of reflection can be fused, thereby reducing the interference of the reflection pixel value.

[0027] In some embodiments, the tab detection result includes a defect detection result and / or the number of layers of the tab. Based on the super depth of field image, a detection result about the tab is obtained, including: determining an area of ​​interest of the tab in the super depth of field image; determining a local image containing the area of ​​interest based on the area of ​​interest; performing defect detection and / or image segmentation and counting processing on the local image to obtain a defect detection result about the tab and / or the number of layers of the tab.

[0028] In the above solution, by first determining the region of interest of the tab in the super depth of field image, and then performing image analysis using the local image containing the region of interest, the efficiency of image analysis can be improved.

[0029] In some embodiments, defect detection and / or image segmentation processing is performed on a local image to obtain defect detection results regarding the pole lug and / or the number of layers of the pole lug, including: in response to the number of pole lug layers included in the pole lug segmentation map being less than a preset number of pole lug layers, determining that there is an error in the number of pole lugs; and adding the result of the error in the number of pole lugs to the defect detection result.

[0030] In the above scheme, if the number of pole lugs is detected to be incorrect, it can be considered that the pole lug has problems such as folding, and the conclusion that the number of pole lugs is incorrect can be added to the defect detection result to facilitate subsequent personnel to find the problem.

[0031] The present application provides a tab detection device, comprising: an image acquisition module, a weight determination module, an image processing module and a tab detection module; the image acquisition module is used to acquire a plurality of initial images of different depth of field ranges acquired by an image acquisition device for the tab, wherein at least some of the initial images correspond to different illumination angles; the weight determination module is used to determine the weighted weights of at least some of the pixels in each initial image based on image brightness information and image clarity information of at least some of the pixels in each initial image; the image processing module is used to perform weighted fusion on each initial image using the weighted weights of at least some of the pixels in each initial image to obtain a super-depth of field image related to the tab; the tab detection module is used to obtain a detection result about the tab based on the super-depth of field image.

[0032] The present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-mentioned tab detection method.

[0033] The present application provides an imaging system, comprising the above-mentioned electronic device, a fill light component and an image acquisition device; the electronic device is connected to the fill light component and is used to adjust the angle of the output light of the fill light component; the image acquisition device includes a lens, and the electronic device is connected to the image acquisition device to adjust the focal length of the lens in the image acquisition device and control the image acquisition device to capture multiple initial images with different depth of field ranges for the pole ears.

[0034] The present application provides a computer-readable storage medium on which program instructions are stored. When the program instructions are executed by a processor, the above-mentioned tab detection method is implemented.

[0035] In the above scheme, by supplementing the light at different angles on the pole ear and collecting initial images of the pole ear in different depth of field ranges, the areas where reflections may exist in the collected initial images can be different. Therefore, by determining the weighted weights of each initial image for each pixel according to the image brightness information and image clarity information of at least part of the pixels, and then using the weighted weights to perform weighted fusion on the initial images, the reflections in the fused super-depth-of-field image can be reduced to a great extent, thereby making the detection result of the pole ear obtained based on the super-depth-of-field image more accurate.

[0036] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0038] Figure 1 is a schematic flow chart of an embodiment of a tab detection method provided by some embodiments;

[0039] Figure 2 is a schematic diagram of supplementing light to the tab at different illumination angles provided by some embodiments;

[0040] Figure 3 The position diagram between the image acquisition device and the fill light component provided in some embodiments is Figure 1 ;

[0041] Figure 4 The position diagram between the image acquisition device and the fill light component provided in some embodiments is Figure 2 ;

[0042] Figure 5 is a schematic diagram of the exposure frequency of an image acquisition device in a tab detection method provided in some embodiments;

[0043] Figure 6 is a schematic structural diagram of a fill light assembly provided in some embodiments;

[0044] Figure 7 is a schematic diagram of the switch state change of two fill light sources provided by some embodiments;

[0045] Figure 8 is a schematic diagram of the change in the focal length of a lens over time in a tab detection method provided in some embodiments;

[0046] Fig. 9 is another flow chart of an embodiment of a tab detection method provided in some embodiments;

[0047] Fig.10 is another flow chart of an embodiment of a tab detection method provided in some embodiments;

[0048] Fig.11 Some embodiments provide Fig.10 Schematic diagram of the sub-process of step S31;

[0049] Fig.12 Some embodiments provide Figure 1 Schematic diagram of the sub-process of step S13;

[0050] Fig.13 is a schematic diagram of the principle of high reflectivity formation provided by some embodiments;

[0051] Fig.14 is a schematic structural diagram of an embodiment of a tab detection device provided in some embodiments;

[0052] Fig.15 It is a structural schematic diagram of an embodiment of the electronic device of the present application;

[0053] Fig.16 is a schematic structural diagram of an embodiment of an imaging system of the present application;

[0054] Fig.17 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0055] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0056] In the following description, for the purpose of explanation rather than limitation, specific details such as specific subsystem structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0057] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.

[0058] In battery production, tab folding is a key quality control point, because the correct folding of tabs is crucial to the performance and safety of batteries. Since the surface of the tabs is made of smooth metal, when there are some uneven tabs, high reflection may occur (the light source is reflected by the unevenness of the tabs), resulting in a decrease in the imaging quality of the highly reflective area and its surrounding areas, reducing the accuracy of tab folding detection.

[0059] Considering the removal of the high reflection of the tab folded, ensuring the imaging effect is particularly important for the accuracy of the tab folding detection. Therefore, this scheme proposes a tab detection method that can reduce the reflection in the collected image. By collecting initial images of the tab under different lighting environments and different depth of field ranges, and then fusing each initial image, the reflection in the fused super-depth of field image can be greatly reduced.

[0060] See also Figure 1 , the pole lug detection method provided in the present application may include the contents of the following steps S11 to S14. Step S11: Acquire multiple initial images of different depth of field ranges of the pole lug captured by the image acquisition device. At least some of the initial images correspond to different illumination angles. Step S12: Based on the image brightness information and image clarity information of at least some of the pixels in each initial image, determine the weighted weights of at least some of the pixels in each initial image. Step S13: Using the weighted weights of at least some of the pixels in each initial image, perform weighted fusion on each initial image to obtain a super depth of field image related to the pole lug. Step S14: According to the super depth of field image, obtain the detection result about the pole lug.

[0061] That is, in the process of collecting images of the pole ear, the focal length of the lens in the image collection device can be continuously adjusted so as to collect initial images with different depths of field. In addition, the lighting angle of the pole ear can be continuously adjusted so that the illumination angle corresponding to at least part of the initial image is different. Among them, the different illumination angles corresponding to at least part of the initial images can be considered to be different fill-in light angles for the pole ear when collecting this part of the initial image. The different fill-in light angles for the pole ear can be considered to be that the light sources emitted by different fill-in light angles directly illuminate different areas of the pole ear, or they all directly illuminate the same area of ​​the pole ear but the incident angles for the same area are different. Exemplarily, the light source emitted by the first fill-in light angle directly illuminates area A of the pole ear, and the light source emitted by the second fill-in light angle directly illuminates area B of the pole ear, or for area A, there are two light sources with different incident angles to fill in the light, because the angle of reflection from area A of the pole ear will also be different, so the reflection conditions in the initial images collected at these two incident angles will also be different. Exemplarily, please refer to Figure 2 , Figure 2 The figure shows the situation of supplementing the light to the ear at different lighting angles. Figure 2As shown, the areas directly irradiated on the tab 100 by light source a and light source b are different. The initial image collected when light source a supplements the tab and the initial image collected when light source b supplements the tab can be considered to have different illumination angles.

[0062] At least some of the pixels in each initial image may be pixels of a certain image area in each initial image, or may be all of the pixels in each initial image. Exemplarily, a certain image area may be an image area where the pole ear is located. In some application scenarios, at least some of the pixels may be all of the pixels in each initial image, that is, each pixel in the super depth of field image may be obtained by weighted fusion using the pixel values ​​of the pixels at the corresponding positions in each initial image. The specific method for obtaining the weighted weight of a certain pixel in each initial image may refer to the image brightness information and image clarity information of the pixel in each initial image. Among them, for image brightness information, the higher the brightness of the pixel, the lower the weight may be; for image clarity, the higher the clarity of the pixel, the lower the weight may be. This solution may determine the weighted weight based on the brightness information and clarity information of the image. In some application scenarios, at least some of the pixels may be the pixels of the region where the pole lug is located in each initial image, that is, the pixels of the region where the pole lug is located in the super depth of field image may be obtained by weighted fusion of the pixel values ​​of the pixels at the corresponding positions of these pixels in each initial image, wherein the weighted weight of the same pixel in different initial images may be obtained according to the image brightness information and image clarity information of the pixel in different initial images. In this case, the other pixels in the super depth of field image except the region where the pole lug is located may be filled with preset pixel values, or weighted fused according to the preset weights of each initial image, or may be obtained in the same way as the pixel values ​​of each pixel in the region where the pole lug is located. The image brightness information may be a brightness value, and the image clarity information may be an image gradient value or may also be frequency information.

[0063] The method of weighted fusion of each initial image by using the weighted weights of at least some pixels in each initial image to obtain the super depth of field image related to the tab can be: for each pixel: if the sum of the weighted weights of the pixel in each initial image is 1, each weighted weight can be multiplied by the pixel value of the pixel in each initial image and then added to obtain the pixel value of the pixel in the super depth of field image; or for each pixel: each weighted weight can also be multiplied by the pixel value of the pixel in each initial image and then added, and then divided by the sum of the weighted weights of the pixel in each initial image to obtain the pixel value of the pixel in the super depth of field image. After obtaining the super depth of field image, the super depth of field image can be processed by target detection, defect detection, or tab number counting to obtain the tab detection result.

[0064] In the above scheme, by supplementing the light at different angles on the pole ear and collecting initial images of the pole ear in different depth of field ranges, the areas where reflections may exist in the collected initial images can be different. Therefore, by determining the weighted weights of each initial image for each pixel according to the image brightness information and image clarity information of at least part of the pixels, and then using the weighted weights to perform weighted fusion on the initial images, the reflections in the fused super-depth-of-field image can be reduced to a great extent, thereby making the detection result of the pole ear obtained based on the super-depth-of-field image more accurate.

[0065] In some embodiments, the above step S11 may include the following steps: controlling the image acquisition device to acquire an initial image including the tab at a preset exposure frequency. The image acquisition device acquires at least one initial image during each exposure time. Controlling the fill light component to adjust the angle of the emitted light between two adjacent exposure times to fill light for the tab. Controlling the focal length of the lens in the image acquisition device to be adjusted between two adjacent exposure times.

[0066] The fill light component can be a fill light or other device that can emit light. The fill light component can be a component of the image acquisition device, or a device independent of the image acquisition device. The positional relationship between the fill light component and the image acquisition device includes but is not limited to the fill light component being between the image acquisition device and the pole ear, or a through hole being opened in the fill light component, and the image acquisition device being arranged in the through hole. For example, the setting relationship between the image acquisition device and the fill light component can be referred to Figure 3 Shown and Figure 4 ,like Figure 3 As shown, the image acquisition device 30 can be located on one side of the fill light assembly 20, and the tab 100 can be located on the other side of the fill light assembly. The outgoing light of the fill light assembly 20 can be the outgoing light c and the outgoing light d. Figure 4 As shown, the image acquisition device can extend into the through hole in the fill light assembly, and the outgoing light of the fill light assembly 20 can be the outgoing light c and the outgoing light d. Figure 5 As shown, the image acquisition device can acquire an initial image including the tab at a fixed preset exposure frequency. Figure 5 In the example, if the signal is high, it means it is within the exposure time, and if the signal is low, it means it is not within the exposure time. Two adjacent high levels represent two adjacent exposure times. Figure 5When the middle signal is at a low level, the fill light component is controlled to adjust the angle of the emitted light and the focal length of the lens is controlled to be adjusted. The method of controlling the fill light component to adjust the angle of the emitted light between two adjacent exposure times to fill light for the pole ear may be to send a control signal to the fill light component so that the fill light component adjusts the angle of the emitted light after receiving the control signal. Similarly, the method of controlling the focal length change of the lens may also be to send a corresponding control signal to the image acquisition device, and the image acquisition device can adjust the focal length of the lens according to the control signal. Among them, the time for sending the control signal to the fill light component and the image acquisition device may be before the initial image is first captured, or it may also be sent at each non-exposure time.

[0067] In the above scheme, the angle of the output light of the fill light component is controlled to be adjusted during the non-exposure time, so that the illumination angles of the initial images collected during adjacent exposure times are different, and the focal length of the lens is controlled to be adjusted during the non-exposure time, so that the depth of field ranges of at least some of the initial images among the multiple initial images collected according to the preset exposure frequency are different and the corresponding illumination angles are also different, so that the areas where reflective light may exist in different initial images will also be different, thereby greatly reducing the reflection in the fused super-depth of field image.

[0068] In some embodiments, the fill light component includes a plurality of fill light sources, each of which has a different light emission angle. Controlling the fill light component to adjust the light emission angle between two adjacent exposure times to fill light the pole ear includes: adjusting the state of at least one fill light source in a fill light state during the previous exposure time to an off state; and adjusting the state of at least one fill light source in an off state during the previous exposure time to a fill light state.

[0069] Different fill light sources in the fill light assembly have different light emission angles, that is, the light emitted by different fill light sources is directed to different areas of the pole ear, or the light emitted by different fill light sources is directed to the same area of ​​the pole ear but the incident angles for the same area are different. The structure of the fill light assembly includes but is not limited to a linear structure and a circular ring structure. The circular ring structure can be a circle obtained by connecting the fill light sources end to end, and the linear structure can be a circle obtained by arranging the fill light sources in the fill light assembly in one direction. Optionally, at least some of the fill light sources are in an on state at one moment, and other fill light sources are in an off state at that moment. Exemplarily, the structure of the fill light assembly can refer to Figure 6 As shown, it is worth noting that Figure 6 This is only an example and is not intended to limit the structure of the fill light assembly. Figure 6As shown, the fill light component 20 can be a circular structure, which can include four fill light sources, namely the first fill light source 21, the second fill light source 22, the third fill light source 23 and the fourth fill light source 24. Among these four components, only one of them can be turned on and three of them can be turned off at the same time, or two of them can be turned on at the same time and two of them can be turned off, or three of them can be turned on and one of them can be turned off.

[0070] For example, Figure 7 It shows the change of the light-on state of each fill light source over time when there are two fill light sources in the fill light component. Figure 7 The upper change line in the figure shows the change in the light-on state of a fill light source. Figure 7 The change line in the lower middle shows the change of the switch state of another fill light source. For the two change lines, their respective high levels indicate that the fill light source is in the on state, and their respective low levels indicate that the fill light source is in the off state. In the case of two fill light sources, only one fill light source can be at a high level at the same time.

[0071] In the above solution, multiple fill light sources are arranged in the fill light assembly and the switching states of different fill light sources are adjusted in time, so that the reflective areas corresponding to the initial images collected when different fill light sources are turned on are different.

[0072] In some embodiments, the tab detection method includes: in response to the state of at least one fill light source that was in a fill light state during the previous exposure time having been adjusted to an off state, executing a step of adjusting the state of at least one fill light source that was in an off state during the previous exposure time to a fill light state after an interval of a preset waiting time.

[0073] like Figure 7 As shown, during the non-exposure time, both fill light sources may be turned off, that is, the time during which the fill light source is turned on during the non-exposure time is minimized, thereby achieving the effect of saving power resources.

[0074] In the above solution, after turning off some of the fill-in light sources and waiting for a period of time, turning on other fill-in light sources can reduce the power waste of turning on multiple light sources at the same time.

[0075] In some embodiments, controlling the focal length of a lens in an image acquisition device to adjust between two adjacent exposure times includes: controlling the focal length of a lens in an image acquisition device to increase or decrease between two adjacent exposure times, and the focal length of the lens is different in different exposure times.

[0076] In some application scenarios, the focal length of the lens can be adjusted to a larger focal length first, and then the focal length of the lens can be gradually reduced during the image acquisition process of the tab. Figure 8As shown, the focal length of the lens can be adjusted to a smaller focal length, and the focal length of the lens can be gradually increased during the image acquisition process of the electrode ear. Optionally, the focal length adjustment amount of the lens can be the same or different each time.

[0077] In the above scheme, by sequentially increasing or sequentially decreasing the focal length of the lens, compared with randomly adjusting the focal length of the lens, this scheme can make the focal length adjustment more orderly.

[0078] In some embodiments, the above-mentioned method of acquiring multiple initial images of different depths of field ranges captured by the image acquisition device on the pole ear includes: controlling the fill light component to fill light the pole ear according to a preset fill light method. The preset fill light method is used to indicate the change in the angle of the output light of the fill light component over time. Adjusting the focal length of the lens in the image acquisition device according to a preset focusing method. The preset focusing method is used to indicate the change in the focal length of the lens over time. Controlling the image acquisition device to capture the initial image containing the pole ear according to a preset exposure frequency.

[0079] The preset fill light mode indicates the change in the angle of the emitted light of the fill light component over time. It can be considered that the angle of the emitted light of the fill light component changes over time after the fill light component is started. For example, the angle of the emitted light in the first time period is the first angle, the angle of the emitted light in the second time period is the second angle, and the angle of the emitted light in the third time period is the third angle... The preset focusing mode indicates the change in the focal length of the lens over time. Specifically, after the image acquisition device is started, the focal length of the lens in the first time period is the first focal length, the focal length in the next time period is the second focal length, and the focal length in the next time period is the third focal length... Among them, the division of different time periods in the preset fill light mode is independent of the division of different time periods in the preset focusing mode, and the division methods of the two can be the same or different. The preset exposure frequency can be a number of acquisitions per unit time. Optionally, it can be guaranteed that at least one image can be acquired in each time period of the preset fill light mode, and at least one image can be acquired in each time period of the preset focusing mode. Exemplarily, the focal length can be gradually increased with the change of time. In other embodiments, the focal length can also be gradually reduced with the change of time.

[0080] In the above scheme, by controlling the output light angle of the fill light component to change continuously over time, and controlling the focal length of the lens to change continuously over time, the depth of field range of at least some of the multiple initial images collected according to the preset exposure frequency is different and the corresponding illumination angles are also different, so that the areas where reflective areas may exist in different initial images will also be different, thereby greatly reducing the reflection in the fused super depth of field image.

[0081] In some embodiments, the fill light component includes a plurality of fill light sources, and the preset fill light method includes the change in the light-on state of each fill light source over time. The method of controlling the fill light component to fill light the pole ear according to the preset fill light method may be: determining the fill light source to be turned on at the current moment and the fill light source to be turned off at the current moment in the fill light component according to the preset fill light method. At least some of the fill light sources have different switch states at the same moment. Turn on or off the corresponding fill light sources in the fill light component to fill light the pole ear.

[0082] Different fill light sources in the fill light assembly have different light emission angles, that is, the light emitted by different fill light sources is directed to different areas of the pole ear, or the light emitted by different fill light sources is directed to the same area of ​​the pole ear but the incident angles for the same area are different. The structure of the fill light assembly includes but is not limited to a linear structure and a circular ring structure. The circular ring structure can be a circle obtained by connecting the fill light sources end to end, and the linear structure can be a circle obtained by arranging the fill light sources in the fill light assembly in one direction. Optionally, at least some of the fill light sources are in an on state at one moment, and other fill light sources are in an off state at that moment. Exemplarily, the structure of the fill light assembly can refer to Figure 6 As shown, it is worth noting that Figure 6 This is only an example and is not intended to limit the structure of the fill light assembly. Figure 6 As shown, the fill light component 20 can be a circular structure, which can include four fill light sources, namely the first fill light source 21, the second fill light source 22, the third fill light source 23 and the fourth fill light source 24. Among these four components, only one of them can be turned on and three of them can be turned off at the same time, or two of them can be turned on at the same time and two of them can be turned off, or three of them can be turned on and one of them can be turned off.

[0083] In the above solution, multiple fill light sources are arranged in the fill light assembly and the switching states of different fill light sources are adjusted in time, so that the reflective areas corresponding to the initial images collected when different fill light sources are turned on are different.

[0084] In some embodiments, based on the image brightness information and image clarity information of at least some of the pixels in each initial image, the weighted weights of at least some of the pixels in each initial image are determined, including: for each pixel of at least some of the pixels: based on the image brightness information of the pixel in each initial image, a first weight value of the pixel in each initial image is determined. And based on the image clarity information of the pixel in each initial image, a second weight value of the pixel in each initial image is determined. The first weight value is negatively correlated with the image brightness information, and the second weight value is positively correlated with the image clarity information. Based on the first weight value and the second weight value of the pixel in each initial image, the weighted weight of the pixel in the initial image is determined.

[0085] Among them, the above-mentioned method of determining the first weight value of the pixel point in each initial image based on the image brightness information of the pixel point in each initial image may be to pre-establish a first mapping relationship between the image brightness information and the first weight value. Exemplarily, the first mapping relationship may be a linear relationship, and the higher the image brightness information, the smaller the first weight value. Similarly, the lower the image brightness information, the larger the first weight value. Based on the image brightness information of the pixel point in each initial image, the method of determining the first weight value of the pixel point in each initial image may also be to divide the initial image into a highlight area and a non-highlight area, and the highlight area adopts a weight determination method, and the non-highlight area adopts a weight determination method, for example, the highlight area can share a weight, and the non-highlight area shares another weight, and the weight of the highlight area can be less than the weight of the non-highlight area. The above-mentioned method of determining the second weight value of the pixel point in each initial image based on the image clarity information of the pixel point in each initial image may be to pre-establish a first mapping relationship between the image clarity information and the second weight value. Exemplarily, the first mapping relationship may be a linear relationship, and the higher the image clarity information, the larger the second weight value. Similarly, the lower the image clarity information, the smaller the second weight value. Based on the image clarity information of the pixel point in each initial image, the second weight value of the pixel point in each initial image may also be determined by dividing the initial image into clear areas and unclear areas, with one weight determination method used for the clear area and another weight determination method used for the unclear area. For example, the clear area may share one weight, and the unclear area may share another weight. The weight of the clear area may be greater than the weight of the unclear area. In some application scenarios, the weighted weight of the pixel point (x, y) in the i-th image The determination method can refer to formula (1):

[0086] Formula (1);

[0087] in, represents the first weight value, represents the second weight value, In some other embodiments, the weighted weight may be determined by adding the first weight value and the second weight value.

[0088] In the above scheme, in the process of weight calculation for each pixel point in a single initial image, the first weight is determined according to the image brightness information and the second weight is determined according to the image gradient, and then the first weight and the second weight are weightedly fused to obtain the final weighted weight of the pixel point in the initial image. Compared with using image brightness information alone or gradient information alone, the weighted weight obtained by this scheme is more accurate.

[0089] In some embodiments, see Fig. 9 , the above-mentioned method of determining the first weight value of the pixel point in each initial image based on the image brightness information of the pixel point in each initial image may include the following steps: Step S21: The area where the highlighted pixel points in each initial image are located is used as the highlighted area in each initial image. Among them, each highlighted pixel point is a pixel point whose pixel value is greater than or equal to the preset pixel value. For each pixel point of each initial image, execute step S22 or step S23, step S22: in response to the pixel point being in the highlighted area in the initial image, determine that the first weight value of the pixel point in the initial image is a first preset value. Step S23: in response to the pixel point not being in the highlighted area in the initial image, determine that the first weight value of the pixel point in the initial image is a second preset value. Among them, the first preset value is less than the second preset value.

[0090] Considering that high reflection does not appear as a single pixel, but generally appears in the form of an area, the present embodiment can divide the highlight area according to the pixel value of each pixel. The area where the highlight pixel points in each initial image are located is used as the highlight area in each initial image, and each highlight pixel point is a pixel point whose pixel value is greater than or equal to the preset pixel value. The method can be: first, the pixel value greater than or equal to the preset pixel value is used as the highlight pixel point. Then, multiple highlight pixel points are connected to form a highlight area. Exemplarily, the preset pixel value can be 250 or other set pixel values. Optionally, the highlight area can be screened. For example, if the number of pixels in the highlight area is less than or equal to the preset number, the highlight area is marked as a non-highlight area, and the non-highlight area is the other area in the initial image except the highlight area. In some application scenarios, the mask of each initial image can be determined according to the division results of the highlight area and the non-highlight area in each initial image. The highlight area in the mask can be assigned a value of 1 and the non-highlight area can be assigned a value of 0. For the first weight value of a pixel in a single initial image, if the value of the pixel in the mask is 1, it indicates that the pixel is in the highlighted area, and the first weight value can be set to the first preset value. If the value of the pixel in the mask is 0, it indicates that the pixel is in the non-highlighted area, and the first weight value can be set to the second preset value. Exemplarily, the second preset value is 1, and the first preset value is 0.1. Of course, in other embodiments, the first preset value can also be 0 or 0.2, or any other value smaller than 1. This embodiment does not directly set the first preset value to 0 because it takes into account that the pixel has reflection in multiple initial images. If the first weight value is directly set to 0, it may cause the pixel to lose information after image fusion.

[0091] In the above scheme, by first determining the highlight area and the non-highlight area of ​​each initial image according to the image brightness information, different weights are set according to the highlight area and the non-highlight area, and the weight of the non-highlight area is greater than the weight of the highlight area, so that the interference of the highlight area can be reduced in the target image finally obtained by fusion.

[0092] In some embodiments, see Fig.10 , the above-mentioned method of determining the second weight value of the pixel point in each initial image based on the image clarity information of the pixel point in each initial image may include the following steps: Step S31: Based on the image clarity information of each pixel point in each initial image, respectively determine the clear area in each initial image. For each pixel point in each initial image, execute step S32 or step S33: Step S32: In response to the pixel point being in the clear area in the initial image, determine that the second weight value of the pixel point in the initial image is a third preset value; Step S33: In response to the pixel point not being in the clear area, determine that the second weight value of the pixel point in the initial image is a fourth preset value. Wherein, the third preset value is greater than the fourth preset value.

[0093] In some application scenarios, the image clarity information includes the image gradient value. The larger the image gradient value, the higher the clarity of the pixel. In some application scenarios, the second weight value of the clear area can be 1, and the second weight value of the unclear area can be 0.1. The second weight value of the clear area can refer to the first weight value of the non-highlight area, and the second weight value of the unclear area can refer to the first weight value of the highlight area. In some application scenarios, the image clarity information includes frequency information. The clear area can be the area where the high-frequency signal is located, and the unclear area can be the area where other frequency signals are located, where the area where the high-frequency signal is located can be obtained by performing a wavelet transform on the initial image.

[0094] In the above scheme, by first determining the clear area and the unclear area of ​​each initial image according to the image brightness information, different weights are set according to the clear area and the unclear area, and the weight of the unclear area is smaller than the weight of the clear area, so that the interference of the unclear area can be reduced in the target image finally obtained by fusion.

[0095] In some embodiments, the above-mentioned determining the clear area in each initial image based on the image clarity information of each pixel in each initial image includes: determining the image gradient of each pixel in each initial image; and determining the boundary of the clear area based on the image gradient change of each pixel. The image gradient of each pixel in the clear area of ​​each initial image is greater than the image gradient of each pixel in other areas of the initial image except the clear area.

[0096] The clear area division may be performed according to the image gradient value of each pixel. For example, the boundary of the clear area may be determined according to the change in the image gradient value of two pixels. For example, the image gradient of the pixel in the clear area is greater than the image gradient of each pixel in the non-clear area. If the image gradient difference between the two pixels is obvious, it is likely that the pixel with the larger image gradient is the boundary of the clear area, and the pixel with the smaller image gradient is in the non-clear area.

[0097] In the above scheme, the clearer the part of the image, the higher the image gradient is, so the image gradient can be used to determine the clear area in the image.

[0098] In some embodiments, see Fig.11 , the above-mentioned step S31 may include the following steps: step S311: perform wavelet transform on each initial image respectively to obtain multiple high-frequency spectrum images corresponding to each initial image; step S312: perform image fusion on multiple high-frequency spectrum images belonging to the same initial image to obtain fused images corresponding to each initial image; step S313: perform convolution on each fused image respectively to obtain clear areas in each fused image; step S314: based on the position of each clear area in each fused image, obtain the position of each clear area in each initial image.

[0099] In some application scenarios, wavelet transform can be combined with convolution operation to obtain a clear area in the initial image. Exemplarily, wavelet transform of a single initial image can obtain three high-frequency spectrum maps, and the three high-frequency spectrum maps are fused to obtain a fused image. The fused image can include high-frequency information in the three high-frequency spectra, and optionally, the fusion method can be addition. Then, convolution of a single fused image can expand the high-frequency signal area in the fused image, and the area where each high-frequency signal is located after expansion is used as a clear area.

[0100] For example, the method of determining the second weight value of each pixel point may refer to formula (2):

[0101] Formula (2);

[0102] In formula (2) Represents the pixel value of the pixel point (x, y) in the fused image corresponding to the first initial image, represents the convolution kernel, Represents the second weight value of the pixel (x, y) in the i-th initial image. For example, if the pixel is determined to be in a clear area through convolution, the second weight value of the pixel is the preset third preset value. If the pixel is determined to be in a non-clear area through convolution, the second weight value of the pixel is the preset fourth preset value. Optionally, a Gaussian convolution kernel can be used. The size of the convolution kernel can be determined according to the texture richness of the object in the image. If the texture is rich, a small-size convolution kernel can be selected. If the texture is less, the convolution kernel size can be appropriately increased. The image spectrum method provided in this embodiment can consider using wavelet transform. Wavelet transform can separate the details of the image in the horizontal, vertical, and diagonal directions. The richer these details are, the better the focusing effect is (for a series of images with different focus positions). Therefore, it can be considered to use a convolution method similar to the above-mentioned method to increase the weight of the area with strong high-frequency signals according to the result of the image wavelet transform.

[0103] In the above scheme, multiple high-frequency spectrum graphs of the image can be obtained by performing wavelet transform on the image. However, the high-frequency signal may not be extracted for the focused pixel points in the high-frequency spectrum graph. Therefore, the high-frequency spectrum graphs can be fused first and then the high-frequency area can be expanded by convolution to obtain a more accurate and clear area in the initial image.

[0104] In some embodiments, the above-mentioned method of determining the weighted weights of at least some of the pixels in each initial image based on the image brightness information and image clarity information of at least some of the pixels in each initial image may be: for each pixel in at least some of the pixels, the following steps are performed: obtaining the corresponding relationship between the image brightness information and the image clarity information and the weighted weight, that is, in the corresponding relationship, the independent variables are the image brightness information and the image clarity of the pixel in a single initial image, and the dependent variable is the weighted weight of the pixel in a single initial image. Exemplarily, the corresponding relationship is f in formula (3).

[0105] For example, the weighted weight of the pixel point (x, y) in the i-th initial image can be calculated by referring to formula (3):

[0106] Formula (3);

[0107] in, represents the weighted weight of the pixel (x, y) in the i-th initial image, Represents the image brightness information of the pixel (x, y) in the i-th initial image, Indicates the image clarity information of the pixel (x, y) in the i-th initial image, and f represents the corresponding relationship. Among them, the image brightness is related to whether high reflection occurs. When high reflection occurs, the image brightness of the pixel is close to 255 (8-bit image), so when the image brightness is close to 255, the weighted weight of this pixel is low. Image clarity information is directly related to the focus. The clearer the focus, the higher the image gradient, and vice versa, the image gradient is lower at the out-of-focus position. Therefore, the higher the image gradient of the pixel, the higher the weight.

[0108] In the above scheme, the higher the brightness of the image, the greater the possibility of reflection, and the higher the image gradient, the clearer the image. Therefore, by combining the image brightness information and image clarity information of the pixel point, the weighted weights of each pixel point in each initial image are determined to be more accurate.

[0109] In some embodiments, at least some of the pixels include pixels in the region of interest where the pole lug is located, and the method further includes: performing target detection on each initial image to obtain a region of interest including the pole lug. For the pixels in the region of interest, a step of determining the weighted weights of at least some of the pixels in each initial image based on the image brightness information and image clarity information of at least some of the pixels in each initial image is performed. For other pixels except the region of interest, a preset weight determination method is performed, and the preset weight determination method includes using the preset weight of each initial image as the weighted weight of each other pixel in each initial image, or, the image brightness information and / or image clarity information of each other pixel in each initial image determines the weighted weight of each other pixel in each initial image.

[0110] Optionally, the method of performing target detection on each initial image may be to perform target detection on each initial image respectively, obtain the region of interest in each initial image, and determine the final region of interest based on the position of each region of interest in each initial image, for example, determine the boundary of the final region of interest based on the position of each region of interest in each initial image, and the final region of interest includes each region of interest. Alternatively, in other embodiments, one of the initial images may be selected from the initial images, and then the target detection may be performed on the selected initial image to obtain the region of interest in the initial image, and then the position of the region of interest in the initial image may be used as the position of the region of interest in other initial images. For the pixels in the region of interest, the specific method of performing the step of determining the weighted weight of at least part of the pixels in each initial image based on the image brightness information and image clarity information of at least part of the pixels in each initial image may refer to the above, and will not be repeated here. For the pixels other than the region of interest, the weight determination method of each pixel in the region of interest may still be adopted. In addition, the preset weights of each initial image may be pre-set, and the weights of each pixel in each initial image may be used according to the predetermined weights, wherein the preset weights of different pixels in the same initial image may be the same or different. For pixel points other than the region of interest, the weight determination method for each pixel point in the region of interest can still be adopted, and the weighted weight can also be determined only according to the image brightness information, or only according to the image gradient.

[0111] In the above solution, each initial image is divided into regions and different regions are subjected to different weighted fusion methods, thereby improving the diversity of weighted fusion.

[0112] In some embodiments, see Fig.12 , the implementation method of the above step S13 can be: for each pixel point, perform the following steps: Step S131: multiply the pixel value of the pixel point in different initial images and the corresponding weighted weight to obtain multiple initial pixel values ​​of the pixel point. Step S132: add the initial pixel values ​​of the pixel point to obtain the candidate pixel value. Step S133: take the ratio of the candidate pixel value to the sum of the weighted weights of the pixel point in different initial images as the pixel value of the pixel point in the super depth of field image.

[0113] For example, the fusion method of pixel point (x, y) can refer to formula (4):

[0114] Formula (4);

[0115] Represents the pixel value of the pixel point (x, y) in the super depth of field image, represents the weighted weight of the pixel (x, y) in the i-th initial image, Represents the image brightness information of the pixel (x, y) in the i-th initial image, Represents the i-th initial pixel value of pixel point (x, y). N represents the number of initial images.

[0116] In the above scheme, the pixel values ​​of each pixel point in each initial image are first fused according to the weighted weights, and then the cumulative value of the pixel value of each pixel point in each initial image is determined, and the ratio between the fused value and the cumulative value is used as the pixel value of the pixel point in the super depth of field image, so that for each pixel point, the normal pixel value and the pixel value in the presence of reflection can be fused, thereby reducing the interference of the reflection pixel value.

[0117] In some embodiments, the tab detection result includes a defect detection result and / or the number of layers of the tab. Based on the super depth of field image, a detection result about the tab is obtained, including: determining an area of ​​interest of the tab in the super depth of field image; determining a local image containing the area of ​​interest based on the area of ​​interest; performing defect detection and / or image segmentation and counting processing on the local image to obtain a defect detection result about the tab and / or the number of layers of the tab.

[0118] The method for determining the region of interest of the tab in the super depth of field image can be to perform target detection on the super depth of field image using a target detection model. Then the super depth of field image is cropped according to the location of the region of interest to obtain a local image containing the region of interest. Based on the local image containing the region of interest, the method for determining the image analysis result can be to perform defect detection on the local image to obtain a defect detection result. Or after performing target segmentation on the local image to obtain the region of each tab, count them to obtain the number of layers of the tab. Optionally, if half of the area of ​​a certain layer of tabs is folded but the other half is normal, counting can also be performed, and the folding problem can be determined by the defect detection model and recorded in the defect detection result.

[0119] In the above solution, by first determining the region of interest of the tab in the super depth of field image, and then performing image analysis using the local image containing the region of interest, the efficiency of image analysis can be improved.

[0120] In some embodiments, defect detection and / or image segmentation processing is performed on a local image to obtain defect detection results regarding the pole lug and / or the number of layers of the pole lug, including: in response to the number of pole lug layers included in the pole lug segmentation map being less than a preset number of pole lug layers, determining that there is an error in the number of pole lugs; and adding the result of the error in the number of pole lugs to the defect detection result.

[0121] That is, the number of layers of the tabs in the battery can be preset. If the number of layers of the tabs detected is less than the preset number of layers of the tabs, it is determined that there is a problem with the number of layers of the tabs in the super depth of field image. The problem may be that the tabs are folded and not counted, or there is one layer missing. The result of the data error can be recorded in the defect detection result, so as to facilitate subsequent verification by users.

[0122] In the above scheme, if the number of pole lugs is detected to be incorrect, it can be considered that the pole lug has problems such as folding, and the conclusion that the number of pole lugs is incorrect can be added to the defect detection result to facilitate subsequent personnel to find the problem.

[0123] In some embodiments, the lens in the image acquisition device can be an electric focus lens, and the fill light component can be a partitioned lighting source. Considering that high reflection requires a light source, a high-reflective area of ​​the pole piece, and the image acquisition component to be in a specific positional relationship to occur, in this solution, an electric focus lens and a partitioned lighting source are used to work together to capture a series of images with different focus positions and lighting directions, and the image sequence is fused according to a certain rule to obtain an ultra-depth-of-field pole ear image without high reflection. Specifically, multiple light sources can be used for partitioned lighting. When one position produces high reflection (specular reflection) under one of the light sources, it will not produce high reflection under other light sources. For example, see Fig.13 The light irradiated by the first fill light source on the left side of the pole ear will be reflected into the camera pupil range and cause reflection, and the light irradiated by the second fill light source on the right side of the pole ear will be reflected into the camera pupil range and cause reflection. However, the light irradiated by the first fill light source on the right side of the pole ear will not be directly reflected into the camera pupil range, so it will not cause reflection. Similarly, the light irradiated by the second fill light source on the left side of the pole ear will not be directly reflected into the camera pupil range, so it will not cause reflection.

[0124] Optionally, the present solution can use a controller to drive a partitioned light source (or multiple light sources), an electric focus lens, and a camera (image acquisition device) to work together to quickly obtain the desired image sequence. The controller can be called an imaging system controller, and the imaging system controller can send a camera trigger signal to control the camera to acquire images. It can also send lens focus position information to enable the lens to adjust the focal length, and can also send a light source partition control signal to control the on / off state of each fill light source in the fill light assembly. That is, the imaging system controller can determine the light source partition control signal at the current moment according to the preset fill light method, determine the current camera trigger signal according to the preset image sampling frequency, and determine the lens focus position signal at the current moment according to the preset focusing method.

[0125] That is, the imaging system controller is used to output control signals to the electric focus lens, the partitioned illumination source and the camera respectively, so that they can work together to collect the required image sequence. The camera is triggered and shot according to the signal output by the imaging system controller. The electric focus lens can accurately control the focus position to ensure that the objects under test at different distances can obtain clear images during the imaging process. The electric focus lens can be an electric module lens (adjusting the focus area by adjusting the image distance) or a liquid lens (adjusting the focus area by driving the interface morphology of the liquid lens in the lens). The electric focus lens can automatically adjust the focal length as needed, so as to capture images at a series of different focus positions. The partitioned illumination source, by using a partitioned controlled illumination source, can adjust the direction and intensity of the illumination according to the characteristics of the object under test and the detection requirements. This lighting method helps to reduce the impact of high reflections because it can avoid light being directly reflected into the lens.

[0126] Common electric focus lenses include electric module lenses and liquid lenses. Electric module lenses are usually composed of multiple lens elements, which can be fixed or movable. The design of the lens determines its optical performance, including focus position, focal length, aperture size, etc. Among them, focus can be achieved by changing the distance between the lens and the imaging plane, so that the subject can form a clear image on the imaging plane. For electric module lenses, the motor inside drives certain parts of the lens to move to achieve fast and accurate focus. Liquid lens refers to a lens that contains at least one liquid lens. The liquid lens contains two immiscible liquids, and at least one of them can be driven by an electric field to change the interface morphology. By applying an electric field, the oil droplet can be quickly and accurately shaped into an effective lens. The change in the focal length of the liquid lens can cause the optical center position of the entire lens to change, thereby changing the focus position. This process is continuous, reversible, and equally fast for focusing steps of different sizes.

[0127] After collecting a series of initial images with different focus positions and lighting directions, these images need to be fused according to certain rules. This can be achieved through image processing technology, such as multi-focus image fusion technology, to achieve super depth of field effect, while making the image have fewer high-reflection areas. When fusing image sequences, it is necessary not only to consider the focus of the image, but also the high-reflection of the image. In addition, an image fusion algorithm based on the grayscale value and grayscale gradient value of the image can be used to obtain a low-reflection, clear, high-quality super-depth of field image.

[0128] The specific fusion method can refer to the above formula (1) to formula (4), which will not be described in detail here.

[0129] Through the above technical solution, a tab image with ultra-depth of field and less high reflection can be obtained. Such an image can clearly show the folding state of the tab and provide reliable image data for subsequent automated inspection and quality assessment.

[0130] After the tab image is fused to obtain the super-depth image, the tab position needs to be located first, and the local image containing the tab is cut out to perform defect detection and tab count. This solution reduces the problem that when the super-depth image contains a highly reflective area, the defect information of the area may be missing, and the adjacent tab line features become weak, which ultimately causes defect detection failure and tab count errors.

[0131] See also Fig.14 The tab detection device 200 provided in the present application includes an image acquisition module 210, a weight determination module 220, an image processing module 230 and a tab detection module 240; the image acquisition module 210 is used to acquire a plurality of initial images of different depths of field ranges acquired by the image acquisition device for the tab, and at least some of the initial images correspond to different illumination angles; the weight determination module 220 is used to determine the weighted weights of at least some of the pixels in each initial image based on the image brightness information and image clarity information of at least some of the pixels in each initial image; the image processing module 230 is used to perform weighted fusion on each initial image using the weighted weights of at least some of the pixels in each initial image to obtain a super-depth image related to the tab. The tab detection module 240 is used to obtain the detection result about the tab according to the super-depth image.

[0132] In the above scheme, by supplementing the light at different angles on the pole ear and collecting initial images of the pole ear in different depth of field ranges, the areas where reflections may exist in the collected initial images can be different. Therefore, by determining the weighted weights of each initial image for each pixel according to the image brightness information and image clarity information of at least part of the pixels, and then using the weighted weights to perform weighted fusion on the initial images, the reflections in the fused super-depth-of-field image can be reduced to a great extent, thereby making the detection result of the pole ear obtained based on the super-depth-of-field image more accurate.

[0133] In some embodiments, the image acquisition module 210 is used to acquire multiple initial images of the pole ear with different depth of field ranges captured by the image acquisition device, including: controlling the image acquisition device to capture the initial image including the pole ear according to a preset exposure frequency, and the image acquisition device captures at least one initial image in each exposure time; controlling the fill light component to adjust the angle of the emitted light between two adjacent exposure times to fill light for the pole ear; controlling the focal length of the lens in the image acquisition device to adjust between two adjacent exposure times.

[0134] In the above scheme, the angle of the output light of the fill light component is controlled to be adjusted during the non-exposure time, so that the illumination angles of the initial images collected during adjacent exposure times are different, and the focal length of the lens is controlled to be adjusted during the non-exposure time, so that the depth of field ranges of at least some of the initial images among the multiple initial images collected according to the preset exposure frequency are different and the corresponding illumination angles are also different, so that the areas where reflective light may exist in different initial images will also be different, thereby greatly reducing the reflection in the fused super-depth of field image.

[0135] In some embodiments, the fill light component includes multiple fill light sources, each of which has a different light emission angle. The image acquisition module 210 controls the fill light component to adjust the light emission angle between two adjacent exposure times to fill light the pole ear, including: adjusting the state of at least one fill light source that was in a fill light state during the previous exposure time to an off state; and adjusting the state of at least one fill light source that was in an off state during the previous exposure time to a fill light state.

[0136] In the above solution, multiple fill light sources are arranged in the fill light assembly and the switching states of different fill light sources are adjusted in time, so that the reflective areas corresponding to the initial images collected when different fill light sources are turned on are different.

[0137] In some embodiments, the image acquisition module 210 is also used to: in response to the state of at least one fill light source that was in the fill light state during the previous exposure time having been adjusted to the off state, execute the step of adjusting the state of at least one fill light source that was in the off state during the previous exposure time to the fill light state after a preset waiting time.

[0138] In the above solution, after turning off some of the fill-in light sources and waiting for a period of time, turning on other fill-in light sources can reduce the power waste of turning on multiple light sources at the same time.

[0139] In some embodiments, the image acquisition module 210 controls the focal length of the lens in the image acquisition device to adjust between two adjacent exposure times, including: controlling the focal length of the lens in the image acquisition device to increase or decrease between two adjacent exposure times, and the focal length of the lens is different in different exposure times.

[0140] In the above scheme, by sequentially increasing or sequentially decreasing the focal length of the lens, compared with randomly adjusting the focal length of the lens, this scheme can make the focal length adjustment more orderly.

[0141] In some embodiments, the weight determination module 220 determines the weighted weights of at least some of the pixels in each initial image based on the image brightness information and image clarity information of at least some of the pixels in each initial image, including: for each pixel of at least some of the pixels: based on the image brightness information of the pixel in each initial image, determining a first weight value of the pixel in each initial image; and based on the image clarity information of the pixel in each initial image, determining a second weight value of the pixel in each initial image; the first weight value is negatively correlated with the image brightness information, and the second weight value is positively correlated with the image clarity information; based on the first weight value and the second weight value of the pixel in each initial image, determining the weighted weight of the pixel in the initial image.

[0142] In the above scheme, in the process of weight calculation for each pixel point in a single initial image, the first weight is determined according to the image brightness information and the second weight is determined according to the image gradient, and then the first weight and the second weight are weightedly fused to obtain the final weighted weight of the pixel point in the initial image. Compared with using image brightness information alone or gradient information alone, the weighted weight obtained by this scheme is more accurate.

[0143] In some embodiments, the weight determination module 220 determines the first weight value of the pixel point in each initial image based on the image brightness information of the pixel point in each initial image, including: taking the area where the highlighted pixel points in each initial image are located as the highlighted area in each initial image, and each highlighted pixel point is a pixel point whose pixel value is greater than or equal to a preset pixel value; for each pixel point in each initial image, in response to the pixel point being in the highlighted area in the initial image, determining that the first weight value of the pixel point in the initial image is a first preset value; in response to the pixel point not being in the highlighted area in the initial image, determining that the first weight value of the pixel point in the initial image is a second preset value, and the first preset value is less than the second preset value.

[0144] In the above scheme, by first determining the highlight area and the non-highlight area of ​​each initial image according to the image brightness information, different weights are set according to the highlight area and the non-highlight area, and the weight of the non-highlight area is greater than the weight of the highlight area, so that the interference of the highlight area can be reduced in the target image finally obtained by fusion.

[0145] In some embodiments, the weight determination module 220 determines the second weight value of the pixel point in each initial image based on the image clarity information of the pixel point in each initial image, including: determining the clear area in each initial image based on the image clarity information of each pixel point in each initial image; for each pixel point in each initial image, in response to the pixel point being in the clear area in the initial image, determining the second weight value of the pixel point in the initial image to be a third preset value; in response to the pixel point not being in the clear area, determining the second weight value of the pixel point in the initial image to be a fourth preset value; the third preset value is greater than the fourth preset value.

[0146] In the above scheme, by first determining the clear area and the unclear area of ​​each initial image according to the image brightness information, different weights are set according to the clear area and the unclear area, and the weight of the unclear area is smaller than the weight of the clear area, so that the interference of the unclear area can be reduced in the target image finally obtained by fusion.

[0147] In some embodiments, the weight determination module 220 determines the clear areas in each initial image based on the image clarity information of each pixel in each initial image, including: determining the image gradient of each pixel in each initial image; determining the boundary of the clear area based on the change of the image gradient of each pixel, the image gradient of each pixel in the clear area in each initial image is greater than the image gradient of each pixel in other areas of the initial image except the clear area; or, based on the image clarity information of each pixel in each initial image, determining the clear areas in each initial image, including: performing wavelet transform on each initial image to obtain multiple high-frequency spectrum images corresponding to each initial image; performing image fusion on multiple high-frequency spectrum images belonging to the same initial image to obtain fused images corresponding to each initial image; performing convolution on each fused image to obtain the clear area in each fused image; obtaining the position of each clear area in each initial image based on the position of each clear area in each fused image.

[0148] In the above scheme, the clearer the part of the image, the higher the image gradient, so the image gradient can be used to determine the clear area in the image. By performing wavelet transform on the image, multiple high-frequency spectrograms of the image can be obtained, but the high-frequency signal may not be extracted for the focused pixel points in the high-frequency spectrogram, so the high-frequency area can be expanded by first fusing the high-frequency spectrograms and then using convolution to obtain a more accurate clear area in the initial image.

[0149] In some embodiments, at least part of the pixels include pixels within the region of interest where the pole ear is located, and the weight determination module 220 is also used to: perform target detection on each initial image to obtain a region of interest including the pole ear; for the pixels within the region of interest, execute the step of determining the weighted weights of at least part of the pixels in each initial image based on the image brightness information and image clarity information of at least part of the pixels in each initial image; for other pixels except the region of interest, execute a preset weight determination method, which includes using the preset weight of each initial image as the weighted weight of each other pixel in each initial image, or, determining the weighted weight of each other pixel in each initial image based on the image brightness information and / or image clarity information of each other pixel in each initial image.

[0150] In the above scheme, each initial image is divided into regions and different regions are subjected to different weighted fusion methods, thereby improving the diversity of weighted fusion.

[0151] In some embodiments, the image processing module 230 uses the weighted weights of at least some pixels in each initial image to perform weighted fusion on each initial image to obtain a super depth of field image related to the pole ear, including: for each pixel, performing the following steps: multiplying the pixel value of the pixel in different initial images by the corresponding weighted weight to obtain multiple initial pixel values ​​of the pixel; adding the initial pixel values ​​of the pixel to obtain a candidate pixel value; using the ratio of the candidate pixel value to the sum of the weighted weights of the pixel in different initial images as the pixel value of the pixel in the super depth of field image.

[0152] In the above scheme, the pixel values ​​of each pixel point in each initial image are first fused according to the weighted weights, and then the cumulative value of the pixel value of each pixel point in each initial image is determined, and the ratio between the fused value and the cumulative value is used as the pixel value of the pixel point in the super depth of field image, so that for each pixel point, the normal pixel value and the pixel value in the presence of reflection can be fused, thereby reducing the interference of the reflection pixel value.

[0153] In some embodiments, the tab detection result includes a defect detection result and / or the number of layers of the tab. The tab detection module 240 obtains a detection result about the tab based on the super depth of field image, including: determining an area of ​​interest of the tab in the super depth of field image; determining a local image containing the area of ​​interest based on the area of ​​interest; performing defect detection and / or image segmentation and counting processing on the local image to obtain a defect detection result about the tab and / or the number of layers of the tab.

[0154] In the above solution, by first determining the region of interest of the tab in the super depth of field image, and then performing image analysis using the local image containing the region of interest, the efficiency of image analysis can be improved.

[0155] In some embodiments, the tab detection module 240 performs defect detection and / or image segmentation processing on a local image to obtain defect detection results regarding the tab and / or the number of tab layers, including: in response to the number of tab layers included in the tab segmentation map being less than a preset number of tab layers, determining that there is an error in the number of tabs; and adding the result of the error in the number of tabs to the defect detection result.

[0156] In the above scheme, if the number of pole lugs is detected to be incorrect, it can be considered that the pole lug has problems such as folding, and the conclusion that the number of pole lugs is incorrect can be added to the defect detection result to facilitate subsequent personnel to find the problem.

[0157] See also Fig.15 , Fig.15 4 is a schematic diagram of the structure of an embodiment of an electronic device of the present application. The electronic device 40 includes a memory 41 and a processor 42, and the processor 42 is used to execute program instructions stored in the memory 41 to implement the steps in any of the above-mentioned tab detection method embodiments. In a specific implementation scenario, the electronic device 40 may include but is not limited to: a monitoring device, a microcomputer, and a server. In addition, the electronic device 40 may also include a carrier device such as a laptop computer and a tablet computer, which is not limited here.

[0158] Specifically, the processor 42 is used to control itself and the memory 41 to implement the steps in any of the above-mentioned embodiments of the lug detection method. The processor 42 can also be called a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip with signal processing capabilities. The processor 42 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 42 can be implemented by an integrated circuit chip.

[0159] In the above scheme, by supplementing the light at different angles on the pole ear and collecting initial images of the pole ear in different depth of field ranges, the areas where reflections may exist in the collected initial images can be different. Therefore, by determining the weighted weights of each initial image for each pixel according to the image brightness information and image clarity information of at least part of the pixels, and then using the weighted weights to perform weighted fusion on the initial images, the reflections in the fused super-depth-of-field image can be reduced to a great extent, thereby making the detection result of the pole ear obtained based on the super-depth-of-field image more accurate.

[0160] See also Fig.16 The imaging system 10 provided in the present application includes the above-mentioned electronic device 40, a fill light component 20 and an image acquisition device 30. The electronic device 40 is connected to the fill light component 20 and is used to adjust the angle of the emitted light of the fill light component 20; the image acquisition device 30 includes a lens (not shown in the figure), and the electronic device 40 is connected to the image acquisition device 30 to adjust the focal length of the lens in the image acquisition device 30 and control the image acquisition device 30 to acquire multiple initial images with different depth of field ranges of the pole ears.

[0161] The position between the image acquisition device 30 and the fill light assembly 20 can refer to the above-mentioned embodiment of the tab detection method, for example, can refer to Figure 3 and Figure 4 The positional relationship between the electronic device 40 and the fill light assembly 20 is not limited, as long as the two establish a wired or wireless connection to transmit information. The positional relationship between the electronic device 40 and the image acquisition device 30 is not limited, as long as the two establish a wired or wireless connection to transmit information.

[0162] In the above scheme, by supplementing the ear with light at different angles and collecting initial images of the ear in different depths of field, the areas where reflections may exist in the collected initial images can be different. Therefore, by determining the weighted weights of each initial image for each pixel according to the image brightness information and image clarity information of at least part of the pixels, and then using the weighted weights to perform weighted fusion on the initial images, the reflections in the fused super-depth-of-field image can be reduced to a great extent.

[0163] See also Fig.17 , Fig.17 The computer-readable storage medium 50 stores program instructions 501, which implement the steps in any of the above-mentioned tab detection method embodiments when executed by a processor.

[0164] In the above scheme, by supplementing the light at different angles on the pole ear and collecting initial images of the pole ear in different depth of field ranges, the areas where reflections may exist in the collected initial images can be different. Therefore, by determining the weighted weights of each initial image for each pixel according to the image brightness information and image clarity information of at least part of the pixels, and then using the weighted weights to perform weighted fusion on the initial images, the reflections in the fused super-depth-of-field image can be reduced to a great extent, thereby making the detection result of the pole ear obtained based on the super-depth-of-field image more accurate.

[0165] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0166] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

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

[0168] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit. 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 part of the contribution 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 several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A method for detecting a tab, characterized in that: include: Acquire a plurality of initial images with different depths of field collected by an image acquisition device on the tab, wherein at least some of the initial images correspond to different illumination angles; Determining weights of at least some of the pixels in each of the initial images based on image brightness information and image definition information of at least some of the pixels in each of the initial images; Using the weighted weights of at least part of the pixels in each of the initial images, weighted fusion is performed on each of the initial images to obtain a super depth of field image related to the tab, wherein each pixel in the super depth of field image is obtained by weighted fusion using the pixel values ​​of the pixel points at corresponding positions in each of the initial images; Obtaining a detection result about the tab according to the super depth of field image; The acquisition device acquires a plurality of initial images of different depths of field of the tabs, including: Controlling the image acquisition device to acquire an initial image including the tab at a preset exposure frequency, wherein the image acquisition device acquires at least one initial image within each exposure time; Controlling the fill light component to adjust the angle of the emitted light between two adjacent exposure times to fill light for the tab, wherein the light source emitted by the fill light component at different angles of the emitted light directly irradiates different areas of the tab or has different incident angles on the same area so that at least part of the initial image corresponds to different illumination angles; The focal length of the lens in the image acquisition device is controlled to be adjusted between two adjacent exposure times.

2. The tab detection method according to claim 1, characterized in that: The fill light component includes a plurality of fill light sources, each of which has a different light emission angle. The control of the fill light component to adjust the light emission angle between two adjacent exposure times to fill light for the tab includes: Adjusting the state of at least one fill light source that was in a fill light state during the previous exposure time to a closed state; And, the state of at least one fill light source that is in an off state during the previous exposure time is adjusted to a fill light state.

3. The tab detection method according to claim 2, characterized in that: The tab detection method comprises: In response to the state of at least one fill light source in the fill light state in the previous exposure time being adjusted to the off state, the step of adjusting the state of at least one fill light source in the off state in the previous exposure time to the fill light state is performed after a preset waiting time.

4. The tab detection method according to any one of claims 1 to 3, characterized in that: The controlling the focal length of the lens in the image acquisition device to adjust between two adjacent exposure times comprises: The focal length of the lens in the image acquisition device is controlled to increase or decrease between two adjacent exposure times, and the focal length of the lens is different in different exposure times.

5. The tab detection method according to any one of claims 1 to 3, characterized in that: The determining, based on image brightness information and image definition information of at least some of the pixels in each of the initial images, weighted weights of the at least some of the pixels in each of the initial images comprises: For each of the at least some of the pixels: Based on the image brightness information of the pixel point in each of the initial images, determining a first weight value of the pixel point in each of the initial images; and based on the image definition information of the pixel point in each of the initial images, determining a second weight value of the pixel point in each of the initial images; the first weight value is negatively correlated with the image brightness information, and the second weight value is positively correlated with the image definition information; Based on the first weight value and the second weight value of each pixel point in the initial image, a weighted weight of the pixel point in the initial image is determined.

6. The tab detection method according to claim 5, characterized in that: The determining, based on the image brightness information of the pixel point in each of the initial images, a first weight value of the pixel point in each of the initial images comprises: The area where the highlighted pixel points in each of the initial images are located is taken as the highlighted area in each of the initial images, and each of the highlighted pixel points is a pixel point whose pixel value is greater than or equal to a preset pixel value; For each pixel of the initial image, in response to the pixel being in a highlighted area in the initial image, the first weight value of the pixel in the initial image is determined to be a first preset value; in response to the pixel not being in a highlighted area in the initial image, the first weight value of the pixel in the initial image is determined to be a second preset value, and the first preset value is smaller than the second preset value.

7. The tab detection method according to claim 5, characterized in that: The determining, based on the image definition information of the pixel point in each of the initial images, a second weight value of the pixel point in each of the initial images comprises: Based on the image clarity information of each pixel point in each of the initial images, respectively determine the clear area in each of the initial images; For each pixel point in each of the initial images, in response to the pixel point being in a clear area in the initial image, the second weight value of the pixel point in the initial image is determined to be a third preset value; in response to the pixel point not being in the clear area, the second weight value of the pixel point in the initial image is determined to be a fourth preset value; the third preset value is greater than the fourth preset value.

8. The tab detection method according to claim 7, characterized in that: The determining of clear areas in each of the initial images based on the image clarity information of each of the pixels in each of the initial images comprises: Determine the image gradient of each pixel point in each of the initial images; Determine the boundary of the clear area based on the image gradient change of each pixel point, the image gradient of each pixel point in the clear area in each of the initial images being greater than the image gradient of each pixel point in other areas of the initial image except the clear area; Or, the determining of the clear areas in each of the initial images based on the image clarity information of each of the pixels in each of the initial images respectively includes: Performing wavelet transform on each of the initial images respectively to obtain a plurality of high-frequency spectrum images corresponding to each of the initial images; Performing image fusion on a plurality of high-frequency spectrum images belonging to the same initial image to obtain fused images corresponding to the initial images; Convolving each of the fused images respectively to obtain a clear area in each of the fused images; Based on the position of each clear area in each fused image, the position of each clear area in each initial image is obtained.

9. The tab detection method according to any one of claims 1 to 3, characterized in that: The at least part of the pixel points include pixel points in the region of interest where the tab is located, and the tab detection method further includes: Performing target detection on each of the initial images to obtain a region of interest including the tab; For the pixel points within the region of interest, performing the step of determining the weighted weights of at least some of the pixel points in each of the initial images based on the image brightness information and image clarity information of at least some of the pixel points in each of the initial images; For other pixel points except those in the area of ​​interest, a preset weight determination method is performed, and the preset weight determination method includes using the preset weight of each of the initial images as the weighted weight of each of the other pixel points in each of the initial images, or, determining the weighted weight of each of the other pixel points in each of the initial images based on the image brightness information and / or image clarity information of each of the other pixel points in each of the initial images.

10. The tab detection method according to any one of claims 1 to 3, characterized in that: The step of using the weighted weights of at least part of the pixels in each of the initial images to perform weighted fusion on each of the initial images to obtain a super-depth image related to the tab includes: For each pixel, perform the following steps: Multiplying the pixel values ​​of the pixel point in different initial images by corresponding weighted weights to obtain a plurality of initial pixel values ​​of the pixel point; Adding the initial pixel values ​​of the pixel points to obtain a candidate pixel value; The ratio of the candidate pixel value to the sum of the weighted weights of the pixel point in different initial images is used as the pixel value of the pixel point in the super depth of field image.

11. The tab detection method according to any one of claims 1 to 3, characterized in that: The tab detection result includes a defect detection result and / or the number of tab layers. The detection result about the tab is obtained according to the super depth of field image, including: Determine a region of interest of the tab in the super depth of field image; Determining a local image including the region of interest based on the region of interest; Defect detection and / or image segmentation and counting processing are performed on the local image to obtain defect detection results on the tab and / or the number of layers of the tab.

12. The tab detection method according to claim 11, characterized in that: The performing defect detection and / or image segmentation processing on the local image to obtain a defect detection result on the tab and / or the number of layers of the tab includes: In response to the number of tab layers included in the tab segmentation diagram being less than a preset number of tab layers, determining that there is an error in the number of tabs; The result of the error in the number of tabs is added to the defect detection result.

13. A tab detection device, characterized in that: include: An image acquisition module, used to acquire a plurality of initial images with different depths of field collected by an image acquisition device on the tab, wherein at least some of the initial images correspond to different illumination angles; A weight determination module, configured to determine the weighted weights of at least some of the pixels in each of the initial images based on image brightness information and image definition information of at least some of the pixels in each of the initial images; An image processing module, used for performing weighted fusion on each of the initial images using the weighted weights of at least part of the pixels in each of the initial images to obtain a super depth of field image related to the tab, wherein each pixel in the super depth of field image is obtained by weighted fusion using the pixel values ​​of the pixel points at corresponding positions in each of the initial images; A tab detection module, used for obtaining a detection result about the tab according to the super depth of field image; The image acquisition module acquires a plurality of initial images of different depths of field ranges acquired by the image acquisition device on the tabs in the following manner: Controlling the image acquisition device to acquire an initial image including the tab at a preset exposure frequency, wherein the image acquisition device acquires at least one initial image within each exposure time; Controlling the fill light component to adjust the angle of the emitted light between two adjacent exposure times to fill light for the tab, wherein the light source emitted by the fill light component at different angles of the emitted light directly irradiates different areas of the tab or has different incident angles on the same area so that at least part of the initial image corresponds to different illumination angles; The focal length of the lens in the image acquisition device is controlled to be adjusted between two adjacent exposure times.

14. An electronic device, characterized in that: It comprises a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the tab detection method according to any one of claims 1 to 12.

15. An imaging system, characterized in that: The imaging system comprises: The electronic device as claimed in claim 14; A fill light component, the electronic device is connected to the fill light component and is used to adjust the angle of the emitted light of the fill light component; An image acquisition device includes a lens, and the electronic device is connected to the image acquisition device to adjust the focal length of the lens in the image acquisition device and control the image acquisition device to acquire multiple initial images of different depth of field ranges for the pole ear.

16. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the tab detection method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • High-dynamic-range image fusion method based on gradient and brightness information

    CN104881854A

  • Tab detection method and device and electronic equipment

    CN113376177A

  • Battery tab defect detection method and system and electronic equipment

    CN117538329A