Image dead pixel correction method and device and battery detection method and device

By denoising the original image of multi-frame sequences and identifying bad points, and performing template-free correction based on the grayscale value of adjacent pixel points, the problem that image bad point correction in the prior art depends on pre-made templates is solved, and the problem of image bad point correction in the prior art is realized Efficient correction of any type and number of bad points.

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

Patent Information

Application Number
CN202310973645.2
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 correction of image bad points needs to rely on pre-made correction templates, and cannot be applied to any type and number of bad points, limiting the scope of use of image bad points correction.

Method used

By obtaining the original image of the multi-frame sequence, denoising the noise to obtain the original image of the single frame, identifying the bad points, and correcting the bad points based on the grayscale values ​​of several pixel points adjacent to the bad points, achieving template-free correction.

Benefits of technology

This method can accurately identify and correct any type and number of bad points, improve image quality, and expand the scope of use of image bad point correction methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119450243A_ABST
    Figure CN119450243A_ABST
Patent Text Reader

Abstract

The invention provides an image dead pixel correction method and device and a battery detection method and device, and belongs to the technical field of batteries. The image dead pixel correction method comprises the following steps: acquiring a multi-frame sequence original image; wherein the multi-frame sequence original image is a multi-frame image continuously acquired within a preset time; performing noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; carrying out dead pixel identification on the single-frame original image, and determining dead pixels; and correcting the gray value of the dead pixel based on the gray values of the plurality of pixel points adjacent to the dead pixel to obtain a 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 an image bad pixel correction method and device, and a battery detection method and device. Background Art

[0002] With the development of imaging technology, imaging modules are widely used in security, military, medical and other fields. However, due to the influence of factors such as manufacturing process and use environment, imaging modules usually have bad pixels, resulting in bad pixels in the generated images in the form of too bright, too dark, light and dark flickering, etc. Therefore, it is necessary to detect and correct the bad pixels in the generated images to eliminate the influence of bad pixels on the imaging effect. Summary of the invention

[0003] The present application aims to solve at least one of the technical problems in the background technology. To this end, one purpose of the present application is to provide an image bad pixel correction method and device, a battery detection method and device, so as to correct the bad pixels in the image and improve the image quality.

[0004] An embodiment of the first aspect of the present application provides an image bad pixel correction method, which includes: acquiring a multi-frame sequence original image; wherein the multi-frame sequence original image is a multi-frame image continuously acquired within a preset time; performing noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; identifying bad pixels in the single-frame original image to determine the bad pixels; and correcting the grayscale value of the bad pixel based on the grayscale values ​​of several pixel points adjacent to the bad pixel to obtain a detection image.

[0005] In the technical solution of the embodiment of the present application, a single-frame original image is obtained by performing noise reduction processing on a multi-frame sequence of original images. The single-frame original image no longer contains electronic noise, etc., which can reduce interference with bad pixel identification and make the determined bad pixels more accurate. The grayscale value of the bad pixel is corrected based on the grayscale values ​​of several pixels adjacent to the bad pixel, and the bad pixel can be corrected without using a correction template, so it can be applied to any type and any number of bad pixels, thereby increasing the scope of use of the image bad pixel correction method.

[0006] In some embodiments, performing noise reduction processing on the multi-frame sequence original image 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 original image; 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 original image, 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.

[0007] 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 pixel point according to 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 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 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 image bad pixel correction.

[0008] 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 existence of electronic noise in the pixel, performing clustering operation 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 value 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 image bad pixel correction.

[0009] In some embodiments, according to the judgment result, determining the grayscale value of the pixel corresponding to the single-frame original image further 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 multi-frame sequence original image 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 multi-frame sequence original image 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.

[0010] In some embodiments, bad pixel identification is performed on a single-frame original image, and determining the bad pixel includes: determining a normal grayscale value range of the single-frame image; and determining the bad pixel in the single-frame original image according to the grayscale value of the pixel in the single-frame image and the normal grayscale value range. Determining the bad pixel in the single-frame original image according to the grayscale value of the pixel in the single-frame image and the normal grayscale value range can simplify the process of determining the bad pixel, thereby improving the efficiency of image bad pixel correction.

