Battery image processing method, battery detection method and device

By performing noise reduction, filtering, linear stretching and histogram equalization on the battery image, the problem of low battery image quality in the prior art is solved, and higher detection accuracy and contrast are achieved.

CN119444644APending Publication Date: 2025-02-14CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310972413.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

In the prior art, the image quality of the battery image detection is not high, which makes it difficult for the accuracy of the detection results to meet the requirements.

Method used

By performing noise reduction, filtering, linear stretching and histogram equalization on the original image of multi-frame sequence, the battery detection image is obtained, which enhances the contrast of the image and highlights local details.

Benefits of technology

The contrast and visual quality of the battery image are improved, the defect characteristics of the battery are clearly visible, and the accuracy of the detection results are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444644A_ABST
    Figure CN119444644A_ABST
Patent Text Reader

Abstract

The invention provides a battery image processing method and device and a battery detection method and device, and belongs to the technical field of batteries. The image processing method comprises the following steps: obtaining a multi-frame sequence original image, and carrying out noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; wherein the multi-frame sequence original images are multi-frame images continuously shot within a preset time; performing filtering processing on the single-frame original image to obtain a first processed image; performing linear stretching on gray values of pixel points in the first processing image to obtain a second processing image; and performing histogram equalization on the gray values of the pixel points in the second processing image to obtain a battery detection image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of battery technology, and in particular to a battery image processing method, a battery detection method and a battery detection device. Background Art

[0002] Energy conservation and emission reduction are the key to the sustainable development of the automobile industry. Electric vehicles have become an important part of the sustainable development of the automobile industry due to their advantages in energy conservation and environmental protection. For electric vehicles, battery technology is an important factor in their development.

[0003] During the production process of batteries, it is necessary to perform defect detection on the batteries. In the related art, battery images can be used to perform non-destructive testing on the batteries. Although this can achieve non-destructive testing, the quality of the detection images is not high, making it difficult for the accuracy of the detection results to meet the requirements. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems in the background technology. To this end, one object of the present application is to provide a battery image processing method, a battery detection method and a device to improve the quality of the image.

[0005] An embodiment of the first aspect of the present application provides a battery image processing method, including: obtaining a multi-frame sequence original image, and performing noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; wherein the multi-frame sequence original image is a multi-frame image continuously shot within a preset time; filtering the single-frame original image to obtain a first processed image; linearly stretching the grayscale values ​​of pixels in the first processed image to obtain a second processed image; and performing histogram equalization on the grayscale values ​​of pixels in the second processed image to obtain a battery detection image.

[0006] In the technical solution of the embodiment of the present application, a single-frame original image is obtained by performing noise reduction processing on the acquired multi-frame sequence original image, and the single-frame original image is filtered to filter out electronic noise and interference in the image, and then the grayscale values ​​of the pixels in the image are linearly stretched, and finally the grayscale values ​​of the pixels in the image are histogram-equalized to obtain a battery detection image, thereby enhancing the contrast of the image. The image processing algorithm is used to improve the contrast of the battery image, and at the same time, the battery image is enhanced to highlight the local details in the battery image, thereby significantly improving the visual quality of the battery image, and making the defect characteristics of the battery clearly visible.

[0007] In some embodiments, filtering a single-frame original image to obtain a first processed image includes: determining a normal grayscale range of the single-frame original image; determining a noise position in the single-frame original image based on the grayscale value of the pixel points in the single-frame original image and the normal grayscale range; and setting the grayscale value of the noise position to a preset grayscale value. Determining the noise position in the single-frame original image based on the grayscale value of the pixel points in the single-frame image and the normal grayscale value range and setting the grayscale value of the noise position to a preset grayscale value can simplify the process of determining the noise position and more quickly identify the noise position in the subsequent battery image processing process, thereby improving the efficiency of processing the battery image.

[0008] In some embodiments, determining the normal grayscale range of a single-frame original image includes: selecting an area of ​​interest of the single-frame original image; wherein the area of ​​interest includes a plurality of pixels; calculating a histogram distribution of grayscale values ​​of the pixels in the area of ​​interest; and determining the normal grayscale range of the single-frame original image according to the histogram distribution. By selecting an area of ​​interest of a single-frame image and determining the normal grayscale range of the single-frame image according to the calculated histogram distribution of grayscale values ​​of the pixels in the area of ​​interest, the determined normal grayscale range can be made more accurate.

[0009] In some embodiments, determining the noise position in the single-frame original image according to the grayscale value of the pixel in the single-frame original image and the normal grayscale range includes: in response to the grayscale value of the pixel exceeding the normal grayscale range, determining the pixel as the noise position. When the grayscale value of the pixel exceeds the normal grayscale value range, the pixel can be determined as the noise position, that is, the noise position can be determined by comparing the grayscale value, which further simplifies the process of determining the noise position.

[0010] In some embodiments, filtering a single-frame original image to obtain a first processed image further includes: traversing the pixels in the single-frame original image, establishing a first local window for any pixel, the first local window including a plurality of pixels adjacent to the pixel; performing median filtering on the grayscale values ​​of the pixels in the first local window to obtain the first processed image. By establishing a first local window for any pixel and performing median filtering on the grayscale values ​​of the pixels in the first local window, the local contrast of the battery image is enhanced. At the same time, the median filter is simple and has a small amount of calculation, which is conducive to the real-time application of the battery image processing method.

[0011] In some embodiments, linearly stretching the grayscale values ​​of pixels in the first processed image to obtain the second processed image includes: traversing the pixels in the first processed image, establishing a second local window for any pixel, the second local window including a plurality of pixels adjacent to the pixel; linearly stretching the grayscale values ​​of the pixels in the second local window to obtain the second processed image. By establishing a second local window for any pixel and linearly stretching the grayscale values ​​of the pixels in the second local window to process the first processed image, the image details can be further enhanced, thereby further improving the display quality of the image.

[0012] In some embodiments, linearly stretching the grayscale values ​​of the pixels in the second local window to obtain the second processed image includes: arranging a plurality of pixels in the second local window along a row direction and a column direction, and performing bidirectional linear stretching on the grayscale values ​​of the pixels in the second local window to obtain the second processed image. By performing bidirectional linear stretching on the grayscale values ​​of the pixels in the second local window, the image contrast can be enhanced while also improving the efficiency of battery image processing.

[0013] In some embodiments, performing histogram equalization on the grayscale values ​​of the pixels in the second processed image to obtain a battery detection image includes: dividing the second processed image into multiple sub-images, performing histogram equalization on the multiple sub-images respectively, and obtaining a battery detection image. The second processed image is segmented to obtain multiple sub-images, and each sub-image is enhanced by histogram equalization respectively, and then the sub-images after histogram equalization are spliced ​​and fused into a final histogram-equalized battery detection image. In this way, when performing histogram equalization, multiple sub-images can be processed in parallel, and then the image is fused, which greatly speeds up the image processing speed. Moreover, for the enhancement of the second processed image of multiple targets, since the image is segmented, the targets in each image area are histogram-equalized in a larger range, and the details of the image can be better displayed.

[0014] In some embodiments, performing histogram equalization on multiple sub-images to obtain a battery detection image includes: arranging the pixels in the sub-images along the row direction and the column direction, and performing bidirectional histogram equalization on the grayscale values ​​of the pixels in the sub-images to obtain the battery detection image. By performing bidirectional histogram equalization on the grayscale values ​​of the pixels in the sub-images, the efficiency of battery image processing can be further improved while satisfying the image enhancement effect.

