Chicken liquid phase capture chip defect detection method and device and storage medium
By pre-processing and feature recognition of the chip surface, and using open operation and edge detection to identify scratches, contamination and edge collapse areas, the problem of low accuracy of micro defect detection in the prior art is solved, and efficient multi-dimensional Type defect identification.
Patent Information
- Application Number
- CN202411096939.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-31
AI Technical Summary
Existing artificial intelligence algorithms have poor nonlinear features detection of micro defects on the surface of chips, and the accuracy of identification and classification is low, which cannot meet the accurate identification of multiple types of micro defects.
By acquiring the original image of the chip to be detected, pre-processing and registration, using the opening operation and edge detection method, marking and identifying the scratches, contamination and collapsed areas, setting thresholds based on geometric characteristics, and judging defect types, improving Accuracy and efficiency of detection.
It realizes accurate identification of various types of defects on the chip surface, improves the accuracy and speed of detection, simplifies algorithm steps, and avoids the inaccurate problem of artificial intelligence algorithm detection.
Smart Images

Figure CN119228730A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of defect detection technology, and in particular to a method, device and storage medium for detecting defects in a chicken liquid phase capture chip. Background Art
[0002] Liquid phase refers to the state of a substance in liquid form, and there is only liquid in this system, no solids and no gases. By capturing and analyzing the chicken liquid phase using the processing chip of the equipment, the disease situation of the flock can be predicted in advance, large-scale spread of the disease in the flock can be prevented, and losses caused by the disease can be reduced. Therefore, the chip of the chicken liquid phase capture device is particularly important. With the rapid development of semiconductor chips today, the size of chips is getting smaller and smaller, and the size of defects in the same chip is also getting smaller and smaller, which poses a considerable challenge to chip defect detection. Conventional chip testing uses manual detection methods to detect chips. However, manual detection has disadvantages such as low accuracy, low efficiency, easy fatigue of detectors, and inconsistent detection standards. Manual detection can no longer meet the needs of chip defect detection. Currently, some large manufacturers have begun to use artificial intelligence to monitor chip defects.
[0003] In the existing artificial intelligence detection technology, the existing technology has the following problems: scratches, stains or broken edges still exist on the surface of the packaged chip, but due to technological advances, the area of these defects is very small, and they are generally identified using high-power microscopes through artificial intelligence algorithms. However, the artificial intelligence algorithm has poor detection effect on nonlinear characteristic defects, and the accuracy of recognition and classification is low, which cannot meet the requirements of accurate identification of different types of tiny defects. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a method, device and storage medium for detecting chip defects by liquid phase capture, which solves the technical problems that the artificial intelligence algorithm has poor detection effect on nonlinear characteristic defects, low recognition and classification accuracy, and cannot meet the accurate recognition of multiple types of tiny defects, and achieves the purpose of accurately identifying multiple types of scratches, stains and chip chip surface.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for detecting defects of a chicken liquid phase capture chip, the method comprising the following steps:
[0006] S1, obtaining an original image of the chip to be detected, and preprocessing the original image to obtain a detection image;
[0007] S2, registering the detection image to determine whether the detection image is a defect image;
[0008] If yes, go to S3;
[0009] If not, end and return to S1 to detect the next chip;
[0010] S3. Perform an opening operation on the defective image to obtain several defective regions in the classified image;
[0011] S4. Mark the scratch regions existing in the several defective regions;
[0012] If then mark it as a scratch region;
[0013] If then mark it as a non-scratch region and enter S5;
[0014] S5. Use the edge detection method to obtain the edge contour of the non-scratch region, and take a point outside the edge contour to establish a two-dimensional coordinate system;
[0015] S6. Calculate the centroid distance X from the centroid of the edge contour to the edge contour w and the adjacent distance value γ, set the edge-breaking threshold V according to the geometric characteristics of the edge contour, and determine whether the non-scratch region is an edge-breaking region;
[0016] If γ≥V, it is an edge-breaking region;
[0017] If γ<V, it is a contamination region.
[0018] Preferably, in step S1, the specific implementation steps are as follows:
[0019] S11. Obtain the original image of the chip to be detected, and split the original image into an R image, a G image, and a B image using the RGB channels;
[0020] S12. Extract a point R(a, b) from several pixel points in the R image, take the point G(c, d) corresponding to the position of point R(a, b) in several pixel points in the G image, and take the point B(e, f) corresponding to the position of R(a, b) in several pixel points in the B image;
[0021] S13. Calculate the pixel gray value Gr i (g, h) of the pixel points at the same position and synthesize them into a gray image. The calculation formula of the pixel gray value Gr i (g, h) is as follows:
[0022] Gr i (g, h) = A×R(a, b) + D×G(c, d) + C×B(e, f)
[0023] Among them, R(a, b) represents the gray value of the pixel point of the R image, G(c, d) represents the gray value of the pixel point of the G image, B(e, f) represents the gray value of the pixel point of the B image, and A, D, and C represent weight coefficients, which are obtained through the color sensitivity of the human eye;
[0024] S14. Filter the grayscale image using a median filter and obtain a detection image.
[0025] Preferably, in step S2, the specific implementation steps are as follows:
[0026] S21. Obtain a template image of the chip to be detected;
[0027] S22. Determine a central pixel point in the pixel points of the detection image, whose gray value is F a , and at the same time obtain the gray values of all pixel points at a distance of α around the central pixel point as F b , and use the square difference formula to calculate the square difference value H of the two gray values respectively i . The calculation formula is as follows:
[0028] H i =(F a -F b ) 2
[0029] Among them, F a represents the gray value of the central pixel point, F b represents the gray value of the pixel point at a distance of α from the central pixel point, and H i represents the i-th square difference value;
[0030] S23. Obtain a feature threshold I using the maximum likelihood estimation method based on the difference between the gray values of the central pixel point and its adjacent pixel points (an example needs to be given in the specification for explanation);
[0031] S24. Mark the central pixel point according to the square difference value H i and the feature threshold I;
[0032] If H i <I, then mark the non-central pixel point as a light point;
[0033] If H i ≥I, then mark the non-central pixel point as a dark point;
[0034] S25. Obtain J dark points and judge whether the central pixel point is a corner point according to the J dark points;
[0035] If then mark it as a non-corner point;
[0036] If Then it is marked as a corner point;
[0037] S26, repeating steps S22-S24 until all pixels in the standard image complete a cycle;
[0038] S27, registering the marked detection image with the template image, and determining whether the detection image is consistent with the template image;
[0039] If yes, the detected image is a defective image, and then the process goes to step S3;
[0040] If not, the process ends and returns to S1 to detect the next chip.
[0041] Preferably, in step S3, the specific implementation steps are as follows:
[0042] S31, obtaining a binary image of the defect image by using a threshold segmentation method;
[0043] S32, performing an opening operation on the binary image to obtain a classified image;
[0044] S33, marking the pixel area with a gray value of 1 in the classified image as a defect area.
[0045] Preferably, in step S4, the specific implementation steps are as follows:
[0046] S41, select a pixel point in the defect area as a reference point O b , based on this reference point O b Draw a circular area with β as the center and radius;
[0047] S42. Calculate the area of the circular region as S o , the calculation formula is as follows:
[0048] S o =πβ 2
[0049] Where β represents the circle O b The radius of
[0050] S43, set the area of each pixel point to S d , calculate the total area Q of the defective pixels in the circular area c , the calculation formula is as follows:
[0051]
[0052] Among them, S d represents the area of the dth pixel, and n represents the number of pixels in the circular area;
[0053] S44, according to the area S o and the total area Qc Determine whether the defective area is a scratch;
[0054] If so, it is marked as a scratch;
[0055] If not, mark it as non-scratch and go to S5;
[0056] S45. Repeat steps S41-S44 until all defective areas are detected.
[0057] Preferably, in step S6, the specific implementation steps are as follows:
[0058] S61, obtain the coordinates D of the points on the edge contour e (x r ,y t );
[0059] S62, according to point D e (x r ,y t ) Calculate the centroid coordinates of the contour (u f , z k ), the calculation formula is as follows;
[0060]
[0061] Among them, x r Represents the horizontal coordinate of the rth point on the edge contour, y t represents the ordinate of the tth point on the edge contour, and m represents the number of coordinates;
[0062] S63, according to the centroid coordinates (u f , z k ) Calculate the center profile X w , the calculation formula is as follows:
[0063]
[0064] Among them, X w represents the wth center profile;
[0065] S64, obtain the distance X adjacent to the w-th center w Heart profile X w-1 , and calculate the neighbor distance value γ, the calculation formula is as follows:
[0066]
[0067] Among them, X w-1 Indicates the distance X adjacent to the wth center w The w-1th center profile, q represents X w and X w-1 Number of groups
[0068] S65. Determine whether the non-scratch area is a chipping area according to the adjacent distance value γ;
[0069] If γ≥V, it is a chipping area;
[0070] If γ<V, it is a contamination area.
[0071] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer device, including:
[0072] At least one processor; and
[0073] A memory, the memory stores a computer program that can run on the processor, and when the processor executes the program, it executes the steps of any of the above chip defect detection methods.
[0074] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it executes the steps of any of the above chip defect detection methods.
[0075] By means of the above technical solutions, the present invention provides a method, device and storage medium for detecting chip defects in chicken liquid phase, which at least have the following beneficial effects:
[0076] 1. According to the obvious differences in morphology between scratch defects and non-scratch defects, the present invention quickly identifies and classifies scratch defects, can improve the accuracy of scratch defect identification and shorten the identification speed, improve the work efficiency of chip defect detection, and the algorithm steps are simple, avoiding the problem of inaccurate detection of non-linear features by artificial intelligence algorithms.
[0077] 2. According to the differences in geometric features between chipping defects and contamination defects, the present invention quickly identifies and classifies defects. On the basis of dilation and erosion, the accuracy of defect identification is further improved, and the identification tasks of chipping defects and contamination defects are quickly completed. While improving the accuracy of identification, the speed is also increased, which is more simplified and efficient compared with artificial intelligence algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0079] Figure 1 is a flowchart of the method for detecting chip defects of the present invention;
[0080] Figure 2A schematic diagram of corner point identification according to the present invention;
[0081] Figure 3 A schematic diagram of the scratch area determination of the present invention;
[0082] Figure 4 A schematic diagram of edge collapse area determination according to the present invention;
[0083] Figure 5 It is a structural schematic diagram of a chip defect detection device of the present invention;
[0084] Figure 6 It is a schematic diagram of the structure of the chip defect detection storage medium of the present invention. DETAILED DESCRIPTION
[0085] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0086] In this embodiment, due to the existing artificial intelligence detection technology, the existing technology has the following problems: scratches, stains or edge collapse still exist on the packaged chip, but due to technological advances, the area of these defects is very small, and generally a high-power microscope is used to identify them through an artificial intelligence algorithm. However, the artificial intelligence algorithm has a poor detection effect on nonlinear characteristic defects, and the accuracy of recognition and classification is low, which cannot meet the accurate recognition of multiple types of tiny defects. In order to solve this problem, this embodiment first uses the difference in defect morphology for preliminary classification, and then identifies and classifies according to the difference in defect geometric characteristics, so as to quickly complete the detection task of defects on the chip. The specific contents are as follows:
[0087] Please refer to Figure 1-6 This embodiment provides a method, device and storage medium for detecting defects of a chicken liquid phase capture chip, which is used to solve the problem that the artificial intelligence algorithm has poor detection effect on nonlinear characteristic defects, low recognition and classification accuracy, and cannot meet the requirements of accurate recognition of multiple types of tiny defects. The method includes the following steps:
[0088] S1. Obtain the original image of the chip to be detected, and preprocess the original image to obtain a detection image; in this step, it is necessary to perform grayscale image conversion on the three color channels of the original image, and use a median filter to preprocess the detection image. In order to facilitate the implementation of this step, the specific implementation steps are as follows:
[0089] S11, obtaining an original image of the chip to be detected, and splitting the original image into an R image, a G image, and a B image using RGB channels;
[0090] S12, extract a point R(a, b) from a number of pixels of the R image, extract a point G(c, d) corresponding to the position of the point R(a, b) from a number of pixels of the G image, and extract a point B(e, f) corresponding to the position of the point R(a, b) from a number of pixels of the B image;
[0091] S13, calculate the pixel gray value Gr of the pixel at the same position according to points R (a, b), G (c, d) and B (e, f) i (g, h) and synthesize into a grayscale image, the pixel grayscale value Gr i (g, h) is calculated as follows:
[0092] G i (g,h)=A×R(a,b)+D×G(c,d)+C×B(e,f)
[0093] Wherein, R(a, b) represents the grayscale value of the pixel of the R image, G(c, d) represents the grayscale value of the pixel of the G image, B(e, f) represents the grayscale value of the pixel of the B image, A, D and C represent weight coefficients, and the weight coefficients are obtained by the color sensitivity of the human eye; in this step, it should be noted that the human eye is generally most sensitive to green and least sensitive to blue. According to this feature, the present invention adopts A=0.2889, D=0.5780, and C=0.1331 for calculation;
[0094] S14, use a median filter to filter the grayscale image and obtain a detection image. In this step, it should be noted that the median filter has the best effect, and the mean filter and the Gaussian filter have poor effects in the present invention. The present invention uses the existing median filter to calculate and obtain the corresponding result, and no improvement is required, so it will not be described in detail.
[0095] S2, register the detection image to determine whether the detection image is a defect image; if so, enter S3; if not, end and return to S1 to detect the next chip; in step S2, it is necessary to calculate the gray value of the image and mark the corner points in the image, and then register it with the template image. The registration uses the more commonly used SIFT algorithm to register the detection image and the template image, and obtain the defect image. The present invention uses the existing SIFT algorithm to calculate and obtain the corresponding result, and no improvement is required, so it will not be described in detail. In order to facilitate the implementation of this step, the specific steps are as follows:
[0096] S21, obtaining a template image of the chip to be detected;
[0097] S22, determine a central pixel point in the pixel points of the detection image, whose gray value is F a At the same time, the grayscale values of all pixels with a distance α around the central pixel are obtained as F b, calculate the squared difference H of the grayscale values of the two using the difference of squares formula i , and the calculation formula is as follows:
[0098] H i = (F a - F b ) 2
[0099] where F a represents the grayscale value of the central pixel, and F b represents the grayscale value of the pixel at a distance α from the central pixel, and H i represents the i-th squared difference;
[0100] S23. Obtain the characteristic threshold I using the maximum likelihood estimation method based on the difference between the grayscale values of the central pixel and adjacent pixels; it should be noted in this step that the maximum likelihood estimation method is a method for estimating the function threshold using statistics and is relatively common in practice. Its principle is to write the likelihood function according to the function expression, solve the likelihood function using the derivative method to obtain the likelihood function estimate, and obtain the threshold using the function estimate. In this invention, the existing maximum likelihood estimation method can be used for calculation to obtain the corresponding result without any improvement, so it will not be elaborated in detail here.
[0101] S24. Mark the central pixel according to the squared difference H i and the characteristic threshold I; if H i < I, mark the non-central pixel as a light point; if H i ≥ I, mark the non-central pixel as a dark point;
[0102] S25. Obtain J dark points and determine whether the central pixel is a corner point according to the J dark points; if then mark it as a non-corner point; if then mark it as a corner point; for example, if there are 16 points at a distance of 3 around the central pixel, then as Figure 2 shown, the corner points in the image can be marked according to this feature.
[0103] S26. Repeat steps S22 - S24 until all pixels in the standard image complete a cycle;
[0104] S27. Register the marked detection image with the template image and determine whether the detection image is consistent with the template image; if so, the detection image is a defective image, and then proceed to step S3; if not, end and return to S1 to detect the next chip.
[0105] S3, performing an opening operation on the defective image to obtain several defective areas in the classified image; in order to facilitate the implementation of this step, the specific steps are as follows:
[0106] S31, obtaining a binary image of the defect image by using a threshold segmentation method;
[0107] S32, performing an opening operation on the binary image to obtain a classified image;
[0108] S33, marking the pixel area with a gray value of 1 in the classified image as a defect area.
[0109] In the prior art, artificial intelligence algorithms are generally used to extract features of all defects, and then the defects are identified and classified through complex calculations. Since the convolution and recurrent neural networks commonly used in artificial intelligence algorithms have low accuracy in recognizing nonlinear features, and chip defects happen to be nonlinear features, the algorithm steps are not only complicated and inefficient, but also the accuracy is not satisfactory. The present invention uses the morphological characteristics of defects to distinguish scratches and marks the scratch area in the defect area to facilitate the subsequent steps, such as Figure 3 As shown, the specific implementation steps are as follows:
[0110] S4. Mark the scratched areas existing in the plurality of defective areas; if It is marked as a scratch area; if Then it is marked as a non-scratch area and enters S5; in order to facilitate the implementation of this step, the specific steps are as follows:
[0111] S41, select a pixel point in the defect area as a reference point O b , based on this reference point O b Draw a circular area with β as the center and radius;
[0112] S42. Calculate the area of the circular region as S o , the calculation formula is as follows:
[0113] S o =πβ 2
[0114] Where β represents the circle O b The radius of
[0115] S43, set the area of each pixel point to S d , calculate the total area Q of the defective pixels in the circular area c , the calculation formula is as follows:
[0116]
[0117] Among them, S dIt represents the area of the d-th pixel point, and n represents the number of pixel points within the circular region;
[0118] S44. According to the area S o and the total area Q c to determine whether the defect area is a scratch; if so, mark it as a scratch; if not, mark it as non-scratch and proceed to S5; it should be noted in this step that in actual operation, it can be known that the characteristics of a scratch are slender strips and relatively narrow in width, different from the larger area forms of contamination and chipping. The area occupied by a scratch within the circular region is very small, while the areas of contamination and chipping are very large, generally greater than The present invention sets the area ratio as The accuracy rate is relatively high. At the same time, through multiple practices, it is found that setting the area of the circular region to 8π - 12π times the pixel point area is more appropriate, and the accuracy rate of the recognition result can be increased to over 93%;
[0119] S45. Repeat steps S41 - S44 until all defect areas are detected.
[0120] S5. Use the edge detection method to obtain the edge contour of the non-scratch area and establish a two-dimensional coordinate system with a point outside the edge contour; the present invention calculates and classifies the edge contour of the defect using the geometric characteristics of the defect, and uses the geometric characteristics of the contamination area being approximately circular and the chipping area being rectangular or polygonal to classify the edge contour. As Figure 4 shown, the specific steps are as follows:
[0121] S6. Calculate the centroid distance X from the centroid of the edge contour to the edge contour w and the adjacent distance value γ, set the chipping threshold V according to the geometric characteristics of the edge contour, and determine whether the non-scratch area is a chipping area; if γ ≥ V, it is a chipping area; if γ < V, it is a contamination area. It should be noted in this step that the contamination area is generally approximately circular. According to the characteristic that the ratio of different radii of the approximately circular shape is 1, the adjacent distance value γ is generally close to the centroid distance X w and the centroid distance X w-1 and the number of groups q of the centroid distance X. The chipping area is generally rectangular or polygonal, and the geometric characteristic of such a figure is that the adjacent distance value γ is generally large and several times the number of groups q. According to this geometric characteristic, the chipping threshold V is set. In practical applications, it is found that when the number of groups q takes 8 - 16 groups, the calculation amount is small and the accuracy is high. The corresponding chipping threshold V can be set to 9 - 17. The chipping threshold V in the present invention is 13. For the convenience of implementing this step, the specific steps are as follows:
[0122] S61. Obtain the coordinates D e (x r , y t ) of the points on the edge contour;
[0123] S62. According to the point De (x r ,y t ) to calculate the centroid coordinates (u f ,z k ) of the contour. The calculation formula is as follows;
[0124]
[0125] where x r represents the abscissa of the r-th point on the edge contour, and y t represents the ordinate of the t-th point on the edge contour. m represents the number of coordinates;
[0126] S63. Calculate the heart contour distance Xw f ,z k ) according to the centroid coordinates (u , . The calculation formula is as follows:
[0127]
[0128] where X w represents the w-th heart contour distance;
[0129] S64. Obtain the heart contour distance X w adjacent to the w-th heart contour distance X w-1 , and calculate the adjacent distance value γ. The calculation formula is as follows:
[0130]
[0131] where X w-1 represents the (w - 1)-th heart contour distance adjacent to the w-th heart contour distance X w . q represents the number of groups of X w and X w-1 ;
[0132] S65. Judge whether the non-scratch area is a chipped edge area according to the adjacent distance value γ; if γ≥V, it is a chipped edge area; if γ<V, it is a contaminated area. It should be noted in this step that the contaminated area is generally circular. According to the characteristic that the ratio of different radii of the circular shape is 1, the adjacent distance value γ is generally close to the number of groups q of the heart contour distance X w and the heart contour distance X w-1 . The chipped edge area is generally rectangular or polygonal. The geometric feature of such a figure is that the adjacent distance value γ is generally large and is several times the number of groups q. According to this geometric feature, a chipped edge threshold V is set. In practical applications, it is found that when the number of groups q is taken as 8 - 16, the calculation amount is small and the accuracy is high. The corresponding chipped edge threshold V can be set to 9 - 17. In the present invention, the chipped edge threshold V is 13.
[0133] Based on the same inventive concept, according to another aspect of the present invention, such as Figure 5As shown, an embodiment of the present invention further provides a computer device, comprising: at least one processor; and a memory, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, the steps of the chip defect detection method as described above are performed.
[0134] Based on the same inventive concept, according to another aspect of the present invention, Figure 6 As shown, an embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the chip defect detection method as described above are performed.
[0135] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0136] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0137] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for detecting defects in a chicken liquid phase capture chip, characterized in that: The method includes the following steps: S1. Obtain the original image of the chip to be detected, and preprocess the original image to obtain a detection image; S2. Register the detection image and determine whether the detection image is a defective image; If yes, go to S3; If no, end and return to S1 to detect the next chip; S3. Perform an opening operation on the defective image to obtain several defective regions in the classification image; S4. Mark the scratch regions existing in the several defective regions; like Then it is marked as scratch area; like Then it is marked as a non-scratch area and enters S5; S5. Use the edge detection method to obtain the edge contour of the non-scratch region, and establish a two-dimensional coordinate system with a point outside the edge contour; S6. Calculate the distance X from the centroid of the edge contour to the center of the edge contour w and the neighbor distance value γ, to determine whether the non-scratch area is a chipping area; If γ≥V, it is a chipping region; If γ<V, it is a contamination region.
2. The detection method according to claim 1, characterized in that: In step S1, the specific implementation steps are as follows: S11. Obtain the original image of the chip to be detected, and split the original image into an R image, a G image, and a B image using the RGB channels; S12. Extract a point R(a, b) from several pixel points in the R image, take the point G(c, d) corresponding to the position of the point R(a, b) in several pixel points in the G image, and take the point B(e, f) corresponding to the position of R(a, b) in several pixel points in the B image; S13, calculate the pixel gray value Gr of the pixel at the same position according to points R (a, b), G (c, d) and B (e, f) i (g, h) and synthesize into a grayscale image, the pixel grayscale value Gr i (g, h) is calculated as follows: Gr i (g,h)=A×R(a,b)+D×G(c,d)+C×B(e,f) Among them, R(a, b) represents the gray value of the pixel point in the R image, G(c, d) represents the gray value of the pixel point in the G image, B(e, f) represents the gray value of the pixel point in the B image, A, D, and C represent weight coefficients, and the weight coefficients are obtained through the color sensitivity of the human eye; S14. Use a median filter to filter the grayscale image and obtain a detection image.
3. The detection method according to claim 1, characterized in that: In step S2, the specific implementation steps are as follows: S21. Obtain the template image of the chip to be detected; S22, determine a central pixel point in the pixel points of the detection image, whose gray value is F a At the same time, the grayscale values of all pixels with a distance α around the central pixel are obtained as F b , use the square difference formula to calculate the square difference H of the gray values of the two i , the calculation formula is as follows: H i =(F a -F b ) 2 Among them, F a Indicates the gray value of the central pixel, F b Indicates the gray value of the pixel point α away from the center pixel point, H i represents the i-th square difference; S23. Use the maximum likelihood estimation method to obtain the feature threshold I according to the difference between the gray values of the central pixel point and the adjacent pixel points; S24, according to the square difference H i And feature threshold I to mark the central pixel; If H i < is less than I, then mark the non-central pixel points as light points; If H i ≥I, then mark the non-central pixel as a deep point; S25. Obtain J deep points, and determine whether the central pixel point is a corner point according to the J deep points; like It is marked as a non-corner point; like Then it is marked as a corner point; S26. Repeat steps S22 - S24 until all pixel points in the standard image complete a cycle; S27. Register the marked detection image with the template image and determine whether the detection image is consistent with the template image; If yes, the detection image is a defective image, and then go to step S3; If no, end and return to S1 to detect the next chip.
4. The detection method according to claim 1, characterized in that: In step S3, the specific implementation steps are as follows: S31. Use the threshold segmentation method to obtain the binary image of the defective image; S32. Perform an opening operation on the binary image to obtain a classification image; S33. Mark the pixel regions with a gray value of 1 in the classification image as defective regions.
5. The detection method according to claim 1, characterized in that: In step S4, the specific implementation steps are as follows: S41, select a pixel point in the defect area as a reference point O b , based on this reference point O b Draw a circular area with β as the center and radius; S42. Calculate the area of the circular region as S o , the calculation formula is as follows: S o =πβ 2 Where β represents the circle O b The radius of S43, set the area of each pixel point to S d , calculate the total area Q of the defective pixels in the circular area c , the calculation formula is as follows: Among them, S d represents the area of the dth pixel, and n represents the number of pixels in the circular area; S44, according to the area S o and the total area Q c Determine whether the defective area is a scratch; If yes, mark it as a scratch; If no, mark it as non-scratch and go to S5; S45. Repeat steps S41 - S44 until all defective regions are detected.
6. The detection method according to claim 1, characterized in that: In step S6, the specific implementation steps are as follows: S61, obtain the coordinates D of the points on the edge contour e (x r ,y t ); S62, according to point D e (x r ,y t ) Calculate the centroid coordinates of the contour (u f , z k ), the calculation formula is as follows; Among them, x t Represents the horizontal coordinate of the rth point on the edge contour, y t represents the ordinate of the tth point on the edge contour, and m represents the number of coordinates; S63, according to the centroid coordinates (u f , z k ) Calculate the center profile X w , the calculation formula is as follows: Among them, X w represents the wth center profile; S64, obtain the distance X adjacent to the w-th center w Heart profile X w-1 , and calculate the neighbor distance value γ, the calculation formula is as follows: Among them, X w-1 Indicates the distance X adjacent to the wth center w The w-1th center profile, q represents X w and X w-1 Number of groups S65. Determine whether the non-scratch region is a chipping region according to the adjacent distance value γ; If γ≥V, it is a chipping region; If γ<V, it is a contamination region.
7. A computer device, including: At least one processor; And A memory storing a computer program executable on the processor, wherein the processor executes the method steps as described in any one of claims 1 to 6 when executing the program.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method steps according to any one of claims 1 to 6 are performed.
Citation Information
Cited By
Supervision method and system based on construction project quality detection
CN120106679A