[0011] In some embodiments, determining the normal grayscale value range of a single-frame image includes: selecting a region of interest of the single-frame image; wherein the region of interest includes a plurality of pixels; calculating a histogram distribution of grayscale values ​​of the pixels in the region of interest; and determining the normal grayscale range of the single-frame image according to the histogram distribution. By selecting a region 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 region of interest, the determined normal grayscale range can be made more accurate.

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

[0013] In some embodiments, the grayscale value of the bad point is corrected based on the grayscale values ​​of several pixels adjacent to the bad point to obtain a detection image, including: traversing the bad points, establishing a local window for any bad point, the local window including at least one pixel whose grayscale value is within the normal grayscale value range; taking the median of the grayscale value of at least one pixel whose grayscale value is within the normal grayscale value range as the grayscale value of the bad point; performing histogram equalization on the grayscale values ​​of the pixels in the local window to obtain a detection image. By establishing a local window for the bad point, and taking the median of the grayscale value of at least one pixel whose grayscale value is within the normal grayscale value range included in the local window as the grayscale value of the bad point, the difficulty of image bad point correction can be reduced and the accuracy of correction can be improved; at the same time, the grayscale values ​​of the pixels in the local window are also histogram equalized to obtain a detection image, which can enhance the contrast of the detection image.

[0014] The second aspect of the present application provides a battery detection method, including: acquiring an image of a battery, wherein the image includes a multi-frame sequence of original images; processing the multi-frame sequence of original images using the image bad pixel correction method of the above embodiment to obtain a detection image; and determining the battery detection result based on the detection image. By using the image bad pixel correction method of the above embodiment to process the battery image to obtain a detection image, and determining the battery detection result based on the detection image, the problem of low accuracy of the battery detection result caused by the presence of bad pixels in the image can be solved, thereby improving the accuracy of the battery detection result.

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

[0016] The third aspect of the present application provides an image bad pixel correction device, including an acquisition module, a noise reduction module, a bad pixel identification module and a correction 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 acquired continuously 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 bad pixel identification module is configured to identify bad pixels on the single-frame original image and determine the bad pixels; the correction module is configured to correct the grayscale value of the bad pixel based on the grayscale values ​​of several pixel points adjacent to the bad pixel to obtain a detection image.

[0017] An embodiment of the fourth aspect of the present application provides a battery detection device, including an image acquisition module, an image processing module and a defect detection module. The image acquisition module is configured to obtain a detection image of the battery, wherein the detection image includes a multi-frame sequence of original images; the image processing module is configured to use the image bad pixel correction method in the above embodiment to process the multi-frame sequence of original images to obtain a battery detection image; the defect detection module is configured to determine the battery detection result based on the detection image.

[0018] 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 image bad pixel correction method in the above-mentioned embodiment or the battery detection method in the above-mentioned embodiment.

[0019] An embodiment of the sixth aspect of the present application provides a battery production device, including the electronic device in the above embodiment.

[0020] The embodiment of the seventh aspect of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the image bad pixel correction method in the above embodiment or the battery detection method in the above embodiment is implemented.

[0021] 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

[0022] 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.

[0023] Figure 1 A flowchart of a method for correcting bad pixels in an image provided by some embodiments of the present application;

[0024] Figure 2 A flowchart of a battery detection method provided for some embodiments of the present application;

[0025] Figure 3 An image bad pixel correction device provided in some embodiments of the present application;

[0026] Figure 4 A battery detection device provided in some embodiments of the present application;

[0027] Figure 5 A flowchart of another method for correcting bad pixels in an image provided in some embodiments of the present application. DETAILED DESCRIPTION

[0028] 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.

[0029] 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.

[0030] 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.

[0031] 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.

[0032] 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.

[0033] 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).

[0034] 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.

[0035] 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.

[0036] At present, indirect conversion flat panel detectors with cesium iodide as scintillator occupy about 90% of the flat panel detector market due to its high detection efficiency, high cost performance, good imaging quality and long service life. This number needs to be further increased in the field of automation industry. The working principle of indirect conversion flat panel detectors is that the scintillator absorbs high-energy X-rays and converts them into low-energy visible light, which then generates X-ray images through photoelectric signal conversion circuits.

[0037] With the use of indirect conversion flat panel detectors, bad pixels are prone to appear on indirect conversion flat panel detectors. The bad pixels of indirect conversion flat panel detectors can be divided into two categories: bad pixels that appear at fixed positions due to manufacturing process problems; and relatively fixed bad pixels that appear over a period of time during use. The appearance of bad pixels seriously affects the subsequent processing of images and the final detection results based on images, especially the detection of tiny particle defects.

[0038] In order to correct the bad pixels detected by the flat panel, a bad pixel template based on the dark field image can be used for correction. The disadvantage of this solution is that it can correct the bad pixels caused by process problems, but when new bad pixels appear, the bad pixel template needs to be remade. The production of the bad pixel template is time-consuming and labor-intensive and seriously affects the production capacity and product safety in the field of industrial quality inspection.

[0039] Based on the above considerations, in order to solve the above-mentioned time-consuming and labor-intensive problem caused by making bad pixel templates and seriously affecting the production capacity and product safety in the field of industrial quality inspection, a bad pixel correction method is designed. The grayscale histogram of the average dark field image, the average bright field image and the gain coefficient matrix is ​​used to calculate three types of bad pixels, namely, the judgment range of dark current over-limit bad pixels, unstable bad pixels and response over-limit pixels, mark the bad pixels, and divide them into the first and second categories according to the number of bad pixels. The first category of bad pixels is first corrected using bilinear interpolation and tri-spline interpolation, and then the average value of normal pixels around the second category of bad pixels is used for correction. However, in such a bad pixel correction method, dark field, bright field and gain coefficient images are required to correct the bad pixels in fixed positions, and new bad pixels appear after a period of use, so the bad pixel correction method is not feasible.

[0040] Based on this, it is necessary to provide an image bad pixel correction method and device, a battery detection method and device to address the above-mentioned technical problems. By means of noise reduction processing, bad pixel identification and correction of the grayscale value of the bad pixel based on the grayscale values ​​of several pixels adjacent to the bad pixel, the bad pixel can be corrected without using a correction template. Thus, it can be applicable to any type and any number of bad pixels, thereby increasing the scope of use of the image bad pixel correction method.

[0041] The image bad pixel correction method disclosed in the embodiment of the present application can be applied to battery image detection, and can be but is not limited to the detection process in the production process of batteries. The image bad pixel correction method of the present application corrects the grayscale value of the bad pixel by the grayscale values ​​of several pixel points adjacent to the bad pixel, and can correct bad pixels in different positions, which can improve the rate of bad pixel correction.

[0042] Figure 1 A flowchart of a method for correcting bad pixels in an image provided by some embodiments of the present application is shown in FIG. Figure 1As shown, the image bad pixel correction method includes:

[0043] Step S110, obtaining a multi-frame sequence of original images; wherein the multi-frame sequence of original images is a multi-frame image obtained continuously within a preset time.

[0044] Step S120, performing noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image.

[0045] Step S130, performing bad pixel identification on the single frame original image to determine the bad pixels.

[0046] Step S140, correcting the grayscale value of the bad pixel based on the grayscale values ​​of a plurality of pixel points adjacent to the bad pixel to obtain a detection image.

[0047] 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.

[0048] 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 there is electronic noise 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 not to affect the correction of bad pixels in the image, 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.

[0049] 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 based on 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, and there is no electronic noise in the single-frame original image.

[0050] In the embodiment of the present application, exemplarily, when the device for acquiring the original multi-frame sequence is a ray source and a flat-panel detector, in the flat-panel detector, when a certain pixel does not respond to the ray or responds abnormally, such a detector pixel is called a bad pixel. Specifically, a bad pixel may refer to a pixel that does not change with the photosensitivity and always presents a color (for example, white, black or color), thereby destroying the clarity and integrity of the image. The presence of bad pixels in the image is one of the reasons for the degradation of image quality, and due to the increase of bad pixels, the image in a low-noise environment will be worse, which is easy to affect the subsequent use of the image.

