Battery sealing ring defect detection method and related device based on image analysis
Through the method based on image analysis, the battery sealing ring is heated, pressurized and image-encoded to fuse, which solves the problem of low reliability of battery sealing ring detection in the existing technology and achieves more efficient defect detection and evaluation.
Patent Information
- Application Number
- CN202411005530.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-25
AI Technical Summary
The existing technology has low reliability in detecting defects in battery sealing rings and cannot effectively guarantee the quality and reliability of battery sealing rings.
Using a method based on image analysis, by obtaining the test text of the battery sealing ring, including the temperature rise control curve and the pressure control curve, the battery sealing ring is heated and pressurized, the global image is obtained and denoised, and multiple images are used The encoding device encodes the image, fuses the initial image encoding, and determines the defect level based on standard image encoding.
The reliability and accuracy of battery sealing ring defect detection are improved, and the defect level of the battery sealing ring can be more effectively evaluated to ensure its quality and reliability.
Smart Images

Figure CN118549450B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image analysis technology, and in particular to a battery sealing ring defect detection method based on image analysis and a related device. Background Art
[0002] The battery sealing ring is an important component used to seal between the battery casing and the cover plate. It plays a vital role in the sealing performance of the battery. Its quality problem directly affects the performance and safety of the battery. Defect detection of the battery sealing ring is an important link to ensure its reliable quality. The existing method for defect detection of the battery sealing ring is usually to directly perform defect detection on the battery sealing ring, and the reliability of this detection method is low. Summary of the invention
[0003] The present application provides a battery sealing ring defect detection method and related devices based on image analysis to solve the problems raised by the above-mentioned background technology.
[0004] In a first aspect, the present application provides a battery sealing ring defect detection method based on image analysis, comprising:
[0005] Acquire a test text of a battery sealing ring; wherein the test text includes a temperature rise control curve, a pressurization control curve and a standard image code of the battery sealing ring;
[0006] Performing a temperature treatment on the battery sealing ring based on the temperature increase control curve, and performing a pressurization treatment on the battery sealing ring based on the pressurization control curve;
[0007] Acquire a global image of the battery sealing ring after the heating and pressurizing treatments through a preset camera device, and perform image denoising on the global image to obtain a target global image;
[0008] The target global image is encoded by a plurality of preset different image encoding devices to obtain a plurality of initial image codes;
[0009] A plurality of the initial image codes are fused to obtain a target image code, and the defect level of the battery sealing ring is determined based on the standard image code and the target image code.
[0010] In a possible implementation, the obtaining the test text of the battery sealing ring includes:
[0011] Scanning the graphic code on the battery sealing ring by a preset code scanning device to obtain an identification image of the battery sealing ring, and acquiring an identification code of the battery sealing ring based on the identification image;
[0012] The test text is obtained from a preset database based on the identification code.
[0013] In a possible implementation, acquiring the identification code of the battery sealing ring based on the identification image includes:
[0014] Input the logo image into a preset image feature extraction model to obtain a feature vector of the logo image; wherein the feature vector is an n-dimensional vector;
[0015] For each number in the feature vector, an initial target number matrix matching the number is obtained from a preset database; wherein the initial target number matrix includes the number, and the initial target number matrix is an n×n matrix;
[0016] Determine an intermediate target digital matrix in all the initial target digital matrices; wherein the number of times the intermediate target digital matrix appears in all the initial target digital matrices is a prime number, and the intermediate target digital matrix includes at least one;
[0017] Adding each of the intermediate target digital matrices to obtain a target digital matrix, and multiplying the target digital matrix by the feature vector to obtain a target vector;
[0018] Obtain a preset coding table; wherein the coding table includes a character column and a number column;
[0019] Adding each element in the feature vector to obtain a target number, and deleting the first target character corresponding to the target number in the character sequence to obtain a first character vacancy;
[0020] Each character before the first character space is moved backward by one character space to obtain a second character space, and the first target character is inserted into the second character space to obtain an intermediate target encoding table;
[0021] Deleting the second target character in the character column of the intermediate target encoding table to obtain a third character space; wherein the second target character is the first character of the character column of the intermediate target encoding table;
[0022] Each character after the third character space is moved forward by one character space to obtain a fourth character space, and the second target character is inserted into the fourth character space to obtain a target encoding table;
[0023] Based on the target coding table, each vector element of the target vector is encoded to obtain the identification code.
[0024] In a possible implementation, the encoding process is performed on the target global image by using a plurality of preset different image encoding devices to obtain a plurality of initial image encodings, including:
[0025] inputting the target global image into the image encoding device;
[0026] The image encoding device extracts contour information of the target global image using an edge detection algorithm, and performs encoding processing on the contour information based on a preset encoding rule to obtain a first initial sub-image code;
[0027] The image encoding device constructs a coordinate system in the target global image based on a preset coordinate construction rule;
[0028] For each pixel of the target global image, the image encoding device determines the coordinate information of the pixel based on the coordinate system, inputs the pixel into a preset pixel feature extraction model to obtain the pixel feature of the pixel, and encodes the coordinate information and the pixel feature based on a preset encoding rule to obtain the pixel code;
[0029] The image encoding device arranges the pixel point codes based on a preset pixel point code sorting rule to obtain a second initial sub-image code;
[0030] The image encoding device fuses the first initial sub-image code and the second initial sub-image code based on a preset fusion rule to obtain an initial image code.
[0031] In a possible implementation manner, the number of initial coding elements of each of the initial image codes is the same, and the fusion processing of the multiple initial image codes to obtain the target image code includes:
[0032] Generate a blank image coding sequence; wherein the number of coding element vacancies of the blank image coding sequence is the same as the number of initial coding elements of the initial image coding;
[0033] For each of the coding element vacancies, determine the serial number of the coding element vacancies in the blank image coding sequence, and based on the serial number, determine the target coding element corresponding to the coding element vacancies in all the initial image codes, and insert the target coding element into the coding element vacancies to obtain the target image code; wherein the target coding element is the coding element that appears the most times among all the coding elements corresponding to the serial number in all the initial image codes.
[0034] In a possible implementation manner, the number of standard coding elements of the standard image code is the same as the number of target coding elements of the target image code, and determining the defect level of the battery sealing ring based on the standard image code and the target image code includes:
[0035] For each target coding element of the target image coding, determining a standard coding element matching the target coding element in the standard image coding to generate a standard coding element-target coding element pair; wherein the serial number of the target coding element in the target image coding is consistent with the serial number of the standard coding element in the standard image coding;
[0036] Determining a target standard coding element-target coding element pair from among all the standard coding element-target coding element pairs; wherein the standard coding element and the target coding element in the target standard coding element-target coding element pair are consistent;
[0037] Counting the number of target standard coding element-target coding element pairs;
[0038] If the number of the target standard coding element-target coding element pairs is less than a first preset number, determining that the defect level of the battery sealing ring is level one;
[0039] If the number of the target standard coding element-target coding element pairs is not less than a first preset number but less than a second preset number, the defect level of the battery sealing ring is determined to be level 2; wherein the first preset number is less than the second preset number;
[0040] If the number of the target standard coding element-target coding element pairs is not less than a second preset number, it is determined that the defect level of the battery sealing ring is level three.
[0041] In a second aspect, the present application provides a battery sealing ring defect detection device based on image analysis, comprising:
[0042] A first acquisition module is used to acquire a test text of a battery sealing ring; wherein the test text includes a temperature rise control curve, a pressurization control curve and a standard image code of the battery sealing ring;
[0043] A first processing module, used for performing a temperature increase process on the battery sealing ring based on the temperature increase control curve, and performing a pressurization process on the battery sealing ring based on the pressurization control curve;
[0044] A second acquisition module is used to acquire a global image of the battery sealing ring after the heating and pressurizing treatments through a preset camera device, and perform image denoising on the global image to obtain a target global image;
[0045] A second processing module is used to encode the target global image through a plurality of preset different image encoding devices to obtain a plurality of initial image codes;
[0046] A determination module is used to fuse the multiple initial image codes to obtain a target image code, and determine the defect level of the battery sealing ring based on the standard image code and the target image code.
[0047] In a third aspect, the present application provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the battery sealing ring defect detection method based on image analysis as described above is implemented.
[0048] In a fourth aspect, the present application provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, wherein when the computer program is executed by a processor, the battery sealing ring defect detection method based on image analysis as described above is implemented.
[0049] The present application provides a battery sealing ring defect detection method and related devices based on image analysis, wherein the method comprises: obtaining a test text of a battery sealing ring; wherein the test text comprises a temperature rise control curve, a pressurization control curve and a standard image code of the battery sealing ring; performing a temperature rise treatment on the battery sealing ring based on the temperature rise control curve, and simultaneously performing a pressurization treatment on the battery sealing ring based on the pressurization control curve; obtaining a global image of the battery sealing ring after the heating treatment and the pressurization treatment through a preset camera device, and performing an image denoising process on the global image to obtain a target global image; performing encoding processing on the target global image respectively through a plurality of preset different image encoding devices to obtain a plurality of initial image codes; performing a fusion process on the plurality of the initial image codes to obtain a target image code, and determining the defect level of the battery sealing ring based on the standard image code and the target image code. The method, on the one hand, improves the reliability of the battery sealing ring defect detection method by performing a temperature treatment on the battery sealing ring based on the temperature rise control curve and simultaneously performing a pressurization treatment on the battery sealing ring based on the pressurization control curve; on the other hand, the target global image is respectively encoded by multiple preset different image encoding devices to obtain multiple initial image codes, and the multiple initial image codes are fused to obtain a target image code, and the defect level of the battery sealing ring is determined based on the standard image code and the target image code, thereby improving the accuracy of the battery sealing ring defect detection method. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0051] Figure 1 A schematic diagram of a flow chart of a battery sealing ring defect detection method based on image analysis provided in an embodiment of the present application;
[0052] Figure 2 A schematic block diagram of the structure of a battery sealing ring defect detection device based on image analysis provided in an embodiment of the present application;
[0053] Figure 3 A schematic block diagram of the structure of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.
[0056] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0057] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0058] The battery seal ring is an important component used to seal between the battery shell and the cover plate. It plays a vital role in the sealing performance of the battery. Its quality directly affects the performance and safety of the battery. Defect detection of the battery seal ring is an important link to ensure its quality reliability. The existing method of defect detection of the battery seal ring is usually to directly detect defects on the battery seal ring, and the reliability of this detection method is low. To this end, the present application provides a battery seal ring defect detection method based on image analysis and related devices.
[0059] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0060] See also Figure 1 , Figure 1 A schematic diagram of the process of the battery sealing ring defect detection method based on image analysis provided in the embodiment of the present application is shown in FIG. Figure 1 As shown, the battery sealing ring defect detection method based on image analysis provided in the embodiment of the present application includes steps S100 to S500.
[0061] Step S100, obtaining a test text of a battery sealing ring; wherein the test text includes a temperature rise control curve, a pressurization control curve and a standard image code of the battery sealing ring.
[0062] It should be noted that the method of obtaining the test text of the battery sealing ring includes the following steps:
[0063] Scanning the graphic code on the battery sealing ring by a preset code scanning device to obtain an identification image of the battery sealing ring, and acquiring an identification code of the battery sealing ring based on the identification image;
[0064] The test text is obtained from a preset database based on the identification code.
[0065] It can be understood that the test text of the battery sealing ring can be accurately obtained through the above method, which helps to improve the accuracy of the battery sealing ring defect detection method.
[0066] Step S200: performing a temperature treatment on the battery sealing ring based on the temperature increase control curve, and performing a pressurization treatment on the battery sealing ring based on the pressurization control curve.
[0067] It can be understood that the time duration involved in the temperature increase control curve is consistent with the time duration involved in the pressurization control curve, and the temperature increase treatment process and the pressurization treatment process are performed synchronously.
[0068] Step S300: acquiring a global image of the battery sealing ring after the heating and pressurizing treatments through a preset camera device, and performing image denoising on the global image to obtain a target global image.
[0069] Among them, the method of performing image denoising processing on the global image includes but is not limited to a median filtering method, a Gaussian filtering method and a wavelet denoising method.
[0070] Step S400, encoding the target global image by using a plurality of preset different image encoding devices respectively to obtain a plurality of initial image codes;
[0071] It should be noted that the encoding process of the target global image is performed by a plurality of preset different image encoding devices to obtain a plurality of initial image encodings, including the following steps:
[0072] inputting the target global image into the image encoding device;
[0073] The image encoding device extracts contour information of the target global image using an edge detection algorithm, and performs encoding processing on the contour information based on a preset encoding rule to obtain a first initial sub-image code;
[0074] The image encoding device constructs a coordinate system in the target global image based on a preset coordinate construction rule;
[0075] For each pixel of the target global image, the image encoding device determines the coordinate information of the pixel based on the coordinate system, inputs the pixel into a preset pixel feature extraction model to obtain the pixel feature of the pixel, and encodes the coordinate information and the pixel feature based on a preset encoding rule to obtain the pixel code;
[0076] The image encoding device arranges the pixel point codes based on a preset pixel point code sorting rule to obtain a second initial sub-image code;
[0077] The image encoding device fuses the first initial sub-image code and the second initial sub-image code based on a preset fusion rule to obtain an initial image code.
[0078] The pixel features include but are not limited to the brightness, chroma and saturation of the pixel.
[0079] It can be understood that the above method, for each pixel point of the target global image, the image encoding device determines the coordinate information of the pixel point based on the coordinate system, inputs the pixel point into a preset pixel feature extraction model to obtain the pixel feature of the pixel point, and encodes the coordinate information and the pixel feature based on a preset encoding rule to obtain the pixel code, thereby improving the accuracy of the encoding processing and further improving the accuracy of the battery sealing ring defect detection method.
[0080] Step S500: fuse the multiple initial image codes to obtain a target image code, and determine the defect level of the battery sealing ring based on the standard image code and the target image code.
[0081] It should be noted that the number of initial coding elements of each of the initial image codes is the same, and the fusion processing of the multiple initial image codes to obtain the target image code includes the following steps:
[0082] Generate a blank image coding sequence; wherein the number of coding element vacancies of the blank image coding sequence is the same as the number of initial coding elements of the initial image coding;
[0083] For each of the coding element vacancies, determine the serial number of the coding element vacancies in the blank image coding sequence, and based on the serial number, determine the target coding element corresponding to the coding element vacancies in all the initial image codes, and insert the target coding element into the coding element vacancies to obtain the target image code; wherein the target coding element is the coding element that appears the most times among all the coding elements corresponding to the serial number in all the initial image codes.
[0084] It can be understood that the above method is used to fuse multiple initial image codes to obtain a target image code, which helps to improve the accuracy of the target image code, thereby improving the accuracy and reliability of the battery sealing ring defect detection method.
[0085] The method provided in this embodiment, on the one hand, improves the reliability of the battery sealing ring defect detection method by performing a temperature treatment on the battery sealing ring based on the temperature rise control curve and simultaneously performing a pressurization treatment on the battery sealing ring based on the pressurization control curve; on the other hand, the target global image is respectively encoded by multiple preset different image encoding devices to obtain multiple initial image codes, and the multiple initial image codes are fused to obtain a target image code, and the defect level of the battery sealing ring is determined based on the standard image code and the target image code, thereby improving the accuracy of the battery sealing ring defect detection method.
[0086] In some embodiments, the obtaining of the identification code of the battery sealing ring based on the identification image comprises the following steps:
[0087] Input the logo image into a preset image feature extraction model to obtain a feature vector of the logo image; wherein the feature vector is an n-dimensional vector;
[0088] For each number in the feature vector, an initial target number matrix matching the number is obtained from a preset database; wherein the initial target number matrix includes the number, and the initial target number matrix is an n×n matrix;
[0089] Determine an intermediate target digital matrix in all the initial target digital matrices; wherein the number of times the intermediate target digital matrix appears in all the initial target digital matrices is a prime number, and the intermediate target digital matrix includes at least one;
[0090] Adding each of the intermediate target digital matrices to obtain a target digital matrix, and multiplying the target digital matrix by the feature vector to obtain a target vector;
[0091] Obtain a preset coding table; wherein the coding table includes a character column and a number column;
[0092] Adding each element in the feature vector to obtain a target number, and deleting the first target character corresponding to the target number in the character sequence to obtain a first character vacancy;
[0093] Each character before the first character space is moved backward by one character space to obtain a second character space, and the first target character is inserted into the second character space to obtain an intermediate target encoding table;
[0094] Deleting the second target character in the character column of the intermediate target encoding table to obtain a third character space; wherein the second target character is the first character of the character column of the intermediate target encoding table;
[0095] Each character after the third character space is moved forward by one character space to obtain a fourth character space, and the second target character is inserted into the fourth character space to obtain a target encoding table;
[0096] Based on the target coding table, each vector element of the target vector is encoded to obtain the identification code.
[0097] The method provided in this embodiment obtains the target vector based on the feature vector of the identification image, obtains the target coding table based on a preset coding table and the feature vector, and encodes each vector element of the target vector based on the target coding table to obtain the identification code, thereby improving the accuracy of the identification code and further improving the accuracy and reliability of the battery sealing ring defect detection method.
[0098] In some embodiments, the number of standard coding elements of the standard image code is the same as the number of target coding elements of the target image code, and determining the defect level of the battery sealing ring based on the standard image code and the target image code comprises the following steps:
[0099] For each target coding element of the target image coding, determining a standard coding element matching the target coding element in the standard image coding to generate a standard coding element-target coding element pair; wherein the serial number of the target coding element in the target image coding is consistent with the serial number of the standard coding element in the standard image coding;
[0100] Determining a target standard coding element-target coding element pair from among all the standard coding element-target coding element pairs; wherein the standard coding element and the target coding element in the target standard coding element-target coding element pair are consistent;
[0101] Counting the number of target standard coding element-target coding element pairs;
[0102] If the number of the target standard coding element-target coding element pairs is less than a first preset number, determining that the defect level of the battery sealing ring is level one;
[0103] If the number of the target standard coding element-target coding element pairs is not less than a first preset number but less than a second preset number, the defect level of the battery sealing ring is determined to be level 2; wherein the first preset number is less than the second preset number;
[0104] If the number of the target standard coding element-target coding element pairs is not less than a second preset number, it is determined that the defect level of the battery sealing ring is level three.
[0105] The method provided in this embodiment determines the standard coding element matching the target coding element in the standard image coding for each target coding element of the target image coding, so as to generate a standard coding element-target coding element pair, and determines the target standard coding element-target coding element pair in all the standard coding element-target coding element pairs, and counts the number of the target standard coding element-target coding element pairs. At the same time, if the number of the target standard coding element-target coding element pairs is less than the first preset number, the defect level of the battery sealing ring is determined to be level one; if the number of the target standard coding element-target coding element pairs is not less than the first preset number but less than the second preset number, the defect level of the battery sealing ring is determined to be level two; wherein the first preset number is less than the second preset number; if the number of the target standard coding element-target coding element pairs is not less than the second preset number, the defect level of the battery sealing ring is determined to be level three. The accuracy and reliability of the battery sealing ring defect detection method are further improved.
[0106] See also Figure 2 , Figure 2 A schematic block diagram of the structure of a battery sealing ring defect detection device 100 based on image analysis provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, a battery sealing ring defect detection device 100 based on image analysis includes:
[0107] The first acquisition module 110 is used to acquire the test text of the battery sealing ring; wherein the test text includes a temperature rise control curve, a pressurization control curve and a standard image code of the battery sealing ring.
[0108] The first processing module 120 is used to perform a temperature increase process on the battery sealing ring based on the temperature increase control curve, and to perform a pressurization process on the battery sealing ring based on the pressurization control curve.
[0109] The second acquisition module 130 is used to acquire a global image of the battery sealing ring after the heating and pressurizing treatments through a preset camera device, and perform image denoising on the global image to obtain a target global image.
[0110] The second processing module 140 is used to perform encoding processing on the target global image respectively through a plurality of preset different image encoding devices to obtain a plurality of initial image codes.
[0111] The determination module 150 is used to fuse the multiple initial image codes to obtain a target image code, and determine the defect level of the battery sealing ring based on the standard image code and the target image code.
[0112] It should be noted that technicians in the relevant technical field can clearly understand that for the convenience and conciseness of description, the specific working process of the above-described device and each module can refer to the corresponding process in the aforementioned battery sealing ring defect detection method based on image analysis, and will not be repeated here.
[0113] The battery sealing ring defect detection device 100 based on image analysis provided in the above embodiment can be implemented in the form of a computer program. The computer program can be used in Figure 3 The system is run on the terminal device 200 shown.
[0114] See also Figure 3 , Figure 3 The terminal device 200 provided in the embodiment of the present application is a schematic block diagram of the structure, wherein the terminal device 200 includes a processor 201 and a memory 202, wherein the processor 201 and the memory 202 are connected via a system bus 203, wherein the memory 202 may include a non-volatile storage medium and an internal memory.
[0115] The non-volatile storage medium can store a computer program. The computer program includes program instructions, and when the program instructions are executed by the processor 201, the processor 201 can execute any of the above-mentioned battery sealing ring defect detection methods based on image analysis.
[0116] The processor 201 is used to provide computing and control capabilities to support the operation of the entire terminal device 200.
[0117] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor 201, the processor 201 can execute any of the above-mentioned battery sealing ring defect detection methods based on image analysis.
[0118] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the terminal device 200 involved in the scheme of the present application. The specific terminal device 200 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0119] It should be understood that the processor 201 may be a central processing unit (CPU), and the processor 201 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0120] In some embodiments, the processor 201 is used to run a computer program stored in the memory to implement the following steps:
[0121] Acquire a test text of a battery sealing ring; wherein the test text includes a temperature rise control curve, a pressurization control curve and a standard image code of the battery sealing ring;
[0122] Performing a temperature treatment on the battery sealing ring based on the temperature increase control curve, and performing a pressurization treatment on the battery sealing ring based on the pressurization control curve;
[0123] Acquire a global image of the battery sealing ring after the heating and pressurizing treatments through a preset camera device, and perform image denoising on the global image to obtain a target global image;
[0124] The target global image is encoded by a plurality of preset different image encoding devices to obtain a plurality of initial image codes;
[0125] A plurality of the initial image codes are fused to obtain a target image code, and the defect level of the battery sealing ring is determined based on the standard image code and the target image code.
[0126] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the terminal device 200 described above can refer to the corresponding process of the aforementioned battery sealing ring defect detection method based on image analysis, and will not be repeated here.
[0127] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by one or more processors, the one or more processors implement a battery sealing ring defect detection method based on image analysis as provided in an embodiment of the present application.
[0128] The computer-readable storage medium may be an internal storage unit of the terminal device 200 in the aforementioned embodiment, such as a hard disk or memory of the terminal device 200. The computer-readable storage medium may also be an external storage device of the terminal device 200, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped with the terminal device 200.
[0129] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A battery sealing ring defect detection method based on image analysis, characterized in that: include: Acquire a test text of a battery sealing ring; wherein the test text includes a temperature rise control curve, a pressurization control curve and a standard image code of the battery sealing ring; Performing a temperature treatment on the battery sealing ring based on the temperature increase control curve, and performing a pressurization treatment on the battery sealing ring based on the pressurization control curve; Acquire a global image of the battery sealing ring after the heating and pressurizing treatments through a preset camera device, and perform image denoising on the global image to obtain a target global image; The target global image is encoded by a plurality of preset different image encoding devices to obtain a plurality of initial image codes; A plurality of the initial image codes are fused to obtain a target image code, and a defect level of the battery sealing ring is determined based on the standard image code and the target image code; The encoding process of the target global image is performed by a plurality of preset different image encoding devices to obtain a plurality of initial image encodings, including: inputting the target global image into the image encoding device; The image encoding device extracts contour information of the target global image using an edge detection algorithm, and performs encoding processing on the contour information based on a preset encoding rule to obtain a first initial sub-image code; The image encoding device constructs a coordinate system in the target global image based on a preset coordinate construction rule; For each pixel of the target global image, the image encoding device determines the coordinate information of the pixel based on the coordinate system, inputs the pixel into a preset pixel feature extraction model to obtain the pixel feature of the pixel, and encodes the coordinate information and the pixel feature based on a preset encoding rule to obtain the pixel code; The image encoding device arranges the pixel point codes based on a preset pixel point code sorting rule to obtain a second initial sub-image code; The image encoding device fuses the first initial sub-image code and the second initial sub-image code based on a preset fusion rule to obtain an initial image code; The number of initial coding elements of each of the initial image codes is the same, and the fusion processing of the multiple initial image codes to obtain the target image code includes: Generate a blank image coding sequence; wherein the number of coding element vacancies of the blank image coding sequence is the same as the number of initial coding elements of the initial image coding; For each of the coding element vacancies, determine the sequence number of the coding element vacancies in the blank image coding sequence, determine the target coding element corresponding to the coding element vacancies in all the initial image codes based on the sequence number, and insert the target coding element into the coding element vacancies to obtain the target image code; wherein the target coding element is the coding element that appears the most times among all the coding elements corresponding to the sequence number in all the initial image codes; The number of standard coding elements of the standard image code is the same as the number of target coding elements of the target image code, and determining the defect level of the battery sealing ring based on the standard image code and the target image code includes: For each target coding element of the target image coding, determining a standard coding element matching the target coding element in the standard image coding to generate a standard coding element-target coding element pair; wherein the serial number of the target coding element in the target image coding is consistent with the serial number of the standard coding element in the standard image coding; Determining a target standard coding element-target coding element pair from among all the standard coding element-target coding element pairs; wherein the standard coding element and the target coding element in the target standard coding element-target coding element pair are consistent; Counting the number of target standard coding element-target coding element pairs; If the number of the target standard coding element-target coding element pairs is less than a first preset number, determining that the defect level of the battery sealing ring is level one; If the number of the target standard coding element-target coding element pairs is not less than a first preset number but less than a second preset number, the defect level of the battery sealing ring is determined to be level 2; wherein the first preset number is less than the second preset number; If the number of the target standard coding element-target coding element pairs is not less than a second preset number, it is determined that the defect level of the battery sealing ring is level three.
2. The battery sealing ring defect detection method based on image analysis according to claim 1, characterized in that: The step of obtaining the test text of the battery sealing ring includes: Scanning the graphic code on the battery sealing ring by a preset code scanning device to obtain an identification image of the battery sealing ring, and acquiring an identification code of the battery sealing ring based on the identification image; The test text is obtained from a preset database based on the identification code.
3. The battery sealing ring defect detection method based on image analysis according to claim 2 is characterized in that: The acquiring the identification code of the battery sealing ring based on the identification image includes: Input the logo image into a preset image feature extraction model to obtain a feature vector of the logo image; wherein the feature vector is an n-dimensional vector; For each number in the feature vector, an initial target number matrix matching the number is obtained from a preset database; wherein the initial target number matrix includes the number, and the initial target number matrix is an n×n matrix; Determine an intermediate target digital matrix in all the initial target digital matrices; wherein the number of times the intermediate target digital matrix appears in all the initial target digital matrices is a prime number, and the intermediate target digital matrix includes at least one; Adding each of the intermediate target digital matrices to obtain a target digital matrix, and multiplying the target digital matrix by the feature vector to obtain a target vector; Obtain a preset coding table; wherein the coding table includes a character column and a number column; Adding each element in the feature vector to obtain a target number, and deleting the first target character corresponding to the target number in the character sequence to obtain a first character vacancy; Each character before the first character space is moved backward by one character space to obtain a second character space, and the first target character is inserted into the second character space to obtain an intermediate target encoding table; Deleting the second target character in the character column of the intermediate target encoding table to obtain a third character space; wherein the second target character is the first character of the character column of the intermediate target encoding table; Each character after the third character space is moved forward by one character space to obtain a fourth character space, and the second target character is inserted into the fourth character space to obtain a target encoding table; Based on the target coding table, each vector element of the target vector is encoded to obtain the identification code.
4. A battery sealing ring defect detection device based on image analysis, characterized in that: include: A first acquisition module is used to acquire a test text of a battery sealing ring; wherein the test text includes a temperature rise control curve, a pressurization control curve and a standard image code of the battery sealing ring; A first processing module, used for performing a temperature increase process on the battery sealing ring based on the temperature increase control curve, and performing a pressurization process on the battery sealing ring based on the pressurization control curve; A second acquisition module is used to acquire a global image of the battery sealing ring after the heating and pressurizing treatments through a preset camera device, and perform image denoising on the global image to obtain a target global image; A second processing module is used to encode the target global image through a plurality of preset different image encoding devices to obtain a plurality of initial image codes; A determination module, configured to fuse the plurality of initial image codes to obtain a target image code, and determine the defect level of the battery sealing ring based on the standard image code and the target image code; The encoding process of the target global image is performed by a plurality of preset different image encoding devices to obtain a plurality of initial image encodings, including: inputting the target global image into the image encoding device; The image encoding device extracts contour information of the target global image using an edge detection algorithm, and performs encoding processing on the contour information based on a preset encoding rule to obtain a first initial sub-image code; The image encoding device constructs a coordinate system in the target global image based on a preset coordinate construction rule; For each pixel of the target global image, the image encoding device determines the coordinate information of the pixel based on the coordinate system, inputs the pixel into a preset pixel feature extraction model to obtain the pixel feature of the pixel, and encodes the coordinate information and the pixel feature based on a preset encoding rule to obtain the pixel code; The image encoding device arranges the pixel point codes based on a preset pixel point code sorting rule to obtain a second initial sub-image code; The image encoding device fuses the first initial sub-image code and the second initial sub-image code based on a preset fusion rule to obtain an initial image code; The number of initial coding elements of each of the initial image codes is the same, and the fusion processing of the multiple initial image codes to obtain the target image code includes: Generate a blank image coding sequence; wherein the number of coding element vacancies of the blank image coding sequence is the same as the number of initial coding elements of the initial image coding; For each of the coding element vacancies, determine the sequence number of the coding element vacancies in the blank image coding sequence, determine the target coding element corresponding to the coding element vacancies in all the initial image codes based on the sequence number, and insert the target coding element into the coding element vacancies to obtain the target image code; wherein the target coding element is the coding element that appears the most times among all the coding elements corresponding to the sequence number in all the initial image codes; The number of standard coding elements of the standard image code is the same as the number of target coding elements of the target image code, and determining the defect level of the battery sealing ring based on the standard image code and the target image code includes: For each target coding element of the target image coding, determining a standard coding element matching the target coding element in the standard image coding to generate a standard coding element-target coding element pair; wherein the serial number of the target coding element in the target image coding is consistent with the serial number of the standard coding element in the standard image coding; Determining a target standard coding element-target coding element pair from among all the standard coding element-target coding element pairs; wherein the standard coding element and the target coding element in the target standard coding element-target coding element pair are consistent; Counting the number of target standard coding element-target coding element pairs; If the number of the target standard coding element-target coding element pairs is less than a first preset number, determining that the defect level of the battery sealing ring is level one; If the number of the target standard coding element-target coding element pairs is not less than a first preset number but less than a second preset number, the defect level of the battery sealing ring is determined to be level 2; wherein the first preset number is less than the second preset number; If the number of the target standard coding element-target coding element pairs is not less than a second preset number, it is determined that the defect level of the battery sealing ring is level three.
5. A terminal device, characterized in that: The terminal device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, the battery sealing ring defect detection method based on image analysis as described in any one of claims 1 to 3 is implemented.
6. A computer-readable storage medium, characterized in that: A computer program is stored on the computer-readable storage medium, wherein when the computer program is executed by a processor, the battery sealing ring defect detection method based on image analysis as described in any one of claims 1 to 3 is implemented.
