Surface defect identification method for finished die seat of lithium battery pole piece punching die

The method enhances the accuracy of identifying concave defects on lithium battery pole piece punching dies by analyzing images under different lighting directions, filtering error pixels, and smoothing grayscale values to improve the precision of defect recognition.

CN118967663BActive Publication Date: 2024-12-27DONGGUAN JINGPIN PRECISION MOULD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411420217.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2024-12-27
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

Existing machine vision technologies struggle to accurately identify surface depressions on lithium battery pole piece punching dies due to interference from holes and mirror reflections caused by changes in lighting direction, leading to reduced accuracy in defect recognition.

Method used

A method that involves obtaining images under different lighting directions, detecting hole areas, filtering error pixels based on radius error, calculating hole membership probabilities, and smoothing grayscale values to enhance the accuracy of height modeling for defect identification.

Benefits of technology

The method improves the accuracy of identifying concave defects on the mold base by effectively distinguishing between concave defects and hole areas, reducing the interference from lighting and hole reflections, resulting in more precise defect recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967663B_ABST
    Figure CN118967663B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of mold base image defect recognition, and specifically to a method for identifying surface defects of a finished mold base of a lithium battery pole piece punching mold, the method comprising: obtaining finished mold base images of a lithium battery pole piece punching mold in different lighting directions; detecting hole areas according to the grayscale gradient changes in the finished mold base images; screening error pixels according to the radius length of each hole area; dividing the boundaries of each hole area according to the positional relationship between the error pixels and each hole area to obtain each updated hole area; screening illumination-affected position points according to the grayscale change differences of position points on the mold base in all finished mold base images; smoothing the grayscale values ​​of the pixels of all updated hole areas and illumination-affected position points in the finished mold base images and highly modeling them to obtain the identification results of surface concave defects of the finished mold base. The present application can improve the accuracy of surface concave defect recognition on the finished mold base.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of mold base image defect recognition, and specifically to a method for identifying surface defects of a finished mold base of a lithium battery pole piece punching die. Background Art

[0002] The lithium battery pole piece punching die is a precision tool used to punch the lithium battery pole piece into the required shape and size. It is usually composed of an upper die and a lower die. The pole piece is punched by the vertical movement of the upper die. The die base is a part of the die, which supports and fixes the die assembly to ensure the stability and precision of the die during use.

[0003] The mold base surface will have defects due to mechanical damage, such as surface depressions, which will reduce the dimensional accuracy and shape accuracy of the mold and affect the quality and consistency of the punched lithium battery pole pieces. Existing machine vision technology uses height modeling to identify depressions on the surface of an object, which usually requires surface images from different lighting directions; however, there are many holes on the mold base surface, which are affected by changes in the lighting direction, and their edges will form mirror reflections, which interfere with the accuracy of height modeling, resulting in a decrease in the accuracy of identifying surface depression defects on the finished mold base. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides a method for identifying surface defects of a finished die base of a lithium battery pole piece punching die to solve the existing problems.

[0005] The method for identifying surface defects of the finished die seat of the lithium battery pole piece punching die of the present application adopts the following technical solution:

[0006] One embodiment of the present application provides a method for identifying surface defects of a finished die seat of a lithium battery pole piece punching die, the method comprising the following steps:

[0007] S1, obtaining images of a finished die base of a lithium battery pole piece punching die under different lighting directions;

[0008] S2, detecting the hole area according to the gray gradient change in the finished mold base image, determining the radius error according to the radius length of each hole area, and filtering the error pixel points according to the radius error; obtaining the hole membership probability of the error pixel points for each hole area according to the radius error of each hole area, the positional relationship between the error pixel points and each hole area;

[0009] S3, dividing the boundaries of each hole area according to the hole membership probability of the error pixel points in all finished mold base images to different hole areas, and obtaining each updated hole area;