[0051] In the embodiment of the present application, bad pixels can be identified based on the normal grayscale value range of pixels in the image. When the grayscale value of a pixel exceeds the normal grayscale value range, the pixel can be determined to be a bad pixel. Bad pixels in a single frame of the original image can also be identified based on a pre-trained bad pixel identification model. After the bad pixels are identified, the bad pixels can also be marked.

[0052] In an embodiment of the present application, at least one pixel whose grayscale value is within a normal range is included among several pixel points adjacent to the bad pixel. The grayscale value of the bad pixel can be corrected based on the grayscale value of the pixel whose grayscale value is within the normal range included among the several pixel points adjacent to the bad pixel, so that the pixel value of the bad pixel is also within the normal range, thereby obtaining a detection image without bad pixels.

[0053] In the embodiment of the present application, a single-frame original image is obtained by performing noise reduction processing on a multi-frame sequence of original images, and the single-frame original image no longer contains electronic noise, etc., which can reduce interference with bad pixel identification and make the determined bad pixels more accurate. The grayscale value of the bad pixel is corrected based on the grayscale values ​​of several pixels adjacent to the bad pixel, and the bad pixel can be corrected without using a correction template, so it can be applied to any type and any number of bad pixels, thereby increasing the scope of application of the image bad pixel correction method.

[0054] According to some embodiments of the present application, denoising is performed on a multi-frame sequence original image to obtain a single-frame original image, including: judging whether electronic noise exists 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.

[0055] 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.

[0056] 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.

[0057] In the embodiment of the present application, by using multiple grayscale values ​​corresponding to any pixel at the same position in the multi-frame sequence original image, it is determined whether there is electronic noise in the pixel, and the grayscale value of the pixel corresponding to the single-frame original image is determined based on the judgment result. This can eliminate the adverse effects of electronic noise on the image to a certain extent and improve the image quality.

[0058] 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 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 pixel point being greater than a preset threshold.

[0059] 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.

[0060] 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.

[0061] In the embodiment of the present application, the standard deviation of the grayscale value of a pixel point calculated by multiple grayscale values ​​corresponding to any pixel point at the same position in the original image of the multi-frame sequence 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 image bad pixel correction.

[0062] 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 presence of electronic noise in the pixel point, performing clustering operations on multiple grayscale values ​​corresponding to the pixel point 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 point in the single-frame original image.

[0063] 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 distinguished from electronic noise.

[0064] 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.

[0065] 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 the 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 eliminate image anomalies caused by abnormal grayscale values ​​generated by electronic noise to a certain extent, thereby improving the quality of the image.

[0066] 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 also includes: in response to the absence of electronic noise at the pixel point, calculating the average of multiple grayscale values ​​of the pixel point corresponding to multiple frame sequence original images and using it as the grayscale value of the corresponding pixel point in the single-frame original image.

[0067] 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.

[0068] In the embodiment of the present application, by calculating the average value of multiple grayscale values ​​corresponding to the pixel points of the multi-frame sequence original image and using it as the grayscale value of the corresponding pixel point in the single-frame original image, image abnormalities caused by abnormal grayscale values ​​of single pixel points can be reduced to a certain extent, making the image display more uniform and improving the image quality.

[0069] According to some embodiments of the present application, bad pixels are identified for a single-frame original image, and determining the bad pixels includes: determining a normal grayscale value range for the single-frame image; and determining the bad pixels in the single-frame original image based on the grayscale values ​​of the pixels in the single-frame image and the normal grayscale value range.

[0070] 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 pixel with the largest grayscale value and the pixel 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.

[0071] 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, it can be determined that the pixel is a bad pixel in the single-frame original image.

[0072] In an embodiment of the present application, bad pixels in a single-frame original image are determined based on the grayscale values ​​of pixels in the single-frame image and the normal grayscale value range, which can make the process of determining bad pixels simpler, thereby improving the efficiency of image bad pixel correction.

[0073] According to some embodiments of the present application, determining the normal grayscale value range of a single-frame image includes: selecting a region of interest of the single-frame image; wherein the region of interest includes a plurality of 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 image based on the histogram distribution.

[0074] 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.

[0075] 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.

[0076] 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.

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

[0078] 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.

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

