Chip surface defect detection method and device based on image region difference and medium
By judging the difference between the area to be detected and the standard reference area in chip surface defect detection, and adjusting the position of the detection area according to the difference, the problem of detection instability and false detection caused by poor chip consistency and interference is solved, and efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202511327326.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-09-17
AI Technical Summary
In the existing technology, the detection of chip surface defects is prone to problems such as unstable detection results and high false detection rate due to interference in the chip template area or poor chip consistency.
By acquiring the detection area and standard reference area of the chip under test, it is determined whether the difference is greater than a preset value. If the difference is less than or equal to the preset value, direct detection is performed. If the difference is greater than the preset value, the detection area is moved by a preset number of pixels in four directions in units of a single pixel, and the target detection area is redefined for differential detection.
It achieves high efficiency and accuracy in detecting defects on the chip surface, and reduces the instability of detection results and the false detection rate.
Smart Images

Figure CN121027147A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of chip surface defect detection, and in particular to a chip surface defect detection method and device based on image region difference and a medium. BACKGROUND
[0002] In the semiconductor field, when performing defect detection on a chip surface, an image region subtraction method is widely used for defect detection on a region of a chip image taken at the same fixed position.
[0003] The image region subtraction method needs to first obtain a standard chip image without defects as a matching template, and set a region to be detected on the image. The region is generally the position region of the chip in the image. After creating the template and setting the detection region, a mathematical positional relationship between the template region and the detection region is established, which can be represented by an affine transformation matrix. During real-time online detection, the collected chip image is first matched with the template to find the position of the template, and then the corresponding detection region in the real-time image is obtained by using the affine transformation matrix and the pre-set detection region, so that the set detection region is subtracted from the real-time detection region. If there is a defect, the gray value after subtraction is not 0, so that the defect is detected.
[0004] The key to detecting defects by using the region subtraction method is to accurately position the mapping region corresponding to the set detection region in the real-time image, that is, the target detection region. The existing detection method uses template matching to position the detection region. When the region of the chip used as the template is disturbed or the chip itself has poor consistency, the template positioning has a positional accuracy error, so that the position of the detection region after affine transformation also has a positional accuracy error, thereby causing unstable detection results in a critical state and a high probability of false detection. SUMMARY
[0005] To solve the problem of low defect accuracy in the prior art when the region of the chip used as the template is disturbed or the chip itself has poor consistency, the present application provides a chip surface defect detection method and device based on image region difference to efficiently and accurately complete the defect detection on the chip surface.
[0006] The present application provides a chip surface defect detection method based on image region difference, which comprises the following steps:
[0007] obtaining a to-be-detected region corresponding to a to-be-detected chip and a pre-set standard reference region;
[0008] judging whether the difference between the to-be-detected region and the standard reference region is greater than a first pre-set value;
[0009] In a case where it is determined that the difference is less than or equal to the first preset value, performing a chip surface defect detection operation based on the to-be-detected region and the standard reference region;
[0010] In a case where it is determined that the difference is greater than the first preset value, moving the to-be-detected region by a preset number of pixels in each of the four directions of front, back, left and right, respectively, determining each moved to-be-detected region as a target detection region, and performing a chip surface defect detection operation based on the target detection region and the standard reference region, wherein the number of the preset pixels is greater than or equal to 1.
[0011] According to the chip surface defect detection method based on image region difference provided in the embodiments of the present application, the chip surface defect detection operation is performed based on the target detection region and the standard reference region, comprising:
[0012] The following area calculation process is performed on each of the target detection region and the standard parameter region, respectively:
[0013] The first pixel gray scale of the target detection region and the second pixel gray scale of the standard parameter region are subtracted one by one to obtain a first gray scale matrix; the point value of each point in the first gray scale matrix is compared with a second preset value; the sum of the comparison results is calculated, and the obtained sum is determined as the area corresponding to the target detection region;
[0014] The chip surface defect is determined based on the areas corresponding to all the target detection regions.
[0015] According to the chip surface defect detection method based on image region difference provided in the embodiments of the present application, the chip surface defect is determined based on the areas corresponding to all the target detection regions, comprising:
[0016] The smallest area is selected from the areas corresponding to all the target detection regions, and the chip position corresponding to the point greater than the second preset value in the first gray scale matrix corresponding to the smallest area is determined as the position where the defect exists.
[0017] According to the chip surface defect detection method based on image region difference provided in the embodiments of the present application, the to-be-detected region is moved by a preset number of pixels in each of the four directions of front, back, left and right, respectively, each moved to-be-detected region is determined as a target detection region, and a chip surface defect detection operation is performed based on the target detection region and the standard reference region, comprising:
[0018] The movement is performed in the front-back direction as the left-right direction priority, and the following detection calculation is performed every time one pixel is moved:
[0019] The moved to-be-detected region is determined as a target detection region, and a chip surface flaw detection operation is performed based on the target detection region and the standard reference region; then the to-be-detected region is moved by one pixel in another direction, the moved to-be-detected region is determined as a target detection region, and a chip surface flaw detection operation is performed based on the target detection region and the standard reference region, until the to-be-detected region is moved by a preset number of pixels in each direction of the another direction.
[0020] until the to-be-detected region is moved by a preset number of pixels in each direction of the another direction.
[0021] According to the chip surface flaw detection method based on image region difference provided in the embodiments of the present application, before the to-be-detected region is moved by a preset number of pixels in each of the four directions, the method further comprises:
[0022] calculating a relationship matrix based on a reference template position corresponding to the standard reference region and a to-be-detected position corresponding to the to-be-detected region;
[0023] performing an affine operation on the to-be-detected region by using the relationship matrix to obtain an affine to-be-detected region;
[0024] The to-be-detected region is moved by a preset number of pixels in each of the four directions in units of a single pixel, comprising:
[0025] The affine to-be-detected region is moved by a preset number of pixels in each of the four directions in units of a single pixel.
[0026] According to the chip surface flaw detection method based on image region difference provided in the embodiments of the present application, before judging whether the difference between the to-be-detected region and the standard reference region is greater than a first preset value, the method further comprises:
[0027] performing variance calculation on pixels in the to-be-detected region and the standard reference region respectively to obtain a first variance corresponding to the to-be-detected region and a second variance corresponding to the standard reference region;
[0028] calculating a variance difference value of the first variance and the second variance, and determining the variance difference value as the difference.
[0029] According to the chip surface flaw detection method based on image region difference provided in the embodiments of the present application, after obtaining the to-be-detected region corresponding to a to-be-detected chip and a preset standard reference region, the method further comprises:
[0030] performing filtering processing on the to-be-detected region and the standard reference region respectively to obtain a filtered to-be-detected region and a filtered standard reference region.
[0031] According to the chip surface flaw detection method based on image region difference provided in the embodiment of the present application, the chip surface flaw detection operation is performed based on the to-be-detected region and the standard reference region, and the operation comprises the following steps:
[0032] A relationship matrix is calculated based on the reference template position corresponding to the standard reference region and the to-be-detected position corresponding to the to-be-detected region.
[0033] An affine operation is performed on the to-be-detected region by using the relationship matrix, and an affine to-be-detected region is obtained.
[0034] A second gray matrix is obtained by subtracting the second pixel gray scale of the standard parameter region from the third pixel gray scale of the affine to-be-detected region.
[0035] Each point in the second gray matrix is compared with a second preset value, and a chip position corresponding to a point greater than the second preset value is determined as a position with a flaw.
[0036] The embodiment of the present application also provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and the processor implements the steps of the chip surface flaw detection method based on image region difference according to any one of the above when executing the program.
[0037] The embodiment of the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program implements the steps of the chip surface flaw detection method based on image region difference according to any one of the above when executed by a processor.
[0038] The chip surface flaw detection method, device and medium based on image region difference provided by the embodiment of the application, by acquiring a to-be-detected region corresponding to a to-be-detected chip and a preset standard reference region (corresponding to a template), judging whether the difference between the to-be-detected region and the standard reference region is greater than a first preset value, the application determines whether there is an interference or a problem of poor consistency of the chip by comparing the difference with the first preset value, in the case that the difference is less than or equal to the first preset value (i.e. in the case that the above problem does not exist), directly performing a chip surface flaw detection operation based on the to-be-detected region and the standard reference region; in the case that the difference is greater than the first preset value (i.e. in the case that the above problem exists), moving the to-be-detected region by a preset pixel in four directions of front, back, left and right respectively in units of a single pixel, and determining each moved to-be-detected region as a target detection region, performing a chip surface flaw detection operation based on the target detection region and the standard reference region, the application translates the to-be-detected region within a set range, and then performs a differential detection using the moved to-be-detected region and the standard reference region, which greatly eliminates the problems of unstable detection results and high false detection rate caused by the above problems, and realizes efficient and accurate completion of chip surface flaw detection. BRIEF DESCRIPTION OF DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0040] Figure 1 is a schematic diagram of the template region and the detection region provided by the embodiment of the application;
[0041] Figure 2 is a schematic diagram of the to-be-detected region collected in real time provided by the embodiment of the application;
[0042] Figure 3 is a schematic diagram of the monitoring region when there is a position deviation provided by the embodiment of the application;
[0043] Figure 4 is one of the flowcharts of the chip surface flaw detection method based on image region difference provided by the embodiment of the application;
[0044] Figure 5 is the second flowchart of the chip surface flaw detection method based on image region difference provided by the embodiment of the application;
[0045] Figure 6This application provides a third schematic flowchart of a chip surface defect detection method based on image region difference.
[0046] Figure 7 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0048] To clearly explain this application, the testing method is described in detail below:
[0049] First, acquire a flawless chip image (refer to the inspection image ImageA). Select the high-contrast Mark region in the image as the template region. Perform template matching on the current position of the template region and record the current position of the template region as (X). m ,Y m ), and determine the reference detection area.
[0050] Second, the area to be tested on the chip is determined manually, denoted as region D(X1,Y1,W,H), where (X1,Y1) represents the coordinates of the top-left corner of the region, W represents the width of the region, and H represents the height of the region. See details in [link to documentation]. Figure 1 .
[0051] in, Figure 1 The green box in the image represents the template area, with its center coordinates being (X). m ,Y m The red box indicates a situation where the reference detection area and the area to be detected overlap.
[0052] Third, after setting the above parameters, perform real-time online detection. During real-time online detection, the acquired images will be matched with a template to locate the center position (X) that matches the template. t ,Y t The angle is A. See details in [link / reference]. Figure 2 .
[0053] in, Figure 2 The green box in the image represents the area after the membrane template is matched, with its center coordinates being (X). t ,Y t), the red frame indicates the case of coincidence after mapping of the reference detection area and the to-be-detected area, and the upper left corner coordinates of the to-be-detected area after mapping are (X S ,Y S ).
[0054] Four, according to the center coordinates (X m ,Y m ) corresponding to the template and the center position (X t ,Y t ) of the to-be-detected image obtained by matching, the relationship matrix of the two coordinates is calculated.
[0055] Generally, such a relationship includes translation and rotation, wherein the affine transformation matrix (relationship matrix) can be decomposed into rotation and then translation, and the obtained relationship matrix is as follows:
[0056]
[0057] Wherein, T x =X t -X m , T y =Y t -Y m .
[0058] Five, multiply the affine transformation matrix and the to-be-detected image to obtain a new to-be-detected image after affine transformation, and make the to-be-detected area in the new to-be-detected image completely coincide with the reference detection area generally under the condition of good chip consistency, and the specific formula of multiplication is shown in formula (1):
[0059] ImageAc=Mat*ImageB………………(1)
[0060] Wherein, ImageAc represents the to-be-detected image after affine transformation, ImageB represents the to-be-detected image before affine transformation, and Mat represents the affine transformation matrix.
[0061] Six, taking the reference detection image ImageA and the to-be-detected image ImageAc after affine transformation as the comparison images, and taking the detection area D as the detection object.
[0062] The pixel gray values of the two areas of the two images are subtracted one by one to obtain the detected area C, and the area gray matrix of the area C is obtained, as shown in formula (2):
[0063] M c (i,j)=M A (i,j)-M Ac (i,j)…………(2)
[0064] Wherein, i=i r , i r+1 , …, ir+W , j = j r , j r+1 , …, j r+H .
[0065] wherein, M A (i,j) represents the pixel gray scale at (i,j) of the reference detection region, M Ac (i,j) represents the pixel gray scale at (i,j) of the simulated image to be detected, and M c (i,j) represents the region gray scale matrix of region C.
[0066] Seven, comparing each point p(i,j) in the region gray scale matrix with a preset threshold T (a second preset value), binarizing the comparison result, and calculating the area based on the binarization result.
[0067] wherein, p(i,j) represents the gray scale difference of the two regions at the image coordinate (i,j) point.
[0068] wherein, the comparison result is shown in formula (3):
[0069]
[0070] wherein, the calculation area is shown in formula (4):
[0071]
[0072] Further, the size of the flaw area is obtained based on the size of the area.
[0073] However, the algorithm will cause the position deviation between the reference detection region and the matched image to be detected due to the poor Mark consistency, and the false detection problem will occur when performing region subtraction, as shown in FIG. 2B. Figure 3 As shown in FIG. 2B, the region subtraction edge after the misplacement appears a region with higher brightness, thereby causing false detection.
[0074] To solve the above problems, the embodiment of the present application provides a chip surface flaw detection method based on image region difference. The method can be applied to a smart terminal and can also be applied to a server. The present application takes the method applied to the server as an example for description, and some other descriptions in the embodiment are for example description and do not limit the protection scope of the present application, and the specific implementation of the method is shown in FIG. 4. Figure 4
[0075] Step 401, obtaining a reference detection region corresponding to a chip to be detected and a preset standard reference region.
[0076] Step 402, judge whether the difference between the to-be-detected region and the standard reference region is greater than a first preset value, if yes, execute step 403, otherwise execute step 404.
[0077] Step 403, move the to-be-detected region by a preset pixel in four directions of front, back, left and right respectively in units of a single pixel, and determine the to-be-detected region after each movement as a target detection region, and perform chip surface defect detection operation based on the target detection region and the standard reference region.
[0078] The number of preset pixels is greater than or equal to 1.
[0079] Step 404, perform chip surface defect detection operation based on the to-be-detected region and the standard reference region.
[0080] The chip surface defect detection method based on image region difference provided by the embodiment of the application, by acquiring a to-be-detected region corresponding to a to-be-detected chip and a preset standard reference region (corresponding to a template), judging whether the difference between the to-be-detected region and the standard reference region is greater than a first preset value, the application determines whether there is interference or chip consistency problem by comparing the difference with the first preset value, in the case of determining that the difference is less than or equal to the first preset value (i.e. in the case of no above-mentioned problem), directly performing chip surface defect detection operation based on the to-be-detected region and the standard reference region; in the case of determining that the difference is greater than the first preset value (i.e. in the case of the above-mentioned problem), moving the to-be-detected region by a preset pixel in four directions of front, back, left and right respectively in units of a single pixel, and determining the to-be-detected region after each movement as a target detection region, and performing chip surface defect detection operation based on the target detection region and the standard reference region, the application translates the to-be-detected region within a set range, and then uses the moved to-be-detected region and the standard reference region for difference detection, which greatly eliminates the problems of unstable detection results and high false detection rate caused by the above-mentioned problems, and realizes efficient and accurate completion of chip surface defect detection.
[0081] In one specific embodiment, after acquiring the to-be-detected region corresponding to the to-be-detected chip and the preset standard reference region, the to-be-detected region and the standard reference region are respectively subjected to filtering processing to obtain the to-be-detected region and the standard reference region after filtering processing.
[0082] Specifically, the filtering processing includes Gaussian filtering.
[0083] Specifically, the two regions are simultaneously subjected to Gaussian filtering processing, and Gaussian noise interference components generated by heating of external hardware such as lenses and light sources are filtered out, so as to improve the accuracy of the region subtraction result.
[0084] Wherein, the Gaussian filter is a linear convolution process, given an input region R and a Gaussian kernel G with a size of (2k+1)*(2k+1), the filtered region R i The calculation formula of R
[0085]
[0086] Wherein, R i (x,y) represents the filtered region, i=1, 2, k represents a pre-set constant, R(x+i, y+j) represents a point of the input region, and G(i,j) represents a weight value of the Gaussian kernel at position (i,j).
[0087] Wherein, G(i,j) is obtained by a two-dimensional Gaussian function, see formula (6):
[0088]
[0089] Wherein, σ represents a standard deviation.
[0090] The present application performs Gaussian filtering on the high-frequency components of the detection region, thereby improving the stability and accuracy of the flaw detection.
[0091] In one embodiment, before determining whether the difference between the to-be-detected region and the standard reference region is greater than a first preset value, the difference between the to-be-detected region and the standard reference region is determined, as shown in Figure 5
[0092] Step 501, respectively, the pixels in the to-be-detected region and the standard reference region are subjected to variance calculation, thereby obtaining a first variance corresponding to the to-be-detected region and a second variance corresponding to the standard reference region.
[0093] Step 502, the variance difference between the first variance and the second variance is calculated, and the variance difference is determined as the difference.
[0094] Specifically, after the pixel variance calculation of the standard reference region is performed, the result is taken as a reference variance, and the to-be-detected region is subjected to variance calculation and compared with the reference variance.
[0095] Wherein, the variance calculation formula is shown in formula (7):
[0096]
[0097] Wherein, δ 2 represents the variance, N represents the total number of pixels in the region, N=W*H, u represents the average gray value of the region, and d(i,j) represents the gray value of the region at the (i,j) image coordinate point.
[0098] Wherein, the calculation of the average gray value is shown in formula (8):
[0099]
[0100] In one embodiment, the implementation of the chip surface defect detection operation based on the target detection area and the standard reference area includes:
[0101] The following area calculation process is performed on each target detection area and standard parameter area respectively, see Figure 6 :
[0102] Step 601, subtract the first pixel gray scale of the target detection area and the second pixel gray scale of the standard parameter area one by one to obtain a first gray scale matrix.
[0103] Step 602, compare the point value of each point in the first gray scale matrix with a second preset value.
[0104] Step 603, calculate the sum of the comparison results, and determine the obtained sum as the area corresponding to the target detection area.
[0105] Further, the chip surface defect is determined based on the areas corresponding to all target detection areas.
[0106] In one embodiment, the implementation of the chip surface defect determination based on the areas corresponding to all target detection areas includes:
[0107] Select the smallest area from the areas corresponding to all target detection areas, and determine the chip position corresponding to the point greater than the second preset value in the first gray scale matrix corresponding to the smallest area as the position where the defect exists.
[0108] Specifically, after affine transformation of the image to be detected, the detection area is moved in the forward, backward, left, right (up, down, left, right) four directions in units of pixels. Each movement of one pixel is subtracted from the standard reference area to calculate the area, and the area is saved. Finally, the minimum value of all the areas obtained is taken as the detection result.
[0109] Take the current matched position as the reference, for example, the moving range in the forward and backward directions (up and down directions, vertical direction) is [-S, S], and the moving range in the left and right directions (horizontal direction) is [-C, C].
[0110] Based on formula (9), all areas are traversed:
[0111]
[0112] The above formula constitutes formula (9).
[0113] The minimum area is obtained from the above area, see formula (10):
[0114] S nin= {S(0), S(1, Y S ), …, S(C, Y S ), S(-1, Y S ), …, S(-C, Y S ),
[0115] …, S(X S , 1), …, S(X S , S), S(x S , -1), …, S(x S , -S)
[0116] ………………………………………(10)
[0117] The application can eliminate the false detection problem caused by the deviation of the two subtracted regions caused by the positioning deviation caused by the poor consistency of the product by subtracting the area of the region after the affine movement from the standard reference region and comparing the effective area after the second preset value, and taking the smallest area as the detection result.
[0118] In one specific embodiment, the to-be-detected region is moved by a preset pixel in four directions of front, back, left and right respectively, and each moved to-be-detected region is determined as a target detection region, and the specific implementation of the chip surface defect detection operation based on the target detection region and the standard reference region includes:
[0119] The movement is performed in the front-back direction as the left-right direction priority, and the following detection calculation is performed every time the pixel is moved:
[0120] The moved to-be-detected region is determined as a target detection region, and the chip surface defect detection operation is performed based on the target detection region and the standard reference region; then the to-be-detected region is moved by one pixel in another direction, the moved to-be-detected region is determined as a target detection region, and the chip surface defect detection operation is performed based on the target detection region and the standard reference region, until the to-be-detected region is moved by a preset pixel in each direction of the another direction.
[0121] Until the to-be-detected region is moved by a preset pixel in each direction of the priority movement direction.
[0122] For example, the movement is performed in the left-right direction as the priority, and the following detection calculation is performed every time the pixel is moved:
[0123] The moved to-be-detected region is determined as a target detection region, and the chip surface defect detection operation is performed based on the target detection region and the standard reference region; then the to-be-detected region is moved by one pixel in the front-back direction, the moved to-be-detected region is determined as a target detection region, and the chip surface defect detection operation is performed based on the target detection region and the standard reference region, until the to-be-detected region is moved by a preset pixel in each direction of the front-back direction.
[0124] Finally, until each direction of the left and right direction moves the preset pixel times.
[0125] For example, the movement is performed in the front and back direction first, and the following detection calculation is performed every time a pixel is moved:
[0126] The moved to-be-detected region is determined as a target detection region, and a chip surface defect detection operation is performed based on the target detection region and the standard reference region; then the to-be-detected region is moved by one pixel in the left and right direction, the moved to-be-detected region is determined as a target detection region, and a chip surface defect detection operation is performed based on the target detection region and the standard reference region, until each direction of the left and right direction moves the preset pixel times.
[0127] Finally, until each direction of the front and back direction moves the preset pixel times.
[0128] For example, the preset pixel is 3, that is, the final movement is 36 times, which is only used for illustration and does not limit the protection scope of the present application, and the preset pixel can also be 2, 4, etc.
[0129] In one embodiment, before the to-be-detected region is moved by the preset pixel in the four directions of front, back, left and right, respectively, and each moved to-be-detected region is determined as a target detection region, a relationship matrix is calculated based on the reference template position corresponding to the standard reference region and the to-be-detected position corresponding to the to-be-detected region; an affine operation is performed on the to-be-detected region by using the relationship matrix to obtain an affine to-be-detected region; and the affine to-be-detected region is moved by the preset pixel in the four directions of front, back, left and right, respectively.
[0130] In one embodiment, the specific implementation of performing a chip surface defect detection operation based on the to-be-detected region and the standard reference region includes:
[0131] A relationship matrix is calculated based on the reference template position corresponding to the standard reference region and the to-be-detected position corresponding to the to-be-detected region; an affine operation is performed on the to-be-detected region by using the relationship matrix to obtain an affine to-be-detected region; the third pixel gray value of the affine to-be-detected region and the second pixel gray value of the standard parameter region are subtracted one by one to obtain a second gray matrix; and each point in the second gray matrix is compared with a second preset value, and the chip position corresponding to the point greater than the second preset value is determined as a position with a defect.
[0132] During real-time detection, when chip inconsistency is poor or there is significant chip interference, and the lighting is slightly unstable due to the quality of imaging hardware such as the camera, lens, and light source (due to light source attenuation and external natural light interference), the grayscale of the edge information imaged for template localization will vary by about 10 gray levels. This variation directly affects template localization, leading to positional deviations in the detection area after affine transformation based on the template localization information. This results in inconsistent detection results, exhibiting a phenomenon where the results are sometimes good and sometimes bad. This directly impacts the stability of the overall detection equipment's repeatability. As a core indicator of any device, detection stability is arguably the most important of all indicators. This application addresses this by shifting the affine-transformed detection area within a set range (up, down, left, and right) before re-performing differential detection with a set reference detection area. This significantly eliminates the detection uncertainty caused by poor chip inconsistency and improves the robustness of the detection algorithm.
[0133] When poor chip consistency or significant chip interference affects positioning, subtracting the reference detection area from the real-time affine target detection area can lead to severe false detections. This application significantly reduces the false detection rate by minimizing the pixel grayscale difference area obtained after further shifting and subtracting the target detection area within a set range.
[0134] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include a processor 701, a communications interface 702, a memory 703, and a communication bus 704. The processor 701, communications interface 702, and memory 703 communicate with each other via the communication bus 704. The processor 701 can call logic instructions stored in the memory 703 to execute a chip surface defect detection method based on image region difference.
[0135] In addition, the logic instructions in the memory 703 described above can be implemented in the form of software function units and sold or used as independent products, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0136] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a non-transitory computer readable storage medium, and the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer can execute the chip surface defect detection method based on image region difference provided by the above-mentioned methods.
[0137] In another aspect, the present application also provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the chip surface defect detection method based on image region difference provided by the above-mentioned embodiments.
[0138] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the embodiment according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0139] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus necessary universal hardware platforms, and of course, can also be implemented by hardware. Based on such understanding, the technical solutions described above essentially or the parts that contribute to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments.
[0140] Finally, it should be noted that the above is only the preferred embodiment of the present application, and the present application is not limited to the above examples. It can be understood that other improvements and changes directly derived or thought of by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included in the protection scope of the present application.
Claims
1. A chip surface defect detection method based on image region difference, characterized in that, The method includes: Obtain the detection area and the preset standard reference area corresponding to the chip under test; Determine whether the difference between the region to be detected and the standard reference region is greater than a first preset value; If the difference is determined to be less than or equal to the first preset value, a chip surface defect detection operation is performed based on the area to be detected and the standard reference area. If the difference is determined to be greater than the first preset value, the area to be detected is moved by a preset number of pixels in the four directions of front, back, left, and right, with each pixel as a unit, and the area to be detected after each movement is determined as the target detection area. Based on the target detection area and the standard reference area, a chip surface defect detection operation is performed, wherein the number of preset pixels is greater than or equal to 1.
2. The chip surface defect detection method based on image region difference according to claim 1, characterized in that, The chip surface defect detection operation is performed based on the target detection area and the standard reference area, including: Perform the following area calculation process for each of the target detection regions and the standard parameter regions respectively: Subtract the grayscale of the first pixel in the target detection region from the grayscale of the second pixel in the standard parameter region to obtain a first grayscale matrix; compare the value of each point in the first grayscale matrix with a second preset value; calculate the sum of the comparison results, and determine the area corresponding to the target detection region as the sum; Chip surface defects are determined based on the area corresponding to all target detection regions.
3. The chip surface defect detection method based on image region difference according to claim 2, characterized in that, Chip surface defects are determined based on the area corresponding to all target detection regions, including: Select the smallest area from all the target detection areas, and determine the chip location corresponding to the point in the first gray-scale matrix corresponding to the smallest area that is greater than the second preset value as the location of the defect.
4. The chip surface defect detection method based on image region difference according to any one of claims 1-3, characterized in that, The area to be detected is moved by a preset number of pixels in each of the four directions (front, back, left, and right), and the area to be detected after each movement is determined as the target detection area. Based on the target detection area and the standard reference area, chip surface defect detection is performed, including: The movement prioritizes left and right directions, moving in the forward and backward direction. For each pixel moved, the following detection calculations are performed: The moved area to be detected is defined as the target detection area. Chip surface defect detection is performed based on the target detection area and the standard reference area. Then, the area is moved by one pixel in the other direction. The moved area to be detected is defined as the target detection area. Chip surface defect detection is performed based on the target detection area and the standard reference area. This process is repeated until the area is moved by a preset number of pixels in each direction in the other direction. Move a preset number of pixels in each of the preferred movement directions up to the specified number of times.
5. The chip surface defect detection method based on image region difference according to any one of claims 1-3, characterized in that, Before moving the region to be detected by a preset number of pixels in each of the four directions (front, back, left, and right) and determining the region to be detected after each movement as the target detection region, the process further includes: Calculate the relationship matrix based on the reference template position corresponding to the standard reference area and the detection position corresponding to the area to be detected; The region to be detected is subjected to an affine operation using the relation matrix to obtain the affine region to be detected. The step of moving the region to be detected by a preset number of pixels in four directions (front, back, left, and right) in units of a single pixel includes: The affine region to be detected is moved by a preset number of pixels in each of the four directions (front, back, left, and right), with each pixel as a unit.
6. The chip surface defect detection method based on image region difference according to any one of claims 1-3, characterized in that, Before determining whether the difference between the region to be detected and the standard reference region is greater than a first preset value, the method further includes: Variance calculations are performed on pixels in the region to be detected and the standard reference region respectively to obtain the first variance corresponding to the region to be detected and the second variance corresponding to the standard reference region. Calculate the variance difference between the first variance and the second variance, and determine the variance difference as the difference.
7. The chip surface defect detection method based on image region difference according to any one of claims 1-3, characterized in that, After obtaining the detection area and the preset standard reference area corresponding to the chip under test, the process also includes: The region to be detected and the standard reference region are filtered separately to obtain the filtered region to be detected and the standard reference region.
8. The chip surface defect detection method based on image region difference according to any one of claims 1-3, characterized in that, The chip surface defect detection operation is performed based on the area to be detected and the standard reference area, including: Calculate the relationship matrix based on the reference template position corresponding to the standard reference area and the detection position corresponding to the area to be detected; The region to be detected is subjected to an affine operation using the relation matrix to obtain the affine region to be detected. Subtract the gray level of the third pixel of the affine region to be detected from the gray level of the second pixel of the standard parameter region one by one to obtain the second gray level matrix; Each point in the second grayscale matrix is compared with the second preset value, and the chip position corresponding to the point that is greater than the second preset value is determined as the position where there is a defect.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the chip surface defect detection method based on image region difference as described in any one of claims 1 to 8.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the chip surface defect detection method based on image region difference as described in any one of claims 1 to 8.
Citation Information
Patent Citations
A product surface image anomaly detection method and device
CN109671078A
Printed matter defect detection method and device based on artifact elimination
CN111986190A
Mold state monitoring method and device, industrial personal computer, storage medium and system
CN112837302A
Chip surface defect detection method and device
CN114170165A
Detection area determination method and device, equipment and storage medium
CN118014926A