[0010] S4, for each position point on the mold base except for all updated hole areas, according to the grayscale change difference of the position point at the same position pixel point in all finished mold base images, obtain the grayscale change difference of the position point; according to the numerical distribution of the grayscale change difference of all position points, screen the position points affected by illumination;

[0011] S5, smoothing the grayscale values ​​of pixels of all updated hole areas and light-affected positions in the finished mold base image to obtain a mold base detection image; height modeling of the mold base surface is performed based on all mold base detection images to obtain an identification result of a concave defect on the surface of the finished mold base.

[0012] Furthermore, the method for obtaining error pixel points includes:

[0013] Detect the circles in the finished mold base image; record the inner area of ​​each circle as a hole area; determine the radius error of each hole area according to the length of the radius of each hole area; wherein the radius error of the hole area is positively correlated with the length of the radius of the hole area, and the radius error length of the hole area is less than the radius of the hole area;

[0014] For each hole area, obtain the circle centered at the hole area and the radius is , The annular area between the circles; the pixel points in the annular area are recorded as error pixel points; wherein, is the radius of the hole area, is the radius error of the hole area.

[0015] Furthermore, the method for obtaining the hole membership probability of the error pixel point for each hole area includes: recording the hole membership probability of the pth error pixel point for the i-th hole area as , ; Among them, exp() represents an exponential function with a natural constant as the base; represents the distance between pixel p and the center of the i-th hole area; represents the radius of the i-th hole area; is the radius error of the i-th hole area; || is the absolute value sign.

[0016] Furthermore, the method for obtaining each updated hole area includes:

[0017] The corresponding positions of all error pixels in all finished mold base images on the mold base are recorded as error position points; the average hole attribution probability of all error pixels at the error position points for each hole area is taken as the average hole probability of the error position points for each hole area;

[0018] According to the average hole probability of all error position points for each hole area, the radius of each hole area is re-divided to obtain an updated hole area.

[0019] Furthermore, the radius of each hole area is re-divided according to the average hole probability of all error position points for each hole area to obtain an updated hole area, including:

[0020] For each hole region, obtain the error position point with the largest average hole probability for the hole region as the boundary position point of the hole region; wherein, when there are more than one error position point with the largest average hole probability, randomly select one of them as the boundary position point of the hole region;

[0021] A circular area with the center of the hole area as the center and the distance between the center of the hole area and its boundary position point as the radius is used as the updated hole area.

[0022] Furthermore, the method for obtaining the grayscale change difference of the position point includes:

[0023] Obtain the grayscale gradient amplitude and grayscale gradient direction of the pixel point located at the same position as the position point in the finished mold base image in each lighting direction;

[0024] According to the differences in the grayscale gradient amplitude and the grayscale gradient direction of the position point in all the finished mold base images, the grayscale change difference of the position point is obtained.

[0025] Further, the grayscale change difference of the position point is obtained according to the difference of the grayscale gradient amplitude and the grayscale gradient direction of the position point in all the finished mold base images, including:

[0026] The grayscale change difference of the p-th position point is recorded as , ;Wherein, norm() represents the normalization function; Represents the standard deviation of the grayscale gradient amplitude of the pixel points at the same position as the p-th position point in all finished mold base images; Represents the distance between the pth position point and the center of the hole area closest to it; It represents the angle between the direction of the p-th position point pointing to the center of the hole area closest to it and the average grayscale gradient direction of the p-th position point; is a constant greater than 0;

[0027] The average grayscale gradient direction of the position point is the average of the grayscale gradient directions of the pixels at the same position as the position point in all finished mold base images.

[0028] Furthermore, the method for screening the illumination-affected position points includes: recording the position points whose normalized grayscale variation difference value is greater than a preset threshold as illumination-affected position points.

[0029] Furthermore, the method for acquiring the mold base detection image includes:

[0030] For each finished mold base image, calculate the mean grayscale value of all pixels except all updated hole areas and light-affected positions; use the mean grayscale value to replace the grayscale values ​​of all pixels in the updated hole area and the pixels at the same position as the light-affected position to obtain a mold base inspection image.