[0080] According to some embodiments of the present application, the grayscale value of the bad point is corrected based on the grayscale values ​​of several pixels adjacent to the bad point to obtain a detection image, including: traversing the bad points, establishing a local window for any bad point, the local window including at least one pixel whose grayscale value is within the normal grayscale value range; taking the median of the grayscale value of at least one pixel whose grayscale value is within the normal grayscale value range as the grayscale value of the bad point; and performing histogram equalization on the grayscale values ​​of the pixels in the local window to obtain a detection image.

[0081] In an embodiment of the present application, a bad pixel may include an independent bad pixel and a bad pixel cluster composed of multiple bad pixels. The size of the local window established for the bad pixel can be determined according to the size of the bad pixel. For example, when the bad pixel is an independent bad pixel, the established local window may include a 2×2 local window, and the independent bad pixel is a pixel in the local window, and the local window includes three pixels whose grayscale values ​​are within the normal grayscale value range. The grayscale values ​​of the three pixels whose grayscale values ​​are within the normal grayscale value range can be sorted, and the median of the grayscale values ​​of the three pixels whose grayscale values ​​are within the normal grayscale value range is used as the grayscale value of the bad pixel.

[0082] In the embodiment of the present application, histogram equalization can change the grayscale value of the pixel points in the local window from a relatively concentrated grayscale interval to a uniform distribution in the entire grayscale range, thereby effectively enhancing the contrast of the image.

[0083] In the embodiment of the present application, after the grayscale value of the bad pixel is assigned, the grayscale value of the pixel in the local window is histogram equalized. All the bad pixels are traversed and the above operation is performed on all the bad pixels, so that an image after the bad pixels of the image are corrected, that is, a detection image, can be obtained.

[0084] In an embodiment of the present application, by establishing a local window for bad pixels and taking the median of the grayscale values ​​of at least one pixel whose grayscale value is within the normal grayscale value range in the local window as the grayscale value of the bad pixel, the difficulty of correcting bad pixels in the image can be reduced and the accuracy of the correction can be improved; at the same time, histogram equalization is performed on the grayscale values ​​of the pixel points in the local window to obtain a detection image, which can enhance the contrast of the detection image.

[0085] Figure 2 A flowchart of a battery detection method provided in some embodiments of the present application, such as Figure 2 As shown, the battery detection method includes:

[0086] Step S210: Acquire an image of the battery, wherein the image includes a plurality of original frames of a sequence of images.

[0087] Step S220: using the image bad pixel correction method of the above embodiment to process the multi-frame sequence original image to obtain the detection image.

[0088] Step S230: determining the detection result of the battery based on the detection image.

[0089] In the embodiment of the present application, the image of the battery can be obtained by using a flat panel detector under the irradiation of a radiation source. The image of the battery can include a multi-frame sequence of original images obtained continuously within a preset time. The multi-frame sequence of original images is processed by the image bad pixel correction method of the above embodiment to obtain a detection image without bad pixels.

[0090] In an embodiment of the present application, the operation of detecting the battery can be performed by a detection model or a recognition algorithm, etc., which 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 obtaining the detection image, the detection image is input into the pre-trained detection model, and after being processed by the detection model, the detection result of the battery can be obtained. The battery detection result may include a qualified battery or an unqualified battery.

[0091] In an embodiment of the present application, by adopting the image bad pixel correction method of the aforementioned embodiment to process the image of the battery to obtain a detection image, and determining the detection result of the battery based on the detection image, the problem of low accuracy of the battery detection result caused by the presence of bad pixels in the image can be solved, thereby improving the accuracy of the battery detection result.

[0092] 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.

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

[0094] Figure 3 The image bad pixel correction device provided in some embodiments of the present application is as follows: Figure 3 As shown, the image bad pixel correction device 300 includes an acquisition module 301, a noise reduction module 302, a bad pixel identification module 303 and a correction module 304. The acquisition module 301 is configured to acquire a multi-frame sequence original image; wherein the multi-frame sequence original image is a multi-frame image continuously acquired within a preset time; the noise reduction module 302 is configured to perform noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; the bad pixel identification module 303 is configured to identify the bad pixel on the single-frame original image and determine the bad pixel; the correction module 304 is configured to correct the gray value of the bad pixel based on the gray value of a number of pixel points adjacent to the bad pixel to obtain a detection image.