[0015] In some embodiments, obtaining a multi-frame sequence of original images, and performing noise reduction processing on the multi-frame sequence of original images to obtain a single-frame original image includes: judging whether there is electronic noise in the pixel according to multiple grayscale values ​​corresponding to any pixel at the same position in the multi-frame sequence of original images; and determining the grayscale value of the pixel corresponding to the single-frame original image according to the judgment result. Judging whether there is electronic noise in the pixel according to multiple grayscale values ​​corresponding to any pixel at the same position in the multi-frame sequence of original images, and determining the grayscale value of the pixel corresponding to the single-frame original image according to the judgment result, can improve the accuracy of the grayscale value of each pixel in the single-frame original image.

[0016] In some embodiments, judging whether electronic noise exists in a pixel point according to multiple grayscale values ​​corresponding to any pixel point at the same position in the multi-frame sequence original image includes: calculating the standard deviation of the grayscale value of the pixel point according to the multiple grayscale values ​​corresponding to any pixel point at the same position in the multi-frame sequence original image; and judging whether electronic noise exists in the pixel point in response to the standard deviation of the grayscale value of the pixel point being greater than a preset threshold. Judging whether electronic noise exists in a pixel point by comparing the standard deviation of the grayscale value of the pixel point calculated from the multiple grayscale values ​​corresponding to any pixel point at the same position in the multi-frame sequence original image with a preset threshold can make the process of judging whether electronic noise exists in a pixel point simpler, thereby improving the efficiency of processing battery images.

[0017] In some embodiments, according to the judgment result, determining the grayscale value of the pixel corresponding to the single-frame original image includes: in response to the presence of electronic noise in the pixel, performing clustering operations on the multiple grayscale values ​​of the pixel corresponding to the multiple-frame sequence original image, and marking the multiple grayscale values ​​as normal or abnormal according to the result of the clustering operation, calculating the average value of the grayscale values ​​marked as normal in the multiple grayscale values ​​and using it as the grayscale value of the corresponding pixel in the single-frame original image. The clustering operation can effectively separate the normal grayscale value from the abnormal grayscale value, and calculating the average value of the normal grayscale value in the multiple grayscale values ​​as the grayscale value of the corresponding pixel in the single-frame original image. The grayscale value of the corresponding pixel in the single-frame original image can make the grayscale value of the corresponding pixel in the single-frame original image more accurate, thereby improving the effect of battery image processing.

[0018] In some embodiments, according to the judgment result, determining the grayscale value of the pixel corresponding to the single-frame original image includes: in response to the absence of electronic noise at the pixel, calculating the average of multiple grayscale values ​​of the pixel corresponding to the multiple-frame sequence original images and using the average of the grayscale value of the corresponding pixel in the single-frame original image. By calculating the average of multiple grayscale values ​​of the pixel corresponding to the multiple-frame sequence original images and using the average of the grayscale value of the corresponding pixel in the single-frame original image, the grayscale value of the corresponding pixel in the single-frame original image can be made more accurate.

[0019] An embodiment of the second aspect of the present application provides a battery detection method, the method comprising: acquiring an image of a battery, the image comprising a multi-frame sequence of original images; processing the multi-frame sequence of original images using the battery image processing method of the aforementioned embodiment to obtain a battery detection image; and determining a battery detection result based on the battery detection image.

[0020] In some embodiments, the battery detection method further includes: in response to the battery detection result indicating that the battery is unqualified, removing the unqualified battery. The battery production method is suitable for large-scale batch production detection, and can prevent defective batteries from entering the market to a certain extent.

[0021] The embodiment of the third aspect of the present application provides a battery image processing device, which includes: an acquisition module, a noise reduction module, a first processing module, a second processing module, and a third processing module. The acquisition module is configured to acquire a multi-frame sequence original image, wherein the multi-frame sequence original image is a multi-frame image continuously shot within a preset time; the noise reduction module is configured to perform noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; the first processing module is configured to perform filtering processing on the single-frame original image to obtain a first processed image; the second processing module is configured to perform linear stretching on the grayscale values ​​of the pixels in the first processed image to obtain a second processed image; the third processing module performs histogram equalization on the grayscale values ​​of the pixels in the second processed image to obtain a battery detection image.

[0022] The fourth aspect of the present application provides a battery detection device, which includes: an image acquisition module, an image processing module and a detection module. The image acquisition module is configured to acquire an image of the battery, the image including a multi-frame sequence of original images; the image processing module is configured to process the multi-frame sequence of original images using the battery image processing method of the aforementioned embodiment to obtain a battery detection image; the detection module is configured to determine the battery detection result based on the battery detection image.

[0023] An embodiment of the fifth aspect of the present application provides an electronic device, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the battery image processing method in the above-mentioned embodiment or the battery detection method in the above-mentioned embodiment.

[0024] An embodiment of the sixth aspect of the present application provides a battery production device, characterized in that it includes the electronic device in the above embodiment.

[0025] An embodiment of the seventh aspect of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the battery image processing method in the above embodiment or the battery detection method in the above embodiment.

[0026] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.

[0028] Figure 1 A flowchart of a battery image processing method according to some embodiments of the present application;

[0029] Figure 2 A schematic diagram of a battery image of some embodiments of the present application;

[0030] Figure 3 A grayscale schematic diagram of a local area of ​​a battery image in some embodiments of the present application;

[0031] Figure 4 A schematic diagram of a battery detection image according to some embodiments of the present application;

[0032] Figure 5 A schematic diagram of grayscale of a local area of ​​a battery detection image in some embodiments of the present application;

[0033] Figure 6 A flowchart of a battery detection method according to some embodiments of the present application;

[0034] Figure 7 A block diagram of a battery image processing device according to some embodiments of the present application;

[0035] Figure 8 A block diagram of a battery detection device according to some embodiments of the present application;

[0036] Fig. 9 Flowchart of a battery image detection method according to some other embodiments of the present application. DETAILED DESCRIPTION

[0037] The following embodiments of the technical solution of the present application are described in detail in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.

[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.

[0039] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.

[0040] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0041] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the 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 associated objects before and after are in an "or" relationship.

[0042] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0043] In the description of the embodiments of the present application, the technical terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the embodiments of the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the embodiments of the present application.

[0044] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.

[0045] At present, from the perspective of market development, the application of power batteries is becoming more and more extensive. Power batteries are not only used in energy storage power systems such as hydropower, thermal power, wind power and solar power stations, but also widely used in electric vehicles such as electric bicycles, electric motorcycles, electric cars, as well as military equipment and aerospace and other fields. With the continuous expansion of the application field of power batteries, the market demand is also constantly expanding.

[0046] The battery consists of one or more cells. The production process of the battery includes coating of the electrode, winding of the cell, shelling and injection of the cell, etc. Various defects may occur in the production process of the battery, such as wrinkled electrode, folded head, cracked electrode and overlapped electrode, etc. These defects will affect the quality and safety of the battery. Therefore, it is of great significance to detect battery defects.

[0047] In some inspection scenarios, the defects of the battery can be detected by using a radiation source and a detector. The radiation emitted by the radiation source passes through the battery and forms an image on the detector. Battery defects (such as wrinkled poles, folded heads, cracked poles, and overlapping poles) will cause different thicknesses of radiation penetration and different degrees of radiation attenuation. Therefore, the defects of the battery will be displayed in the form of grayscale differences on the battery inspection image.

[0048] However, since the thickness variation of a single-layer electrode (about 100um) is too small compared to the thickness of the entire battery cell (about 32mm), the radiation absorption is also very small, resulting in very small imaging contrast at the edge of the defective area of ​​the battery on the flat-panel detector. The battery defects may not be detected, which will affect the accuracy of battery defect detection and result in a low accuracy rate in the battery defect detection results.

[0049] In view of the above problems, the present invention proposes a battery image processing method, a battery detection method and a device, which process the battery image into a recognizable state, and then detect the battery image to complete the battery defect detection.

[0050] The battery image processing method disclosed in the embodiment of the present disclosure can be applied to, but not limited to, battery defect detection, and can also be applied to the production process of batteries. The battery image processing method of the present application can improve the contrast of the battery image and highlight the local details in the battery image by performing noise reduction, filtering, linear stretching and histogram equalization on the acquired multi-frame sequence original image, thereby significantly improving the intuitive visual quality of the battery image and making the defect characteristics of the battery clearly visible.

[0051] Figure 1 Flowchart of a battery image processing method according to some embodiments of the present application. Figure 1 As shown, the battery image processing method 100 includes:

[0052] Step S110: obtaining a multi-frame sequence original image, and performing noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; wherein the multi-frame sequence original image is a multi-frame image continuously shot within a preset time.

[0053] Step S120: filter the single frame original image to obtain a first processed image.

[0054] Step S130: linearly stretching the grayscale values ​​of the pixels in the first processed image to obtain a second processed image.

[0055] Step S140: performing histogram equalization on the grayscale values ​​of the pixels in the second processed image to obtain a battery detection image.

[0056] In the embodiments of the present application, Figure 2 Schematic diagram of battery images of some embodiments of the present application, Figure 3 A grayscale schematic diagram of a local area of ​​a battery image in some embodiments of the present application, such as Figure 2 As shown in Figure 2, the grayscale values ​​of each area in the battery image are close, and the location of the battery defect cannot be identified. Figure 3 As shown, the grayscale value of the defect position 301 on the battery electrode sheet ranges from 32300 to 32500, and the maximum difference in grayscale value is only 200, so it is difficult to easily distinguish and identify in the image.

[0057] In an embodiment of the present application, a multi-frame sequence original image can be obtained by a ray source and a flat-panel detector. The ray emitted by the ray source is projected to the flat-panel detector through the detection object, and the flat-panel detector obtains an image based on the received ray. The image can be continuously acquired at a preset frequency, and multiple frames of images can be continuously acquired within a preset time. The continuously acquired multiple frames of images can be used as the multi-frame sequence original image. In an embodiment of the present application, the preset time can be determined according to the number of multi-frame sequence original images to be acquired and the frequency of acquiring images.

[0058] It is understandable that due to the jitter of the image acquisition device during the image acquisition process, the first few frames of images acquired continuously may not be completely aligned, and image offset or afterimage may occur. Therefore, the first few frames of images can be discarded.

[0059] In an embodiment of the present application, the shape, size, and number of pixels contained in each frame image in the multi-frame sequence original image are all the same. In the process of acquiring the multi-frame sequence original image, electronic noise may exist in the multi-frame sequence original image due to the influence of equipment or environmental factors. The grayscale value of the pixel point where electronic noise exists in the multi-frame sequence original image will be abnormal, and the grayscale value of the pixel point will be too large or too small. In order to achieve a better effect of image processing, the multi-frame sequence original image can be subjected to noise reduction processing. The method of performing noise reduction processing on the multi-frame sequence original image can be to filter each frame image in the multi-frame sequence original image, or to perform noise reduction processing on the multi-frame sequence original image at the same time based on the grayscale value of the pixel point in each frame image in the multi-frame sequence original image.

[0060] In the embodiment of the present application, the shape, size and number of pixels of the single-frame original image are the same as the shape, size and number of pixels of each frame image in the multi-frame sequence original image. The grayscale values ​​of the corresponding pixels of the single-frame original image can be determined according to the multiple grayscale values ​​of the multi-frame sequence original image after the multi-frame sequence original image is subjected to noise reduction processing to obtain the single-frame original image, thereby reducing the influence of electronic noise.

[0061] In an embodiment of the present application, a single-frame original image may include battery defects. In addition, the single-frame original image also includes some random noise, which makes the defect characteristics of the battery less obvious. By filtering the single-frame original image, the defect characteristics of the battery pole piece can be enhanced, that is, the defect characteristics of the battery in the first processed image are more obvious than the single-frame original image.

[0062] In the embodiment of the present application, the grayscale values ​​of the pixels in the first processed image are linearly stretched, and the grayscale value distribution of the pixels in the first processed image can be mapped to the entire grayscale range, thereby enhancing the contrast of the first processed image and obtaining the second processed image.

[0063] In an embodiment of the present application, the grayscale value probability density distribution of the pixels in the second processed image can be adjusted by histogram equalization, so that the grayscale values ​​of the pixels in the second processed image not only have a relatively balanced grayscale probability density distribution, but also adjust the dynamic range of the grayscale values ​​of the pixels in the second processed image, expand the grayscale difference of the grayscale values ​​of the pixels in the second processed image, improve the grayscale values ​​of the pixels in the second processed image, and move the grayscale values ​​of the pixels in the second processed image from a lower grayscale value to a higher distribution range. The grayscale values ​​of the pixels in the second processed image can be converted from a relatively concentrated grayscale interval to a uniform distribution within the entire grayscale range, thereby effectively enhancing the contrast of the second processed image and obtaining a battery detection image. Performing histogram equalization on the grayscale values ​​of the pixels in the second processed image can enhance the contrast of the image and obtain a battery detection image.

[0064] In the embodiments of the present application, Figure 4 Schematic diagram of battery detection images of some embodiments of the present application, Figure 5 This is a grayscale schematic diagram of a local area of ​​a battery detection image in some embodiments of the present application, such as Figure 4 and Figure 5 As shown, the defect position 501 in the battery inspection image is the area where the pole piece fragments are located. The grayscale value of the defect position 501 ranges from 10000 to 50000, and the maximum difference in grayscale value is 40000. Compared with the image before processing, the grayscale value range of the defect position is significantly increased, and the battery defects can be clearly identified in the battery inspection image.

[0065] According to the embodiment of the present application, a single-frame original image is obtained by performing noise reduction processing on the acquired multi-frame sequence original image, and the single-frame original image is filtered to filter out electronic noise and interference in the image, and then the grayscale values ​​of the pixels in the image are linearly stretched, and finally the grayscale values ​​of the pixels in the image are histogram-equalized to obtain a battery detection image, thereby enhancing the contrast of the image. The image processing algorithm is used to improve the contrast of the battery image, and at the same time, the battery image is enhanced to highlight the local details in the battery image, thereby significantly improving the visual quality of the battery image, and making the defect characteristics of the battery clearly visible.

[0066] According to some embodiments of the present application, filtering is performed on a single-frame original image to obtain a first processed image, including: determining a normal grayscale range of the single-frame original image; determining a noise position in the single-frame original image based on the grayscale values ​​of pixels in the single-frame original image and the normal grayscale range; and setting the grayscale value of the noise position to a preset grayscale value.