[0031] Further, the mold base surface is height modeled according to all mold base detection images to obtain the recognition result of the concave defect on the surface of the finished mold base, including: all mold base detection images are height reconstructed using the photometric stereo method to obtain a reconstructed height map of the finished mold base surface.

[0032] This application has at least the following beneficial effects:

[0033] The present application analyzes the difference between the surface concave defects on the finished mold base and the functional hole areas in the finished mold base image under the influence of different lighting directions. First, the error pixels are preliminarily screened according to the shape characteristics of the hole area, and the hole belonging probability is calculated based on the distribution relationship of the error pixels, thereby improving the accuracy of the error pixels in dividing adjacent hole areas. Further, the hole belonging probability of the error pixels in different lighting directions for different hole areas is integrated to obtain an updated hole area, thereby solving the problem of the blurred boundary of the hole area caused by noise and different lighting directions, and obtaining a more accurate hole area. Furthermore, for the positions around the holes that are easily affected by the lighting direction and present different grayscale changes, which affect the detection of the concave defects, the lighting-affected positions are screened according to the difference in grayscale changes. Finally, in order to eliminate the interference of the holes and the lighting-affected positions on the recognition of the concave defects, the grayscale values ​​of the pixels of all the updated hole areas and the lighting-affected positions in the finished mold base image are smoothed and then height modeling is performed, thereby improving the accuracy of the light modeling and making the recognition of the surface concave defects on the finished mold base more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1A flowchart of the steps of the method for identifying surface defects of the finished die seat of the lithium battery pole piece punching die provided in this application;

[0036] Figure 2 A schematic diagram of a side view of a detection device provided for one embodiment of the present application;

[0037] Figure 3 A schematic diagram of a top view of a detection device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0039] 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 application belongs.

[0040] The specific scheme of the method for identifying surface defects of the finished die seat of the lithium battery pole piece punching die provided in the present application is described in detail below with reference to the accompanying drawings.

[0041] An embodiment of the present application provides a method for identifying surface defects of a finished die seat of a lithium battery pole piece punching die. Specifically, the following method for identifying surface defects of a finished die seat of a lithium battery pole piece punching die is provided. Figure 1 , the method comprises the following steps:

[0042] S1, obtaining images of a finished die base of a lithium battery pole piece punching die under different lighting directions.

[0043] A specific implementation scenario of the embodiment of the present application is the concave defect recognition scenario of the finished die base surface of the lithium battery pole piece punching die; the finished die base of the lithium battery pole piece punching die will have concave surface defects due to mechanical damage, and this defect will affect the matching and positioning accuracy between the dies. The photometric stereo method is usually used to detect the surface defects of the die base through multiple images with different lighting directions.

[0044] First, the finished die base of the lithium battery pole piece punching die is installed on the detection device, which includes: an industrial CMOS camera is selected as the camera for collecting images, a telecentric lens is selected as the lens, an LED light source is selected as the light source, and the lighting mode is forward lighting. Figure 2The figure shows a side view of the detection device. The camera b is perpendicular to the mold base a. The illumination direction of the light source and the optical axis of the camera are in the same plane and there is an angle between them. In this embodiment .

[0045] like Figure 3 As shown, it is a top view of the detection device, and the horizontal right direction of the plane where the mold base a is located is set as the 0° direction. Since the photometric stereo method requires W images with different lighting directions as input, this embodiment collects three finished mold base images of the mold base to be tested, where the lighting direction is the direction of the line connecting the projection point of the light source on the plane where the mold base a is located and the mold base a, which are 0°, 120°, and 240° directions respectively. The implementer can determine the value of W according to actual conditions, and this application does not limit it. The larger the value of W, the more accurate the recognition effect. To meet the requirements of the photometric stereo method, the minimum value of W is 3. The collected finished mold base images under different lighting directions are converted into grayscale images, and median filtering is used for denoising. Image grayscale and median filtering belong to well-known technologies, and the specific process will not be repeated.

