Battery pack corrosion determination method, device, electronic device and storage medium
By analyzing the number of pixels at the gamut level in the sample image to be tested, determining the target corrosion value and comparing it with the threshold, the problem of low corrosion aging and low accuracy of manual visual inspection of battery packs in the prior art is solved, and efficient and accurate corrosion detection is achieved.
Patent Information
- Application Number
- CN202411567862.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-11-05
AI Technical Summary
When detecting whether there is corrosion in the battery pack of new energy vehicles, the prior art relies on manual visual inspection, which has problems with low timeliness and detection accuracy.
By acquiring the image of the sample to be tested, the target corrosion value is determined based on the preset color gamut level and image, and by comparing it with the preset corrosion value threshold, it is determined whether the sample to be tested has corrosion.
It realizes efficient and accurate judgment of whether there is corrosion in the sample to be tested, and avoids the timeliness and accuracy of manual visual inspection.
Smart Images

Figure CN119198771B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of corrosion detection, and more specifically, to a method, device, electronic device and storage medium for determining corrosion of a battery pack. Background Art
[0002] As the application market of new energy vehicles becomes more and more extensive, in the process of using new energy vehicles in coastal cities and northern cities in winter, due to the influence of deicing agents in coastal cities and northern cities in winter, the salt content in the air is relatively high. New energy vehicles are subject to salt spray corrosion conditions in long-term operation, which may cause corrosion on the surface of the battery pack, thus posing a safety hazard.
[0003] The current corrosion detection method mainly determines the degree of corrosion, that is, if corrosion is known to occur, the degree of corrosion is determined. The judgment of whether corrosion has occurred mainly relies on manual visual inspection, which has the problems of low timeliness and detection accuracy. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for determining corrosion of a battery pack, so as to efficiently and accurately determine whether corrosion occurs in a tested object.
[0005] In a first aspect, the present application provides a method for determining corrosion of a battery pack, comprising: acquiring an image of a sample to be tested; determining a target corrosion value of the image of the sample to be tested based on a preset color gamut level and the image of the sample to be tested; wherein the target corrosion value characterizes the relationship of the image of the sample to be tested, and the image relationship includes the relationship between the number of pixels in the image of the sample to be tested that are at the preset color gamut level and the total number of pixels in the image of the sample to be tested; determining whether corrosion occurs to the sample to be tested based on the target corrosion value and a preset corrosion value threshold.
[0006] In the embodiment of the present application, the target corrosion value of the sample image to be tested is determined according to the relationship between the number of pixels in the preset color gamut level in the sample image to be tested and the total number of pixels in the sample image to be tested, and then by setting a suitable corrosion value threshold, the target corrosion value of the sample image to be tested is compared with the corrosion value threshold, and when the target corrosion value of the sample image to be tested is greater than the corrosion value threshold, it is determined that the sample image to be tested has been corroded. Compared with relying on manual visual inspection to determine whether the sample to be tested has been corroded, the above method can efficiently and accurately determine whether the sample to be tested has been corroded.
[0007] In an optional embodiment, the corrosion value threshold is determined by: acquiring multiple corrosion sample images, where the corrosion sample images are images of samples that have undergone corrosion; determining the number of pixels in each color gamut level of the multiple corrosion sample images based on a preset color gamut level and the multiple corrosion sample images; and determining the corrosion value threshold based on the number of pixels in each color gamut level of the multiple corrosion sample images.
[0008] In an embodiment of the present application, when corrosion occurs, there is a difference between the color of the corroded area in the corrosion sample image and the color of the uncorroded area. By analyzing the number of pixels in the corrosion area in each color gamut level in the corrosion sample image, a suitable corrosion value threshold is determined, thereby determining whether corrosion has occurred in the sample to be tested based on the corrosion value threshold.
[0009] In an optional embodiment, determining the corrosion value threshold according to the number of pixels of the multiple corrosion sample images in each color gamut level includes: determining the corrosion value threshold according to the weight corresponding to each of the corrosion sample images in each of the color gamut levels and the number of pixels of each of the corrosion sample images in each of the color gamut levels.
[0010] In an embodiment of the present application, when corrosion occurs, there are differences in the distribution of the number of pixels in different color gamut levels. By setting appropriate weights and determining a suitable corrosion value threshold based on the number of pixels and the weights, the accuracy of subsequently determining whether corrosion has occurred in the sample to be tested based on the corrosion value threshold can be improved.
[0011] In an optional embodiment, the corrosion value threshold is determined according to the weight corresponding to each of the corrosion sample images at each of the color gamut levels and the number of pixels of each of the corrosion sample images in each of the color gamut levels, including: for each of the color gamut levels in each of the corrosion sample images, determining the product of the weight corresponding to the color gamut level and the number of pixels of the corrosion sample image in the color gamut level; accumulating the products corresponding to each of the color gamut levels to determine the corrosion occurrence value corresponding to the corrosion sample image; and taking the smallest corrosion occurrence value among multiple corrosion sample images as the corrosion value threshold.
[0012] In the embodiment of the present application, in the multiple corrosion sample images, the corrosion degree of different corrosion samples may be different. The more serious the corrosion degree, the more pixels there are in the corrosion sample image, and the more serious the corrosion degree, the larger the corresponding corrosion occurrence value. Since the purpose of the corrosion determination method provided in the present application is to determine whether the sample to be tested has been corroded. Therefore, using the smallest corrosion occurrence value in the multiple corrosion sample images as the corrosion value threshold can improve the accuracy of the subsequent determination of whether the sample to be tested has been corroded according to the corrosion value threshold.
[0013] In an optional embodiment, the corrosion value threshold is determined according to the weight corresponding to each of the corrosion sample images at each of the color gamut levels and the number of pixels of each of the corrosion sample images at each of the color gamut levels, including: for each of the color gamut levels, adding and averaging the weights corresponding to the respective corrosion sample images at the color gamut level to determine the weighted average value; wherein each of the color gamut levels corresponds to a weighted average value; for each of the color gamut levels, adding and averaging the number of pixels of each of the corrosion sample images at the color gamut level to determine the pixel average value; wherein each of the color gamut levels corresponds to a pixel average value; for each of the color gamut levels, determining the product of the weighted average value corresponding to the color gamut level and the pixel average value corresponding to the color gamut level; and accumulating the products corresponding to each of the color gamut levels as the corrosion value threshold.
[0014] In the embodiment of the present application, since there are differences in the number of pixels in different color gamut levels of different corrosion sample images, in order to reduce the errors introduced by individual differences, the weighted average value and pixel average value corresponding to each color gamut level are determined by adding and averaging, and then the corrosion value threshold is determined based on the weighted average value and the pixel average value, thereby determining the appropriate corrosion value threshold, thereby improving the accuracy of subsequent determination of whether corrosion occurs in the sample to be tested based on the corrosion value threshold.
[0015] In an optional embodiment, the weight corresponding to each of the eroded sample images at each of the color gamut levels is determined in the following manner: for each of the eroded sample images, the number of pixels of the eroded sample image at each color gamut level is determined; for each of the color gamut levels, the weight corresponding to the color gamut level is determined based on the ratio of the number of pixels of the eroded sample image at the color gamut level to the number of all pixels of the eroded sample image.
[0016] In an embodiment of the present application, taking into account the differences in the distribution of pixel points of different corrosion sample images in different color gamut levels, the weight corresponding to the color gamut level is determined according to the ratio of the number of pixel points of each corrosion sample image in each color gamut level to the number of all pixel points of the corrosion sample image, so that the determined weight is closer to the actual situation, thereby improving the accuracy of the weight corresponding to each color gamut level.
[0017] In an optional embodiment, the obtaining of multiple corrosion sample images includes: obtaining original images of different corrosion samples; normalizing the original images to obtain the multiple corrosion sample images; wherein the total number of pixels in each of the corrosion sample images is the same.
[0018] In the embodiment of the present application, when collecting original images of different corrosion samples, the resolutions of the original images collected by different collection devices may be different, resulting in differences in the total number of pixels between different original images. If the corrosion value threshold is directly determined using original images with different resolutions, the difference in the total number of pixels will cause errors in determining the corrosion value threshold, thereby reducing the accuracy of corrosion determination. By normalizing the original images of each corrosion sample to obtain multiple corrosion sample images, the total number of pixels in each corrosion sample image after normalization is the same, thereby improving the accuracy of subsequent determination of the corrosion value threshold.
[0019] In an optional embodiment, determining the target corrosion value of the sample image to be tested based on the preset color gamut level and the sample image to be tested includes: determining the number of pixels of the sample image to be tested in each color gamut level; determining the target corrosion value of the sample image to be tested based on the number of pixels of the sample image to be tested in each color gamut level.
[0020] In an embodiment of the present application, when corrosion occurs, there is a difference between the color of the corroded area and the color of the uncorroded area in the image of the sample to be tested. By analyzing the number of pixels in each color gamut level in the image of the sample to be tested, the target corrosion value of the image of the sample to be tested is determined, and then based on the relationship between the target corrosion value and the corrosion value threshold, it is determined whether corrosion has occurred in the sample to be tested.
[0021] In an optional embodiment, each of the color gamut levels corresponds to a target weight; determining the target corrosion value of the sample image to be tested according to the number of pixels of the sample image to be tested in each color gamut level includes: for each of the color gamut levels, determining the product of the target weight corresponding to the color gamut level and the number of pixels of the sample image to be tested in the color gamut level; and accumulating the products corresponding to each of the color gamut levels as the target corrosion value.
[0022] In an embodiment of the present application, since there are distribution differences in the number of pixels in different color gamut levels when corrosion occurs, in the process of determining the target corrosion value of the sample image to be tested, the target corrosion value is obtained by multiplying and adding the number of pixels in the sample image to be tested in different color gamut levels and the target weight corresponding to the color gamut level. This allows the target corrosion value of the sample image to be tested to more accurately reflect whether there is corrosion in the sample to be tested.
[0023] In an optional embodiment, the sample to be tested is arranged in a test chamber, and the test chamber is used to perform a salt spray test on the sample to be tested; an image acquisition device is arranged in the test chamber, and the image acquisition device is used to obtain an image of the sample to be tested at every preset time interval.
[0024] In an embodiment of the present application, an image acquisition device is provided in the test chamber to acquire images of the sample to be tested in the salt spray test, and then determine whether corrosion occurs based on the image, thereby realizing battery corrosion detection on the sample to be tested in the salt spray test.
[0025] In an optional embodiment, the sample to be tested is arranged in a battery compartment, and the battery compartment supplies power to electrical equipment; an image acquisition device is arranged in the battery compartment, and the image acquisition device is used to obtain the image of the sample to be tested at every preset time interval.
[0026] In an embodiment of the present application, an image acquisition device is provided in the battery compartment to acquire images of the sample to be tested during the power supply process, and then determine whether corrosion occurs based on the image, thereby realizing battery corrosion detection on the sample to be tested during the power supply process.
[0027] In a second aspect, the present application provides a corrosion determination device for a battery pack, comprising: an acquisition module, used to acquire an image of a sample to be tested; a determination module, used to determine a target corrosion value of the image of the sample to be tested based on a preset color gamut level and the image of the sample to be tested; wherein the target corrosion value characterizes the relationship between the image of the sample to be tested, and the image relationship includes the relationship between the number of pixels in the image of the sample to be tested that are at the preset color gamut level and the total number of pixels in the image of the sample to be tested; and whether corrosion occurs to the sample to be tested is determined based on the target corrosion value and a preset corrosion value threshold.
[0028] In an optional embodiment, the determination module is also used to obtain multiple corrosion sample images, where the corrosion sample images are images of samples that have undergone corrosion; determine the number of pixels in each color gamut level of the multiple corrosion sample images based on a preset color gamut level and the multiple corrosion sample images; and determine the corrosion value threshold based on the number of pixels in each color gamut level of the multiple corrosion sample images.
[0029] In an optional implementation, the determination module is specifically used to determine the corrosion value threshold according to the weight corresponding to each of the corrosion sample images at each of the color gamut levels and the number of pixels of each of the corrosion sample images at each of the color gamut levels.
[0030] In an optional embodiment, the determination module is specifically used to determine, for each color gamut level in each of the corrosion sample images, the product of the weight corresponding to the color gamut level and the number of pixels of the corrosion sample image in the color gamut level; accumulate the products corresponding to each of the color gamut levels to determine the corrosion occurrence value corresponding to the corrosion sample image; and use the minimum corrosion occurrence value among multiple corrosion sample images as the corrosion value threshold.
[0031] In an optional embodiment, the determination module is specifically used to, for each color gamut level, add and average the corresponding weights of each of the eroded sample images at the color gamut level to determine the weighted average value; wherein each of the color gamut levels corresponds to a weighted average value; for each of the color gamut levels, add and average the number of pixels of each of the eroded sample images in the color gamut level to determine the pixel average value; wherein each of the color gamut levels corresponds to a pixel average value; for each of the color gamut levels, determine the product of the weighted average value corresponding to the color gamut level and the pixel average value corresponding to the color gamut level; accumulate the products corresponding to each of the color gamut levels as the corrosion value threshold.
[0032] In an optional embodiment, the determination module is also used to determine, for each of the eroded sample images, the number of pixels of the eroded sample image in each color gamut level; for each of the color gamut levels, determine the weight corresponding to the color gamut level based on the ratio of the number of pixels of the eroded sample image in the color gamut level to the number of all pixels of the eroded sample image.
[0033] In an optional embodiment, the acquisition module is specifically used to acquire original images of different corrosion samples; normalize the original images to obtain the multiple corrosion sample images; wherein the total number of pixels in each of the corrosion sample images is the same.
[0034] In an optional embodiment, the determination module is specifically used to determine the number of pixels of the sample image to be tested in each color gamut level; and determine the target corrosion value of the sample image to be tested according to the number of pixels of the sample image to be tested in each color gamut level.
[0035] In an optional embodiment, each of the color gamut levels corresponds to a target weight; the determination module is specifically used to determine, for each of the color gamut levels, the product of the target weight corresponding to the color gamut level and the number of pixels of the sample image to be tested in the color gamut level; and the products corresponding to each of the color gamut levels are added up as the target corrosion value.
[0036] In an optional embodiment, the sample to be tested is set in a test chamber, and the test chamber is used to perform a salt spray test on the sample to be tested; an image acquisition device is set in the test chamber, and the image acquisition device is used to obtain the image of the sample to be tested at every preset time interval.
[0037] In an optional embodiment, the sample to be tested is arranged in a battery compartment, and the battery compartment supplies power to electrical equipment; an image acquisition device is arranged in the battery compartment, and the image acquisition device is used to obtain the image of the sample to be tested at every preset time interval.
[0038] In a third aspect, the present application provides an electronic device comprising: a processor, a memory and a bus; the processor and the memory communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute a method as described in any one of the aforementioned embodiments.
[0039] In a fourth aspect, the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are read and executed by a computer, the method as described in any one of the aforementioned embodiments is executed. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A flowchart of a method for determining corrosion of a battery pack provided in an embodiment of the present application;
[0042] Figure 2 A flowchart for determining a corrosion value threshold provided in an embodiment of the present application;
[0043] Figure 3 A flowchart for determining a preset color gamut level provided in an embodiment of the present application;
[0044] Figure 4 A flowchart of another method for determining corrosion of a battery pack provided in an embodiment of the present application;
[0045] Figure 5 A structural diagram of a battery pack corrosion detection system provided in an embodiment of the present application Figure 1 ;
[0046] Figure 6 A structural diagram of a battery pack corrosion detection system provided in an embodiment of the present application Figure 2 ;
[0047] Figure 7 A structural block diagram of a battery pack corrosion determination device provided in an embodiment of the present application;
[0048] Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment of the present application.
[0049] The reference numerals in the specific implementation manner are as follows:
[0050] 1-battery pack; 2-test chamber; 3-image acquisition device; 4-slide rail; 5-rolling door. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0052] It should be noted that similar numbers and letters represent similar items in the following figures, so once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. At the same time, in the description of this application, words such as "including", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0053] As the application market of new energy vehicles becomes more and more extensive, in the use of new energy vehicles in coastal cities and northern cities in winter, due to the influence of deicing agents in coastal cities and northern cities in winter, the salt content in the air is high. When new energy vehicles are operated in a high-salt environment for a long time, salt spray corrosion will occur on the surface of the battery pack of the vehicle, which may lead to rust, rust-through failure and other safety hazards. Therefore, in the design stage of the battery pack of new energy vehicles, salt spray corrosion experiments are carried out on the battery pack to test the corrosion resistance of the battery pack in a humid and corrosive environment, so as to evaluate the durability and reliability of the battery pack in actual use.
[0054] During the salt spray corrosion experiment, the salt spray test cycle is long and the test system is highly closed. After the test, manual visual inspection is mainly used to compare abnormal points on the surface of the battery pack before and after the test to determine whether the battery pack has been corroded.
[0055] However, manual visual inspection can only be used to determine the corrosion condition of the battery pack after the salt spray test cycle is completed. It is impossible to accurately determine the time when corrosion occurs and is prone to missed detection.
[0056] In view of this, the embodiment of the present application provides a method for determining corrosion of a battery pack, which analyzes the relationship between the number of pixels in a certain color gamut level (the color gamut level corresponding to the color presented by the sample to be tested when corrosion occurs) and the total number of pixels in the sample to be tested image, and determines whether corrosion occurs in the sample to be tested. In the above manner, corrosion detection can be achieved by only acquiring the image of the sample to be tested, without the need for manual visual observation or setting up a complex test scene, thereby achieving efficient and accurate determination of whether corrosion occurs in the sample to be tested.
[0057] The corrosion determination method provided in the embodiment of the present application can be used to determine whether corrosion occurs in a battery pack, which can be arranged in various energy storage systems, including but not limited to: energy storage power supply systems such as hydropower, thermal power, wind power and solar power stations; energy storage systems for electric vehicles such as electric bicycles, electric motorcycles, and electric cars; and energy storage systems in multiple fields such as military equipment and aerospace.
[0058] See also Figure 1 , Figure 1 A flowchart of a method for determining corrosion of a battery pack provided in an embodiment of the present application, the method for determining corrosion may include the following steps:
[0059] S1: Acquire the image of the sample to be tested.
[0060] S2: Determine a target corrosion value of the sample image to be tested according to a preset color gamut level and the sample image to be tested; wherein the target corrosion value represents the relationship of the sample image to be tested, and the image relationship includes the relationship between the number of pixel points in the sample image to be tested that are at the preset color gamut level and the total number of pixel points in the sample image to be tested.
[0061] S3: Determine whether corrosion occurs to the sample to be tested according to the target corrosion value and the preset corrosion value threshold.
[0062] In the embodiment of the present application, the image of the sample to be tested is first obtained, and the image of the sample to be tested can be obtained by performing image acquisition for the sample to be tested by an image acquisition device. The sample to be tested can be various items that need to be judged whether corrosion occurs, such as: battery packs in new energy vehicles, various equipment used in salt spray environments, metal plates in corrosion detection experiments, metal composite plates, etc. The image of the sample to be tested can be an RGB image, an HSV image, etc., and the present application does not limit the type of the image of the sample to be tested.
[0063] After obtaining the sample image to be tested, the target corrosion value of the sample image to be tested is determined according to the preset color gamut level and the sample image to be tested. The target corrosion value represents the relationship between the number of pixels in the sample image to be tested that are at the preset color gamut level and the total number of pixels in the sample image to be tested.
[0064] By analyzing the image of the corroded object, it can be determined that after the object is corroded, the color of the corroded area is different from the color of the uncorroded area. The color information in the image of the corroded area is analyzed, and the channel value in the RGB image or HSV image corresponding to the color information is used as the preset color gamut level. The preset color gamut level can be a value range interval of the hue in the HSV image.
[0065] For example, by collecting an HSV image of an object and analyzing the image of the object after corrosion, it can be determined that after the object is corroded, the hue (Hue) corresponding to the image of the corroded area has a value range of 60°-70°, and the preset color gamut level can be determined as H taking 60°-70°.
[0066] Since the colors corresponding to the corroded areas of different samples to be tested may be different after corrosion occurs, the preset color gamut levels corresponding to different samples to be tested may be the same or different, the number of preset color gamut levels may be one or more, and the preset color gamut levels may be determined by analyzing the image of the same object as the sample to be tested after corrosion occurs.
[0067] After acquiring the image of the sample to be tested, the number of pixels in the preset color gamut level in the image of the sample to be tested is determined, and the target corrosion value is calculated and determined according to the number of pixels in the preset color gamut level and the total number of pixels in the image of the sample to be tested. The target corrosion value is compared with the preset corrosion value threshold. If the target corrosion value is greater than the corrosion value threshold, it is determined that the sample to be tested has corrosion; otherwise, if the target corrosion value is less than the corrosion value threshold, it is determined that the sample to be tested has not corroded.
[0068] In the above process, the target corrosion value of the sample image to be tested is determined according to the relationship between the number of pixels in the preset color gamut level in the sample image to be tested and the total number of pixels in the sample image to be tested, and then by setting a suitable corrosion value threshold, the target corrosion value of the sample image to be tested is compared with the corrosion value threshold, and when the target corrosion value of the sample image to be tested is greater than the corrosion value threshold, it is determined that the sample image to be tested has been corroded. Compared with relying on manual visual inspection to determine whether the sample to be tested has been corroded, the above method can efficiently and accurately determine whether the sample to be tested has been corroded, and the detection time is short and it is not easy to miss the problem.
[0069] In addition, during the salt spray test, by continuously collecting images of the sample to be tested, it is possible to determine in real time whether corrosion has occurred in the sample to be tested, thereby accurately determining the time when corrosion occurred and reducing the chance of missed detection.
[0070] The following is an introduction to the method of determining the corrosion value threshold.
[0071] As an alternative implementation, see Figure 2 , the corrosion value threshold can be determined by:
[0072] S21: Acquire multiple corrosion sample images.
[0073] S22: Determine the number of pixels of the multiple eroded sample images in each color gamut level according to the preset color gamut level and the multiple eroded sample images.
[0074] S23: Determine a corrosion value threshold according to the number of pixels in each color gamut level of the plurality of corrosion sample images.
[0075] In the embodiment of the present application, the corrosion sample image is an image of a sample that has been corroded. An object of the same type as the sample to be tested and that has been corroded is used as a corrosion sample, and an image of the corrosion sample is obtained as the corrosion sample image. The multiple corrosion sample images are images corresponding to multiple corrosion samples, and each corrosion sample corresponds to a corrosion sample image.
[0076] In order to determine the appropriate corrosion value threshold, the corrosion sample image is analyzed. When corrosion occurs in the corrosion sample, there is a difference between the color of the corroded area and the color of the uncorroded area in the corrosion sample image. By analyzing the number of pixels in the corrosion area of the corrosion sample image in each color gamut level, the corrosion value threshold used to judge whether corrosion occurs in the sample to be tested is determined, thereby realizing the corrosion judgment of the sample to be tested.
[0077] Furthermore, in some implementations, the above step S21 includes:
[0078] The original images of different corrosion samples are obtained; the original images are normalized to obtain a plurality of corrosion sample images; wherein the total number of pixels of each corrosion sample image is the same.
[0079] In this embodiment, the original image is an image of the corrosion sample directly collected by the acquisition device. When collecting original images of different corrosion samples, the resolutions of the original images collected by different acquisition devices may be different, resulting in differences in the total number of pixels between different original images. Considering that the corrosion value threshold needs to be determined based on the number of pixels in each color gamut level in the corrosion sample image, if the corrosion value threshold is directly determined using original images with different resolutions, the difference in the total number of pixels will cause errors in determining the corrosion value threshold, thereby reducing the accuracy of corrosion judgment.
[0080] Therefore, after obtaining the original images of different corrosion samples, the original images of each corrosion sample are normalized to obtain multiple corrosion sample images, so that the total number of pixels in each corrosion sample image after normalization is the same, thereby improving the accuracy of subsequent determination of the corrosion value threshold.
[0081] Furthermore, after normalizing the original image, the corrosion determination method provided in the embodiment of the present application further includes: converting the corrosion sample image into an HSV image.
[0082] In this embodiment, the image acquisition device usually uses the RGB color model to describe the image color. However, the HSV color model is a more intuitive color model that describes the image color through three attributes: hue (Hue, H), saturation (Saturation, S), and value (Value, V). The HSV color model is easier to filter and classify the color gamut than the RGB color model. Therefore, when the original image uses the RGB color model or other color models to describe the image color, the original image is converted into an HSV image to facilitate the subsequent identification and classification of the pixel color of the corrosion sample image, thereby improving the accuracy of determining the corrosion value threshold.
[0083] In step S22, after a plurality of eroded sample images are acquired, the number of pixels of each eroded sample image in each preset color gamut level is determined respectively.
[0084] See also Figure 3 , the preset color gamut level can be determined in the following way.
[0085] S31: extracting the corrosion area of the standard corrosion sample image.
[0086] The standard corrosion sample is a sample that has been corroded. The standard corrosion sample image is compared and analyzed with the non-corroded sample image, and the area where corrosion occurs in the standard corrosion sample image is determined by contour search or other comparative analysis methods.
[0087] S32: Determine a preset color gamut level according to the HSV histogram distribution of the eroded area.
[0088] After obtaining the HSV histogram distribution of the corrosion area of the standard corrosion sample image, the H, S, and V information of each pixel in the corrosion area can be determined. Then, according to the chromaticity gradient or the number of preset color gamut levels, the preset color gamut level is determined.
[0089] A preset color gamut level can be expressed as [H, Smin, Vmin]~[H+x, Smax, Vmax]. Wherein, x is the chromaticity gradient. x can be 5°, 6°, 10°, etc., and the present application does not limit the specific value of the chromaticity gradient. Smin represents the minimum saturation value of all pixels with chromaticity between H and H+x in the corrosion area of the standard corrosion sample image. Smax represents the maximum saturation value of all pixels with chromaticity between H and H+x in the corrosion area of the standard corrosion sample image. Vmin represents the minimum brightness value of all pixels with chromaticity between H and H+x in the corrosion area of the standard corrosion sample image. Vmax represents the maximum brightness value of all pixels with chromaticity between H and H+x in the corrosion area of the standard corrosion sample image.
[0090] In some embodiments, when the color gamut gradient is determined, the number of preset color gamut levels can be determined according to the span value and the chromaticity gradient of the chromaticity in the corrosion area of the standard corrosion sample image. The number of preset color gamut levels, the span value and the chromaticity gradient satisfy the following relationship:
[0091]
[0092] For example, in the corrosion area of the standard corrosion sample image, the minimum chromaticity is 30°, the maximum chromaticity is 50°, and the span of chromaticity is 20°. The chromaticity gradient is 5°, and the number of preset color gamut levels is 4.
[0093] In other embodiments, when the number of preset color gamut levels is determined, the color gamut gradient can be determined according to the span value of the chromaticity in the corrosion area of the standard corrosion sample image and the number of preset color gamut levels. The number of preset color gamut levels, the span value of the chromaticity and the chromaticity gradient satisfy the following relationship:
[0094]
[0095] For example, in the corrosion area of the standard corrosion sample image, the minimum chromaticity is 40°, the maximum chromaticity is 55°, and the span of chromaticity is 15°. The number of preset color gamut levels is 5, and the chromaticity gradient is 3°.
[0096] In some embodiments, according to the HSV histogram distribution of the eroded sample image, the number of pixels in each color gamut level in the eroded sample image is counted to determine the number of pixels in each color gamut level of the eroded sample image.
[0097] In some other embodiments, a corrosion region in the corrosion sample image is determined; and the number of pixel points in the corrosion region at a preset color gamut level is determined.
[0098] In this embodiment, considering that the colors of the pixels in the corrosion sample except the corrosion area are in the preset color gamut level, the colors of the pixels in the non-corrosion area may also be in the preset color gamut level. For example, there may be noise in the image acquisition process, and the colors of some areas of the corrosion sample are close to or the same as the colors corresponding to the preset color gamut level. In order to remove these interfering pixels, a mask operation can be performed on the corrosion sample image first, and the non-corrosion area is assigned a value of 0, and the corrosion area is assigned a value of 1, and the pixels in the non-corrosion area are removed. Then, the number of pixels in the corrosion area that are in the preset color gamut level is determined.
[0099] Through the above method, in the process of determining the corrosion value threshold, the pixels in the area where corrosion does not occur in the corrosion sample image are eliminated, the number of pixels in the corrosion area at each color gamut level is determined, interference points are reduced, and the accuracy of the corrosion value threshold is improved.
[0100] In step S23, after the number of pixels in each color gamut level of the plurality of eroded sample images is determined, the erosion value threshold is determined according to the number of pixels in each color gamut level.
[0101] In some embodiments, the corrosion occurrence value corresponding to each corrosion sample image may be the sum of the number of pixels of the corrosion sample in each color gamut level.
[0102] In this embodiment, the number of pixels in each color gamut level of each corrosion sample image is positively correlated with the corrosion value of the corrosion sample image. Each corrosion sample image corresponds to a corrosion occurrence value, and the minimum corrosion occurrence value is used as the corrosion value threshold.
[0103] Among multiple corrosion sample images, the corrosion degree of different corrosion samples may be different, that is, some corrosion samples have just been corroded, while some corrosion samples have been corroded to a greater extent, and the corrosion occurrence value corresponding to the corrosion sample image with a more serious corrosion degree is larger. Since the purpose of the corrosion determination method provided in this application is to determine whether the sample to be tested has been corroded. Therefore, in order to improve the accuracy of determining whether the sample to be tested has been corroded, the corrosion value threshold is the smallest corrosion occurrence value among multiple corrosion sample images.
[0104] In some other embodiments, the above step S23 includes:
[0105] The corrosion value threshold is determined according to the weight corresponding to each corrosion sample image at each color gamut level and the number of pixels of each corrosion sample image at each color gamut level.
[0106] In this embodiment, different color gamut levels correspond to pixels of different colors. According to the analysis of the eroded sample image, when erosion occurs, the number of pixels in each color gamut level has a certain proportional relationship. The erosion value threshold is determined by combining the weight corresponding to each color gamut level and the number of pixels in each color gamut level.
[0107] When corrosion occurs, there are differences in the distribution of the number of pixels in different color gamut levels. By setting appropriate weights and determining the appropriate corrosion value threshold based on the number of pixels and the weights, the accuracy of subsequent determination of whether corrosion has occurred in the sample to be tested based on the corrosion value threshold can be improved.
[0108] In some embodiments, the weight corresponding to each color gamut level may be a fixed value determined in advance based on experience, that is, different eroded sample images have the same weight corresponding to the same color gamut level.
[0109] In some other embodiments, the weight corresponding to each eroded sample image at each color gamut level is determined by:
[0110] For each eroded sample image, determine the number of pixels of the eroded sample image in each color gamut level; for each color gamut level, determine the weight corresponding to the color gamut level according to the ratio of the number of pixels of the eroded sample image in the color gamut level to the number of all pixels of the eroded sample image.
[0111] In this embodiment, the weight corresponding to each eroded sample image at each color gamut level is the ratio of the number of pixels of the eroded sample image at each color gamut level to the number of all pixels of the eroded sample image.
[0112] For example, there are currently eroded sample images A and eroded sample images B. The number of pixels of eroded sample image A in color gamut level 1 is A1, and the number of pixels in color gamut level 2 is A2. The number of pixels of eroded sample image B in color gamut level 1 is B1, and the number of pixels in color gamut level 2 is B2. The number of all pixels of eroded sample image A and eroded sample image B is M. The weight of eroded sample image A in color gamut level 1 is A1 / M, the weight of eroded sample image A in color gamut level 2 is A2 / M, the weight of eroded sample image B in color gamut level 1 is B1 / M, and the weight of eroded sample image B in color gamut level 2 is B2 / M.
[0113] Taking into account the differences in the distribution of pixels of different eroded sample images in different color gamut levels, the weight corresponding to the color gamut level is determined according to the ratio of the number of pixels of each eroded sample image in each color gamut level to the number of all pixels of the eroded sample image, so that the determined weight is closer to the actual situation and the accuracy of the weight corresponding to each color gamut level is improved.
[0114] As an optional implementation, determining the corrosion value threshold according to the weight corresponding to each corrosion sample image at each color gamut level and the number of pixels of each corrosion sample image at each color gamut level includes:
[0115] For each color gamut level in each eroded sample image, determine the product of the weight corresponding to the color gamut level and the number of pixels of the eroded sample image in the color gamut level; add up the products corresponding to each color gamut level to determine the corrosion occurrence value corresponding to the eroded sample image; and use the smallest corrosion occurrence value among multiple eroded sample images as the corrosion value threshold.
[0116] In this implementation, taking a corrosion sample image as an example, the corrosion occurrence value of the corrosion sample image can be determined by the following formula:
[0117]
[0118] in, is the number of color gamut levels, is the number of pixels in the ith color gamut level of the eroded sample image, is the weight corresponding to the i-th color gamut level.
[0119] The corrosion occurrence value of each corrosion sample image is calculated and determined according to the above formula, and the minimum corrosion occurrence value is used as the corrosion value threshold. Considering that in multiple corrosion sample images, the degree of corrosion of different corrosion samples may be different. The more severe the corrosion degree, the more pixels there are in the corrosion sample image. Combined with the above formula, it can be seen that the more severe the corrosion degree, the larger the corresponding corrosion occurrence value of the corrosion sample image. Since the purpose of the corrosion determination method provided in the present application is to determine whether corrosion has occurred in the sample to be tested. Therefore, in order to improve the accuracy of determining whether corrosion has occurred in the sample to be tested, the corrosion value threshold is the minimum corrosion occurrence value in multiple corrosion sample images.
[0120] As an optional implementation, determining the corrosion value threshold according to the weight corresponding to each corrosion sample image at each color gamut level and the number of pixels of each corrosion sample image at each color gamut level includes:
[0121] For each color gamut level, the corresponding weights of each eroded sample image at the color gamut level are added and averaged to determine the weighted average value; wherein each color gamut level corresponds to a weighted average value; for each color gamut level, the number of pixels of each eroded sample image in the color gamut level is added and averaged to determine the pixel average value; wherein each color gamut level corresponds to a pixel average value; for each color gamut level, the product of the weighted average value corresponding to the color gamut level and the pixel average value corresponding to the color gamut level is determined; the products corresponding to each color gamut level are accumulated as the corrosion value threshold.
[0122] In this embodiment, for each color gamut level, the ratio of the number of pixels of each eroded sample image in the color gamut level to the number of all pixels of the eroded sample image is used as the weight corresponding to the eroded sample image at the color gamut level. In the above manner, the weight corresponding to each eroded sample image at the color gamut level can be determined. Then, the weight corresponding to each eroded sample image at the color gamut level is added and averaged to obtain the weight average value of the color gamut level.
[0123] Similarly, for each color gamut level, the number of pixels of each eroded sample image in the color gamut level is added and averaged to obtain the pixel average value.
[0124] After determining the weighted average value and pixel average value corresponding to each color gamut level, the weighted average value corresponding to each color gamut level is multiplied by the pixel average value, and the products of different color gamut levels are accumulated to obtain the corrosion value threshold.
[0125] Since the number of pixels in different color gamut levels of different corrosion sample images varies, in order to reduce the errors introduced by individual differences, the weighted average value and pixel average value corresponding to each color gamut level are determined by the addition and averaging method, and then the corrosion value threshold is determined based on the weighted average value and the pixel average value, so as to determine the appropriate corrosion value threshold, thereby improving the accuracy of subsequent determination of whether the sample to be tested is corroded based on the corrosion value threshold.
[0126] The above steps S1-S3 are introduced below.
[0127] In step S1, the image of the sample to be tested can be obtained by collecting the image of the sample to be tested by an image acquisition device. According to the above introduction to the HSV color model, the HSV model is easier to filter and classify the color gamut. Therefore, if the image collected by the image acquisition device is an RGB image or an image in another format, the collected image is converted into an HSV image as the sample image to be tested.
[0128] Furthermore, if the total number of pixels of the sample image to be tested is different from the total number of pixels of the corrosion sample image, the sample image to be tested is normalized so that the total number of pixels of the sample image to be tested after normalization is the same as the total number of pixels of the corrosion sample image used when determining the corrosion value threshold.
[0129] As an optional implementation, the above step S2 includes:
[0130] Determine the number of pixels of the sample image to be tested in each color gamut level; and determine the target corrosion value of the sample image to be tested according to the number of pixels of the sample image to be tested in each color gamut level.
[0131] In this embodiment, the number of pixels in each color gamut level in the sample image to be tested can be counted according to the HSV histogram distribution of the sample image to be tested, and the number of pixels in each color gamut level in the sample image to be tested can be determined. It is also possible to first determine the erosion area in the sample image to be tested, and then determine the number of pixels in the erosion area at a preset color gamut level.
[0132] The specific method for determining the number of pixels of the sample image to be tested in each color gamut level can refer to the method for determining the number of pixels of the corrosion sample image in each color gamut level in the aforementioned embodiment, which will not be repeated here to make the specification concise.
[0133] After determining the number of pixels of the sample image to be tested in each color gamut level, the target corrosion value of the sample image to be tested is determined according to the number of pixels of the sample image to be tested in each color gamut level. The method of determining the target corrosion value of the sample image to be tested corresponds to the method of processing the corrosion sample image when determining the corrosion value threshold.
[0134] When corrosion occurs, there is a difference between the color of the corroded area and the color of the uncorroded area in the image of the sample to be tested. By analyzing the number of pixels in each color gamut level in the image of the sample to be tested, the target corrosion value of the image of the sample to be tested is determined, and then based on the relationship between the target corrosion value and the corrosion value threshold, it is determined whether corrosion has occurred in the sample to be tested.
[0135] In some embodiments, when the sum of the number of pixels of the corrosion sample in each color gamut level is used as the corrosion occurrence value corresponding to each corrosion sample image, the target corrosion value of the sample image to be tested is the sum of the number of pixels of the sample to be tested in each color gamut level.
[0136] In some other embodiments, determining the target corrosion value of the sample image to be tested according to the number of pixels of the sample image to be tested in each color gamut level includes:
[0137] For each color gamut level, determine the product of the target weight corresponding to the color gamut level and the number of pixels of the sample image to be tested in the color gamut level; accumulate the products corresponding to each color gamut level as the target erosion value.
[0138] In this embodiment, each color gamut level corresponds to a target weight, and the target weight corresponding to the color gamut level is determined when determining the corrosion value threshold.
[0139] In the aforementioned embodiment of determining the corrosion value threshold, if the corrosion value threshold is the minimum corrosion occurrence value among multiple corrosion sample images, the minimum corrosion occurrence value is called the target corrosion sample image, and the target weight corresponding to each color gamut level is the ratio of the number of pixels of the target corrosion sample image in each color gamut level to the total number of pixels of the target corrosion sample image.
[0140] If the corrosion value threshold is the accumulation of the product of the weight average value corresponding to each color gamut level and the pixel average value, then the target weight corresponding to each color gamut level is the weight average value corresponding to each color gamut level. The method for determining the weight average value corresponding to each color gamut level can refer to the introduction in the above embodiment, and will not be repeated here for the sake of brevity.
[0141] Multiply the target weight corresponding to each color gamut level by the number of pixels of the sample image to be tested in the color gamut level, and then accumulate the products corresponding to each color gamut level to obtain the target corrosion value. The target corrosion value can be determined by the following formula:
[0142]
[0143] in, is the target corrosion value of the sample image to be tested, n is the number of color gamut levels, is the number of pixels of the sample image to be tested in the jth color gamut level, is the target weight corresponding to the j-th color gamut level.
[0144] Since there are differences in the distribution of the number of pixels in different color gamut levels when corrosion occurs, in the process of determining the target corrosion value of the sample image to be tested, the target corrosion value is obtained by multiplying and adding the number of pixels in the sample image to be tested in different color gamut levels and the target weight corresponding to the color gamut level. This allows the target corrosion value of the sample image to be tested to more accurately reflect whether there is corrosion in the sample to be tested.
[0145] In the above step S3, after determining the target corrosion value, the target corrosion value is compared with the corrosion value threshold. If the target corrosion value is greater than the corrosion value threshold, it is determined that corrosion occurs in the sample to be tested; otherwise, if the target corrosion value is less than the corrosion value threshold, it is determined that no corrosion occurs in the sample to be tested.
[0146] Furthermore, the present application also provides a method for determining corrosion of a battery pack. Figure 4 The method for determining corrosion of a battery pack may include the following steps:
[0147] S41: Acquire an image of the battery pack at preset time intervals.
[0148] S42: Determine a target corrosion value corresponding to the image of the battery pack according to a preset color gamut level and the image of the battery pack.
[0149] S43: Determine whether the battery pack is corroded according to the target corrosion value and a preset corrosion value threshold.
[0150] The battery pack corrosion determination method provided in the example of the present application can be applied in the battery pack salt spray test stage or in the daily use stage when the battery pack is installed on a new energy vehicle. An image acquisition device is set in the battery pack test compartment or the battery compartment of the new energy vehicle, and the image acquisition device acquires an image of the battery pack once at a preset time interval. After acquiring the image of the battery pack, the number of pixels in the image of the battery pack that are at a preset color gamut level is determined, and the target corrosion value is calculated and determined based on the number of pixels in the preset color gamut level and the total number of pixels in the sample image to be tested. The target corrosion value is compared with the preset corrosion value threshold. If the target corrosion value is greater than the corrosion value threshold, it is determined that the battery pack is corroded; conversely, if the target corrosion value is less than the corrosion value threshold, it is determined that the battery pack is not corroded.
[0151] The following describes the battery pack corrosion determination method provided in the embodiment of the present application in conjunction with specific scenarios.
[0152] In some embodiments, Figure 5 As shown, during the battery pack salt spray test phase, the battery pack 1 is placed in the test chamber 2, and an image acquisition device 3 is provided in the test chamber 2. During the salt spray test, the image acquisition device 3 acquires images of the battery pack 1 at certain preset intervals. The acquired images are transmitted to an electronic device in a wired or wireless communication mode, and the electronic device stores program instructions corresponding to steps S41-S43, executes the program instructions, and determines whether the battery pack is corroded.
[0153] Furthermore, if Figure 5 As shown, a slide rail 4 may also be provided, and the image acquisition device 3 moves on the slide rail 4 to acquire images of the battery pack 1 from multiple angles.
[0154] Furthermore, if Figure 6As shown, a rolling shutter 5 can also be provided in the battery corrosion determination detection system. In the process where the image acquisition device 3 is not required to acquire an image of the battery pack, the rolling shutter 5 is always in a closed state. When the specified time (i.e., the aforementioned preset time) is reached, the rolling shutter 5 is opened so that the image acquisition device 3 can acquire an image of the battery pack 1. By providing the rolling shutter 5, the image acquisition device 3 can be protected during the battery pack salt spray test phase, and the impact of the test environment on the image acquisition device 3 during the test process can be reduced.
[0155] In other embodiments, for battery packs that are already in use on electrical equipment (such as new energy vehicles or other equipment), an image acquisition device is set in the battery compartment of the electrical equipment to regularly capture images of the battery pack, and then determine whether the battery pack is corroded during use based on the captured images.
[0156] Furthermore, optionally, if corrosion is found in the battery pack during use, the battery management system of the new energy vehicle or other equipment can issue an early warning message to remind the user to replace the battery to reduce the occurrence of safety hazards.
[0157] The specific implementation process of the above steps S41-S43 can refer to the description of steps S1-S3 of the aforementioned battery corrosion determination method. In order to make the description concise, it will not be repeated here.
[0158] By regularly collecting images of the battery pack and judging whether the battery pack is corroded, the time when the battery pack is corroded can be accurately determined, thereby reducing the possibility of missed detection.
[0159] The present application also provides a battery pack corrosion determination device. Figure 7 , Figure 7 A structural block diagram of a battery pack corrosion determination device provided in an embodiment of the present application, the battery pack corrosion determination device 700 includes: an acquisition module 701, used to acquire a sample image to be tested; a determination module 702, used to determine a target corrosion value of the sample image to be tested according to a preset color gamut level and the sample image to be tested; wherein the target corrosion value characterizes the relationship between the sample image to be tested, and the image relationship includes the relationship between the number of pixels in the sample image to be tested that are at the preset color gamut level and the total number of pixels in the sample image to be tested; and whether the sample to be tested is corroded is determined according to the target corrosion value and a preset corrosion value threshold.
[0160] In an optional embodiment, the determination module 702 is also used to obtain multiple corrosion sample images, where the corrosion sample images are images of samples that have undergone corrosion; determine the number of pixels in each color gamut level of the multiple corrosion sample images based on a preset color gamut level and the multiple corrosion sample images; and determine the corrosion value threshold based on the number of pixels in each color gamut level of the multiple corrosion sample images.
[0161] In an optional implementation, the determination module 702 is specifically used to determine the corrosion value threshold according to the weight corresponding to each of the corrosion sample images at each of the color gamut levels and the number of pixels of each of the corrosion sample images at each of the color gamut levels.
[0162] In an optional embodiment, the determination module 702 is specifically used to determine, for each color gamut level in each of the corrosion sample images, the product of the weight corresponding to the color gamut level and the number of pixels of the corrosion sample image in the color gamut level; accumulate the products corresponding to each of the color gamut levels to determine the corrosion occurrence value corresponding to the corrosion sample image; and use the minimum corrosion occurrence value among the multiple corrosion sample images as the corrosion value threshold.
[0163] In an optional embodiment, the determination module 702 is specifically used to, for each of the color gamut levels, add and average the corresponding weights of each of the eroded sample images at the color gamut level to determine the weighted average value; wherein each of the color gamut levels corresponds to a weighted average value; for each of the color gamut levels, add and average the number of pixels of each of the eroded sample images in the color gamut level to determine the pixel average value; wherein each of the color gamut levels corresponds to a pixel average value; for each of the color gamut levels, determine the product of the weighted average value corresponding to the color gamut level and the pixel average value corresponding to the color gamut level; and accumulate the products corresponding to each of the color gamut levels as the corrosion value threshold.
[0164] In an optional embodiment, the determination module 702 is also used to determine, for each of the eroded sample images, the number of pixels of the eroded sample image in each color gamut level; for each of the color gamut levels, determine the weight corresponding to the color gamut level based on the ratio of the number of pixels of the eroded sample image in the color gamut level to the number of all pixels of the eroded sample image.
[0165] In an optional implementation, the acquisition module 701 is specifically used to acquire original images of different corrosion samples; normalize the original images to obtain the multiple corrosion sample images; wherein the total number of pixels in each of the corrosion sample images is the same.
[0166] In an optional implementation, the determination module 702 is specifically used to determine the number of pixels of the sample image to be tested in each color gamut level; and determine the target corrosion value of the sample image to be tested according to the number of pixels of the sample image to be tested in each color gamut level.
[0167] In an optional embodiment, each of the color gamut levels corresponds to a target weight; the determination module 702 is specifically used to determine, for each of the color gamut levels, the product of the target weight corresponding to the color gamut level and the number of pixels of the sample image to be tested in the color gamut level; and accumulate the products corresponding to each of the color gamut levels as the target corrosion value.
[0168] In an optional embodiment, the sample to be tested is arranged in a test chamber, and the test chamber is used to perform a salt spray test on the sample to be tested; an image acquisition device is arranged in the test chamber, and the image acquisition device is used to obtain an image of the sample to be tested at every preset time interval.
[0169] In an optional embodiment, the sample to be tested is arranged in a battery compartment, and the battery compartment supplies power to electrical equipment; an image acquisition device is arranged in the battery compartment, and the image acquisition device is used to obtain the image of the sample to be tested at every preset time interval.
[0170] See also Figure 8 , Figure 8 This is a schematic diagram of the structure of an electronic device of an embodiment of the present application. The electronic device 800 includes: at least one processor 801, at least one communication interface 802, at least one memory 803 and at least one bus 804. Among them, the bus 804 is used to realize the direct connection and communication of these components, the communication interface 802 is used to communicate signaling or data with other node devices, and the memory 803 stores machine-readable instructions executable by the processor 801. When the electronic device 800 is running, the processor 801 communicates with the memory 803 through the bus 804, and when the machine-readable instructions are called by the processor 801, the corrosion determination method of the battery pack as described above is executed.
[0171] The processor 801 may be an integrated circuit chip with signal processing capabilities. The processor 801 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0172] The memory 803 may include but is not limited to random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable read-only memory (EEPROM), etc.
[0173] Understandably, Figure 8 The structure shown is for illustration only. The electronic device 800 may also include Figure 8 More or fewer components as shown, or with Figure 8 Different configurations are shown. Figure 8 Each component shown in can be implemented by hardware, software or a combination thereof. In the embodiment of the present application, the electronic device 800 can be a device used for a battery management system, a vehicle-mounted computer, etc. in a new energy vehicle.
[0174] In addition, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a computer, the method for determining corrosion of a battery pack as in the above embodiment is executed.
[0175] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0176] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0177] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0178] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0179] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining corrosion of a battery pack, characterized in that: include: Acquire an image of a sample to be tested; According to the preset color gamut level and the sample image to be tested, a target corrosion value of the sample image to be tested is determined; wherein the target corrosion value represents the relationship of the sample image to be tested, and the image relationship includes the relationship between the number of pixels in the sample image to be tested that are in the preset color gamut level and the total number of pixels in the sample image to be tested; the preset color gamut level is: in the image where the corrosion area exists, the channel value in the RGB image or the HSV image corresponding to the color information of the corrosion area; Determining whether corrosion occurs to the sample to be tested according to the target corrosion value and a preset corrosion value threshold; The corrosion value threshold is determined by: acquiring a plurality of corrosion sample images, wherein the corrosion sample images are images of samples where corrosion occurs; determining the number of pixels of the plurality of corrosion sample images in each color gamut level according to a preset color gamut level and the plurality of corrosion sample images; determining the corrosion value threshold according to the number of pixels of the plurality of corrosion sample images in each color gamut level; Determining the corrosion value threshold according to the number of pixels of the multiple corrosion sample images in each color gamut level includes: determining the corrosion value threshold according to the weight corresponding to each of the corrosion sample images at each color gamut level and the number of pixels of each of the corrosion sample images at each color gamut level.
2. The method for determining corrosion of a battery pack according to claim 1, characterized in that: Determining the corrosion value threshold according to the weight corresponding to each of the corrosion sample images at each of the color gamut levels and the number of pixels of each of the corrosion sample images at each of the color gamut levels includes: For each color gamut level in each of the eroded sample images, determine the product of a weight corresponding to the color gamut level and the number of pixels of the eroded sample image in the color gamut level; Add the products corresponding to each color gamut level to determine the corrosion occurrence value corresponding to the corrosion sample image; The minimum corrosion occurrence value among the plurality of corrosion sample images is used as the corrosion value threshold.
3. The method for determining corrosion of a battery pack according to claim 1, characterized in that: Determining the corrosion value threshold according to the weight corresponding to each of the corrosion sample images at each of the color gamut levels and the number of pixels of each of the corrosion sample images at each of the color gamut levels includes: For each color gamut level, the weights corresponding to the eroded sample images at the color gamut level are summed and averaged to determine a weighted average value; wherein each color gamut level corresponds to a weighted average value; For each color gamut level, the number of pixels of each eroded sample image in the color gamut level is added and averaged to determine a pixel average value; wherein each color gamut level corresponds to a pixel average value; For each color gamut level, determine the product of the weighted average value corresponding to the color gamut level and the pixel average value corresponding to the color gamut level; The products corresponding to each of the color gamut levels are accumulated and used as the erosion value threshold.
4. The method for determining corrosion of a battery pack according to any one of claims 1 to 3, characterized in that: The weight corresponding to each of the eroded sample images at each color gamut level is determined in the following manner: For each of the eroded sample images, determining the number of pixels of the eroded sample image in each color gamut level; For each of the color gamut levels, a weight corresponding to the color gamut level is determined according to a ratio of the number of pixels of the eroded sample image in the color gamut level to the number of all pixels of the eroded sample image.
5. The method for determining corrosion of a battery pack according to claim 1, characterized in that: The obtaining of multiple corrosion sample images comprises: Get the original images of different corrosion samples; The original image is normalized to obtain the multiple corrosion sample images; wherein the total number of pixels in each of the corrosion sample images is the same.
6. The method for determining corrosion of a battery pack according to claim 1, characterized in that: The step of determining a target corrosion value of the sample image to be tested according to a preset color gamut level and the sample image to be tested includes: Determine the number of pixels of the sample image to be tested in each color gamut level; According to the number of pixels of the sample image to be tested in each color gamut level, a target corrosion value of the sample image to be tested is determined.
7. The method for determining corrosion of a battery pack according to claim 6, characterized in that: Each color gamut level corresponds to a target weight; determining the target corrosion value of the sample image to be tested according to the number of pixels of the sample image to be tested in each color gamut level includes: For each color gamut level, determining the product of the target weight corresponding to the color gamut level and the number of pixels of the sample image to be tested in the color gamut level; The products corresponding to each of the color gamut levels are accumulated as the target erosion value.
8. The method for determining corrosion of a battery pack according to claim 1, characterized in that: The sample to be tested is arranged in a test chamber, and the test chamber is used to perform a salt spray test on the sample to be tested; an image acquisition device is arranged in the test chamber, and the image acquisition device is used to acquire an image of the sample to be tested at every preset time interval.
9. The method for determining corrosion of a battery pack according to claim 1, characterized in that: The sample to be tested is arranged in a battery compartment, and the battery compartment supplies power to the electrical equipment; an image acquisition device is arranged in the battery compartment, and the image acquisition device is used to acquire the image of the sample to be tested at every preset time interval.
10. A battery pack corrosion determination device, characterized in that: include: An acquisition module, used for acquiring an image of a sample to be tested; A determination module, configured to determine a target corrosion value of the sample image to be tested according to a preset color gamut level and the sample image to be tested; wherein the target corrosion value represents the relationship of the sample image to be tested, and the image relationship includes a relationship between the number of pixels in the sample image to be tested that are at the preset color gamut level and the total number of pixels in the sample image to be tested; The preset color gamut level is: in an image where a corrosion area exists, the channel value in an RGB image or an HSV image corresponding to the color information of the corrosion area; determining whether the sample to be tested is corroded according to the target corrosion value and a preset corrosion value threshold; The determination module is further used to: obtain a plurality of corrosion sample images, wherein the corrosion sample images are images of samples where corrosion occurs; determine the number of pixels of the plurality of corrosion sample images in each color gamut level according to a preset color gamut level and the plurality of corrosion sample images; determine the corrosion value threshold according to the number of pixels of the plurality of corrosion sample images in each color gamut level; The determination module is specifically used to determine the corrosion value threshold according to the weight corresponding to each of the corrosion sample images at each of the color gamut levels and the number of pixels of each of the corrosion sample images at each of the color gamut levels.
11. An electronic device, characterized in that: include: processor, memory, and bus; The processor and the memory communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor can execute the method according to any one of claims 1 to 9 by calling the program instructions.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a computer, the method according to any one of claims 1 to 9 is executed.
Citation Information
Patent Citations
Method for detecting and grading greening potatoes based on machine vision
CN103394472A
Intelligent bus danger monitoring system
CN109087263A
Unmanned aerial vehicle visual detection and evaluation method and system for corrosion of high-altitude steel structure
CN113409314A