[0067] In the embodiment of the present application, the normal grayscale value range of a single-frame image includes the maximum value of the normal grayscale value of the single-frame image and the minimum value of the normal grayscale value of the single-frame image. The grayscale value range of a single-frame image can be obtained by statistically analyzing the grayscale values ​​of the single-frame image, but at this time, the grayscale values ​​of the single-frame image may include the grayscale values ​​of bad pixels in the single-frame original image. The pixels with the largest grayscale value and the pixels with the smallest grayscale value are most likely to be bad pixels. Therefore, the grayscale value range of the single-frame image with the maximum grayscale value and the minimum grayscale value removed can be determined as the normal grayscale value range of the single-frame image; the normal grayscale value range of the single-frame image can also be determined by multiplying the grayscale value range of the single-frame image by a preset ratio.

[0068] In the embodiment of the present application, when the grayscale value of a pixel exceeds the normal grayscale value range of a single-frame image, the pixel can be determined to be a noise position in the single-frame original image. In order to better identify noise in the subsequent steps of the battery image processing method, the grayscale value of the noise position can be set to a preset grayscale value. For example, when the battery image is a 16-bit image, the grayscale value of the noise position can be set to 0 or 65535.

[0069] In an embodiment of the present application, the noise position in the single-frame original image is determined based on the grayscale value of the pixel points in the single-frame image and the normal grayscale value range, and the grayscale value of the noise position is set to a preset grayscale value. This can make the process of determining the noise position simpler, and the noise position can be identified more quickly in the subsequent battery image processing process, thereby improving the efficiency of battery image processing.

[0070] According to some embodiments of the present application, determining the normal grayscale range of a single-frame original image includes: selecting a region of interest of the single-frame original image; wherein the region of interest includes multiple pixels; calculating the histogram distribution of the grayscale values ​​of the pixels in the region of interest; and determining the normal grayscale range of the single-frame original image based on the histogram distribution.

[0071] In the embodiment of the present application, for example, the probability of bad pixels appearing in the central area of ​​a single-frame image is generally low, and the central area of ​​the single-frame image can be selected as the region of interest of the single-frame image. Since the region of interest of the single-frame image is selected to determine the normal grayscale range of the single-frame image, the region of interest needs to include multiple pixels, and the specific number of pixels is not specifically limited in the embodiment of the present application.

[0072] In the embodiment of the present application, the histogram of the grayscale value of a pixel is to count the grayscale values ​​of all pixels in the image according to the size of the grayscale value and calculate the probability of their occurrence. The histogram of the grayscale value of a pixel is a function of the grayscale level, which can represent the number of pixels with a certain grayscale value in the image and reflect the probability of a certain grayscale value appearing in the image. The normal grayscale range of a single frame image can be determined based on the histogram distribution of the grayscale values ​​of the pixels in the region of interest.

[0073] In an embodiment of the present application, by selecting a region of interest of a single frame image and determining the normal grayscale range of the single frame image based on the calculated histogram distribution of the grayscale values ​​of the pixels in the region of interest, the determined normal grayscale range can be made more accurate.

[0074] According to some embodiments of the present application, determining the noise position in a single-frame original image based on the grayscale value of the pixel in the single-frame original image and the normal grayscale range includes: in response to the grayscale value of the pixel exceeding the normal grayscale range, determining the pixel as a noise position.

[0075] In an embodiment of the present application, the grayscale value of the pixel exceeds the normal grayscale range of a single-frame image, including the grayscale value of the pixel being greater than the maximum value of the normal grayscale value of a single-frame image or less than the minimum value of the normal grayscale value of a single-frame image.

[0076] In the embodiment of the present application, when the grayscale value of a pixel point exceeds the normal grayscale value range, the pixel point can be determined as a noise position, that is, the noise position can be determined by comparing the grayscale values, which further simplifies the process of determining the noise position.

[0077] According to some embodiments of the present application, filtering a single-frame original image to obtain a first processed image also includes: traversing the pixel points in the single-frame original image, establishing a first local window for any pixel point, the first local window including multiple pixel points adjacent to the pixel point; performing median filtering on the grayscale values ​​of the pixel points in the first local window to obtain the first processed image.

[0078] In the embodiment of the present application, the median filtering algorithm is to sort the grayscale values ​​of pixels in the neighborhood, and then select the middle value of the group of data as the output pixel value. Because it is simple and practical, and can play a good role in eliminating noise, it has been widely used in many fields.

[0079] In the embodiment of the present application, the size of the first local window can be selected to be any size. The larger the size, the stronger the denoising ability, but the more serious the blurring of the original image will be. In other words, if the size of the first local window is too small, the denoising effect is not good enough; if the size of the first local window is too large, more image details will be lost due to too many pixels involved in the calculation, resulting in image blur. The size of the first local window can be selected according to the size of the defect in the image, and the embodiment of the present application is not limited. For example, the size of the first local window can be 5×5.

[0080] In the embodiment of the present application, a first local window is established for any pixel point, and the grayscale value of the pixel point in the first local window is subjected to median filtering, thereby enhancing the local contrast of the battery image. Meanwhile, median filtering is simple and requires little calculation, which is conducive to the real-time application of the battery image processing method.

[0081] According to some embodiments of the present application, linearly stretching the grayscale values ​​of pixels in a first processed image to obtain a second processed image includes: traversing the pixels in the first processed image, establishing a second local window for any pixel, the second local window including multiple pixels adjacent to the pixel; linearly stretching the grayscale values ​​of pixels in the second local window to obtain the second processed image.

[0082] In the embodiment of the present application, for the linear stretching of the grayscale value of the pixel, the typical transformation formula of the grayscale value of each pixel is: the grayscale value of the new pixel = the maximum grayscale value × (the grayscale value of the original pixel - the grayscale value of the minimum pixel) / (the grayscale value of the maximum pixel - the grayscale value of the minimum pixel). Although the grayscale value distribution of the pixels of the original image may be biased towards a certain grayscale interval, through the transformation of the above formula, all grayscale values ​​of an image will be distributed within the entire grayscale value range.

[0083] In the embodiment of the present application, by establishing a second local window for any pixel point and linearly stretching the grayscale value of the pixel point in the second local window, the local features of the image in the second local window can be enhanced to highlight the image details. Based on the same processing method, the first processed image is traversed to complete the processing of the first processed image.

[0084] In an embodiment of the present application, by establishing a second local window for any pixel point and processing the first processed image by linearly stretching the grayscale value of the pixel point in the second local window, the image details can be further enhanced, thereby further improving the display quality of the image.

[0085] According to some embodiments of the present application, linearly stretching the grayscale values ​​of pixels in the second local window to obtain a second processed image includes: arranging multiple pixels in the second local window along row and column directions, and bidirectionally linearly stretching the grayscale values ​​of pixels in the second local window to obtain the second processed image.

[0086] In the embodiment of the present application, the sub-image includes a plurality of pixels arranged along the row direction and a plurality of pixels arranged along the column direction. When linear stretching is performed on the sub-image, linear stretching is performed simultaneously based on the plurality of pixels arranged along the row direction and the plurality of pixels arranged along the column direction contained in the second local window, that is, bidirectional histogram equalization is performed on the grayscale values ​​of the pixels in the second local window.