[0046] When the traditional photometric stereo method is used to detect surface defects on the mold base, multiple functional holes on the mold base surface, including positioning holes, guide post holes, guide sleeve holes, screw holes, etc., are of different sizes and have blurred edges, which are easily judged as surface depressions, affecting the accuracy of defect recognition. Therefore, this embodiment analyzes the characteristics of functional holes, processes these holes and the affected areas before using the photometric stereo method to detect surface depressions, and eliminates the interference of functional holes on the identification of depression defects.

[0047] S2, detect the hole area according to the grayscale gradient change in the finished mold base image, determine the radius error according to the radius length of each hole area, and filter the error pixel points according to the radius error; according to the radius error of each hole area, the positional relationship between the error pixel points and each hole area, obtain the hole membership probability of the error pixel points to each hole area.

[0048] The functional holes on the surface of the mold base are circular in shape. To extract the hole area, the circle in the finished mold base image is first detected. In this embodiment, the Hough transform is used to detect the circle in the grayscale image. The inner area of ​​each circle is a hole area. The Hough transform is a well-known technology and the specific process is not repeated here. The Hough transform detection of circles depends on edge detection. Due to the influence of noise, there is an error between the radius of the detected circle and the actual radius of the hole. In particular, there will be a cross-overlap phenomenon between holes that are close to each other, which makes the hole features blurred and mistakenly judged as a concave defect. The center of the circle detected is obtained by summing up the accumulator detected by the Hough transform, and the error is relatively small. Therefore, the accuracy of the center of the circle detected by the Hough transform is relatively high, and the radius of the circle has a certain error with the radius of the hole.

[0049] The larger the area of ​​the hole, the greater the internal pixels are affected by noise, and the larger the radius error of the detection circle may be. Therefore, the radius error of the hole area is positively correlated with the length of the radius of the hole area. It should be noted that the positive correlation indicates that there is a same-direction change relationship between the independent variable and the dependent variable, that is, the larger the independent variable, the larger the dependent variable. In this embodiment, k (k=0.1) times the radius of each hole area is taken as the radius error of each hole area. The implementer can evaluate according to the noise level. The larger the noise level, the larger the value of k, which means that the radius error of the detection circle is larger.

[0050] Based on the above analysis, for the pixels within the radius error at the edge of the hole area, there is a large error in the hole area determination process. For each hole area, the radius is obtained with the center of the hole area as the center. , The annular area between the circles; the pixel points in the annular area are recorded as error pixel points; wherein, is the radius of the hole area, is the radius error of the hole area.

[0051] As the distance between the error pixel and the center of the hole area increases, the probability that it belongs to the hole area gradually decreases and conforms to the Gaussian distribution law. In order to divide the pixels between the holes that appear cross-overlapping in the finished mold base image, the hole membership probability is calculated according to the Gaussian function and the positional relationship between the error pixel and each hole area.

[0052] Specifically, the hole membership probability of the pth error pixel to the i-th hole region is recorded as , ; Among them, exp() represents the exponential function with the natural constant e as the base; represents the Euclidean distance between pixel p and the center of the i-th hole area, represents the radius of the i-th hole area, is the radius error of the i-th hole area, which represents the standard deviation of the Gaussian function; || is the absolute value symbol.

[0053] If the hole regions are close to each other, the error pixel may belong to multiple hole regions at the same time. The hole membership probability between the error pixel and each hole region is calculated separately. is the inner radius of the annular area of ​​the hole area. The smaller the distance between the error pixel and the inner radius, and the larger the radius error, the more likely the error pixel belongs to the hole area, and the greater their association degree, that is, the greater the probability of hole belonging to the hole area. When the distance between the error pixel and the center of the i-th hole area is When , the degree of correlation reaches its maximum.

