CN-115170520-B - Metal grid defect detection method based on structure comparison information lamination
Abstract
The invention discloses a metal grid defect detection method based on structure comparison information lamination, which comprises the steps of shooting a metal grid image by a microscope, dividing an input image into blocks, carrying out neighborhood structure comparison calculation on each sub-block image to obtain a difference matrix of the input image, carrying out displacement of different magnitudes on the positions of the sub-blocks, carrying out neighborhood structure comparison calculation to obtain a multi-layer difference matrix, superposing all layers of results to obtain a priori graph, decomposing the input image by a robust principal component analysis method in combination with the priori graph to obtain low-rank sparse and noise images, constructing a binary mask by the priori graph, carrying out filtering treatment on the sparse image to obtain a significant graph, and carrying out threshold segmentation on the significant graph to obtain a binary detection result. The invention can detect various defects of the metal mesh grid without a training process, and can also be generalized to defect detection under other periodic texture patterns, and the parameter setting is simple and the detection efficiency is high.
Inventors
- LU ZHENGANG
- SUN MING
- TAN JIUBIN
- QIN HONGSHENG
Assignees
- 哈尔滨工业大学
- 哈尔滨工业大学
Dates
- Publication Date
- 20260421
- Application Date
- 20220627
- Priority Date
- 20220627
Claims (3)
- 1. The method for detecting the defects of the metal mesh grid based on the structure contrast information lamination is characterized by comprising the following steps: Step 1, collecting a metal grid image by using a microscopic system as an input image, wherein the input image comprises x multiplied by x grid periods, x is 10 and 20, and homomorphic filtering operation is carried out on the input image to obtain an image with balanced brightness; step 2, traversing the difference of characteristic similarity of four opposite angles of a pixel point of an input image after homomorphism filtering by taking the pixel point as a center, wherein the length and width values of the neighborhood are larger than 1.5 times of the design period of the grid, the corresponding length and width values when the characteristic similarity difference of the four adjacent areas is minimum are the period sizes of the grid pattern in the length and width directions, dividing the grid image into period blocks according to the calculated period, comparing the difference between each period block and the four adjacent areas in the horizontal and vertical directions, counting the characteristic similarity difference value calculated by each block to obtain a difference matrix, sliding and dividing each point in the period to obtain a multi-layer difference matrix, and superposing and calculating the results of each layer to obtain a priori graph P; substituting the weight matrix W corresponding to the input image D and the prior map P into an optimized robust principal component analysis model: Wherein the weight matrix corresponding to the prior map is E is a defective image satisfying the sparse feature, A is a non-defective background image, D is an input image, G represents noise in the image due to deformation and illumination variation, parameters lambda and beta are used to balance the defective portion and the noisy portion, For the matrix 1-norm, For the matrix F-norm, Is a matrix of singular values that is a function of, Is a matrix Norms: the model decomposes the input image D to obtain a low-rank image A, a sparse image E and a noise image G; step 4, gray stretching is carried out on the prior graph, threshold segmentation is carried out on the stretched prior graph, a binary mask graph is obtained, filtering operation is carried out on the sparse image through the binary mask graph, namely Hadamard product operation is carried out, and impurity points of a non-defect area are filtered, so that a significant graph is obtained; and 5, setting zero to the edge pixels around the saliency map so as to eliminate false detection high pixel value points of the edge of the saliency map, and finally, performing threshold segmentation operation to obtain a defect detection result.
- 2. The method for detecting defects of metal grids based on structural contrast information stacks according to claim 1, wherein in step 2: the step of calculating the feature similarity difference of the four diagonal neighbors comprises the following steps: Calculating the structural similarity indexes of a certain pixel point and the pixels in the upper left, lower left, upper right and lower right of the pixel point, summing the structural similarity differences of the upper left and lower left neighborhood, the lower left and lower right neighborhood, the lower right and upper right neighborhood and the upper right and upper left neighborhood, averaging, and finally subtracting the calculation result by 1; The difference comparison step of the periodic block and the four adjacent domains in the horizontal and vertical directions comprises the following steps: Calculating the structural similarity index of a certain periodic block and the upper, lower, left and right four-adjacent-domain periodic blocks, summing the four structural similarity differences, averaging to obtain a structural similarity difference value, subtracting the gray scales of the periodic block and the upper, lower, left and right adjacent-domain periodic blocks from each other, calculating a root mean square value, summing the four root mean square values, averaging to obtain a gray scale difference value, summing the gray scale difference value and the structural similarity difference value, and finally subtracting the sum result from 2.
- 3. The method for detecting defects of metal grids based on structural contrast information stacks according to claim 1, wherein in step 4: The prior map is subjected to gray stretching steps as follows: each pixel of the prior map is stretched with an e-index, so that high pixel values map to higher values, locating the pixel area more accurately.
Description
Metal grid defect detection method based on structure comparison information lamination Technical Field A metal grid defect detection method based on structure contrast information lamination belongs to the field of compressed sensing and computer vision, and particularly relates to a metal grid image processing algorithm based on computer vision and surface texture structure information. Background With the wide application of high-frequency electronic devices and the increasing complexity of electromagnetic environments, electromagnetic interference may reduce the stability of electronic devices. The metal mesh grid is widely applied to the field of electromagnetic shielding under observable scenes with higher light transmittance and larger electromagnetic shielding performance. However, in the actual preparation process of the metal grid, the grid structure has various defects such as impurity adhesion, metal adhesion, cracks, broken wires and the like on the surface due to various influencing factors such as scraping, external erosion, manual errors and the like. These defects are difficult to be found by the naked eye because of their very small structure, but the change in the mesh structure caused by the defects affects their shielding properties. Meanwhile, the defects are continuously expanded in the using process, and the stability of practical engineering application is threatened. At present, in the preparation stage of the metal mesh grid, the defect detection method mainly depends on observation and identification of preparation staff under a microscope, and the detection time of the large-area submicron-level metal mesh grid is long and is very energy-consuming due to the small field of view observed under the microscope. The method is completely dependent on experience and energy of preparation personnel, has larger subjective factors, and is not available at present in the actual engineering application stage of the metal grid. There are few patents related to metal grid defect detection, and patent 201410131635.5 discloses a method for detecting and identifying metal grid defects. The patent divides the defects of the metal grid into three types of broken lines and scratches, the areas are closed, the lengths and the sizes of the three types of defects are simulated, a defect library is constructed, and a support vector machine is trained so as to conveniently identify and classify the defects of the metal grid in real time. The defect type of the invention is insufficient to describe all defects of the metal grid, and the size of a defect library can influence the detection precision. The defect detection problem of the metal mesh grid belongs to the surface defect detection problem and has certain texture characteristics. Patent 202111243941.4 "a wood board defect detection method based on computer vision" discloses a defect detection idea of wood grain texture. Three descriptors including intensity level, texture pitch ratio, and texture tilt level are defined. Obtaining the probability of the corresponding intra-tile node area, and further obtaining a probability image. The method considers that the texture features of the wood apply the edge extraction concept, is more suitable for the worm hole detection of the wood board surface, but is difficult to generalize in the surface defect detection scene with other texture features, and is also not suitable for the defect detection of the metal grid. Patent 202111083642.9 "a mechanical part surface defect detection method based on image processing" describes a gray level co-occurrence matrix in the vicinity of pixel points, calculates information entropy of the gray level co-occurrence matrix, and constructs a loss function of a semantic segmentation network according to the information entropy, thereby realizing threshold calculation and segmentation to obtain a defect image. Patent 202111064818.6 'a textile surface defect detection device and method' proposes a self-adaptive threshold segmentation algorithm. The two threshold segmentation algorithms can solve the problem that the gray scale range is inapplicable due to uneven illumination of an actual light source or other factors. But the defect recognition detection for the actual image is less effective. Patent 202210503931.8 "a method for detecting defects on a tile surface with complex textures" discloses a method for detecting defects on a tile surface by applying CASCADE RCNN convolutional neural network and a traditional image processing algorithm. The multi-perception head self-attention and the structures of the variable convolution kernel and the cascade head can strengthen the detection capability of the algorithm on small defects with various shapes. Patents 202110852729.1, 202011462376.6, 202111062913.2, 202111023082.8 are also surface defect detection methods based on other deep learning algorithms, such as BP neural networks, ART neural networks YOLOV networks, and the li