[0087] Exemplarily, when the size of the second local window is 2×2, linear stretching is performed based on 4 pixels simultaneously.

[0088] In the embodiment of the present application, by performing bidirectional linear stretching on the grayscale values ​​of the pixels in the second local window, the image contrast can be enhanced while also improving the efficiency of battery image processing.

[0089] According to some embodiments of the present application, performing histogram equalization on the grayscale values ​​of pixels in the second processed image to obtain a battery detection image includes: dividing the second processed image into multiple sub-images, and performing histogram equalization on the multiple sub-images to obtain the battery detection image.

[0090] In an embodiment of the present application, the second processed image can be divided into a plurality of sub-images, and the number of sub-images divided can be determined according to the complexity of the second processed image. The second processed image can be divided into uniform and regular divisions, that is, the size and / or shape of each sub-image can be the same or conform to a certain regularity. The second processed image can also be divided into non-uniform divisions, that is, the size and / or shape of each sub-image can be different or irregular. For example, the second processed image can be divided into sub-images of different sizes and / or shapes according to the different complexities of the various parts of the second processed image.

[0091] In the embodiment of the present application, each sub-image may be subjected to histogram equalization. Histogram equalization is to stretch the grayscale of the image from a narrow grayscale range to a wider grayscale range. The sub-images subjected to histogram equalization are spliced ​​so that the sub-images subjected to histogram equalization are re-fused to obtain a battery detection image.

[0092] In the embodiment of the present application, the second processed image is segmented to obtain multiple sub-images, and each sub-image is enhanced by histogram equalization, and then the sub-images after histogram equalization are spliced ​​and fused into a final histogram-equalized battery detection image. In this way, when performing histogram equalization, multiple sub-images can be processed in parallel, and then the image is fused, which greatly speeds up the image processing speed. Moreover, for the second processed image enhancement of multiple targets, since the image is segmented and the targets in each image area are histogram-equalized within a larger range, the details of the image can be better displayed.

[0093] According to some embodiments of the present application, performing histogram equalization on multiple sub-images to obtain a battery detection image includes: arranging multiple pixel points in the sub-image along the row direction and the column direction respectively, and performing bidirectional histogram equalization on the grayscale values ​​of the pixel points in the sub-image to obtain the battery detection image.

[0094] In the embodiment of the present application, the sub-image includes a plurality of pixels arranged along the row direction and a plurality of pixels arranged along the column direction. When performing histogram equalization on the sub-image, histogram equalization is performed simultaneously based on the plurality of pixels arranged along the row direction and the plurality of pixels arranged along the column direction contained in the histogram, that is, bidirectional histogram equalization is performed on the grayscale values ​​of the pixels in the sub-image.

[0095] Exemplarily, when the size of the sub-image is 50×50, histogram equalization is performed based on 2500 pixels at the same time.

[0096] In the embodiment of the present application, by performing bidirectional histogram equalization on the grayscale values ​​of the pixels in the sub-image, the efficiency of battery image processing can be further improved while satisfying the image enhancement effect.

[0097] According to some embodiments of the present application, a multi-frame sequence original image is obtained, and a single-frame original image is obtained after noise reduction processing is performed on the multi-frame sequence original image, including: judging whether there is electronic noise at a pixel point based on multiple grayscale values ​​corresponding to any pixel point at the same position in the multi-frame sequence original image; and determining the grayscale value of the pixel point corresponding to the single-frame original image based on the judgment result.

[0098] In the embodiment of the present application, the shape, size, and number of pixels contained in each frame image in the multi-frame sequence original image are all the same. Since the multi-frame sequence original image is a multi-frame image continuously acquired within a preset time, in theory, the grayscale values ​​corresponding to the pixels at the same position in each frame image should be the same or similar. That is to say, the multiple grayscale values ​​corresponding to the pixels at the same position in the multi-frame sequence original image should be the same or similar, and when the pixel has interference such as electronic noise, the grayscale value corresponding to the pixel may mutate. Therefore, it is possible to determine whether the pixel has electronic noise based on the multiple grayscale values ​​corresponding to any pixel at the same position in the multi-frame sequence original image. Specifically, the grayscale value corresponding to the pixel at any position of any image can be compared with the grayscale value at the same position of other images. If the grayscale value corresponding to the pixel at any position of the image is different from the grayscale value at the same position of other images, the pixel of the image may have electronic noise. It is also possible to calculate the standard deviation of the pixel based on the multiple grayscale values ​​corresponding to the pixel at the same position in the multi-frame sequence original image to determine whether the pixel has electronic noise.

[0099] In the embodiment of the present application, the judgment result includes the presence of electronic noise in the pixel and the absence of electronic noise in the pixel. When electronic noise exists in the pixel, the gray value of the corresponding pixel in the single-frame original image can be determined according to the normal gray value among the multiple gray values ​​corresponding to the pixel at the same position in the multi-frame sequence original image. When electronic noise does not exist in the pixel, the gray value of the corresponding pixel in the single-frame original image can be determined according to the multiple gray values ​​corresponding to the pixel at the same position in the multi-frame sequence original image.

[0100] In an embodiment of the present application, by using multiple grayscale values ​​corresponding to any pixel at the same position in a multi-frame sequence original image, it is determined whether there is electronic noise at the pixel, and the grayscale value of the pixel corresponding to the single-frame original image is determined based on the judgment result, thereby improving the accuracy of the grayscale value of each pixel in the single-frame original image.

[0101] According to some embodiments of the present application, judging whether electronic noise exists at a pixel point based on multiple grayscale values ​​corresponding to any pixel point at the same position in a multi-frame sequence original image includes: calculating the standard deviation of the grayscale value of the pixel point based on multiple grayscale values ​​corresponding to any pixel point at the same position in the multi-frame sequence original image; and judging that electronic noise exists at the pixel point in response to the standard deviation of the grayscale value of the pixel point being greater than a preset threshold.

[0102] In the embodiment of the present application, the standard deviation of the grayscale value of a pixel can reflect the degree of discreteness of multiple grayscale values ​​corresponding to any pixel at the same position in the multi-frame sequence original image. The larger the standard deviation of the grayscale value of a pixel, the more discrete the multiple grayscale values ​​corresponding to any pixel at the same position in the multi-frame sequence original image. The more discrete the multiple grayscale values ​​corresponding to any pixel at the same position in the multi-frame sequence original image, the more interference such as electronic noise exists in the pixel. Therefore, the standard deviation of the grayscale value of a pixel can be calculated based on the multiple grayscale values ​​corresponding to any pixel at the same position in the multi-frame sequence original image to determine whether the pixel has electronic noise. In response to the standard deviation of the pixel being greater than a preset threshold, it can be determined that the pixel has electronic noise.

[0103] In the embodiment of the present application, the preset threshold can be set according to the actual usage scenario of the image bad pixel correction method, and the embodiment of the present disclosure is not limited thereto. For example, when a 16-bit image is selected, the preset threshold can be 10.

[0104] In the embodiment of the present application, the standard deviation of the grayscale value of the pixel point calculated by multiple grayscale values ​​corresponding to any pixel point at the same position in the multi-frame sequence original image is compared with a preset threshold to determine whether electronic noise exists in the pixel point. This can make the process of determining whether electronic noise exists in the pixel point simpler, thereby improving the efficiency of processing the battery image.