[0054] Among them, the standard deviation of the Gaussian function controls the intensity of the change of the correlation degree with the distance. The larger the standard deviation, the more gradually the correlation degree decreases with the increase of the distance. The value here is the radius error. The size of the radius error depends on the length of the radius. That is, when the error pixel point is in the error range of the two hole areas at the same time, the hole membership probability calculated for the hole area with a larger radius length decreases more gradually with the increase of the distance. That is, at this time, the error pixel point has a greater probability of hole membership for the hole area with a larger radius length.

[0055] S3, dividing the boundaries of each hole area according to the hole membership probabilities of the error pixels in all finished mold base images to different hole areas, and obtaining updated hole areas.

[0056] Based on step S2, the hole membership probability of each error pixel in the finished mold base image of the lithium battery pole piece punching mold in different lighting directions is obtained. Since the position of the camera is fixed, the pixel positions in the finished mold base images in different lighting directions correspond one to one; and the different lighting directions make the error pixels in different finished mold base images different.

[0057] The concave and hole on the surface of the finished mold base will produce different reflection and refraction phenomena for light in different directions. In order to obtain the hole morphology in each direction, it is necessary to combine the analysis results of multiple lighting directions. Therefore, in this embodiment, the corresponding positions of all error pixels in all finished mold base images on the mold base are recorded as error position points; the average hole attribution probability of all error pixels at the error position points for each hole area is taken as the average hole probability of the error position points for each hole area.

[0058] Specifically, for example, if there is a pixel point at a certain position on the mold base that is the same as the position in the finished mold base image as an error pixel point, then this position is an error position point. If the error position point is an error pixel point in two finished mold base images, then the average hole probability of the error position point is the average of the hole attribution probabilities of the two error pixels.

[0059] The error position point is the fuzzy position of the boundary of the hole area. The hole attribution probability of the error pixel points in different directions is combined to calculate the membership of the error position point to the hole area, which can increase the judgment accuracy of the membership of the error position point to the hole area.

[0060] Through the above analysis, the error position point is the fuzzy position of the boundary of the hole area, and its hole attribution probability represents the degree to which the error position point is the true boundary of the hole area. Therefore, this embodiment can re-divide the radius of each hole area according to the average hole probability of all error position points for each hole area to obtain an updated hole area.

[0061] Specifically, for each hole region, an error position point with the largest average hole probability for the hole region is obtained as the boundary position point of the hole region; wherein, when there is more than one error position point with the largest average hole probability, one of them is randomly selected as the boundary position point of the hole region;

[0062] A circular area with the center of the hole area as the center and the distance between the center of the hole area and its boundary position point as the radius is used as the updated hole area.

[0063] The distance between the center of the circle and the boundary position point is used as the new radius of the hole area, which solves the blurred boundary of the hole area caused by noise and different lighting directions and obtains a more accurate hole area.

[0064] S4, for each position point on the mold base except for all updated hole areas, the grayscale change difference of the position point is obtained according to the grayscale change difference of the pixel point at the same position in all finished mold base images; according to the numerical distribution of the grayscale change difference of all position points, the position points affected by illumination are screened.

[0065] Photometric stereo requires that the surface of an object conforms to the Lambertian reflection model, that is, diffuse reflection. However, the edge of a hole is very smooth, which may form a specular reflection, affecting the analysis results of photometric stereo. The presence of a hole will affect the distribution of light, resulting in differences in the grayscale changes at the same position under different lighting directions. The grayscale gradient of the pixels at the edge of the hole is larger because it is affected by the lighting direction, and the grayscale changes are obvious when the pixels outside the hole transition to the edge of the hole. If a specular reflection is generated at the edge of the hole, the direction of the grayscale gradient will point to the center of the circle inside the hole.

[0066] For each position point on the mold base except for all updated hole areas, the grayscale gradient amplitude and grayscale gradient direction of the pixel point located at the same position as the position point in the finished mold base image in each lighting direction are obtained; this embodiment uses the grayscale gradient amplitude and grayscale gradient direction of the Sobel operator pixel point, and other embodiments of the present application may also use the Prewitt operator or the Roberts cross operator, which is not limited in this application.