[0095] In some embodiments, the noise reduction module 302 includes: a 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 determination module, configured to determine the grayscale value of the pixel point corresponding to the single-frame original image based on the judgment result.

[0096] In some embodiments, the judgment module includes: a standard deviation calculation module, configured to calculate 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; a first judgment submodule, configured to determine that electronic noise exists in the pixel point in response to the standard deviation of the pixel point being greater than a preset threshold.

[0097] In some embodiments, the determination module includes: an operation module, 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, 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.

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

[0099] In some embodiments, the bad pixel identification module 303 includes: a grayscale value range determination module, configured to determine the normal grayscale value range of a single frame image; a bad pixel determination module, configured to determine the bad pixels 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.

[0100] In some embodiments, the grayscale value range determination module includes: a selection module, configured to select a region of interest of a single frame image; wherein the region 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 region of interest; and a normal grayscale range determination module, configured to determine the normal grayscale range of the single frame image based on the histogram distribution.

[0101] In some embodiments, the bad pixel determination module includes: a bad pixel determination submodule configured to determine a pixel as a bad pixel in response to a grayscale value of the pixel exceeding a normal grayscale value range.

[0102] In some embodiments, the correction module 304 includes: a local window establishment module, configured to traverse the bad pixels and establish a local window for any bad pixel, the local window including at least one pixel whose grayscale value is within the normal grayscale value range; an assignment module, configured to use the median of the grayscale values ​​of at least one pixel whose grayscale value is within the normal grayscale value range as the grayscale value of the bad pixel; and a histogram equalization module, configured to perform histogram equalization on the grayscale values ​​of the pixel points in the local window to obtain a detection image.

[0103] Figure 4 The battery detection device provided in some embodiments of the present application is as follows: Figure 4 As shown, the battery detection device 400 includes an image acquisition module 401, an image processing module 402 and a defect detection module 403. The image acquisition module 401 is configured to acquire an image of the battery, wherein the image includes a multi-frame sequence of original images; the image processing module 402 is configured to process the multi-frame sequence of original images using the image bad pixel correction method in the above embodiment to obtain a battery detection image; the defect detection module 403 is configured to determine the detection result of the battery based on the detection image.

[0104] An embodiment of the present application provides an electronic device, comprising at least one processor; and a memory connected to the at least one processor in communication; 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 image bad pixel correction method in the above embodiment or the battery detection method in the above embodiment.

[0105] 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.

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

[0107] 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 image bad pixel correction method in the above-mentioned embodiment or the battery detection method in the above-mentioned embodiment.

[0108] 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.

[0109] 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 image bad pixel correction method in the above embodiment.

[0110] The technical solution of the present application is further described below through a specific embodiment. Figure 5 A flowchart of another method for correcting bad pixels in an image provided by some embodiments of the present application is shown in FIG. Figure 5 As shown, the image bad pixel correction method includes:

[0111] Step S501: Frame sequence original image: obtain a multi-frame sequence original image; wherein the multi-frame sequence original image is a multi-frame image continuously obtained within a preset time.

[0112] Step S502: discard the first few frames of original images.

[0113] Step S503: 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.

[0114] Step S504: Whether the standard deviation is greater than a threshold: Whether the standard deviation of the pixel is greater than a preset threshold, it is determined whether there is electronic noise in the pixel.

[0115] Step S505: 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 operation is 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 result of the clustering operation; 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.

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

[0117] Step S507: Acquire the central area of ​​the battery in the single-frame image: select a region of interest in the single-frame image; wherein the region of interest includes a plurality of pixel points.

[0118] Step S508: Calculate the normal grayscale range of the single-frame image based on the grayscale value histogram distribution of the region of interest: calculate the histogram distribution of the grayscale values ​​of the pixels in the region of interest; and determine the normal grayscale range of the single-frame image based on the histogram distribution.

[0119] Step S509: Mark the position in the original image where the grayscale value exceeds the normal grayscale range as a bad pixel: In response to the grayscale value of the pixel exceeding the normal grayscale range, the pixel is determined as a bad pixel.