[0105] According to some embodiments of the present application, determining the grayscale value of a pixel corresponding to a single-frame original image based on a judgment result includes: in response to the presence of electronic noise in the pixel, performing clustering operations on multiple grayscale values ​​corresponding to the pixel in a multi-frame sequence of original images, and marking the multiple grayscale values ​​as normal or abnormal based on the result of the clustering operation, calculating the average of the grayscale values ​​marked as normal among the multiple grayscale values ​​and using it as the grayscale value of the corresponding pixel in the single-frame original image.

[0106] In the embodiment of the present application, the pixel points are respectively corresponding to the multiple grayscale values ​​of the multi-frame sequence original image to perform clustering operation to obtain the clustering operation result, and then the clustering operation result is separated, and the grayscale values ​​of the multi-frame sequence original image that are less than or equal to the reference threshold are marked as normal, and the others are marked as abnormal. Abnormal is electronic noise, and normal grayscale values ​​are classified from electronic noise.

[0107] In an embodiment of the present application, due to the influence of environmental factors, etc., the grayscale values ​​marked as normal are not necessarily completely equal. In order to make the grayscale values ​​in a single-frame image more accurate, the average value of the grayscale values ​​marked as normal among multiple grayscale values ​​can be calculated and used as the grayscale value of the corresponding pixel point in the single-frame original image.

[0108] In the embodiment of the present application, normal grayscale values ​​and abnormal grayscale values ​​can be effectively separated through clustering operations, and the average value of normal grayscale values ​​among multiple grayscale values ​​is calculated as the grayscale value of the corresponding pixel point in the single-frame original image. The grayscale value of the corresponding pixel point in the single-frame original image can make the grayscale value of the corresponding pixel point in the single-frame original image more accurate, thereby improving the effect of battery image processing.

[0109] According to some embodiments of the present application, determining the grayscale value of a pixel point corresponding to a single-frame original image based on a judgment result includes: in response to the absence of electronic noise at the pixel point, calculating the average value of multiple grayscale values ​​of the pixel point corresponding to a plurality of frame sequence original images and using it as the grayscale value of the corresponding pixel point in the single-frame original image.

[0110] In the embodiment of the present application, when there is no electronic noise in the pixel points, the multiple grayscale values ​​of the multi-frame sequence original image are all normal values. However, due to the influence of environmental factors, the multiple grayscale values ​​of the multi-frame sequence original image are not completely equal. In order to make the grayscale value of the corresponding pixel point in the single-frame original image more accurate, the average value of the multiple grayscale values ​​of the multi-frame sequence original image corresponding to the pixel point can be calculated and used as the grayscale value of the corresponding pixel point in the single-frame original image.

[0111] In an embodiment of the present application, by calculating the average of multiple grayscale values ​​corresponding to the pixel points of a multi-frame sequence of original images and using it as the grayscale value of the corresponding pixel point in the single-frame original image, the grayscale value of the corresponding pixel point in the single-frame original image can be made more accurate.

[0112] The second aspect of the present application provides a battery detection method. Figure 6 A flowchart of a battery detection method according to some embodiments of the present application is shown in FIG. Figure 6 As shown, the battery detection method includes:

[0113] Step S610: Acquire an image of the battery, where the image includes a plurality of original frames of a sequence of images.

[0114] Step S620: Process the multi-frame sequence original image using the battery image processing method of the above embodiment to obtain a battery detection image.

[0115] Step S630: determining the battery detection result based on the battery detection image.

[0116] According to some embodiments of the present application, the operation of detecting the battery can be performed by means of a detection model or a recognition algorithm, and can be selected according to the actual application and needs. Exemplarily, in order to realize the detection of the battery, the detection model can be pre-trained to obtain a pre-trained detection model. After acquiring the battery image, the battery image is processed using the battery image processing method in the aforementioned embodiment to obtain a battery detection image, and the battery detection image is input into the pre-trained detection model. After being processed by the detection model, the battery detection result is obtained.

[0117] In an embodiment of the present application, by using the battery image processing method in the aforementioned embodiment to process the image of the battery to obtain a battery detection image, and detecting the battery based on the battery detection image, the problem of being unable to detect battery defects due to the battery image being unable to provide sufficiently clear and complete battery information can be solved, thereby improving the accuracy of the battery detection results.

[0118] According to some embodiments of the present application, the battery detection method further includes: in response to the battery detection result indicating that the battery is unqualified, discarding the unqualified battery.

[0119] In the embodiment of the present application, in response to the battery test result indicating that the battery is defective, the defective battery can be transferred to the waste outlet, and in response to the battery test result indicating that the battery is not defective, the non-defective battery can be subjected to further testing. The battery production method is suitable for large-scale batch production testing, and can prevent defective batteries from entering the market to a certain extent.

[0120] Some embodiments of the fourth aspect of the present application provide a battery image processing device, Figure 7 A block diagram of a battery image processing device according to some embodiments of the present application is shown in FIG. Figure 7 As shown, the battery image processing device 700 includes: an acquisition module 710, a noise reduction module 720, a first processing module 730, a second processing module 740 and a third processing module 750. The acquisition module 710 is configured to acquire a multi-frame sequence original image, wherein the multi-frame sequence original image is a multi-frame image continuously shot within a preset time; the noise reduction module 720 is configured to perform noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; the first processing module 730 is configured to perform filtering processing on the single-frame original image to obtain a first processed image; the second processing module 740 is configured to perform linear stretching on the grayscale values ​​of the pixels in the first processed image to obtain a second processed image; the third processing module 750 performs histogram equalization on the grayscale values ​​of the pixels in the second processed image to obtain a battery detection image.

[0121] In some embodiments, the noise reduction module 720 includes: a grayscale range determination module, configured to determine the normal grayscale range of a single-frame original image; a noise position determination module, configured to determine the noise position in the single-frame original image based on the grayscale value of the pixel points in the single-frame original image and the normal grayscale range; and a grayscale value setting module, configured to set the grayscale value of the noise position to a preset grayscale value.

[0122] In some embodiments, the grayscale range determination module includes: an area of ​​interest selection module, configured to select an area of ​​interest of a single frame original image; wherein the area of ​​interest includes multiple pixels; a histogram distribution calculation module, configured to calculate the histogram distribution of the grayscale values ​​of the pixels in the area of ​​interest; and a normal grayscale range determination module, configured to determine the normal grayscale range of the single frame original image according to the histogram distribution.

[0123] In some embodiments, the noise position determination module is configured to determine a pixel point as a noise position in response to a grayscale value of the pixel point exceeding a normal grayscale range.

[0124] In some embodiments, the first processing module 730 includes: a first local window establishment module, configured to traverse the pixel points in a single frame original image, establish a first local window for any pixel point, and the first local window includes multiple pixel points adjacent to the pixel point; a median filtering processing module, configured to perform median filtering on the grayscale values ​​of the pixel points in the first local window to obtain a first processed image.

[0125] In some embodiments, the second processing module 740 includes: a second local window establishment module, configured to traverse the pixel points in the first processed image, establish a second local window for any pixel point, and the second local window includes multiple pixel points adjacent to the pixel point; a linear stretching module, configured to linearly stretch the grayscale values ​​of the pixel points in the second local window to obtain a second processed image.