[0067] According to the difference in the grayscale gradient amplitude and the grayscale gradient direction of the position point in all the finished mold base images, the grayscale change difference of the position point is obtained. The grayscale change difference is calculated by the calculation method of this embodiment:

[0068]

[0069] In the above formula, Indicates the grayscale change difference of the pth position point; norm() represents the normalization function; Represents the standard deviation of the grayscale gradient amplitude of the pixel points at the same position as the p-th position point in all finished mold base images; Represents the distance between the pth position point and the center of the hole area closest to it; Represents the angle between the direction of the p-th position point pointing to the center of the circle and the average grayscale gradient direction of the p-th position point; In order to preset a constant greater than 0 to prevent the denominator from being 0, the value of this embodiment is 1.

[0070] For the same position in the finished mold base image under different lighting directions, the gradient amplitude is different due to the different lighting directions. The standard deviation is used to represent the difference between them. The larger the difference, the greater the influence of lighting on the pixel at that position. The closer to the center of the circle, that is, the closer to the edge pixel that produces mirror reflection, the greater the influence of lighting direction. The smaller the angle between the direction of the center of the circle and the gradient direction through the pixel, the more likely the gradient direction is to point to the center of the hole, and the more likely it is caused by mirror reflection, so the greater the influence.

[0071] The greater the grayscale change difference, the greater the pixel is affected by the illumination direction, and the greater the impact on the photometric stereo method, and vice versa. Therefore, the pixels with a grayscale change difference greater than the threshold t=0.5 after normalization are recorded as illumination-affected position points.

[0072] S5, smoothing the grayscale values ​​of pixels of all updated hole areas and light-affected positions in the finished mold base image to obtain a mold base detection image; height modeling of the mold base surface is performed based on all mold base detection images to obtain an identification result of a concave defect on the surface of the finished mold base.

[0073] After analyzing the above steps, the position points in the updated hole area on the mold base need to be eliminated in the detection of the mold base surface depression. The light-affected position points have a negative effect on the detection of the mold base surface depression due to the influence of light from different directions, so they also need to be eliminated. Finally, the influence of the above factors is not excluded. In this embodiment, for each finished mold base image, the gray value mean of all pixels except all updated hole areas and light-affected position points is calculated; the gray value mean is used to replace the gray value of all pixels in the updated hole area and the same position of the light-affected position points to obtain the mold base detection image.

[0074] All mold base inspection images are used as inputs of the photometric stereo method, and the output is a reconstructed height map to obtain the recognition result of the surface concave defects of the finished mold base. The photometric stereo method is a well-known technology, and the specific process will not be repeated.