[0120] Step S510: traverse all bad pixels and calculate the size and concentration of the bad pixels.

[0121] Step S511: Select a corresponding window according to the size of the bad pixel, and obtain a corresponding small image with the bad pixel as the center: traverse the bad pixels, and establish a local window for any bad pixel, where the local window includes at least one pixel whose grayscale value is within the normal grayscale value range.

[0122] Step S512: filter out the small images in the window around the bad pixel and arrange the grayscale values ​​of the window: take the median of the grayscale values ​​of at least one pixel whose grayscale value is within the normal grayscale value range as the grayscale value of the bad pixel.

[0123] Step S513: Select the median value in the normal response grayscale value sequence as the grayscale value of the center point of the small image and then perform grayscale histogram equalization assignment: perform histogram equalization on the grayscale values ​​of the pixels in the local window.

[0124] Step S514: original image without bad pixels: obtaining a battery detection image.

[0125] 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 method for correcting bad pixels in an image, characterized in that: include: Acquire a multi-frame sequence of original images; wherein the multi-frame sequence of original images is a multi-frame image acquired continuously within a preset time; Performing noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image; Perform bad pixel identification on the single frame original image to determine the bad pixels; The grayscale value of the bad point is corrected based on the grayscale values ​​of a plurality of pixel points adjacent to the bad point to obtain a detection image.

2. The image bad pixel correction method according to claim 1, characterized in that: The performing noise reduction processing on the multi-frame sequence original image to obtain a single-frame original image includes: 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.

3. The image bad pixel correction method according to claim 2, 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 pixel being greater than a preset threshold, it is determined that electronic noise exists at the pixel.

4. The image bad pixel correction method according to claim 2 or 3, 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.

5. The image bad pixel correction method according to any one of claims 2 to 4, characterized in that: Determining the grayscale value of the pixel corresponding to the single frame original image according to the judgment result also 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.

6. The image bad pixel correction method according to any one of claims 1 to 5, characterized in that: The step of identifying bad pixels on the single frame original image and determining the bad pixels comprises: Determining a normal grayscale value range of the single-frame image; Determine the bad pixels in the single-frame original image according to the grayscale values ​​of the pixels in the single-frame image and the normal grayscale value range.

7. The image bad pixel correction method according to claim 6, characterized in that: Determining the normal grayscale value range of the single frame image includes: Selecting a region of interest of the single-frame 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 image is determined according to the histogram distribution.

8. The image bad pixel correction method according to claim 6 or 7, characterized in that: Determining the bad pixels in the single-frame original image according to the grayscale values ​​of the pixels in the single-frame image and the normal grayscale value range includes: In response to the grayscale value of the pixel point exceeding the normal grayscale value range, the pixel point is determined as a bad pixel.

9. The image bad pixel correction method according to any one of claims 1 to 8, characterized in that: The step of correcting the grayscale value of the bad point based on the grayscale values ​​of a plurality of pixels adjacent to the bad point to obtain a detection image comprises: Traversing the bad pixels, establishing a local window for any of the bad pixels, wherein the local window includes at least one pixel whose grayscale value is within the normal grayscale value range; Taking the median of the grayscale values ​​of the pixel points whose grayscale value is within the normal grayscale value range as the grayscale value of the bad pixel; Histogram equalization is performed on the grayscale values ​​of the pixels in the local window to obtain a detection image.

10. 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; The method for correcting bad pixels in an image according to any one of claims 1 to 9 is used to process the original multi-frame sequence images to obtain a detection image; A detection result of the battery is determined based on the detection image.

11. The battery detection method according to claim 10, 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.

12. An image bad pixel correction 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 acquired 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 bad pixel identification module is configured to identify bad pixels on the single frame original image and determine the bad pixels; The correction module is configured to correct the grayscale value of the bad point based on the grayscale values ​​of a plurality of pixel points adjacent to the bad point to obtain a detection image.

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

14. An electronic device, characterized in that: include at least one processor; as well as 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 image bad pixel correction method described in any one of claims 1 to 9 or the battery detection method described in claim 10 or 11.

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

16. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the image bad pixel correction method described in any one of claims 1 to 9 or the battery detection method described in claim 10 or 11 is implemented.