CN117853319A - Image processing method, battery cell defect detection method, device and equipment - Google Patents

Image processing method, battery cell defect detection method, device and equipment Download PDF

Info

Publication number
CN117853319A
CN117853319A CN202410233964.4A CN202410233964A CN117853319A CN 117853319 A CN117853319 A CN 117853319A CN 202410233964 A CN202410233964 A CN 202410233964A CN 117853319 A CN117853319 A CN 117853319A
Authority
CN
China
Prior art keywords
image
stretching
pixel
battery cell
nonlinear
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410233964.4A
Other languages
Chinese (zh)
Other versions
CN117853319B (en
Inventor
牛茂龙
李海波
宋谦
孔德轲
才鑫源
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Contemporary Amperex Technology Ltd
Original Assignee
Jiangsu Contemporary Amperex Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Contemporary Amperex Technology Ltd filed Critical Jiangsu Contemporary Amperex Technology Ltd
Priority to CN202410233964.4A priority Critical patent/CN117853319B/en
Priority claimed from CN202410233964.4A external-priority patent/CN117853319B/en
Publication of CN117853319A publication Critical patent/CN117853319A/en
Application granted granted Critical
Publication of CN117853319B publication Critical patent/CN117853319B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Processing (AREA)

Abstract

The application provides an image processing method, a battery cell defect detection device and battery cell defect detection equipment, and relates to the technical field of image processing. The stretching image is obtained by carrying out nonlinear stretching treatment on the cell region image of the cell, so that the contrast between each level of the cathode and anode of the cell in the cell region image can be improved after the treatment, the imaging effect is improved, the gray interval in the cell region image can be enlarged by adopting an exponential function according to a nonlinear stretching formula, the detail characteristics are highlighted, the stretching effect can be improved, and further, an image with higher definition can be provided for the subsequent defect detection of the cell, so that the accuracy of the defect detection of the cell is improved.

Description

Image processing method, battery cell defect detection method, device and equipment
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image processing method, a method, an apparatus, and a device for detecting a cell defect.
Background
With the widespread use of lithium-ion polymer battery products, the safety of the individual components in the battery is gaining importance. The battery cell is an electric storage part in the rechargeable battery, and the quality of the battery cell directly determines the quality of the battery, so that the quality detection of the battery cell is particularly important to determine whether the battery cell has defects or not.
In the prior art, the image acquisition is directly carried out on the battery cell, then the defect detection is carried out based on the acquired image, but the imaging of the image is affected by more interference factors, the imaging effect is poor, and the detection effect is poor.
Disclosure of Invention
An objective of the embodiments of the present application is to provide an image processing method, a device and a device for detecting a cell defect, which are used for improving the problem that the existing method has a poor imaging effect and further causes a poor detection effect.
In a first aspect, an embodiment of the present application provides an image processing method, including:
acquiring a battery cell image of a battery cell;
extracting a battery cell region image containing the battery cell from the battery cell image;
and carrying out nonlinear stretching treatment on the cell region image by using a nonlinear stretching formula constructed by an exponential function to obtain a stretched image, wherein the nonlinear stretching formula is constructed based on stretching parameters, the stretching parameters comprise a contrast stretching coefficient and/or a pixel enhancement coefficient, and the contrast stretching coefficient and the pixel enhancement coefficient are determined based on a pixel variance value of the cell region image.
In the implementation process, the stretching image is obtained by carrying out nonlinear stretching treatment on the cell region image of the cell, so that the nonlinear stretching treatment can be carried out on pixels of the region where the cell is located, the contrast between each level of the cathode and anode of the cell in the cell region image can be improved after the nonlinear stretching treatment is carried out, the imaging effect is improved, the gray interval in the cell region image can be enlarged by a nonlinear stretching formula by adopting an exponential function, the detail characteristics are highlighted, the stretching effect can be improved, and further, an image with higher definition can be provided for the follow-up defect detection of the cell, so that the accuracy of the cell defect detection is improved. And the stretching parameters comprise contrast stretching coefficients, so that the contrast of the cell area image can be further enhanced, the stretching parameters comprise pixel enhancement coefficients, the contrast of the cell area image can be further highlighted, and the stretching effect is improved.
Optionally, the nonlinear stretching processing is performed on the battery cell area image by using a nonlinear stretching formula constructed by an exponential function to obtain a stretched image, which includes:
acquiring a pixel maximum value, a pixel minimum value and the stretching parameter in the battery cell area image;
and calculating the pixel value of each pixel point after nonlinear stretching the battery cell area image by using a nonlinear stretching formula constructed by an exponential function according to the pixel maximum value, the pixel minimum value and the stretching parameter so as to obtain a stretched image.
In the implementation process, the pixel value of each pixel point after nonlinear stretching is calculated through the pixel maximum value, the pixel minimum value and the stretching parameter, so that the contrast of the image of the battery cell area can be enhanced, and the stretching effect is improved.
Optionally, the stretching parameter is obtained by:
acquiring a pixel variance value in the battery cell area image;
and determining the contrast stretching coefficient and/or the pixel enhancement coefficient according to the pixel variance value and a preset variance threshold.
In the implementation process, since the pixel variance value of the battery cell area image can reflect the distribution condition of the image pixels, the contrast stretching coefficient and/or the pixel enhancement coefficient are determined based on the pixel variance value, so that the degree of stretching processing of the battery cell area image can be known to adapt to the pixel distribution condition, and the overall stretching effect of the image can be improved.
Optionally, if the stretching parameters include a contrast stretching coefficient and a pixel enhancement coefficient, a nonlinear stretching formula constructed using an exponential function is expressed as follows:
wherein,representing the pixel value of the pixel point after nonlinear stretching, wherein G represents the pixel value of the pixel point in the image of the battery cell area, < ->Represents the contrast stretch factor,/->Representing the pixel enhancement factor,/->Representing the pixel minimum, +.>Representing the pixel maximum.
In the implementation process, the nonlinear stretching formula adopts exponential stretching, so that the gray interval in the cell area image can be enlarged, the detail characteristic is highlighted, and the stretching effect can be improved.
Optionally, the acquiring the maximum pixel value, the minimum pixel value and the stretching parameter in the cell area image includes:
determining a convolution window size;
traversing the battery cell region image according to the size of the convolution window to obtain a pixel maximum value, a pixel minimum value and a stretching parameter of an image region corresponding to the convolution window;
the calculating a pixel value of each pixel point after nonlinear stretching the battery cell area image by using a nonlinear stretching formula constructed by an exponential function according to the pixel maximum value, the pixel minimum value and the stretching parameter to obtain a stretched image comprises the following steps:
And calculating the pixel value of the corresponding pixel point in the corresponding image area after nonlinear stretching is carried out on the battery cell area image by using a nonlinear stretching formula constructed by an exponential function according to the pixel maximum value, the pixel minimum value and the stretching parameter of the corresponding image area until the pixel value of each pixel point after nonlinear stretching is obtained, so as to obtain a stretched image.
In the implementation process, the region division is carried out on the battery cell region image according to the convolution window size, so that the characteristics among the layers of the battery cell can be better highlighted when nonlinear stretching is carried out, and the stretching effect is improved.
Optionally, the determining the convolution window size includes:
acquiring the thickness of a cathode plate and an anode plate of the battery cell;
and determining the size of the convolution window according to the thickness.
In the implementation process, the more proper convolution window size can be determined according to the thickness of the cathode pole piece, so that the cell area can be reasonably divided, detail characteristics can be better captured when nonlinear stretching is performed, and the effect of subsequent cell defect detection is further improved.
Optionally, the extracting the cell region image including the cell in the cell image includes:
Performing histogram statistics on the battery cell image to determine an image segmentation threshold;
and segmenting a battery cell region image containing the battery cell from the battery cell image by utilizing the image segmentation threshold.
In the implementation process, the cell region image is extracted from the cell image, so that the image of a non-cell region in the cell image can be filtered, the calculated amount in the subsequent nonlinear stretching process can be effectively reduced, and the interference of background information on the subsequent defect detection can be reduced. In addition, since the histogram statistics is statistics related to gray values, complex calculation and processing are not required for each pixel, so that the calculation cost is low, and rapid segmentation of images can be realized.
Optionally, the nonlinear stretching processing is performed on the battery cell area image by using a nonlinear stretching formula constructed by an exponential function to obtain a stretched image, which includes:
if the pixel value of the corresponding pixel point in the battery cell area image is smaller than or equal to the stretching threshold value, nonlinear stretching processing is carried out on the battery cell area image by using a nonlinear stretching formula constructed by an exponential function, and a stretching image is obtained.
In the implementation process, since the region for performing defect detection is generally the cell pixel region, only the cell pixel region in the cell region image is subjected to nonlinear stretching treatment, so that the stretching treatment efficiency can be improved.
Optionally, the battery cell area image is an image obtained based on X-ray photographing. Due to the strong penetrating power of the X-rays, characteristics among the layers of the battery cells can be conveniently obtained, and further more defects can be detected later.
Optionally, after the extracting the cell region image including the cell in the cell image, the nonlinear stretching process is performed on the cell region image by using the nonlinear stretching formula constructed by the exponential function, and before obtaining the stretched image, the method further includes:
and carrying out logarithmic transformation on the battery cell area image to obtain a transformed battery cell area image.
In the implementation process, according to the change rule of the ray intensity, the density of the battery cell is obtained wirelessly by carrying out logarithmic transformation on the battery cell area image, so that the influence of the thickness of the battery cell on the pixel value of each pixel point can be amplified, and further, after nonlinear stretching is carried out on the battery cell area image, the thickness distribution of the battery cell can be more clearly defined, and the detection effect of the battery cell defect is improved.
In a second aspect, an embodiment of the present application provides a method for detecting a cell defect, where the method includes:
acquiring a stretched image, the stretched image being obtained according to the method provided in the first aspect;
And detecting the defects of the battery cells according to the stretching images.
In the implementation process, after nonlinear stretching treatment is carried out on the battery cell area image by the method, a stretched image with stronger contrast can be obtained, and further detail features in the image can be highlighted more, so that the accuracy of battery cell defect detection is improved.
In a third aspect, an embodiment of the present application provides an image processing apparatus, including:
the battery cell image acquisition module is used for acquiring a battery cell image of the battery cell;
the region image acquisition module is used for extracting a battery cell region image containing the battery cell in the battery cell image;
the image processing module is used for carrying out nonlinear stretching processing on the battery cell region image by utilizing a nonlinear stretching formula constructed by an exponential function to obtain a stretched image, wherein the nonlinear stretching formula is constructed based on stretching parameters, the stretching parameters comprise a contrast stretching coefficient and/or a pixel enhancement coefficient, and the contrast stretching coefficient and the pixel enhancement coefficient are determined based on a pixel variance value of the battery cell region image.
In a fourth aspect, an embodiment of the present application provides a device for detecting a defect of a battery cell, where the device includes:
A stretching image acquisition module, configured to acquire a stretching image, where the stretching image is obtained according to the method provided in the first aspect;
and the defect detection module is used for detecting the defects of the battery cells according to the stretching image.
In a fifth aspect, embodiments of the present application provide an electronic device comprising a processor and a memory storing computer readable instructions that, when executed by the processor, perform the steps of the method as provided in the first aspect above.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which when executed by a processor performs steps in the method as provided in the first aspect above.
In a seventh aspect, embodiments of the present application provide a computer program product comprising computer program instructions which, when read and executed by a processor, perform the steps of the method as provided in the first aspect above.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be apparent from the description, or may be learned by practice of the embodiments of the application. The objectives and other advantages of the application will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of an image processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of dividing an image area based on a convolution window size according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an original X-ray image according to an embodiment of the present application;
FIG. 4 is a diagram of a log transformed image according to an embodiment of the present disclosure;
FIG. 5 is a schematic view of an image after nonlinear stretching according to an embodiment of the present application;
fig. 6 is a flowchart of a method for detecting a cell defect according to an embodiment of the present application;
fig. 7 is a process schematic diagram of a cell production process according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of an image processing procedure according to an embodiment of the present application;
Fig. 9 is a block diagram of an image processing apparatus according to an embodiment of the present application;
fig. 10 is a block diagram of a cell defect detecting device according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of an electronic device for performing an image processing method or a method for detecting a cell defect according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
It should be noted that the terms "system" and "network" in embodiments of the present invention may be used interchangeably. "plurality" means two or more, and "plurality" may also be understood as "at least two" in this embodiment of the present invention. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/", unless otherwise specified, generally indicates that the associated object is an "or" relationship.
At present, the defect detection is directly carried out by utilizing the acquired battery cell image, and the imaging of the acquired battery cell image is affected by more interference factors, so that the imaging effect is poor, and the effect of detecting the battery cell defect is poor.
In order to solve the above problems, the embodiment of the application provides an image processing method, which performs nonlinear stretching processing on an image of a battery cell region of a battery cell to obtain a stretched image, and performs nonlinear stretching processing on pixels of the region where the battery cell is located, so that after the processing, the contrast between each level of a cathode and an anode of the battery cell in the image of the battery cell region can be improved, the imaging effect is improved, and a nonlinear stretching formula adopts an exponential function, so that the gray interval in the image of the battery cell region can be enlarged, the detail characteristics are highlighted, the stretching effect can be improved, and further, an image with higher definition can be provided for the subsequent defect detection of the battery cell, so that the accuracy of the defect detection is improved.
Referring to fig. 1, fig. 1 is a flowchart of an image processing method according to an embodiment of the present application, where the method includes the following steps:
step S110: and acquiring a battery cell image of the battery cell.
The battery cell image is understood to be an image obtained by photographing the battery cell, for example, an infrared image, an X-ray image, an ultrasonic image, and the like.
In some embodiments, if the battery cell image is an X-ray image, the battery cell image is an image obtained based on X-ray shooting, for example, the formed battery cell can be placed in an X-ray device for shooting, so as to obtain the battery cell image.
Step S120: and extracting a cell region image containing the cell in the cell image.
Because more background information may exist in the cell image obtained by direct shooting, in order to reduce the interference on cell defect detection, a cell area image in which a cell area is located can be extracted from the cell image.
When the cell area is detected, the corresponding detection algorithm, such as a neural network model, can be utilized to detect the cell in the cell image, and then the cell area image containing the cell is segmented from the cell image, so that the non-cell background area in the cell image can be removed, on one hand, the calculation amount of subsequent stretching can be reduced, on the other hand, the interference of other background information on the detection result can be reduced when the cell defect detection is performed subsequently, and the accuracy is improved. And in the follow-up nonlinear stretching, only nonlinear stretching is carried out on the battery cell region image, so that the influence on the pixel stretching effect of the battery cell region caused by stretching of other non-battery cell regions can be reduced, the stretching effect of the battery cell region image can be enhanced, and powerful help can be provided for the follow-up detection of the battery cell defect.
Step S130: and carrying out nonlinear stretching treatment on the battery cell area image by using a nonlinear stretching formula constructed by an exponential function to obtain a stretched image.
It can be understood that if the cell image is an X-ray image, the contrast of the whole image is low and the noise is too large due to the imaging principle and environmental influence of the X-ray image, so that the detail of the object is lost, and the accuracy of detecting the defects of the cell by using the obtained image is low. Therefore, in the scheme, in order to enhance the contrast of the cell region image, nonlinear stretching processing is performed on the cell region image.
Of course, other images, such as infrared images and ultrasonic images, may also have low image contrast due to the influence of the shooting environment, so that the image processing method in the present embodiment may also be used to perform nonlinear stretching processing on the obtained cell region image.
The nonlinear stretching process is mainly used for changing gray value distribution in the image so as to improve visual effect of the image or improve contrast of the image. The nonlinear stretching treatment adopts a unified nonlinear transformation function in a corresponding gray value range, and expansion and compression of different gray value intervals are realized by utilizing mathematical properties of the function.
The nonlinear stretching process may employ various nonlinear functions such as exponential, logarithmic, gaussian, square root, etc. These nonlinear functions can expand or contract the gray scale interval, highlighting or weakening details of the image for the purpose of improving image quality. For example, an exponential function may expand the gray scale interval of dark portions of an image, highlight the details of those portions, and a logarithmic function is used primarily to stretch bright portions of an image and compress dark portions.
In the scheme, in order to accurately detect defects at the cathode ending position of the battery cell, detail features between layers of the cathode and anode of the battery cell need to be highlighted in the battery cell region image, so that nonlinear stretching processing can be performed on the battery cell region image by using a nonlinear stretching formula constructed by an exponential function in the scheme, the detail features between the layers are highlighted, and whether the battery cell has defects or not can be accurately detected according to the detail features.
The nonlinear stretching formula adopted in the scheme is constructed based on stretching parameters, wherein the stretching parameters comprise a contrast stretching coefficient and/or a pixel enhancement coefficient, and the contrast stretching coefficient and the pixel enhancement coefficient are determined based on pixel variance values of the cell region image. It will be appreciated that the contrast stretch coefficients may be used to enhance the contrast of an image and that the pixel enhancement coefficients may enhance the image pixels. Because the pixel variance value of the cell area image can reflect the distribution condition of the pixels of the image, the contrast stretching coefficient and/or the pixel enhancement coefficient are determined based on the pixel variance value, so that the degree of stretching treatment on the cell area image can be known to adapt to the pixel distribution condition of the cell area image, and the overall stretching effect of the image can be improved.
In the implementation process, the stretching image is obtained by carrying out nonlinear stretching treatment on the cell region image of the cell, so that the nonlinear stretching treatment can be carried out on pixels of the region where the cell is located, the contrast between each level of the cathode and anode of the cell in the cell region image can be improved after the nonlinear stretching treatment is carried out, the imaging effect is improved, the gray interval in the cell region image can be enlarged by a nonlinear stretching formula by adopting an exponential function, the detail characteristics are highlighted, the stretching effect can be improved, and further, an image with higher definition can be provided for the follow-up defect detection of the cell, so that the accuracy of the cell defect detection is improved. And the stretching parameters comprise contrast stretching coefficients, so that the contrast of the cell area image can be further enhanced, the stretching parameters comprise pixel enhancement coefficients, the contrast of the cell area image can be further highlighted, and the stretching effect is improved.
Based on the above embodiment, in the manner of performing the nonlinear stretching processing on the cell area image, the maximum value, the minimum value and the stretching parameter of the pixel in the cell area image may be obtained first, and then, according to the maximum value, the minimum value and the stretching parameter of the pixel, the pixel value of each pixel point after performing the nonlinear stretching on the cell area image is calculated by using the nonlinear stretching formula constructed by the exponential function, so as to obtain the stretched image.
The maximum pixel value may refer to the maximum value of the pixel values of all the pixel points in the cell area image, and the minimum pixel value may refer to the minimum value of the pixel values of all the pixel points in the cell area image. Stretching parameters refer to parameters for the stretching process, which in this embodiment may include contrast stretching coefficients and/or pixel enhancement coefficients.
In some other embodiments, the stretching parameter may be a constant, and the value of the constant may be set empirically, in this manner, a nonlinear stretching formula constructed by an exponential function is used to calculate the pixel value of each pixel after nonlinear stretching, and the nonlinear stretching formula constructed by an exponential function may be as follows:
wherein,representing the pixel value of the pixel point after nonlinear stretching, and G represents the pixel value of the pixel point in the image of the battery cell area,/for the pixel point>Representing the stretching parameter, which may be a constant, < ->Representing the pixel minimum,/->Representing the pixel maximum.
Thus, for each pixel point in the battery cell area image, the pixel value of each pixel point is substituted into the formula, so that the pixel value after nonlinear stretching corresponding to each pixel point can be calculated and obtained, and finally, a stretched image is obtained.
It will be appreciated that the above-mentioned nonlinear stretching formula is only an example, and in practical application, the nonlinear stretching formula formed by the corresponding exponential function may be flexibly set.
In the implementation process, the pixel value of each pixel point after nonlinear stretching is calculated through the pixel maximum value, the pixel minimum value and the stretching parameter, so that the contrast of the image of the battery cell area can be enhanced, and the stretching effect is improved.
On the basis of the above embodiment, if the image of the cell area is an image obtained by X-ray shooting, the pixels of the obtained image of the cell area are 16 bits, that is, the gray level of the pixels is 0-65535, the gray level of the gray level image is relatively large, and the distribution of the pixel values is relatively concentrated, which results in the low utilization rate of the gray level, so that the contrast ratio of the image is very low, and the sensory experience of human eyes is very poor, so that nonlinear stretching adjustment can be performed on the original data, and the contrast ratio of the image can be increased to adapt to human eye observation.
The pixel values are normalized after the pixel maximum value and the pixel minimum value are processed, and in order to improve the stretching effect, the stretching parameters may include a contrast stretching coefficient and/or a pixel enhancement coefficient, where the contrast stretching coefficient may stretch the pixel values to 0-65535. Or because the pixel value range is 0-255 when the display displays, namely 8-bit images, the contrast stretching coefficient can also stretch the pixel value to 0-255, and the mode can reduce the calculated amount and facilitate the subsequent processing and display of the images.
In the above-described manner of calculating the pixel value of the pixel after nonlinear stretching when the stretching parameter includes the contrast stretching coefficient, the above-describedThe value of the contrast stretching coefficient can be 65535 or 255, and of course, in practical application, the value of the contrast stretching coefficient can be flexibly set according to the value range of the pixels, or the value of the contrast stretching coefficient can be set according to the practical stretching requirement, that is, the contrast stretching coefficient can also take other values, such as 254, 65534, 250 and other values.
In other implementations of obtaining the stretching parameters, the pixel variance value in the image of the cell region may be obtained first, then the contrast stretching coefficient and/or the pixel enhancement coefficient may be determined according to the pixel variance value and the preset variance threshold, and then the pixel value of each pixel point after the image of the cell region is subjected to nonlinear stretching may be calculated according to the pixel maximum value, the pixel minimum value, and the contrast stretching coefficient and/or the pixel enhancement coefficient by using the nonlinear stretching formula constructed by the exponential function.
The pixel variance value here may be a variance calculated for the pixel value of each pixel point in the image of the battery cell area, where the pixel variance value may be used to evaluate a difference between the pixel value of each pixel point and a desired pixel value, that is, the pixel variance value may reflect a pixel fluctuation condition of each pixel point. In the cell region image, the fluctuation of pixels in the pole piece region of the cell is larger, and the fluctuation of pixels in the non-pole piece region is smaller, so that the contrast stretching coefficient and/or the pixel enhancement coefficient can be determined according to the pixel variance value and the preset variance threshold.
The preset variance threshold may be set according to an actual situation, or the preset variance threshold may be obtained through experiments in advance, for example, different images of the battery cell area are collected in an experiment process, and then a pixel variance value when a pole piece area of the battery cell is clearer is detected, where the pixel variance value can be used as the preset variance threshold. Through a great number of experiments, the inventor of the application finds that in a clearer battery cell area image, the pixel variance value of the pole piece area of the battery cell is about 15, so that the preset variance threshold value can be set to be 15. Of course, the preset variance threshold can be flexibly valued according to actual conditions, for example, can be 14 and 16 values, and can also be valued according to the actual required effect.
In this way, when determining the contrast stretching coefficient, if the preset variance threshold value is 15, and the pixel variance value is greater than or equal to 15, it may be determined that the contrast stretching coefficient may be 65535 or other values, which indicates that nonlinear stretching is to be performed, and if the pixel variance value is less than 15, the contrast stretching coefficient may be set to 0, which indicates that nonlinear stretching is not to be performed, and of course, in practical application, a smaller value may also be obtained according to the requirement, for example, when the pixel variance value is less than 15, the contrast stretching coefficient value is 1 or 2, and so on. That is, the contrast stretching coefficient may be determined according to the pixel variance value and the preset variance threshold, and in the case that the pixel variance value is different from the preset variance threshold, the corresponding contrast stretching coefficient may take different values, which may set the value of the contrast stretching coefficient in the case that the pixel variance value is different from the preset variance threshold according to the actual requirement, for example, when the pixel variance value is greater than or equal to the preset variance threshold, the value of the contrast stretching coefficient is x, and when the pixel variance value is less than the preset variance threshold, the value of the contrast stretching coefficient is y, where x and y may be flexibly set according to the actual requirement.
In some embodiments, the pixel variance value herein may refer to a pixel variance value of a certain area, for example, an image of a battery cell area may be divided into a plurality of image areas, and then the pixel variance value of each image area is calculated, so that whether the image area is a pole piece area of the battery cell can be known according to the pixel variance value, then a corresponding contrast stretching coefficient may be determined for each image area, for example, if the pixel variance value of the image area 1 is greater than a preset variance threshold, the contrast stretching coefficient of the image area 1 is a1, and for each pixel point in the image area 1, the pixel value of the pixel point may be substituted into the nonlinear stretching formula to calculate, so as to obtain the pixel value of each pixel point in the image area 1 after nonlinear stretching. If the pixel variance value of the image area 2 is smaller than the preset variance threshold, the contrast stretching coefficient of the image area 2 is a2, and at this time, the pixel value of the image area 2 may also be substituted into the nonlinear stretching formula to perform calculation, so as to obtain the pixel value of each pixel point in the image area 2 after nonlinear stretching.
It should be understood that, the pixel maximum value and the pixel minimum value herein may also refer to the pixel maximum value and the pixel minimum value of the image area, for example, when calculating the pixel value of the pixel point of the image area 1 after nonlinear stretching, the pixel maximum value and the pixel minimum value substituted into the nonlinear stretching formula refer to the pixel maximum value and the pixel minimum value corresponding to the image area 1.
The stretching parameters may also include pixel enhancement factors in order to enhance the brightness and contrast of the non-linearly stretched image.
Here, when the pixel enhancement coefficient is determined in a similar manner to the manner of determining the contrast stretch coefficient, for example, when the pixel variance value is greater than or equal to the preset variance threshold, the pixel enhancement coefficient may take a value j, when the pixel variance value is less than the preset variance threshold, the pixel enhancement coefficient may take a value k, and it is understood that, when the pixel variance value is different from the preset variance threshold, the corresponding pixel enhancement coefficient may take a different value, which may set the value of the pixel enhancement coefficient according to the actual requirement, when the pixel variance value is greater than or equal to the preset variance threshold, the pixel enhancement coefficient may take a value j, and when the pixel variance value is less than the preset variance threshold, the pixel enhancement coefficient may take a value k, where j and k may be flexibly set according to the actual requirement.
For example, the above mentioned j may be 20, and k may be 0, where the value of the pixel enhancement coefficient is 20, which is found by the inventor of the present solution through a lot of experiments that the enhancement effect on the image is better when the value is obtained, and of course, in practical application, other values may be obtained as required, for example, the value is 18 or 21. When the pixel variance value is smaller than the preset variance threshold, it indicates that stretching is not needed, and enhancement is not needed naturally, and the pixel enhancement coefficient takes a value of 0, however, in practical application, a smaller value, for example, a value of 1 or 2, may be also taken according to the requirement.
If the nonlinear stretching formula constructed by the exponential function is constructed based on the contrast stretching coefficient and the pixel enhancement coefficient, the nonlinear stretching formula constructed by the exponential function can be as follows:
wherein,representing the pixel value of the pixel point after nonlinear stretching, and G represents the pixel value of the pixel point in the image of the battery cell area, < ->Representation pairSpecific elongation coefficient, < >>Representing pixel enhancement coefficients,/->Representing the pixel minimum,/->Representing the pixel maximum.
By way of example, the contrast stretching coefficientAnd pixel enhancement coefficient->The values of (2) may be as follows:,/>wherein->Representing the pixel variance value, the preset variance threshold is 15. It can be understood that the values of the contrast stretching coefficient and the pixel enhancement coefficient are only an example, in the actual situation, the values can be flexibly set according to the needs according to the comparison situation of the pixel variance value and the preset variance threshold, for example, when the pixel variance value is smaller than the preset variance threshold, the values of the contrast stretching coefficient and the pixel enhancement coefficient can be 1, and other values can be flexibly set according to the actual needs.
It will be appreciated that if there is no contrast stretch factor, i.e. the stretch parameter includes only pixel enhancement factors, here The nonlinear stretching formula a can be replaced by a constant, and in this case, the nonlinear stretching formula can be expressed as follows:
wherein,representing the pixel value of the pixel point after nonlinear stretching, and G represents the pixel value of the pixel point in the image of the battery cell area, < ->Representing a constant, the specific value can be flexibly set according to the actual requirement, and the user can be at a premium>Representing pixel enhancement coefficients,/->Representing the pixel minimum,/->Representing the pixel maximum.
In this manner, the image of the cell region may be divided into regions according to the above manner, then, for each image region, a corresponding pixel variance value, a contrast stretching coefficient, a pixel enhancement coefficient, a pixel maximum value, and a pixel minimum value are determined, and then, the pixel value of each pixel point in the image region after nonlinear stretching is calculated according to the above formula.
The above-mentioned method for dividing the battery cell region image into regions may be flexibly set according to practical situations, for example, the battery cell region may be divided into blocks according to a set size, or the regions may be divided at will.
In the implementation process, the stretching parameters comprise contrast stretching coefficients, so that the contrast of the cell area image can be further enhanced, and the stretching effect is improved. The stretching parameters comprise pixel enhancement coefficients, so that the contrast ratio in the cell area image can be further highlighted, and the stretching effect is improved. The nonlinear stretching formula adopts exponential stretching, so that gray scale intervals in the battery cell region image can be enlarged, detail characteristics are highlighted, and further stretching effect can be improved.
On the basis of the above embodiment, because there is interference between the levels of the battery cells, in order to highlight the features between the levels of the battery cells, when the above-mentioned area division is performed on the battery cell area image, the area division may also be performed by adopting a convolution window mode, for example, the convolution window size may be determined first, then the battery cell area image is traversed according to the convolution window size, and the pixel maximum value, the pixel minimum value and the stretching parameter of the image area corresponding to the convolution window are obtained, when the stretched image is obtained, the pixel value of the corresponding pixel point in the corresponding image area after the nonlinear stretching is performed on the battery cell area image by using the nonlinear stretching formula constructed by the exponential function may be calculated until the pixel value of each pixel point after the nonlinear stretching is obtained, so as to obtain the stretched image.
The convolution window size may be flexibly set according to actual requirements, for example, the convolution window size is 1x3, and the step size is 1, as shown in fig. 2, where the image area 1 corresponding to the first convolution window includes 3 pixel points, at this time, the maximum value, the minimum value and the stretching parameter of the pixel corresponding to the image area 1 may be obtained first, and the obtaining manner of the stretching parameter may be described with reference to the related description in the foregoing embodiments. Then substituting the maximum value, the minimum value, the stretching parameter and the pixel value of the first pixel point into the nonlinear stretching formula to calculate the pixel value of the first pixel point after nonlinear stretching. Then the convolution window moves backwards by one step length, at this time, the image area 2 corresponding to the second convolution window is obtained, and the pixel value of the first pixel point (namely the second pixel point) of the image area 2 after nonlinear stretching can be calculated in the same manner. Therefore, the pixel values of all the pixel points after nonlinear stretching can be obtained in the same way in sequence, and finally a stretched image is obtained.
It should be noted that if the convolution window is at the edge, the area may be divided by filling pixels, such as the image area 4 in fig. 2, where a pixel 0 may be filled, and the minimum value of the pixel in the image area 4 is 0, and the subsequent calculation process is the same as the above manner. Alternatively, when the convolution window is at the edge, it may be moved forward, so that the convolution window can contain a corresponding number of pixels, for example, the image area 4 may also be an area as further shown in fig. 2, and then the calculation process is performed on the image area 4 in the same manner.
It should be noted that, the moving step length of the convolution window may also be set according to actual requirements, so that the number of pixels in each image area calculated by the moving step length is related to the size of the convolution window, for example, the convolution window size is 1*3, and the step length is 2, then the number of calculated pixels in each image area is 2, that is, the first pixel point and the second pixel point of the starting position of the image area are the convolution window size is 2×2, and the step length is 2, then the number of calculated pixels in each image area is 4, that is, all pixels in the image area, so that the corresponding pixels in the image area are not only the first pixel point, but can be understood to be the pixels determined by the window size and the moving step length.
In the implementation process, the region division is carried out on the battery cell region image according to the convolution window size, so that the characteristics among the layers of the battery cell can be better highlighted when nonlinear stretching is carried out, and the stretching effect is improved.
On the basis of the above embodiment, in order to improve the stretching effect, in the above manner of determining the size of the convolution window, the thickness of the cathode and anode plates of the battery cell may also be obtained, and then the size of the convolution window may be determined according to the thickness.
The corresponding relation between the thickness and the convolution window size can be obtained through a large number of experiments in advance, for example, when determining which thickness corresponds to which convolution window size through a large number of experiments, the corresponding relation between the determined thickness and the convolution window size can be stored in the image processing device, and then the corresponding relation can be searched by obtaining the thickness of the cathode and anode plates of the current battery cell when determining the convolution window size, and then the corresponding convolution window size is obtained.
In the implementation process, the more proper convolution window size can be determined according to the thickness of the cathode pole piece, so that the cell area can be reasonably divided, detail characteristics can be better captured when nonlinear stretching is performed, and the effect of subsequent cell defect detection is further improved.
On the basis of the above embodiment, in the manner of extracting the cell region image including the cells in the cell image, histogram statistics may be performed on the cell image to determine the image segmentation threshold, and then the cell region image including the cells may be segmented from the cell image by using the image segmentation threshold.
Through carrying out histogram statistics on the battery cell image, the gray value distribution condition in the battery cell image can be intuitively seen. For example, counting the number of pixels on each gray level in the cell image to form a histogram, and then finding the gray level with a larger number of pixels in the histogram, where the pixel area corresponding to the gray level can be understood as the cell area in the image, where the cell area can be determined by acquiring the peak value or the valley value in the histogram. Then, according to the position of the peak value, a proper threshold value, namely an image segmentation threshold value, is selected to segment the battery cell image into different areas, for example, according to the principle of X-ray image acquisition, the pixel value of the area where the battery cell is located in the X-ray image should be lower, and the pixel value corresponding to the non-battery cell area should be higher, so that when the battery cell area image is segmented, the pixel value in the battery cell image is smaller than or equal to the image segmentation threshold value, and is considered to be the battery cell area, the pixel value is larger than the image segmentation threshold value, and is considered to be the non-battery cell area, and thus the battery cell area image containing the battery cell can be segmented from the battery cell image.
In the implementation process, since the histogram statistics is statistics related to gray values, complex calculation and processing are not required for each pixel, so that the calculation cost is low, and rapid segmentation of images can be realized.
On the basis of the above embodiment, since the segmented cell region image may still include a small amount of background information, when the nonlinear stretching processing is performed on the cell region image, the nonlinear stretching processing may be performed only on the pixel points of the cell region, for example, if the pixel value of the corresponding pixel point in the cell region image is less than or equal to the stretching threshold value, the nonlinear stretching processing is performed on the corresponding pixel point in the cell region image by using the nonlinear stretching formula constructed by the exponential function, so as to obtain the stretched image.
That is, for the pixel points whose pixel values are less than or equal to the stretch threshold value, the nonlinear stretching method of the above-described method may be adopted for processing, whereas for the pixel points whose pixel values are greater than the stretch threshold value, the nonlinear stretching processing may not be adopted. The calculation formula can be as follows:
wherein G represents the pixel value of a certain pixel point,representing the stretch threshold.
It will be appreciated that the stretching threshold may be set according to practical situations, for example, the lowest threshold of the pixel points of the cell area may be determined through a lot of experiments, and then the lowest threshold is determined as the stretching threshold. Or, the stretching threshold value may be set smaller than the image segmentation threshold value, because the background information of the non-battery cell region may be segmented during segmentation, and the pixel value of the background image of the non-battery cell region is generally larger than the pixel value of the battery cell region, so that the pixel point where the battery cell in the image is located can be determined by setting a stretching threshold value smaller than the image segmentation threshold value, and further, nonlinear stretching processing is performed on the pixel point, so that a better stretching effect can be realized on the pixel point of the battery cell.
In the implementation process, since the region for performing defect detection is generally the cell pixel region, only the cell pixel region in the cell region image is subjected to nonlinear stretching treatment, so that the stretching treatment efficiency can be improved.
On the basis of the embodiment, the X-ray device can emit X-ray with uniformly distributed dose through the X-ray light tube, when the X-ray penetrates through a certain part of the battery cell, the X-ray is influenced by factors such as thickness and density of the part, attenuation of corresponding degree is further generated, and the pixel value of each pixel point in the battery cell area image can be related to unattenuated dose after the X-ray penetrates through the corresponding part of the battery cell. For example, when the conditions such as the material density are the same, the smaller the thickness of the cell part penetrated by the X-ray, the lower the dose of X-ray attenuation, the higher the dose reaching the program equipment, the higher the brightness of the pixel at the corresponding position in the obtained cell region image, and if the pixel value is defined as the brightness value, the smaller the thickness of the cell part, the higher the pixel value of the corresponding pixel in the cell region image can be summarized.
When the X-ray equipment is adopted to acquire the image of the region of the current core, the acquisition parameters of the X-ray equipment can be set firstly, including voltage, current, magnification, exposure time and the like, and as can be understood, the set acquisition parameters can be different under different scene requirements.
The basic principle of X-ray imaging is that when X-ray passes through an irradiated object, the intensity of rays becomes smaller due to scattering, absorption and other factors, and ideally, the ray attenuation formula in the process can be described as follows:
wherein I represents the received energy, namely the dose of the radiation attenuated at a certain pixel point in the image of the cell region, and also can refer to the pixel value of the pixel point,represents the incident energy, i.e. the dose of the input radiation, E represents the material coefficient, x represents the material thickness.
As the thickness of the cell layer increases gradually, the contrast between adjacent layers becomes weaker gradually, as shown in fig. 3, so, according to the principle of ray attenuation, by using the above-mentioned I to represent the pixel value, the log transformation is performed on the cell region image, so as to obtain a corresponding primary relation model along with the thickness change, and finally, the transformed cell region image is obtained, as shown in fig. 4, the transformation process can be represented as follows:
the battery cell region image after the logarithmic transformation is understood to be lnI, so that the corresponding relation between the battery cell thickness and the pixel value of the pixel point in the battery cell region image can be obtained, the distribution condition of the battery cell thickness can be accurately reflected through the pixel value, and further reliable detection of the battery cell defect can be realized.
It should be noted that, the cell region image in the above embodiment may refer to a transformed cell region image, that is, the transformed cell region image is subjected to a nonlinear stretching process, and the image after the nonlinear stretching transformation may be as shown in fig. 5.
In the implementation process, according to the change rule of the ray intensity, the density of the battery cell is obtained wirelessly by carrying out logarithmic transformation on the battery cell area image, so that the influence of the thickness of the battery cell on the pixel value of each pixel point can be amplified, and further, after nonlinear stretching is carried out on the battery cell area image, the thickness distribution of the battery cell can be more clearly defined, and the detection effect of the battery cell defect is improved.
Based on the above embodiment, in the actual application scenario, there is noise interference in the cell image obtained by using the X-ray imaging, or there is also possibility of noise interference in the obtained cell region image, so the cell region image or the cell image may be subjected to denoising processing, where the denoising processing may be implemented by using a gaussian filtering and an average filtering manner.
For example, firstly, processing the battery cell area image or the battery cell image by adopting average filtering, wherein the implementation mode of the average filtering is as follows:
Wherein f (x, y) is a cell region image or a cell image containing noise, g (x, y) is a cell region image or a cell image obtained after mean value filtering, s is a set of pixels in a template with a point (i.j) as a center, and the size of the template is m x n.
And then, carrying out Gaussian filtering again on the cell region image or the cell image after the mean value filtering, wherein the Gaussian filtering is realized as follows:
wherein G (x, y) represents a cell region image or a cell image obtained after Gaussian filtering,the standard deviation of the gaussian function is represented, and (x, y) represents the coordinates of the pixel point.
It can be understood that the electric core area image or the electric core image may be subjected to gaussian filtering and then to mean filtering, and the filtering sequence of the electric core area image and the electric core image may not be limited in particular. In practical application, other filtering methods (such as median filtering) can be adopted to filter noise in the battery cell region image or the battery cell image, or a combination of multiple filtering methods can be adopted to process the battery cell region image or the battery cell image, so that the influence on the defect detection result of the battery cell in the follow-up process can be reduced.
On the basis of the above embodiment, after obtaining the stretching image, the defect detection may be performed on the battery cell by using the stretching image, as shown in fig. 6, and the embodiment of the application provides a flowchart of a method for detecting the defect of the battery cell, which includes the following steps:
Step S210: a stretched image is acquired.
The stretched image is obtained by the image processing method. It will be appreciated that the apparatus for performing the image processing method and the apparatus for performing the defect detection method herein may not be the same apparatus, but may be the same apparatus, and if they are different apparatuses, the defect detection apparatus may acquire a stretched image from the image processing apparatus and then perform defect detection on the stretched image. In other implementations, after the image processing device obtains the stretched image, the stretched image may also be transmitted to another device for storage, for example, a cloud end, where in this case, the defect detection device may obtain the stretched image from the cloud end and then perform defect detection.
Step S220: and detecting the defects of the battery cells according to the stretching images.
The defect types of the battery cell may include: the cathode and anode plates are wrinkled, overlapped or metal leaked, whether the cathode is terminated correctly, whether the cathode and anode distance is qualified, whether the length of the anode compared with the cathode is qualified, the alignment degree of the cathode and the anode, and the like, and in practical application, more than one defect type can be detected specifically.
The defect detection can be implemented by an algorithm in the related art, for example, a contrast enhancement algorithm or an edge detection algorithm, so as to extract a region with a severely changed thickness of the cell, so as to implement cell detection. Alternatively, the neural network model may be used to detect defects and types of defects present in the stretched image, and reference may be made specifically to the implementation process in the related art, which is not described in detail herein.
In the above embodiment, in order to implement online nonlinear stretching processing and defect detection on the cell area image, the image processing device and the defect detection device may be deployed online, for example, in the process of cell production, the image processing device and the defect detection device are deployed online, and a flowchart of cell production may be shown in fig. 7. After the battery cell is subjected to hot press shaping, image acquisition can be performed through an X-ray, at this time, the acquired battery cell image can be subjected to nonlinear stretching processing through image processing equipment to obtain a stretched image (wherein data preprocessing is nonlinear stretching processing in the scheme), the stretching processing process is shown in fig. 8, wherein a lightweight AI model in fig. 7 and 8 is a neural network model for defect detection, and a Sigmoid function in fig. 8 can refer to the nonlinear stretching function in the embodiment. Then the stretched image passes through defect detection equipment to detect defects, so that online defect detection can be realized. According to the scheme, defect detection can be performed after hot press shaping, instantaneity is stronger, if defects are found at the moment, the subsequent production flow can be suspended, and subsequent useless processing is not needed to be continued, so that the production efficiency can be improved.
Referring to fig. 9, fig. 9 is a block diagram illustrating an image processing apparatus 300 according to an embodiment of the present application, where the apparatus 300 may be a module, a program segment, or a code on an electronic device. It should be understood that the apparatus 300 corresponds to the above embodiment of the method of fig. 1, and is capable of performing the steps involved in the embodiment of the method of fig. 1, and specific functions of the apparatus 300 may be referred to in the above description, and detailed descriptions thereof are omitted herein as appropriate to avoid redundancy.
Optionally, the apparatus 300 includes:
a cell image acquisition module 310, configured to acquire a cell image of a cell;
the area image obtaining module 320 is configured to extract a cell area image including the cell in the cell image;
the image processing module 330 is configured to perform a nonlinear stretching process on the cell area image by using a nonlinear stretching formula constructed by an exponential function, so as to obtain a stretched image, where the nonlinear stretching formula is constructed based on a stretching parameter, the stretching parameter includes a contrast stretching coefficient and/or a pixel enhancement coefficient, and the contrast stretching coefficient and the pixel enhancement coefficient are determined based on a pixel variance value of the cell area image.
Optionally, the image processing module 330 is configured to obtain a maximum value of a pixel, a minimum value of a pixel, and the stretching parameter in the image of the battery cell area; and calculating the pixel value of each pixel point after nonlinear stretching the battery cell area image by using a nonlinear stretching formula constructed by an exponential function according to the pixel maximum value, the pixel minimum value and the stretching parameter so as to obtain a stretched image.
Optionally, the image processing module 330 is configured to obtain a pixel variance value in the image of the cell area; and determining the contrast stretching coefficient and/or the pixel enhancement coefficient according to the pixel variance value and a preset variance threshold.
Optionally, if the stretching parameters include a contrast stretching coefficient and a pixel enhancement coefficient, a nonlinear stretching formula constructed using an exponential function is expressed as follows:
wherein,representing the pixel value of the pixel point after nonlinear stretching, wherein G represents the pixel value of the pixel point in the image of the battery cell area, < ->Represents the contrast stretch factor,/->Representing the pixel enhancement factor,/->Representing the pixel minimum, +.>Representing the pixel maximum.
Optionally, the image processing module 330 is configured to determine a convolution window size; traversing the battery cell region image according to the size of the convolution window to obtain a pixel maximum value, a pixel minimum value and a stretching parameter of an image region corresponding to the convolution window; and calculating the pixel value of the corresponding pixel point in the corresponding image area after nonlinear stretching is carried out on the battery cell area image by using a nonlinear stretching formula constructed by an exponential function according to the pixel maximum value, the pixel minimum value and the stretching parameter of the corresponding image area until the pixel value of each pixel point after nonlinear stretching is obtained, so as to obtain a stretched image.
Optionally, the image processing module 330 is configured to obtain a thickness of the cathode and anode plates of the electrical core; and determining the size of the convolution window according to the thickness.
Optionally, the area image obtaining module 320 is configured to perform histogram statistics on the battery cell image, and determine an image segmentation threshold; and segmenting a battery cell region image containing the battery cell from the battery cell image by utilizing the image segmentation threshold.
Optionally, the image processing module 330 is configured to perform nonlinear stretching processing on the corresponding pixel point in the image of the electrical core area if the pixel value of the corresponding pixel point in the image of the electrical core area is less than or equal to the stretching threshold value, so as to obtain a stretched image.
Optionally, the battery cell area image is an image obtained based on X-ray photographing.
Optionally, the apparatus 300 further includes:
and the transformation module is used for carrying out logarithmic transformation on the battery cell area image to obtain a transformed battery cell area image.
Referring to fig. 10, fig. 10 is a block diagram illustrating a structure of a device 400 for detecting a cell defect according to an embodiment of the present application, where the device 400 may be a module, a program segment, or a code on an electronic device. It should be understood that the apparatus 400 corresponds to the above embodiment of the method of fig. 6, and is capable of executing the steps involved in the embodiment of the method of fig. 6, and specific functions of the apparatus 400 may be referred to in the above description, and detailed descriptions thereof are omitted herein as appropriate to avoid redundancy.
Optionally, the apparatus 400 includes:
a stretched image acquisition module 410, configured to acquire a stretched image, where the stretched image is obtained according to the image processing method in the above embodiment;
and the defect detection module 420 is configured to detect a defect of the battery cell according to the stretched image.
It should be noted that, for convenience and brevity, a person skilled in the art will clearly understand that, for the specific working procedure of the apparatus described above, reference may be made to the corresponding procedure in the foregoing method embodiment, and the description will not be repeated here.
Referring to fig. 11, fig. 11 is a schematic structural diagram of an electronic device for executing an image processing method or a method for detecting a cell defect according to an embodiment of the present application, if the electronic device is used for executing the image processing method, the electronic device may be the above-mentioned image processing device, and if the electronic device is used for executing the method for detecting a cell defect, the electronic device may be the above-mentioned defect detecting device, and the electronic device may include: at least one processor 510, such as a CPU, at least one communication interface 520, at least one memory 530, and at least one communication bus 540. Wherein the communication bus 540 is used to enable connected communications between these components. The communication interface 520 of the device in the embodiment of the present application is used to perform signaling or data communication with other node devices. The memory 530 may be a high-speed RAM memory or a nonvolatile memory (non-volatile memory), such as at least one disk memory. Memory 530 may also optionally be at least one storage device located remotely from the aforementioned processor. The memory 530 has stored therein computer readable instructions which, when executed by the processor 510, perform the method processes described above with respect to fig. 1 or 6.
It is to be understood that the configuration shown in fig. 11 is illustrative only, and the electronic device may also include more or fewer components than shown in fig. 11, or have a different configuration than shown in fig. 11. The components shown in fig. 11 may be implemented in hardware, software, or a combination thereof.
Embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs a method process performed by an electronic device in an embodiment of a method as shown in fig. 1 or fig. 6.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing the methods provided by the above-described method embodiments, for example, comprising:
acquiring a battery cell image of a battery cell;
extracting a battery cell region image containing the battery cell from the battery cell image;
and carrying out nonlinear stretching treatment on the cell region image by using a nonlinear stretching formula constructed by an exponential function to obtain a stretched image, wherein the nonlinear stretching formula is constructed based on stretching parameters, the stretching parameters comprise a contrast stretching coefficient and/or a pixel enhancement coefficient, and the contrast stretching coefficient and the pixel enhancement coefficient are determined based on a pixel variance value of the cell region image.
In summary, the embodiments of the present application provide an image processing method, a method, an apparatus, and a device for detecting a cell defect, where a stretched image is obtained by performing nonlinear stretching processing on an image of a cell region of a cell, so that nonlinear stretching processing can be performed on pixels of a region where the cell is located, further, after the processing, the contrast between each level of a cathode and an anode of the cell in the image of the cell region can be improved, the imaging effect is improved, and a nonlinear stretching formula adopts an exponential function, so that the gray interval in the image of the cell region can be enlarged, the detail feature is highlighted, the stretching effect can be improved, and further, an image with higher definition can be provided for the subsequent defect detection of the cell, so as to improve the accuracy of the cell defect detection.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
Further, the units described as separate units may or may not be physically separate, and units displayed as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, functional modules in various embodiments of the present application may be integrated together to form a single portion, or each module may exist alone, or two or more modules may be integrated to form a single portion.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application, and various modifications and variations may be suggested to one skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims (15)

1. An image processing method, the method comprising:
acquiring a battery cell image of a battery cell;
extracting a battery cell region image containing the battery cell from the battery cell image;
and carrying out nonlinear stretching treatment on the cell region image by using a nonlinear stretching formula constructed by an exponential function to obtain a stretched image, wherein the nonlinear stretching formula is constructed based on stretching parameters, the stretching parameters comprise a contrast stretching coefficient and/or a pixel enhancement coefficient, and the contrast stretching coefficient and the pixel enhancement coefficient are determined based on a pixel variance value of the cell region image.
2. The method of claim 1, wherein the nonlinear stretching of the cell area image using the nonlinear stretching formula constructed by the exponential function to obtain a stretched image comprises:
acquiring a pixel maximum value, a pixel minimum value and the stretching parameter in the battery cell area image;
and calculating the pixel value of each pixel point after nonlinear stretching the battery cell area image by using a nonlinear stretching formula constructed by an exponential function according to the pixel maximum value, the pixel minimum value and the stretching parameter so as to obtain a stretched image.
3. The method according to claim 2, characterized in that the stretching parameters are obtained by:
acquiring a pixel variance value in the battery cell area image;
and determining the contrast stretching coefficient and/or the pixel enhancement coefficient according to the pixel variance value and a preset variance threshold.
4. The method of claim 2, wherein if the stretching parameters include contrast stretching coefficients and pixel enhancement coefficients, a nonlinear stretching formula constructed using an exponential function is expressed as follows:
wherein,representing the pixel value of the pixel point after nonlinear stretching, wherein G represents the pixel value of the pixel point in the image of the battery cell area, < ->Represents the contrast stretch factor,/->Representing the pixel enhancement factor,/->Representing the minimum value of the pixel in question,representing the pixel maximum.
5. The method of claim 2, wherein the acquiring the pixel maximum value, the pixel minimum value, and the stretching parameter in the cell area image comprises:
determining a convolution window size;
traversing the battery cell region image according to the size of the convolution window to obtain a pixel maximum value, a pixel minimum value and a stretching parameter of an image region corresponding to the convolution window;
The calculating a pixel value of each pixel point after nonlinear stretching the battery cell area image by using a nonlinear stretching formula constructed by an exponential function according to the pixel maximum value, the pixel minimum value and the stretching parameter to obtain a stretched image comprises the following steps:
and calculating the pixel value of the corresponding pixel point in the corresponding image area after nonlinear stretching is carried out on the battery cell area image by using a nonlinear stretching formula constructed by an exponential function according to the pixel maximum value, the pixel minimum value and the stretching parameter of the corresponding image area until the pixel value of each pixel point after nonlinear stretching is obtained, so as to obtain a stretched image.
6. The method of claim 5, wherein the determining the convolution window size comprises:
acquiring the thickness of a cathode plate and an anode plate of the battery cell;
and determining the size of the convolution window according to the thickness.
7. The method of claim 1, wherein the nonlinear stretching of the cell area image using the nonlinear stretching formula constructed by the exponential function to obtain a stretched image comprises:
if the pixel value of the corresponding pixel point in the battery cell area image is smaller than or equal to the stretching threshold value, nonlinear stretching processing is carried out on the battery cell area image by using a nonlinear stretching formula constructed by an exponential function, and a stretching image is obtained.
8. The method according to any one of claims 1-7, wherein the cell area image is an image based on X-ray imaging.
9. The method of claim 8, wherein after the extracting the cell region image including the cell in the cell image, the nonlinear stretching process is performed on the cell region image by using the nonlinear stretching formula constructed by an exponential function, and before obtaining a stretched image, the method further comprises:
and carrying out logarithmic transformation on the battery cell area image to obtain a transformed battery cell area image.
10. A method for detecting a cell defect, the method comprising:
acquiring a stretched image, the stretched image being obtained according to the method of any one of claims 1-9;
and detecting the defects of the battery cells according to the stretching images.
11. An image processing apparatus, characterized in that the apparatus comprises:
the battery cell image acquisition module is used for acquiring a battery cell image of the battery cell;
the region image acquisition module is used for extracting a battery cell region image containing the battery cell in the battery cell image;
the image processing module is used for carrying out nonlinear stretching processing on the battery cell region image by utilizing a nonlinear stretching formula constructed by an exponential function to obtain a stretched image, wherein the nonlinear stretching formula is constructed based on stretching parameters, the stretching parameters comprise a contrast stretching coefficient and/or a pixel enhancement coefficient, and the contrast stretching coefficient and the pixel enhancement coefficient are determined based on a pixel variance value of the battery cell region image.
12. A device for detecting a cell defect, the device comprising:
a stretched image acquisition module for acquiring a stretched image, the stretched image being obtained according to the method of any one of claims 1-9;
and the defect detection module is used for detecting the defects of the battery cells according to the stretching image.
13. An electronic device comprising a processor and a memory storing computer readable instructions that, when executed by the processor, perform the method of any of claims 1-10.
14. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, performs the method according to any of claims 1-10.
15. A computer program product comprising computer program instructions which, when read and executed by a processor, perform the method of any of claims 1-10.
CN202410233964.4A 2024-03-01 Image processing method, battery cell defect detection method, device and equipment Active CN117853319B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410233964.4A CN117853319B (en) 2024-03-01 Image processing method, battery cell defect detection method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410233964.4A CN117853319B (en) 2024-03-01 Image processing method, battery cell defect detection method, device and equipment

Publications (2)

Publication Number Publication Date
CN117853319A true CN117853319A (en) 2024-04-09
CN117853319B CN117853319B (en) 2024-07-02

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104112133A (en) * 2014-07-30 2014-10-22 福州大学 Face detection preprocessing method under complex illumination
CN110020999A (en) * 2019-04-15 2019-07-16 中科和光(天津)应用激光技术研究所有限公司 A kind of uncooled ir thermal imagery self organizing maps method based on homomorphic filtering
US20190370935A1 (en) * 2018-05-31 2019-12-05 Quanta Computer Inc. Method and system for non-linearly stretching a cropped image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104112133A (en) * 2014-07-30 2014-10-22 福州大学 Face detection preprocessing method under complex illumination
US20190370935A1 (en) * 2018-05-31 2019-12-05 Quanta Computer Inc. Method and system for non-linearly stretching a cropped image
CN110020999A (en) * 2019-04-15 2019-07-16 中科和光(天津)应用激光技术研究所有限公司 A kind of uncooled ir thermal imagery self organizing maps method based on homomorphic filtering

Similar Documents

Publication Publication Date Title
CN111986183B (en) Chromosome scattered image automatic segmentation and identification system and device
KR101361644B1 (en) Image processing device and image defogging method
CN113837974B (en) NSST domain power equipment infrared image enhancement method based on improved BEEPS filtering algorithm
CN111179202B (en) Single image defogging enhancement method and system based on generation countermeasure network
CN110532746B (en) Face checking method, device, server and readable storage medium
WO2019184851A1 (en) Image processing method and apparatus, and training method for neural network model
CN111444555B (en) Temperature measurement information display method and device and terminal equipment
CN112330613B (en) Evaluation method and system for cytopathology digital image quality
CN111311562B (en) Ambiguity detection method and device for virtual focus image
CN114240978A (en) Cell edge segmentation method and device based on adaptive morphology
CN117409083B (en) Cable terminal identification method and device based on infrared image and improved YOLOV5
CN112507818B (en) Illumination estimation method and system based on near infrared image
CN117853319B (en) Image processing method, battery cell defect detection method, device and equipment
CN117218026B (en) Infrared image enhancement method and device
CN117853319A (en) Image processing method, battery cell defect detection method, device and equipment
CN115908802A (en) Camera shielding detection method and device, electronic equipment and readable storage medium
Wang et al. Pixel-Level dehazed image quality assessment based on dark channel prior and depth
Zhou et al. Image Dehazing Algorithm Based on Particle Swarm Optimization for Sky Region Segmentation
CN114187303A (en) Oral cavity image processing method, device, electronic equipment and computer storage medium
CN112184733A (en) Cervical abnormal cell detection device and method
CN112381809A (en) Iris image definition evaluation method based on relative entropy
Xing et al. Research on Automatic Color Scale Optimization Based Canny Identification Strategy for Underwater Fish
Setiawan et al. Improved Edge Detection Based on Adaptive Gaussian Smoothing in X-Ray Image
CN115205939B (en) Training method and device for human face living body detection model, electronic equipment and storage medium
Cheng Image Defogging Algorithm Based on Deblurgan Network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant