A method and system for detecting defects in ceramic cast films based on image recognition
By constructing a pixel matrix and analyzing spatial connectivity aggregation, combined with nonlinear exponential excitation, the problem of low detection accuracy caused by particle texture interference on the surface of ceramic cast films was solved, and accurate detection of weak defects was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAN XINYI ELECTRONIC TECH CO LTD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies cannot effectively distinguish between the texture of powder particles on the surface of ceramic cast films and actual defects, resulting in low detection accuracy. Traditional methods are prone to misjudging particles as defects or missing weak defects.
By constructing a pixel matrix, calculating the defect responsivity and spatial connectivity aggregation, and using the Gaussian second-order differential operator and Gaussian decay mechanism, combined with nonlinear exponential excitation, the grayscale feature map is reconstructed and threshold segmentation is performed to suppress particle interference and amplify weak defect signals.
It improves the accuracy of defect detection in ceramic cast films, reduces the false detection rate and the missed detection rate, and enables precise capture of micron-level defects in high-speed production environments.
Smart Images

Figure CN121962149B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ceramic cast film defect detection technology, and relates to a ceramic cast film defect detection method and system based on image recognition. It is used for online defect detection of cast films on production lines of core materials such as ceramic substrates, and can effectively suppress surface particle interference, thereby improving the accuracy of defect detection. Background Technology
[0002] As electronic components move towards miniaturization and high integration, the manufacturing of multilayer ceramic capacitors and ceramic substrates places extremely stringent quality requirements on the core material, ceramic cast film. Cast film production is typically carried out at high speed in roll-to-roll motion, and the film is extremely thin. Any slight surface scratches, bubbles, or other defects with topological extensibility can directly lead to insulation failure or short circuits in the final electronic components. Therefore, high-precision online defect detection of ceramic cast film on high-speed production lines is a key step in ensuring product yield and reliability.
[0003] Currently, defect detection for such film materials often employs traditional image processing methods. For example, CN121258921A discloses a method for locating abnormal regions by extracting edge gradient operators or local thresholding. However, this method relies solely on a single gray-level gradient and cannot distinguish between normal ceramic particle textures with high-frequency gradient abrupt changes and real defects, easily misjudging dense particles as defects. CN120876486B discloses a method for extracting film defects based on image filtering smoothing and morphological features. However, global filtering smoothing easily causes blurring effects. When applied to ceramic cast films, it smooths out high-frequency weak defect features such as microbubbles or shallow scratches, leading to missed detections. CN116681688B discloses a method for detecting defects such as scratches by extracting image connected component features and gray-level analysis. However, it lacks in-depth local topological geometric morphological analysis, making it difficult to completely separate multi-directionally extending weak defects from the dense, discrete ceramic particle background, resulting in low detection accuracy.
[0004] However, specifically for ceramic cast films, a special material, because it is cast from a slurry of powder particles, its surface is densely covered with a large number of powder particle textures, which optically manifest as high-frequency gray-scale gradient abrupt changes, extremely similar to real defect characteristics. The existing technologies mentioned above cannot effectively solve this problem. If thresholding or connected component segmentation is used directly, it is very easy to misjudge dense normal particles as defects. If excessive smoothing filtering is performed to suppress particle interference, it will cause real weak defect signals to be missed, which cannot meet the stringent quality inspection requirements of high-precision electronic materials. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and solve the technical problem that the inherent particle texture on the surface of ceramic cast film is greatly interfered with, which makes it impossible for traditional methods to effectively distinguish between normal particles and real topological defects, resulting in low detection accuracy. This invention provides a method and system for detecting defects in ceramic cast film based on image recognition.
[0006] To achieve the above-mentioned objectives, this invention provides a method for detecting defects in ceramic cast films based on image recognition, comprising the following steps: acquiring a pre-processed image of the cast film; performing convolution operations with the pre-processed image using a Gaussian second-order differential operator to obtain the gradient of each pixel in the horizontal, vertical, and diagonal directions; constructing a matrix for each pixel based on the gradient and obtaining feature values, and calculating the defect responsivity based on the ratio of the feature values; obtaining the local principal extension direction angle of each pixel as the center, performing bidirectional discrete sampling along the local principal extension direction angle at a preset maximum step size of unidirectional spatial search, and weighting and summing the defect responsivity of all obtained sampling points to obtain the spatial connectivity aggregation degree; fusing the spatial connectivity aggregation degree and the defect responsivity to obtain a correction factor, and using the correction factor to weight the grayscale values of the pixels to obtain grayscale reconstruction values; reconstructing a grayscale feature map based on the grayscale reconstruction values and performing threshold segmentation to obtain a binary image and extracting each connected region in the binary image; if the number of pixels in a connected region is greater than a set judgment threshold, the connected region is marked as a defect region.
[0007] This invention addresses the technical problem that dense particle textures on the surface of ceramic cast films are easily misjudged as defects by traditional algorithms. It constructs a pixel matrix to extract feature values and calculate defect responsivity, accurately capturing anisotropic defects and suppressing isotropic particle responses. Secondly, it introduces spatial connectivity aggregation analysis along the local principal extension direction, utilizing defect topological continuity to thoroughly eliminate isolated noise interference. Finally, it fuses both to reconstruct a grayscale feature map, exponentially amplifying weak defect features and strongly suppressing background textures. This effectively solves the contradiction between high-frequency texture suppression and weak defect preservation in traditional methods, improving the accuracy of defect detection.
[0008] The present invention describes constructing a matrix for each pixel and obtaining its feature values, including: constructing a matrix for each pixel. matrix , ,in , and Each pixel The gradients are calculated in the horizontal, vertical, and diagonal directions; the principal and secondary eigenvalues of the matrix are solved using the principles of linear algebra.
[0009] The defect response degree described in this invention satisfies the expression: In the formula, For pixels Defect response degree; , For pixels The principal and secondary eigenvalues of the matrix; These are preset hyperparameters; It is a natural exponential function; This is the standard normalization function.
[0010] This invention utilizes the ratio of the primary and secondary eigenvalues of a matrix to construct an isotropic penalty term. When a pixel is located in a normal particle, the eigenvalues are close, and the exponential term decays rapidly, thus strongly suppressing the response. When located in a real linear defect, the secondary eigenvalues tend to zero, maximizing the preservation of the structural strength represented by the primary eigenvalues and achieving the filtering of non-defect textures.
[0011] The method for obtaining the local principal extension direction angle described in this invention is as follows: the direction angle of the feature vector corresponding to the secondary feature value is selected as the local principal extension direction angle.
[0012] The spatial connectivity aggregation degree described in this invention satisfies the expression: In the formula, For pixels Spatial connectivity and aggregation degree; This represents the maximum step size for a unidirectional spatial search. The step size offset variable for discrete search. ; For pixels The local principal extension direction angle; Sampling points Defect response rate, , In pixels Starting point along move The x and y coordinates of the sampling points after each step size; The default Gaussian standard deviation factor is used. For standard normalized functions; is the base of the natural logarithm.
[0013] This invention uses discrete sampling and weighted summation along the local main extension direction, and introduces a spatial nearest neighbor distance penalty mechanism based on Gaussian decay. The sampling points that are farther away have lower weights, which effectively prevents abnormal interference from occasional noise points at far ends. By utilizing the spatial continuous topological characteristics of real defects, it amplifies continuous weak defect signals, blocks the accumulation of fracture particle noise, and further reduces the false detection rate.
[0014] The correction factor described in this invention satisfies the expression: In the formula, For pixels Correction factor; For pixels Defect response degree; For pixels Spatial connectivity and aggregation degree; The preset excitation intensity coefficient; It is a natural exponential function.
[0015] This invention utilizes a natural exponential function for nonlinear excitation. For normal particles, the confidence index approaches zero, and the correction factor decays rapidly. For real defects, the correction factor increases exponentially, thereby amplifying the defect signal exponentially and increasing the contrast to make weak features more prominent.
[0016] The method for obtaining grayscale reconstruction values according to the present invention includes: calculating the product of the grayscale value of each pixel and the correction factor, and using the maximum-minimum normalization method to map the product value to the range of 0-255 to obtain the grayscale reconstruction value.
[0017] This invention securely maps the product value to the standard grayscale range of 0-255 using a maximum-minimum normalization method. This reconstruction mechanism achieves progressive forced suppression of non-defect regions while ensuring that the amplified defect energy is converted into bright image features without overflow, eliminating the contrast distortion problem and providing a high-contrast image basis for threshold segmentation.
[0018] The threshold segmentation described in this invention is achieved using the Otsu method.
[0019] The method for obtaining a pre-processed image of a cast film according to the present invention includes: filtering the grayscale image of the cast film using a standard two-dimensional Gaussian convolution kernel to obtain a pre-processed image; wherein the convolution kernel size ranges from 5×5 to 9×9, and the standard deviation ranges from 1 to 2.
[0020] The present invention also provides a ceramic casting film defect detection system based on image recognition, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the aforementioned ceramic casting film defect detection method based on image recognition. By adopting the above technical solution, the aforementioned ceramic casting film defect detection method based on image recognition is generated into a computer program and stored in the memory for loading and execution by the processor. This allows for the creation of a terminal device based on the memory and processor, facilitating its use.
[0021] Compared with the prior art, the present invention has at least the following beneficial effects: by introducing second-order topological analysis of the matrix, the morphological essential difference between ceramic particles and real defects is analyzed by utilizing the ratio relationship between primary and secondary eigenvalues, thus solving the problem of false alarms caused by powder interference on the surface of the cast film; furthermore, the spatial connectivity aggregation degree is used for signal accumulation, and a nonlinear exponential excitation mechanism is combined to amplify the gain of the defect region, so that the weak defect signal originally submerged in the complex background is reconstructed into a significant feature, realizing the accurate capture of micron-level defects in a high-speed production environment and effectively reducing the false detection rate. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating the image recognition-based defect detection method for ceramic cast films that relates to the present invention.
[0023] Figure 2 This is a schematic diagram of the detection result after processing with the traditional gradient operator involved in this invention.
[0024] Figure 3 This is a schematic diagram of the reconstructed grayscale features after processing by the method of the present invention. Detailed Implementation
[0025] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings.
[0026] Example 1:
[0027] This embodiment discloses a method for detecting defects in ceramic cast films based on image recognition, referring to... Figure 1 This includes steps S1-S5:
[0028] S1. Obtain the image of the cast film after preprocessing.
[0029] It should be noted that ceramic cast films are in a high-speed roll-to-roll motion during production, and the defects on the film surface are often small in scale. Therefore, high-resolution imaging equipment is required for acquisition. However, the industrial environment is complex, and the acquired raw images are often mixed with thermal noise from CCD / CMOS sensors and high-frequency electromagnetic interference from the site. These non-essential random isolated noise points appear as abrupt changes in grayscale values, which will interfere with subsequent calculations if not processed. Therefore, it is necessary to preprocess the images first to accurately filter out irrelevant high-frequency electronic noise while preserving the film surface texture features and defect edges.
[0030] Specifically, an industrial camera and a high-brightness LED line light source are installed on the cast film production line to collect images of the cast film surface in real time, convert them into grayscale images, and then use a standard two-dimensional Gaussian convolution kernel to filter the grayscale images to obtain preprocessed images.
[0031] It should be added that the size and standard deviation of the two-dimensional Gaussian convolution kernel are used to control the spatial range and weight attenuation of the smoothing filter, which directly determines the balance between noise suppression and detail preservation. If the value is too large, it will cause severe blurring of the image, smoothing out the high-frequency features of tiny bubble defect edges or shallow scratches. If the value is too small, it will not be able to cover and neutralize the single-pixel-level random thermal noise generated by the sensor, causing these noise points to be mistakenly amplified in subsequent differential calculations. Therefore, the range of the convolution kernel size is 5×5 to 9×9, and the range of the standard deviation is 1 to 2. In this embodiment of the invention, the convolution kernel size is 7×7 and the standard deviation is 1.5 to ensure that while effectively filtering out discrete electronic shot noise, the physical morphology of the particle texture on the surface of the cast film and the topological edges of tiny defects are preserved to the greatest extent, avoiding missed detections caused by excessive smoothing. The implementer can adjust the value according to the imaging resolution of the actual production line camera and the electromagnetic noise level of the environment.
[0032] At this point, the image of the pre-processed cast film has been obtained.
[0033] S2. Calculate the defect response of each pixel.
[0034] It should be noted that since the grayscale value difference between normal grain texture and minute defects is extremely small, relying on conventional grayscale comparison is very easy to cause misjudgment or missed detection. Therefore, topological morphology analysis is introduced: grain texture usually presents as isolated, isotropic point structures, while real minute defects often appear as ridge or valley structures with a certain degree of extension. Since second-order curvature can accurately reflect the local geometric and directional features of an image, by analyzing the second-order curvature changes in the neighborhood of a pixel, isotropic grain points and anisotropic defect features can be distinguished.
[0035] Specifically, the matrix of each pixel is constructed and its feature values are obtained. The construction process includes: performing convolution operations with the preprocessed image using the Gaussian Derivative Operator to obtain the gradient of each pixel in the horizontal, vertical, and diagonal directions; and constructing the pixel matrix. matrix , ,in , and Each pixel The gradients in the horizontal, vertical, and diagonal directions; the principal and secondary eigenvalues of the matrix are solved using the principles of linear algebra; it should be noted that the Gaussian second-order differential operator is a well-known technique and will not be elaborated upon here.
[0036] The defect response degree is calculated based on the two characteristic values; the defect response degree satisfies the expression:
[0037]
[0038] In the formula, For pixels Defect response degree; , For pixels The principal and secondary eigenvalues of the matrix; To preset the hyperparameter, we set it to 0.01 to prevent the denominator from being zero; It is a natural exponential function; This is the standard normalization function.
[0039] in, Reflecting pixels The structural response intensity in the direction of maximum local curvature. The larger this value, the more likely the pixel is located at the edge or center of a structure with significant grayscale changes. Reflects pixels The degree of isotropy of the local structure: When the pixel is located in a normal ceramic grain texture, the gradient changes in all directions of the image are large, causing the values of the two feature values to be close. Close to 1 It will rapidly decay and shrink, thus affecting Strong suppression is applied to ensure that the defect response value of pixels with non-defective grain textures is significantly reduced; when the pixel is located in a real defect, its shape appears as a line or ridge, and the grayscale change along the defect extension direction is minimal. Approaching 0, while the grayscale change perpendicular to the extension direction is extremely large. Much greater than 0, at this time Approaching 0, Approaching 1, thus maximizing the preservation In summary, if The larger the value, the more likely the pixel belongs to a real defect structure with directional extension, rather than messy background particles.
[0040] At this point, the defect response of each pixel has been obtained.
[0041] S3. Calculate the spatial connectivity aggregation degree of each pixel.
[0042] It should be noted that due to the extremely rough surface of the cast film, some particle aggregation points may still produce pseudo-ridge-like responses, which may lead to false detections. True defects have physical continuity in space, that is, defects exist continuously, while residual particle noise is broken and randomly distributed in space. Therefore, it is necessary to introduce spatial connectivity analysis to analyze whether surrounding pixels also have the same curvature characteristics along the extension direction of the texture. If surrounding pixels also have high curvature, they are considered to be continuous defects; if they are isolated points, they are considered to be noise, thereby reducing the false detection rate.
[0043] Specifically, since the direction of the feature vector corresponding to the principal feature value represents the direction of the most drastic gray-scale change, that is, the direction across the defect, while the direction of the feature vector corresponding to the secondary feature value represents the direction of the most gradual gray-scale change; in the ridge structure, the direction extending along the ridge line often has the smallest gray-scale change, therefore, the direction angle of the feature vector corresponding to the secondary feature value is selected as the local principal extension direction angle of the pixel.
[0044] Centered on each pixel, perform a unidirectional spatial search along its local principal extension direction according to a preset formula.
[0045] Bidirectional discrete sampling is performed with the maximum step size; the spatial connectivity aggregation degree of each pixel is obtained by weighted summation of the defect response of all sampling points; the spatial connectivity aggregation degree satisfies the expression:
[0046]
[0047] In the formula, For pixels Spatial connectivity and aggregation degree; This represents the maximum step size for a unidirectional spatial search. For the step size offset variable of the discrete search, from arrive consecutive integers , representing the specific offset distance of the sampling point relative to the center point; For pixels The local principal extension direction angle; Sampling points Defect response rate, , In pixels Starting from, along move The x and y coordinates of the sampling points after each step size; The default Gaussian standard deviation factor is used. For standard normalized functions; is the base of the natural logarithm.
[0048] in, Reflects pixels The degree of topological resonance with neighboring pixels along its extension direction: If the pixel is isolated particle noise, even if its own defect responsivity is large, the defect responsivity of the sampling points along its extension direction is small, and the accumulated result will not increase significantly; conversely, if the pixel is on the edge of a microcrack or bubble, most of the sampling points along its extension direction have high defect responsivity, and the accumulated result will increase significantly; multiplying the defect responsivity by a Gaussian weight term aims to introduce a distance attenuation penalty mechanism for spatial nearest neighbor correlation, which is based on the distance from the pixel. The closer the sampling point, the greater its morphological features are as a reference point for the center point. Conversely, the reference value decreases Gaussianly with increasing offset distance as the distance increases. This prevents occasional isolated high-response noise points at the far end of the search path from causing abnormal interference to the local aggregation results. In summary, The larger the value, the more likely the pixel not only has ridge-like features but also forms a close linear or curved connected structure with surrounding pixels in space, meaning that the probability of this area being a real defect is extremely high.
[0049] It should be added that the Gaussian standard deviation factor determines the rate of distance decay. To ensure the effective distribution range of the spatial weights matches the maximum step size of the unidirectional search, the Gaussian standard deviation factor and the maximum step size of the unidirectional search must satisfy a Gaussian... Criteria, i.e., taking Under this criterion, when the sampling deviation distance reaches the set search boundary, the weight smoothly decays to almost zero. This not only ensures the effective aggregation of continuous defect signals in the neighborhood, but also avoids the boundary distortion effect caused by the abrupt truncation of the search window, suppressing the crosstalk of far-end impurities from a mechanistic perspective. The maximum step size of the unidirectional spatial search is used to define the field of view of the spatial connectivity check. Its value should be set according to the maximum scale of common defects. If the value is too small, the search range is insufficient to cover the complete linear structure of the small defects, resulting in insufficient energy accumulation and difficulty in distinguishing short defects from dense particles. If the value is too large, too many irrelevant background areas are introduced, increasing the amount of computation and potentially causing the features of two adjacent defects to interfere with each other. Considering that the local linear size of common microbubbles or pinholes is 15 to 50 pixels, 30 pixels is used in this embodiment of the invention to ensure that the local linear features of common micropores and scratches on the surface of ceramic cast film can be completely captured, achieving effective signal aggregation. Implementers can adjust the value according to the typical physical size of the defects to be detected in actual production.
[0050] At this point, the spatial connectivity aggregation degree of each pixel has been obtained.
[0051] S4. Calculate the correction factor for each pixel to obtain the grayscale reconstruction value.
[0052] It should be noted that if the spatial connectivity aggregation degree is directly linearly multiplied with the original gray level, although the background can be suppressed, the gray level of the defect area will also be linearly attenuated, making the defect darker and failing to effectively increase the gray level contrast between the defect and the background. Therefore, a correction factor feature is introduced, and an exponential function is used to construct a gain coefficient with a high dynamic range to exponentially amplify the defect signal. In order to adapt to the bit width limitations of standard gray level image storage and display, normalization mapping is required after the correction operation to reconstruct a gray level feature map with significant defect features.
[0053] Specifically, the spatial connectivity aggregation degree and defect response degree of each pixel are fused to obtain a correction factor for each pixel; the correction factor satisfies the expression:
[0054]
[0055] In the formula, For pixels Correction factor; For pixels Defect response degree; For pixels Spatial connectivity and aggregation degree; The preset excitation intensity coefficient; It is a natural exponential function.
[0056] in, Pixels The joint topological confidence index, when the pixel is located in the ceramic powder particle region, is due to its isotropic geometric characteristics. It approaches 0, perhaps due to the discreteness of its spatial distribution. Approaching 0, under the influence of the exponential function, It will decay to zero at an extremely rapid rate; when the pixel is located in a real defect region, it simultaneously satisfies local ridge features and spatial connectivity features, causing the confidence index to approach 1. Under the excitation of the excitation intensity coefficient, It exhibits an exponential leap.
[0057] Furthermore, the grayscale reconstruction value of each pixel is obtained by: calculating the product of the grayscale value of each pixel and the correction factor, mapping the product value to the range of 0-255, and obtaining the grayscale reconstruction value. , ,in For pixels The product of the gray value and the correction factor; , This represents the maximum and minimum values of the product of all pixels; due to noise interference during the imaging process, the maximum and minimum values of the product of pixels in the image are not equal, i.e. .
[0058] The grayscale reconstruction mechanism achieves progressive confidence suppression of non-defect areas. Regardless of the absolute intensity of the original background grayscale, the reconstruction response is forcibly mapped to an extremely low value range. This causes the grayscale energy of the defect area to differ by orders of magnitude from the background in the feature space, forming an extremely high signal peak, thereby eliminating the risk of missed detection. Furthermore, these highly dynamic values are remapped back to the [0,255] space, ensuring that the defect appears as a bright feature in the reconstructed grayscale feature map, while the background remains pure black.
[0059] It should be added that the excitation intensity coefficient is used to adjust the gain slope of the nonlinear transfer function. If the value is too large, the gain coefficient will increase too steeply with the confidence index, causing the extremely weak pseudo-ridge perturbations or high-frequency noise in the background to be excessively amplified, which can easily lead to contrast oversaturation, resulting in false alarms or distortion of the defect edge contour due to over-excitation. If the value is too small, the nonlinear excitation effect will not be significant, and it will be unable to achieve sufficient energy stretching for weak defects with low contrast, resulting in limited improvement in the signal-to-noise ratio of the reconstructed feature map, making it difficult to completely separate the fine defects from the background particles in the subsequent segmentation steps. Therefore, the value range of the excitation intensity coefficient is 1.5 to 3. In this embodiment of the invention, it is set to 2 to ensure that while greatly suppressing the residual texture of ceramic particles, it can provide sufficient response gain for the extremely weak pinholes and bubble edges, so that the defect features present an ideal contrast distribution in the reconstruction space. The implementer can dynamically adjust the value within the above range according to the sensitivity requirements of the actual production line for the detection of weak scratches.
[0060] At this point, the grayscale reconstruction value of each pixel is obtained, and the grayscale feature map is reconstructed.
[0061] S5. Reconstruct the grayscale feature map and identify defect areas.
[0062] It should be noted that the contrast of the defect target in the reconstructed grayscale feature map is significantly improved. At this time, the image has extremely high purity and can directly use binarization segmentation to separate the defect from the background. Combined with the actual defect size requirements in the production process, the accurate screening and positioning of the real defect target can be achieved.
[0063] Specifically, the Otsu method is used to process the obtained reconstructed grayscale feature map to obtain a binary image;
[0064] The binary image is scanned, and each connected component in the image is obtained using a connected component analysis algorithm. The number of pixels in each connected component is then counted.
[0065] Since real defects appear as high-contrast connected regions in the reconstructed image, a judgment threshold is set, and all acquired connected regions are traversed: if the number of pixels in a connected region is greater than the judgment threshold, the connected region is marked as a defective region; otherwise, it is regarded as a harmless minor impurity or residual noise and is not marked; finally, if there is a marked region in the image, an early warning is immediately triggered, and relevant personnel are sent to check for defect problems in order to reduce the defect rate.
[0066] It should be added that the Otsu method is a well-known technology and will not be described in detail here. The judgment threshold is used to define the physical scale of the defect at the pixel level. Based on the minimum physical area of the defect defined in the casting film production process, combined with the unit pixel resolution of the camera, the area limit at the physical level is equivalently mapped to the pixel scale at the image level. The specific calculation relationship satisfies that the judgment threshold is equal to the ratio of the minimum physical area of the defect to the square of the unit pixel resolution. The implementers can dynamically adjust the minimum defect area according to the process control requirements of different product models.
[0067] For example, Figure 2 The detection results after processing with the traditional gradient operator contain a large number of white noise interference points distributed like stars in the sky, in addition to some real scratch signals. While enhancing weak scratches, it also erroneously amplifies the edges of high-frequency particle textures, resulting in serious false alarms in the detection results. Figure 3 The image shows the reconstructed grayscale feature map after processing by the method of this invention. The background is pure black, indicating that the background of normal high-frequency powder particles is suppressed. At the same time, the image clearly shows bright areas with linear continuous features. These bright areas correspond to the positions of the original micro scratches. Compared with the traditional gradient processing method, it has stronger background suppression ability and weak defect capture ability, thus improving the accuracy of defect detection.
[0068] This embodiment also discloses a ceramic cast film defect detection system based on image recognition, including a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, a ceramic cast film defect detection method based on image recognition according to the present invention is implemented. The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. Their settings and functions are known in the art, and therefore will not be described in detail here.
Claims
1. A method for detecting defects in ceramic cast films based on image recognition, characterized in that, include: Acquire images of the preprocessed cast film; The preprocessed image is convolved using the second-order Gaussian differential operator to obtain the gradient of each pixel in the horizontal, vertical, and diagonal directions. A matrix is constructed for each pixel based on the gradients, and the eigenvalues are obtained. The defect response is then calculated based on the ratio of these eigenvalues. , ; , For pixels The principal and secondary eigenvalues of the matrix; These are preset hyperparameters; It is a natural exponential function; For standard normalized functions; Centered on each pixel, its local principal extension direction angle is obtained. Bidirectional discrete sampling is performed along the local principal extension direction angle at a preset maximum step size for unidirectional spatial search. The defect response of all obtained sampling points is weighted and summed to obtain the spatial connectivity aggregation degree. , ; This represents the maximum step size for a unidirectional spatial search. The step size offset variable for discrete search. ; For pixels The local principal extension direction angle; Sampling points Defect response rate, , In pixels Starting point along move The x and y coordinates of the sampling points after each step size; The default Gaussian standard deviation factor is used. is the base of the natural logarithm; The correction factor is obtained by fusing spatial connectivity aggregation degree and defect response degree. , ; To preset the excitation intensity coefficient, the gray values of the pixels are weighted using a correction factor to obtain gray-scale reconstruction values. This includes: calculating the product of the gray value of each pixel and the correction factor, and using a maximum-minimum normalization method to map the product value to the range of 0-255 to obtain the gray-scale reconstruction value. The grayscale feature map is reconstructed based on the grayscale reconstruction value and threshold segmentation is performed to obtain the binary map and extract each connected region in the binary map. If the number of pixels in the connected region is greater than the set judgment threshold, the connected region is marked as a defect region.
2. The method for detecting defects in ceramic cast films based on image recognition according to claim 1, characterized in that, The process of constructing a matrix for each pixel and obtaining its feature values includes: Build pixels matrix , ,in , and Each pixel The gradients are calculated in the horizontal, vertical, and diagonal directions; the principal and secondary eigenvalues of the matrix are solved using the principles of linear algebra.
3. The method for detecting defects in ceramic cast films based on image recognition according to claim 2, characterized in that, The method for obtaining the local principal extension direction angle is as follows: The direction angle of the eigenvector corresponding to the secondary eigenvalue is selected as the local principal extension direction angle.
4. The method for detecting defects in ceramic cast films based on image recognition according to claim 1, characterized in that, The threshold segmentation is achieved using the Otsu method.
5. The method for detecting defects in ceramic cast films based on image recognition according to claim 1, characterized in that, The process of acquiring the preprocessed image of the cast film includes: The grayscale image of the cast film was filtered using a standard two-dimensional Gaussian convolution kernel to obtain the preprocessed image; the kernel size ranged from 5×5 to 9×9, and the standard deviation ranged from 1 to 2.
6. A ceramic cast film defect detection system based on image recognition, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement a method for detecting defects in ceramic cast films based on image recognition according to any one of claims 1-5.