[0126] In some embodiments, the linear stretching module is configured to arrange multiple pixel points in the second local window along the row direction and the column direction, and perform bidirectional linear stretching on the grayscale values ​​of the pixel points in the second local window to obtain the second processed image.

[0127] In some embodiments, the third processing module 750 includes: an image segmentation module configured to segment the second processed image into multiple sub-images; and a histogram equalization module configured to perform histogram equalization on the multiple sub-images to obtain a battery detection image.

[0128] In some embodiments, the histogram equalization module is configured to arrange the pixels in the sub-image along the row direction and the column direction, and perform bidirectional histogram equalization on the grayscale values ​​of the pixels in the sub-image to obtain the battery detection image.

[0129] In some embodiments, the noise reduction module 720 includes: an electronic noise judgment module, configured to judge whether there is electronic noise at a pixel point based on multiple grayscale values ​​corresponding to any pixel point at the same position in a multi-frame sequence original image; and a grayscale value determination module, configured to determine the grayscale value of the pixel point corresponding to the single-frame original image based on the judgment result.

[0130] In some embodiments, the electronic noise judgment module includes: a gray value standard deviation calculation module, configured to calculate the gray value standard deviation of a pixel point based on multiple gray values ​​corresponding to any pixel point at the same position in a multi-frame sequence original image; and an electronic noise judgment module, configured to judge that electronic noise exists at a pixel point in response to the standard deviation of the gray value of the pixel point being greater than a preset threshold.

[0131] In some embodiments, the electronic noise judgment module includes: a grayscale value marking module, which is configured to perform clustering operations on multiple grayscale values ​​corresponding to the pixel points of a multi-frame sequence original image in response to the presence of electronic noise in the pixel points, and mark the multiple grayscale values ​​as normal or abnormal according to the results of the clustering operation; a first grayscale value calculation module, which is configured to calculate the average value of the grayscale values ​​marked as normal among the multiple grayscale values ​​and use it as the grayscale value of the corresponding pixel point in the single-frame original image.

[0132] In some embodiments, the electronic noise judgment module includes: a second grayscale value calculation module, which is configured to calculate the average value of multiple grayscale values ​​corresponding to the pixel point in a multi-frame sequence of original images in response to the absence of electronic noise at the pixel point and use it as the grayscale value of the corresponding pixel point in the single-frame original image.

[0133] Some embodiments of the fourth aspect of the present application provide a battery detection device, Figure 8 FIG. 1 is a block diagram of a battery detection device according to some embodiments of the present application. Figure 8 As shown, the battery detection device 800 includes: an image acquisition module 810, an image processing module 820 and a detection module 830. The image acquisition module 810 is configured to acquire an image of the battery, the image including a multi-frame sequence of original images; the image processing module 820 is configured to process the multi-frame sequence of original images using the battery image processing method of the above embodiment to obtain a battery detection image; the detection module 830 is configured to determine the battery detection result based on the battery detection image.

[0134] Some embodiments of the present application also provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the battery image processing method or the battery detection method in the above-mentioned embodiments.

[0135] Various embodiments of the systems and techniques described above in this application can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0136] An embodiment of the present application provides a battery production device, including the electronic device of the above embodiment.

[0137] Some embodiments of the present application further provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the battery image processing method or the battery detection method in the above-mentioned embodiments.

[0138] Computer readable media can be tangible media that can contain or store programs for use by or in conjunction with instruction execution systems, devices or equipment. Machine readable media can be machine readable signal media or machine readable storage media. Machine readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of machine readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0139] According to some embodiments of the present application, a computer program product is provided, including a computer program, which, when executed by a processor, implements the battery image processing method in the above embodiment or the battery detection method in the above embodiment.

[0140] The technical solution of the present application is further described below through a specific embodiment. Fig. 9 Flowchart of a battery image detection method according to another embodiment of the present application, such as Fig. 9 As shown, the method includes:

[0141] Step S901: frame sequence original image: PLC or software triggers, and the data acquisition module obtains a multi-frame sequence original image, wherein the multi-frame sequence original image is a multi-frame image taken continuously within a preset time.

[0142] Step S902: discarding the first few frames of original images: discarding the first few frames of the sequence of original images to avoid interference from image delay and afterimage.

[0143] Step S903: CPU (Central Processing Unit) copies to GPU (Graphics processing unit): the multi-frame sequence original images with the first few frames of the original images discarded are copied from the CPU to the GPU.

[0144] Step S904: Calculate the standard deviation of the grayscale values ​​of the same pixel position in the original images of different frame sequences: calculate the standard deviation of the grayscale values ​​of the pixel point according to multiple grayscale values ​​corresponding to any pixel point at the same position in the original images of multiple frame sequences.

[0145] Step S905: whether the standard deviation is greater than a threshold: the standard deviation of the gray value of the pixel is compared with a preset threshold to determine whether there is electronic noise in the pixel.

[0146] Step S906: Clustering operation marks the noise points and calculates the average value to obtain a single-frame original image: In response to the existence of electronic noise in the pixel points, clustering operations are performed on multiple grayscale values ​​corresponding to the pixel points of the multi-frame sequence original image, and the multiple grayscale values ​​are marked as normal or abnormal according to the results of the clustering operation, and the average value of the grayscale values ​​marked as normal in the multiple grayscale values ​​is calculated and used as the grayscale value of the corresponding pixel point in the single-frame original image.

[0147] Step S907: directly calculating the mean to obtain a single-frame original image: in response to the absence of electronic noise at the pixel point, the average value of multiple grayscale values ​​of the pixel points corresponding to the original images of the multiple frames of the sequence is calculated and used as the grayscale value of the corresponding pixel point in the single-frame original image.

[0148] Step S908: Obtain the center area of ​​the battery cell: select an area of ​​interest of a single frame of the original image; wherein the area of ​​interest includes a plurality of pixel points.

[0149] Step S909: Calculate the normal grayscale range of the cell area based on the grayscale value histogram distribution of the center area of ​​the cell: calculate the histogram distribution of the grayscale values ​​of the pixels in the region of interest; determine the normal grayscale range of the single frame original image according to the histogram distribution.

[0150] Step S910: Mark the position in the original image where the grayscale value exceeds the normal response grayscale range as 0 or 65535: In response to the grayscale value of the pixel point exceeding the normal grayscale range, determine the pixel point as a noise position.

[0151] Step S911: traverse all pixel points and establish a local window for each pixel point: traverse the pixel points in the single-frame original image, and establish a first local window for any pixel point, where the first local window includes multiple pixel points adjacent to the pixel point.

[0152] Step S912: Perform median filtering in the local window: perform median filtering on the grayscale values ​​of the pixels in the first local window to obtain a first processed image.

[0153] Step S913: traverse all pixel points and establish a local window for each pixel point: traverse the pixel points in the first processed image, and establish a second local window for any pixel point, where the second local window includes multiple pixel points adjacent to the pixel point.

[0154] Step S914: linear stretching in the local window: multiple pixel points in the second local window are arranged along the row direction and the column direction, and bidirectional linear stretching is performed on the grayscale values ​​of the pixel points in the second local window to obtain a second processed image.

[0155] Step S915: Divide the image into multiple windows, and perform local contrast histogram equalization on each window: divide the second processed image into multiple sub-images, arrange the pixels in the sub-images along the row direction and the column direction, and perform bidirectional histogram equalization on the grayscale values ​​of the pixels in the sub-images to obtain a battery detection image.

