Lithium battery defect recognition method and system based on graphic recognition
By clustering and stretching the color points in the lithium battery separator image, the problem of insensitive defect detection in the prior art is solved, and the accurate identification of the defect area of the lithium battery separator is achieved.
Patent Information
- Application Number
- CN202411397612.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2044-10-09
AI Technical Summary
The existing lithium battery diaphragm defect detection method based on machine vision cannot uniformly obtain accurate thresholds for segmentation, and is insensitive to the identification of smaller defects, resulting in the inability to accurately obtain defects in the diaphragm image.
By obtaining color points in the RGB color space in the diaphragm image, performing clustering and stretching operations, calculate the stretching degree and stretching rate of each color point, and use the initial stretching coefficient and proportional change coefficient to perform multiple stretching times , until the preset number of times is reached, the final diaphragm image is obtained to identify the defect area.
The accuracy of the detection of defects in lithium battery separator is improved, the differences in defect areas in color space are highlighted, and the stretching operation abnormalities caused by clustering results are avoided, ensuring accurate identification of defect areas.
Smart Images

Figure CN118898616B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pattern recognition, and in particular to a lithium battery defect recognition method and system based on pattern recognition. Background Art
[0002] The quality of lithium batteries affects their capacity, cycle and safety performance. Therefore, when producing lithium batteries, it is necessary to identify defects in the lithium batteries and identify the defective areas of the diaphragm. The defects of lithium batteries include diaphragm surface defects. The main surface defects of the diaphragm are holes, coating leaks, scratches, roller marks, foreign matter, tears, wrinkles and other defects.
[0003] Existing defect detection is based on machine vision, and the collected diaphragm surface image is directly segmented by threshold using the difference in pixel values. However, there are defects of different types and degrees on the surface of lithium battery diaphragms, which makes it impossible for existing machine vision-based defect detection methods to uniformly obtain accurate thresholds for segmentation. In addition, threshold segmentation itself is insensitive to the recognition of smaller defects, so direct threshold segmentation cannot accurately obtain defects in the diaphragm image. Summary of the invention
[0004] In order to solve the above problems, the present invention provides a lithium battery defect recognition method and system based on pattern recognition, the method comprising:
[0005] S1: Obtain a diaphragm image, convert all pixels in the diaphragm image into color points in the RGB color space, and record the number of pixels corresponding to the color points in the diaphragm image as the frequency of the color points;
[0006] S2: Perform stretching operations on all color points according to the initial stretching coefficient to obtain new stretching coefficients and new color points, including:
[0007] Cluster all color points to obtain a preset number of categories;
[0008] The color point with the largest frequency is recorded as the reference point, and the distance between each color point and the reference point is calculated. According to the distance between all color points and the reference point and the frequency of all color points, a distance frequency curve is obtained; the descending speed of each color point is calculated according to the distance frequency curve, and the distance between the color point corresponding to the largest descending speed and the reference point is recorded as the target distance, and the relative position difference between each color point and the reference point is calculated according to the target distance;
[0009] According to the relative position difference between each color point and the reference point and the category to which each color point belongs, the stretching degree of each color point is calculated; according to the stretching degree of each color point, the stretching rate of each color point is calculated; according to the initial stretching coefficient and the stretching rate of each color point, the stretching distance between each color point and the reference point is calculated;
[0010] Each color point is stretched according to the stretching distance to obtain all new color points; a new stretching coefficient is calculated according to the initial stretching coefficient and the proportional change coefficient;
[0011] S3: Repeat the stretching operation on all new color points according to the new stretching coefficient until the preset number of times is reached, and the latest color point obtained is used as the final color point;
[0012] S4: Processing the diaphragm image according to the final color point to obtain a final diaphragm image, and obtaining the diaphragm defect area of the lithium battery according to the final diaphragm image.
[0013] Furthermore, the step of calculating the relative position difference between each color point and the reference point according to the target distance includes:
[0014] No. The calculation formula for the relative position difference between a color point and the reference point is:
[0015]
[0016] In the formula, Indicates The relative position difference between the color point and the reference point, Indicates The distance between the color point and the reference point, Indicates the target distance, Indicates The frequency of the color points.
[0017] Furthermore, the step of calculating the stretching degree of each color point according to the relative position difference between each color point and the reference point and the category to which each color point belongs includes:
[0018] No. The calculation formula for the stretching degree of a color point is:
[0019]
[0020] In the formula, Indicates The stretching degree of each color point, Indicates The frequency of the color points, Indicates The distance between the color point and the reference point, Indicates The Euclidean distance between a color point and the cluster center of the category to which the color point belongs, Indicates The frequency of the cluster center of the category to which the color point belongs, Indicates The sum of the frequencies of all color points of the category to which the color point belongs, represents an exponential function with a natural constant as base, Indicates The relative position difference between the color point and the reference point.
[0021] Further, the step of calculating the stretching rate of each color point according to the stretching degree of each color point includes:
[0022] No. The calculation formula for the stretching rate of each color point is:
[0023]
[0024] In the formula, Indicates The stretching rate of each color point, Indicates The stretching degree of each color point, Indicates that the distance from the reference point is equal to The number of color points, Indicates that the distance from the reference point is equal to The sum of the frequencies of all color points, Indicates The distance between a color point and the reference point.
[0025] Further, the step of calculating the stretching distance between each color point and the reference point according to the initial stretching coefficient and the stretching rate of each color point includes:
[0026] No. The calculation formula for the stretching distance between a color point and the reference point is:
[0027]
[0028] In the formula, Indicates The stretching distance between the color point and the reference point, represents the initial stretch coefficient, Indicates The normalized value of the stretching rate of the color point, Indicates The stretching rate of each color point, Indicates The distance between a color point and the reference point.
[0029] Further, the step of calculating a new stretch coefficient according to the initial stretch coefficient and the proportional change coefficient comprises:
[0030] No. The calculation formula of the stretch coefficient is:
[0031]
[0032] In the formula, Indicates The stretch factor, represents the coefficient of proportional change, Indicates A stretch factor.
[0033] An embodiment of the present invention proposes a lithium battery defect identification system based on graphic recognition, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any step of the lithium battery defect identification method based on graphic recognition.
[0034] The embodiments of the present invention have at least the following beneficial effects:
[0035] 1. For lithium battery diaphragm defects, they are mainly reflected in the difference between the defective area and the normal area of the diaphragm image. The greater the difference between the defective area and the normal area, the easier the defect is to be detected. Therefore, the present invention clusters the color points corresponding to the diaphragm image in the RGB color space to obtain the distribution characteristics of the corresponding color points of the diaphragm image, and then stretches the color points in the color space to highlight the difference in the defective area in the color space, so as to more accurately obtain the diaphragm defect area of the lithium battery.
[0036] 2. Compared with directly stretching the color points in the space according to the clustering results, the present invention takes into account the relative relationship between the categories to which the color points in the space belong, obtains the distribution characteristics of the color points through clustering, and then determines the stretching rate of the color points in the space, which effectively avoids the stretching operation abnormalities caused by inaccurate clustering results, thereby improving the accuracy of the stretching operation of the color points in the space relative to the reference points.
[0037] 3. The present invention takes into account the distribution characteristics of different color points in space, effectively highlights the differences in the defective area in the color space, and obtains different stretching distances of different color points in space. Compared with stretching operations performed at the same scale, it avoids stretching operation abnormalities caused by abnormal stretching distances, thereby performing more accurate stretching operations on the color points in space; finally, by performing multiple stretching operations on the color points in the RGB color space corresponding to the diaphragm image, it is avoided that a single excessive stretching operation causes the normal area points and the color points corresponding to the defective area to be mixed together, thereby making it impossible to identify the color points corresponding to the defective area, and by setting a decreasing stretching coefficient, the size of the stretching distance in multiple different stretching operations is controlled, so that after multiple stretching operations, the stretching effect of the color points gradually approaches the best, that is, the degree of difference between the pixel values of the normal area and the defective area is maximized. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flowchart of the steps of a lithium battery defect identification method and system based on graphic recognition provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation, structure, features and effects of the lithium battery defect recognition method and system based on graphic recognition proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures, or characteristics in one or more embodiments may be combined in any suitable form.
[0041] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0042] The specific scheme of the lithium battery defect recognition method and system based on pattern recognition provided by the present invention is described in detail below with reference to the accompanying drawings.
[0043] See also Figure 1 , which shows a flowchart of a method and system for identifying lithium battery defects based on graphic recognition according to an embodiment of the present invention, the method comprising the following steps:
[0044] S001, collecting a diaphragm image through a set camera at a time interval to obtain all color points corresponding to the diaphragm image.
[0045] 1. Get the shooting time interval.
[0046] The lithium battery defect recognition electronic device is used to capture the image of the diaphragm surface of the lithium battery, that is, the diaphragm image. The lithium battery defect recognition electronic device includes: a transmission device, an industrial camera, a light source, and an embedded device.
[0047] The specific method of capturing the diaphragm image by using an industrial camera is as follows: the produced diaphragm is generally in the shape of a long strip, and the diaphragm strip follows the conveying device through the identification device, and the diaphragm image is captured by the industrial camera.
[0048] According to the conveying speed of the conveying device, the actual length of the diaphragm contained in the diaphragm image obtains the shooting time interval. The specific calculation format is:
[0049]
[0050] In the formula, is the actual length of the diaphragm contained in a diaphragm image taken by the camera. is the transmission speed of the transmission device, Take time lapse photos for your camera.
[0051] 2. Collect diaphragm images through the set camera at time intervals.
[0052] Generally speaking, the surface defects of lithium battery separators are mainly reflected in the difference of surface pixel values. Therefore, in order to detect the surface defects of separators, it is necessary to obtain the surface image of separators first. At this time, after the separator is produced, it needs to be transported to a special inspection platform, and a camera is installed directly above the inspection platform to take the image of the separator located on the transmission device.
[0053] The captured image may contain a diaphragm area image and a transmission background image. In order to facilitate the subsequent analysis and detection of the diaphragm area image, the captured image needs to be preprocessed, that is, the diaphragm area image is obtained through a graph segmentation method, which is recorded as a diaphragm image.
[0054] 3. Obtain all color points corresponding to the diaphragm image.
[0055] The diaphragm image is preprocessed again: all pixel points in the diaphragm image are converted into color points in the RGB color space, the number of pixel points corresponding to the color points in the diaphragm image is recorded as the frequency of the color points, and all color points corresponding to the diaphragm image are obtained.
[0056] S002, clustering all color points to obtain a preset number of categories.
[0057] In order to determine the distribution characteristics of the corresponding color points in the normal area and the defective area in the diaphragm image, the present invention adopts a mean shift algorithm to cluster all the color points corresponding to the diaphragm image. In this embodiment, the number of initial windows in the mean shift algorithm is 10, the window radius is 20, and the window shape is a sphere. In other embodiments, the implementer can set the number of initial windows and the window radius as needed.
[0058] S003, obtaining a distance-frequency curve according to the distances between all color points and the reference point and the frequencies of all color points; and obtaining a target distance according to the distance-frequency curve.
[0059] It should be noted that since the color values of the pixels in the normal area of the diaphragm image may also have small differences, and multiple defects of varying degrees may appear at the same time, it is impossible to directly use the clustering results to identify the defective area. Therefore, in order to highlight the difference in color values between the normal area and the defective area of the diaphragm, the present invention performs a stretching operation on the color points in the RGB color space.
[0060] In this embodiment, the color point with the largest frequency is recorded as the reference point, and the Euclidean distance between each color point and the reference point is recorded as the distance between each color point and the reference point; the distance between the color point and the reference point is used as the horizontal axis, and the frequency of the color point is used as the vertical axis. According to the points composed of the distance between each color point and the reference point and the frequency of each color point, a curve is drawn to obtain a distance frequency curve; the absolute value of the slope of each color point on the distance frequency curve is calculated, and recorded as the descending speed of each color point. The greater the descending speed of the color point, the smaller the correlation between the corresponding color point and the reference point. Therefore, the color point corresponding to the maximum descending speed has the minimum correlation with the reference point, and the necessity of stretching the color point relative to the reference point is the greatest. Therefore, the distance between the color point corresponding to the maximum descending speed and the reference point is recorded as the target distance.
[0061] S004, calculating the relative position difference between each color point and the reference point according to the target distance; calculating the stretching degree of each color point according to the relative position difference between each color point and the reference point and the category to which each color point belongs; calculating the stretching rate of each color point according to the stretching degree of each color point; calculating the stretching distance between each color point and the reference point according to the initial stretching coefficient and the stretching rate of each color point.
[0062] 1. Calculate the relative position difference between each color point and the reference point based on the target distance.
[0063] No. The calculation formula for the relative position difference between a color point and the reference point is:
[0064]
[0065] In the formula, Indicates The relative position difference between the color point and the reference point, Indicates The distance between the color point and the reference point, Indicates the target distance, Indicates The frequency of the color points.
[0066] The bigger, the The more pixels a color point corresponds to in the diaphragm image, the greater the possibility that the color point belongs to the normal area of the diaphragm, so the relative position difference of the color point with respect to the reference point is smaller.
[0067] By using the above steps, the relative position difference of each color point relative to the reference point is determined through the relationship between the number and position of the color points. The maximum value of the decreasing speed of the number and distance of all color points is used to directly determine the position of the stretching operation relative to the reference point, providing a reference point for judging the relative position difference of all color points relative to the reference point.
[0068] 2. According to the relative position difference between each color point and the reference point and the category to which each color point belongs, the stretching degree of each color point is extracted.
[0069] It should be noted that, according to the above steps, the positional relationship between all color points and the reference point in the RGB color space mainly considers the characteristics of the category to which each color point belongs and the relationship between the color point and the category to which it belongs. The more the color point does not belong to the normal area of the diaphragm, the more it is stretched relative to the reference point, and the greater the degree of stretching.
[0070] In this embodiment, The calculation formula for the stretching degree of a color point is:
[0071]
[0072] In the formula, Indicates The stretching degree of each color point, Indicates The frequency of the color points, Indicates The distance between the color point and the reference point, Indicates The Euclidean distance between a color point and the cluster center of the category to which the color point belongs, Indicates The frequency of the cluster center of the category to which the color point belongs, Indicates The sum of the frequencies of all color points of the category to which the color point belongs, represents an exponential function with a natural constant as base, Indicates The relative position difference between the color point and the reference point.
[0073] This embodiment extracts the stretching degree of each color point through the relative position difference between each color point and the reference point and the category to which each color point belongs.
[0074] Indicates The relative aggregation of color points, The bigger, the The smaller the degree to which each color point is stretched relative to the reference point; Indicates The relative size of the category to which the color point belongs, The bigger, the The larger the category to which the color point belongs, the The more likely a color point is to belong to the normal area, the less it is stretched relative to the reference point; The bigger, the The greater the difference in the relative positions of the color points with respect to the reference point, the greater the degree of stretching.
[0075] By using the above steps, the degree to which each color point is stretched relative to the reference point is determined according to the distribution relationship of all color points in the RGB color space. Compared with stretching directly according to the clustering results, the method of the present invention considers the relative relationship between the categories to which the color points belong, effectively avoiding stretching anomalies caused by inaccurate clustering, thereby improving the stretching accuracy of the color points relative to the reference points.
[0076] 3. Extract the stretching rate of each color point according to the stretching degree of each color point.
[0077] It should be noted that, through the above steps, the possibility of stretching all color points in the RGB color space relative to the reference point is obtained. Because the relative position relationship between all color points in the RGB color space and the reference point is different, in order to uniformly highlight the difference between the defective area and the normal area on the surface of the diaphragm, it is necessary to stretch different color points in the RGB color space to different degrees. The degree of stretching of different color points in the RGB color space relative to the reference point is mainly affected by the relative relationship between the position of the color point and the position of the reference point.
[0078] In this embodiment, The calculation formula for the stretching rate of a color point is:
[0079]
[0080] In the formula, Indicates The stretching rate of each color point, Indicates The stretching degree of each color point, Indicates that the distance from the reference point is equal to The number of color points, Indicates that the distance from the reference point is equal to The sum of the frequencies of all color points, Indicates The distance between a color point and the reference point.
[0081] The larger the The greater the degree to which the color points are clustered relative to the reference point, the smaller the stretching rate; The larger the The smaller the degree of abnormal distribution of each color point relative to the reference point, the smaller the stretching rate of the color point. The larger it is, the greater the stretching rate of the color point.
[0082] The above steps are used to determine the stretching rate of the color point in the RGB color space. Compared with stretching at the same scale, the method of the present invention takes into account the clustering distribution characteristics of different color points in the RGB color space, effectively highlights the difference in color points, and avoids stretching anomalies caused by abnormal judgment of color points, thereby performing a more accurate stretching operation, that is, more accurately highlighting the difference between the defective area and the normal area of the diaphragm.
[0083] The stretching rate of the color point is extracted through the stretching degree of the color point and the distance between the color point and the reference point.
[0084] 4. Calculate the stretching distance between each color point and the reference point based on the initial stretching coefficient and the stretching rate of each color point.
[0085] No. The calculation formula for the stretching distance between a color point and the reference point is:
[0086]
[0087] In the formula, Indicates The stretching distance between the color point and the reference point, represents the initial stretch coefficient, Indicates The normalized value of the stretching rate of the color point, Indicates The stretching rate of each color point, Indicates The distance between a color point and the reference point.
[0088] S005, stretching each color point according to the stretching distance to obtain all new color points; calculating a new stretching coefficient according to the initial stretching coefficient and the proportional change coefficient.
[0089] It should be noted that according to the above steps, the stretching degree of each color point in the RGB color space relative to the reference point is obtained. In the process of stretching the color points, if the stretching degree is too large, it is easy to destroy the positional relationship of the color points, and then the color points corresponding to the defective area cannot be distinguished. If the stretching degree is too small, the stretching effect cannot be reflected, and the color points corresponding to the defective area are not highlighted sufficiently. Therefore, in order to obtain a better stretching effect, the present invention adopts a multiple stretching method to stretch all color points. For each stretching operation, the stretching coefficient It directly affects the stretching distance. Because the purpose of multiple stretching is to prevent excessive stretching in one time, multiple stretching is to gradually approach the optimal stretching effect. Therefore, the stretching coefficient of each time is adjusted by the proportional change coefficient.
[0090] For color point, along the reference point to the The direction of the color point The color point moves to a distance equal to the first The stretching distance between the color point and the base point , and obtain the The new color point corresponding to the color point.
[0091] In this embodiment, a new stretching coefficient is calculated based on the initial stretching coefficient and the proportional change coefficient. The calculation formula of the stretch coefficient is:
[0092]
[0093] In the formula, Indicates The stretch factor, represents the coefficient of proportional change, Indicates In this embodiment, the proportional change coefficient is 0.6. In other embodiments, the implementer can set the proportional change coefficient as needed.
[0094] S006, repeatedly performing the stretching operation on all new color points according to the new stretching coefficient to obtain the final color point.
[0095] Repeat steps S002 to S005 to cluster all new color points to obtain a preset number of categories; obtain a distance-frequency curve based on the distances between all new color points and the reference point and the frequencies of all new color points; obtain the target distance based on the distance-frequency curve; calculate the relative position difference between each new color point and the reference point based on the target distance; calculate the stretching degree of each new color point based on the relative position difference between each new color point and the reference point and the characteristics of the category to which each new color point belongs; calculate the stretching rate of each new color point based on the stretching degree of each new color point; calculate the stretching distance between each new color point and the reference point based on the initial stretching coefficient and the stretching rate of each new color point; stretch each new color point based on the stretching distance to obtain all new color points; calculate a new stretching coefficient based on the initial stretching coefficient and the proportional change coefficient.
[0096] Repeat steps S002 to S005, perform stretching operations on all new color points according to the new stretching coefficient, and stop when a preset number of times is reached, and use the latest color point obtained as the final color point.
[0097] S007, processing the diaphragm image according to the final color point to obtain a final diaphragm image, and obtaining the diaphragm defect area of the lithium battery according to the final diaphragm image.
[0098] The color values of all pixels in the diaphragm image are converted into the color values of the corresponding final color points. According to the color value of each pixel and the reference value of the reference point, the possibility of each pixel belonging to the defect area is calculated. The specific calculation formula is:
[0099]
[0100] In the formula, Indicates the reference value of the reference point, Indicates the diaphragm image The color value of a pixel, Indicates the diaphragm image The probability that a pixel belongs to the defect area.
[0101] When the probability that a pixel belongs to a defective area is greater than a preset threshold, the corresponding pixel is a defective area pixel, otherwise, the corresponding pixel belongs to a normal area pixel. All defective area pixels in the diaphragm image are obtained, and the connected domain formed by all defective area pixels is the identification of lithium battery diaphragm defects. In this embodiment, the preset threshold is 0.05. In other embodiments, the implementer can set the preset threshold as needed.
[0102] This embodiment extracts the possibility that each pixel belongs to a defective area through the color value of the pixel and the reference value of the reference point, and identifies the lithium battery diaphragm defect based on the possibility that each pixel belongs to the defective area.
[0103] In summary, the present invention converts the pixel points in the diaphragm image into color points; obtains the distance-frequency curve and the target distance according to the distance and frequency between the color point and the reference point; calculates the relative position difference of each color point according to the target distance, extracts the stretching degree of each color point according to the relative position difference and the characteristics of the category to which each color point belongs, calculates the stretching distance between each color point and the reference point according to the stretching degree and the initial stretching coefficient, and stretches each color point according to the stretching distance to obtain a new color point; repeats the stretching operation on all new color points according to the new stretching coefficient to obtain the final diaphragm image; identifies the diaphragm defect area of the lithium battery according to the final diaphragm image. The present invention stretches the color points corresponding to the diaphragm image, highlights the difference in the defective area in the color space, and accurately identifies the diaphragm defect area of the lithium battery.
[0104] It should be noted that the sequence of the embodiments of the present invention described above is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0105] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0106] An embodiment of the present invention proposes a lithium battery defect identification system based on graphic recognition, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the lithium battery defect identification method based on graphic recognition in steps S001 to S007 are implemented.
[0107] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A lithium battery defect recognition method based on pattern recognition, characterized in that: The method comprises: S1: Obtain a diaphragm image, convert all pixels in the diaphragm image into color points in the RGB color space, and record the number of pixels corresponding to the color points in the diaphragm image as the frequency of the color points; S2: Perform stretching operations on all color points according to the initial stretching coefficient to obtain new stretching coefficients and new color points, including: Cluster all color points to obtain a preset number of categories; The color point with the largest frequency is recorded as the reference point, and the distance between each color point and the reference point is calculated. According to the distance between all color points and the reference point and the frequency of all color points, a distance frequency curve is obtained; the descending speed of each color point is calculated according to the distance frequency curve, and the distance between the color point corresponding to the largest descending speed and the reference point is recorded as the target distance, and the relative position difference between each color point and the reference point is calculated according to the target distance; According to the relative position difference between each color point and the reference point and the category to which each color point belongs, the stretching degree of each color point is calculated; according to the stretching degree of each color point, the stretching rate of each color point is calculated; according to the initial stretching coefficient and the stretching rate of each color point, the stretching distance between each color point and the reference point is calculated; Each color point is stretched according to the stretching distance to obtain all new color points; a new stretching coefficient is calculated according to the initial stretching coefficient and the proportional change coefficient; S3: Repeat the stretching operation on all new color points according to the new stretching coefficient until the preset number of times is reached, and the latest color point obtained is used as the final color point; S4: Processing the diaphragm image according to the final color point to obtain a final diaphragm image, and obtaining a diaphragm defect area of the lithium battery according to the final diaphragm image; The step of calculating the stretching degree of each color point according to the relative position difference between each color point and the reference point and the category to which each color point belongs comprises: No. The calculation formula for the stretching degree of a color point is: In the formula, Indicates The stretching degree of each color point, Indicates The frequency of the color points, Indicates The distance between the color point and the reference point, Indicates The Euclidean distance between a color point and the cluster center of the category to which the color point belongs, Indicates The frequency of the cluster center of the category to which the color point belongs, Indicates The sum of the frequencies of all color points of the category to which the color point belongs, represents an exponential function with a natural constant as base, Indicates The relative position difference between the color point and the reference point.
2. The lithium battery defect identification method based on pattern recognition according to claim 1, characterized in that: The step of calculating the relative position difference between each color point and the reference point according to the target distance comprises: No. The calculation formula for the relative position difference between a color point and the reference point is: In the formula, Indicates The relative position difference between the color point and the reference point, Indicates The distance between the color point and the reference point, Indicates the target distance, Indicates The frequency of the color points.
3. The method for identifying lithium battery defects based on pattern recognition according to claim 1, characterized in that: The step of calculating the stretching rate of each color point according to the stretching degree of each color point comprises: No. The calculation formula for the stretching rate of a color point is: In the formula, Indicates The stretching rate of each color point, Indicates The stretching degree of each color point, Indicates that the distance from the reference point is equal to The number of color points, Indicates that the distance from the reference point is equal to The sum of the frequencies of all color points, Indicates The distance between a color point and the reference point.
4. The method for identifying lithium battery defects based on pattern recognition according to claim 2, characterized in that: The step of calculating the stretching distance between each color point and the reference point according to the initial stretching coefficient and the stretching rate of each color point comprises: No. The calculation formula for the stretching distance between a color point and the reference point is: In the formula, Indicates The stretching distance between the color point and the reference point, represents the initial stretch coefficient, Indicates The normalized value of the stretching rate of the color point, Indicates The stretching rate of each color point, Indicates The distance between a color point and the reference point.
5. The method for identifying lithium battery defects based on pattern recognition according to claim 1, characterized in that: The step of calculating a new stretch coefficient according to the initial stretch coefficient and the proportional change coefficient comprises: No. The calculation formula of the stretch coefficient is: In the formula, Indicates The stretch factor, represents the coefficient of proportional change, Indicates A stretch factor.
6. A lithium battery defect recognition system based on pattern recognition, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the lithium battery defect identification method based on graphic recognition as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Image type defect detecting method for insulator
CN103886610A
Lithium battery diaphragm quality detection system
CN116703894A
Image processing target object detail texture defect detection method and system
CN118470012A
Systems and Methods for Detecting Image Quality Defects
US20090185204A1