[0075] Through the above description of the implementation method in combination with the accompanying drawings, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0076] The above contents are only specific implementation methods 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 changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A method for identifying surface defects of a finished die seat of a lithium battery pole piece punching die, characterized in that: The method comprises the following steps: S1, obtaining images of a finished die base of a lithium battery pole piece punching die under different lighting directions; S2, detecting the hole areas in the finished mold base image, determining the radius error according to the radius length of each hole area, and filtering the error pixel points according to the radius error; obtaining the hole membership probability of the error pixel points for each hole area according to the radius error of each hole area, the positional relationship between the error pixel points and each hole area; S3, dividing the boundaries of each hole area according to the hole membership probability of the error pixel points in all finished mold base images to different hole areas, and obtaining each updated hole area; S4, for each position point on the mold base except for all updated hole areas, according to the grayscale change difference of the position point at the same position pixel point in all finished mold base images, obtain the grayscale change difference of the position point; according to the numerical distribution of the grayscale change difference of all position points, screen the position points affected by illumination; S5, smoothing the grayscale values ​​of all updated hole areas and pixel points at positions affected by illumination in the finished mold base image to obtain a mold base detection image; height modeling of the mold base surface is performed based on all mold base detection images to obtain an identification result of a concave defect on the surface of the finished mold base; The method for obtaining error pixel points includes: Detect the circles in the finished mold base image; record the inner area of ​​each circle as a hole area; determine the radius error of each hole area according to the length of the radius of each hole area; wherein the radius error of the hole area is positively correlated with the length of the radius of the hole area, and the radius error length of the hole area is less than the radius of the hole area; For each hole area, obtain the circle centered at the hole area and the radius is , The annular area between the circles; the pixel points in the annular area are recorded as error pixel points; wherein, is the radius of the hole area, is the radius error of the hole area; The method for obtaining the hole membership probability of the error pixel point for each hole area includes: recording the hole membership probability of the pth error pixel point for the i-th hole area as , ; Among them, exp() represents an exponential function with a natural constant as the base; represents the distance between pixel p and the center of the i-th hole area; represents the radius of the i-th hole area; is the radius error of the i-th hole area; || is the absolute value sign; The method for obtaining each updated hole area includes: The corresponding positions of all error pixels in all finished mold base images on the mold base are recorded as error position points; the average hole attribution probability of all error pixels at the error position points for each hole area is taken as the average hole probability of the error position points for each hole area; According to the average hole probability of all error position points for each hole area, the radius of each hole area is re-divided to obtain an updated hole area; The method for obtaining the grayscale change difference of the position point includes: Obtain the grayscale gradient amplitude and grayscale gradient direction of the pixel point located at the same position as the position point in the finished mold base image in each lighting direction; According to the differences in the grayscale gradient amplitude and the grayscale gradient direction of the position point in all the finished mold base images, the grayscale change difference of the position point is obtained.

2. The method for identifying surface defects of a finished die seat of a lithium battery pole piece punching die according to claim 1, characterized in that: The method of re-dividing the radius of each hole area according to the average hole probability of all error position points for each hole area to obtain an updated hole area includes: For each hole region, obtain the error position point with the largest average hole probability for the hole region as the boundary position point of the hole region; wherein, when there are more than one error position point with the largest average hole probability, randomly select one of them as the boundary position point of the hole region; A circular area with the center of the hole area as the center and the distance between the center of the hole area and its boundary position point as the radius is used as the updated hole area.

3. The method for identifying surface defects of a finished die seat of a lithium battery pole piece punching die according to claim 1, characterized in that: The grayscale change difference of the position point is obtained according to the difference of the grayscale gradient amplitude and the grayscale gradient direction of the position point in all the finished mold base images, including: The grayscale change difference of the p-th position point is recorded as , ;Wherein, norm() represents the normalization function; Represents the standard deviation of the grayscale gradient amplitude of the pixel points at the same position as the p-th position point in all finished mold base images; Represents the distance between the pth position point and the center of the hole area closest to it; It represents the angle between the direction of the p-th position point pointing to the center of the hole area closest to it and the average grayscale gradient direction of the p-th position point; is a constant greater than 0; The average grayscale gradient direction of the position point is the average of the grayscale gradient directions of the pixels at the same position as the position point in all finished mold base images.

4. The method for identifying surface defects of a finished die seat of a lithium battery pole piece punching die according to claim 1, characterized in that: The method for screening the illumination-affected position points includes: recording the position points whose normalized grayscale variation difference value is greater than a preset threshold as illumination-affected position points.

5. The method for identifying surface defects of a finished die seat of a lithium battery pole piece punching die according to claim 1, characterized in that: The method for acquiring the mold base detection image comprises: For each finished mold base image, calculate the mean grayscale value of all pixels except all updated hole areas and light-affected positions; use the mean grayscale value to replace the grayscale values ​​of all pixels in the updated hole area and the pixels at the same position as the light-affected position to obtain a mold base inspection image.

6. The method for identifying surface defects of a finished die seat of a lithium battery pole piece punching die according to claim 1, characterized in that: The method of performing height modeling on the mold base surface according to all mold base detection images to obtain the recognition result of the concave defect on the surface of the finished mold base includes: performing height reconstruction on all mold base detection images using the photometric stereo method to obtain a reconstructed height map of the surface of the finished mold base.