[0156] Step S916: GPU to CPU copy: copy the battery detection image from the GPU to the CPU.

[0157] Step S917: Preprocessing result image: battery detection image.

[0158] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application. In particular, as long as there is no structural conflict, the various technical features mentioned in the various embodiments can be combined in any way. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions that fall within the scope of the claims.

Claims

1. A battery image processing method, characterized in that: include: Acquire a multi-frame sequence of original images, and perform noise reduction processing on the multi-frame sequence of original images to obtain a single-frame original image; wherein the multi-frame sequence of original images is a multi-frame image taken continuously within a preset time; Performing filtering processing on the single frame original image to obtain a first processed image; Linearly stretching the grayscale values ​​of the pixels in the first processed image to obtain a second processed image; Perform histogram equalization on the grayscale values ​​of the pixels in the second processed image to obtain a battery detection image.

2. The battery image processing method according to claim 1, characterized in that: The filtering process of the single frame original image to obtain a first processed image comprises: Determining a normal grayscale range of the single-frame original image; Determining the noise position in the single frame original image according to the grayscale value of the pixel point in the single frame original image and the normal grayscale range; The grayscale value of the noise position is set to a preset grayscale value.

3. The battery image processing method according to claim 2, characterized in that: Determining the normal grayscale range of the single-frame original image includes: Selecting a region of interest of the single frame original image; wherein the region of interest includes a plurality of pixel points; Calculating the histogram distribution of the grayscale values ​​of the pixels in the region of interest; A normal grayscale range of the single-frame original image is determined according to the histogram distribution.

4. The battery image processing method according to claim 2 or 3, characterized in that: The determining the noise position in the single frame original image according to the grayscale value of the pixel point in the single frame original image and the normal grayscale range comprises: In response to the grayscale value of the pixel point exceeding the normal grayscale range, the pixel point is determined as the noise position.

5. The battery image processing method according to any one of claims 1 to 4, characterized in that: The filtering process of the single frame original image to obtain a first processed image further comprises: Traversing the pixel points in the single-frame original image, establishing a first local window for any pixel point, wherein the first local window includes a plurality of pixel points adjacent to the pixel point; Perform median filtering on the grayscale values ​​of the pixels in the first local window to obtain the first processed image.

6. The battery image processing method according to any one of claims 1 to 5, characterized in that: The linearly stretching the grayscale values ​​of the pixels in the first processed image to obtain the second processed image comprises: Traversing the pixel points in the first processed image, establishing a second local window for any pixel point, wherein the second local window includes a plurality of pixel points adjacent to the pixel point; The grayscale values ​​of the pixels in the second local window are linearly stretched to obtain the second processed image.

7. The battery image processing method according to claim 6, characterized in that: The step of linearly stretching the grayscale values ​​of the pixels in the second local window to obtain the second processed image comprises: The plurality of pixels in the second local window are arranged along row and column directions, and the grayscale values ​​of the pixels in the second local window are bidirectionally linearly stretched to obtain the second processed image.

8. The battery image processing method according to any one of claims 1 to 7, characterized in that: The performing histogram equalization on the grayscale values ​​of the pixels in the second processed image to obtain the battery detection image comprises: dividing the second processed image into a plurality of sub-images; Histogram equalization is performed on the multiple sub-images to obtain the battery detection image.

9. The battery image processing method according to claim 8, characterized in that: The performing histogram equalization on the multiple sub-images to obtain the battery detection image comprises: The pixel points in the sub-image are arranged along the row direction and the column direction, and the grayscale values ​​of the pixel points in the sub-image are subjected to bidirectional histogram equalization to obtain the battery detection image.

10. The battery image processing method according to any one of claims 1 to 9, characterized in that: The acquiring of a plurality of original frames of a sequence of images and performing noise reduction processing on the plurality of original frames of a sequence of images to obtain a single original frame of an image comprises: According to a plurality of grayscale values ​​corresponding to any pixel at the same position in the original image of the multi-frame sequence, it is determined whether the pixel has electronic noise; According to the judgment result, the grayscale value of the pixel corresponding to the single frame original image is determined.

11. The battery image processing method according to claim 10, characterized in that: The determining, based on the multiple grayscale values ​​corresponding to any pixel at the same position in the multi-frame sequence original image, whether the pixel has electronic noise comprises: Calculate the standard deviation of the grayscale value of the pixel point according to multiple grayscale values ​​corresponding to any pixel point at the same position in the multi-frame sequence original image; In response to the standard deviation of the grayscale value of the pixel being greater than a preset threshold, it is determined that electronic noise exists at the pixel.

12. The battery image processing method according to claim 10 or 11, characterized in that: Determining the grayscale value of the pixel corresponding to the single frame original image according to the judgment result includes: In response to the existence of electronic noise at the pixel point, clustering operations are performed on the plurality of grayscale values ​​of the pixel point corresponding to the plurality of frame sequence original images, and marking the plurality of grayscale values ​​as normal or abnormal according to the result of the clustering operation; An average value of the grayscale values ​​marked as normal among the multiple grayscale values ​​is calculated and used as the grayscale value of the corresponding pixel point in the single frame original image.

13. The battery image processing method according to any one of claims 10 to 12, characterized in that: Determining the grayscale value of the pixel corresponding to the single frame original image according to the judgment result includes: In response to the absence of electronic noise at the pixel point, an average value of a plurality of grayscale values ​​of the pixel point corresponding to the multi-frame sequence original images is calculated and used as the grayscale value of the corresponding pixel point in the single frame original image.

14. A battery detection method, characterized in that: include: Acquire an image of the battery, wherein the image includes a plurality of original frames of a sequence of images; Processing the multi-frame sequence original image using the battery image processing method according to any one of claims 1 to 13 to obtain a battery detection image; A detection result of the battery is determined based on the battery detection image.

15. The battery detection method according to claim 14, characterized in that: The method further comprises: In response to the test result of the battery indicating that the battery is unqualified, the unqualified battery is rejected.

16. A battery image processing device, characterized in that: include: An acquisition module is configured to acquire a multi-frame sequence of original images, wherein the multi-frame sequence of original images is a multi-frame image taken continuously within a preset time; A noise reduction module is configured to perform noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; A first processing module is configured to perform filtering processing on the single frame original image to obtain a first processed image; A second processing module is configured to linearly stretch the grayscale values ​​of the pixels in the first processed image to obtain a second processed image; The third processing module performs histogram equalization on the grayscale values ​​of the pixels in the second processed image to obtain a battery detection image.

17. A battery detection device, characterized in that: include: An image acquisition module is configured to acquire an image of the battery, wherein the image includes a plurality of original frames of a sequence of images; An image processing module, configured to process the multi-frame sequence original image using the battery image processing method according to any one of claims 1 to 13 to obtain a battery detection image; The detection module is configured to determine a detection result of the battery based on the battery detection image.

18. An electronic device, characterized in that: include at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the battery image processing method described in any one of claims 1 to 13 or the battery detection method described in any one of claims 14 to 15.

19. A battery production device, characterized in that: Comprising the electronic device as claimed in claim 18.

20. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the battery image processing method according to any one of claims 1 to 13 or the battery detection method according to any one of claims 14 to 15 is implemented.