A detection method, apparatus, and storage medium
By employing differential image processing and binarization techniques, the problem of chip defect detection under template-less image conditions was solved, achieving efficient and accurate defect detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2026-03-31
AI Technical Summary
Existing chip inspection methods cannot detect defects without template images, resulting in low inspection efficiency.
By acquiring the image to be detected and at least two adjacent contrast images to form a difference image, and using the grayscale histogram to determine the binarization threshold, the difference image is binarized. Combined with AND processing, the binarized image of the image to be detected is obtained. Finally, the defect area is determined according to the preset defect area threshold.
It enables efficient defect detection without template images, reduces the complex calculations of binarization processing, and improves detection efficiency and accuracy.
Smart Images

Figure CN113935927B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology, specifically to a detection method, apparatus, and storage medium. Background Technology
[0002] In the existing chip (or wafer or integrated circuit) manufacturing field, chip testing is required. Typically, equipment such as electron microscopes are used to obtain images of the microstructure on the chip. By testing and analyzing these images, the quality of the chip can be determined.
[0003] Existing detection methods use template images to match and detect chip images in order to identify the location and size of defects in the chip image.
[0004] The current method of using template images requires a lot of time to create the template images, and without template images, it is impossible to detect defects in the chip. Summary of the Invention
[0005] The main technical problem solved by this invention is that existing detection methods cannot perform defect detection without a template image.
[0006] According to the first aspect, one embodiment provides a detection method, comprising:
[0007] Acquire the image to be detected and at least two adjacent contrast images;
[0008] Obtain the difference image between the image to be detected and the comparison image;
[0009] Based on the gray-level histogram of the difference image, determine the binarization threshold, and perform binarization processing on the difference image to obtain the binarized image of the difference image.
[0010] Perform a bitwise AND operation on at least two binarized images to obtain a binarized image of the image to be detected;
[0011] Based on the preset defect area threshold, defects with an area greater than or equal to the preset defect area threshold in the binarized image of the image to be detected are identified, and the defect detection result is obtained.
[0012] According to a second aspect, one embodiment provides a detection device, comprising:
[0013] The image acquisition module is used to acquire the image to be detected and at least two comparison images adjacent to the image to be detected;
[0014] The processing module is used to acquire the difference image between the image to be detected and the comparison image; determine the binarization threshold based on the grayscale histogram of the difference image, perform binarization processing on the difference image to obtain the binarized image of the difference image; perform AND processing on at least two binarized images to obtain the binarized image of the image to be detected; and determine the defects in the binarized image of the image to be detected whose area is greater than or equal to the preset defect area threshold based on the preset defect area threshold to obtain the defect detection result.
[0015] According to a third aspect, one embodiment provides a computer-readable storage medium storing a program that can be executed by a processor to implement the detection method as described in the first aspect above.
[0016] According to the detection method, apparatus, and storage medium of the above embodiments, the following steps are taken: acquiring an image to be detected and at least two adjacent comparison images; acquiring a difference image between the image to be detected and the comparison images; determining a binarization threshold based on the grayscale histogram of the difference images; performing binarization processing on the difference images to obtain a binarized image of the difference images; performing an AND operation on the at least two binarized images to obtain a binarized image of the image to be detected; and determining defects in the binarized image of the image to be detected whose area is greater than or equal to the preset defect area threshold based on a preset defect area threshold to obtain a defect detection result. It is evident that by forming two difference images from two comparison images and obtaining the binarized image of the image to be detected by performing an AND operation on the binarized images of the two difference images, the complex calculations involved in binarizing the image to be detected are reduced, and defect detection can be performed without a template image. Attached Figure Description
[0017] Figure 1 A schematic diagram of the structure of a detection device provided in one embodiment;
[0018] Figure 2 A schematic flowchart illustrating a detection method provided in one embodiment;
[0019] Figure 3 This is a schematic diagram of the image to be detected and the comparison image provided in one embodiment;
[0020] Figure 4 A schematic diagram of a defect area provided in one embodiment;
[0021] Figure 5 This is a schematic diagram of a differential image in a detection method provided in one embodiment;
[0022] Figure 6 Another schematic diagram of the differential image in a detection method provided in one embodiment;
[0023] Figure 7This is a schematic diagram of the binarized image of the difference image in a detection method provided in one embodiment;
[0024] Figure 8 This is a schematic diagram of the grayscale histogram of the difference image in a detection method provided in one embodiment;
[0025] Figure 9 This is a schematic diagram of the binarized image of the image to be detected in a detection method provided in one embodiment;
[0026] Figure 10 This is a schematic diagram of the defect detection results in a detection method provided in one embodiment. Detailed Implementation
[0027] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of this application. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to this application are not shown or described in the specification. This is to avoid obscuring the core parts of this application with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.
[0028] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.
[0029] The serial numbers assigned to components in this document, such as "first" and "second," are used only to distinguish the described objects and have no sequential or technical meaning. The terms "connection" and "linkage" used in this application, unless otherwise specified, include both direct and indirect connections (linkages).
[0030] Wafer defect detection typically involves scanning (capturing) images of the wafer using an electron microscope (such as a scanning electron microscope). Defects are located by searching for and analyzing abnormal patterns in the images. Existing image detection and analysis methods often compare the image to be detected with a template image (or reference image, standard image). Therefore, the template image is an indispensable part of existing image detection and analysis methods.
[0031] In this embodiment of the invention, the detection method provided by the present invention forms a difference image by using at least two comparison images adjacent to the image to be detected, performs AND processing, and then performs binarization processing to obtain only the part corresponding to the defect in the image to be detected, thereby performing defect detection and analysis, without the need for template images for defect comparison and detection.
[0032] Please refer to Figure 1 The present invention provides a detection device, including an image acquisition module 10 and a processing module 20. The detection device provided by the present invention can be applied to a detection system, which may include the detection device and a display module 30, or the detection device provided by the present invention may further include a display module 30.
[0033] The image acquisition module 10 described above is used to acquire multiple images of the wafer to be inspected, each image corresponding to a region on the wafer to be inspected. The image acquisition module 10 can be an electron microscope, such as a scanning electron microscope, or other usable image acquisition modules, such as an RGB camera. The specific equipment used depends on the product to be inspected.
[0034] The processing module 20 is used to acquire an image to be detected and at least two adjacent images to be detected (defined as comparison images). Using the detection method provided by this invention, defects in the images to be detected are detected, corresponding detection results are obtained, and the detection results are sent to the display module 30. The display module 30 displays the detection results; the display module 30 can be a monitor.
[0035] Specifically, the processing module 20 is used to acquire a difference image between the image to be detected and a comparison image; determine a binarization threshold based on the grayscale histogram of the difference image, perform binarization processing on the difference image to obtain a binarized image of the difference image; perform AND processing on at least two binarized images to obtain a binarized image of the image to be detected; and determine defects in the binarized image of the image to be detected whose area is greater than or equal to the preset defect area threshold based on a preset defect area threshold, thereby obtaining a defect detection result. The processing module 20 can employ devices with computing capabilities, such as processors, microcontrollers, programmable logic controllers (PLCs), programmable logic arrays (FPGAs), etc.
[0036] The following describes the specific process of defect detection using a detection device or system, such as... Figure 2 As shown, the detection method provided by the present invention includes the following steps:
[0037] Step 1: As Figure 3As shown, the processing module 20 acquires the image to be detected and at least two adjacent comparison images through the image acquisition module 10. It is evident that the image to be detected contains areas with clearly distinguishable colors, visually appearing as black patterns. For ease of description, the area containing such black patterns is defined as a defect area, and the area outside the defect area is defined as the background or background region. It is not limited whether the two comparison images contain defect areas. In reality, the color of a defect is not necessarily black; this embodiment uses black for ease of description only. Figure 3 The defect is described as black. For example... Figure 4 As shown, when the defect area is magnified (for ease of observation, the background color is uniformly defined as white, and the defect as black), it can be seen that a defect area contains multiple discontinuous defects. It is evident that the area (number of pixels) of each defect is not the same. Simultaneously, there are also factors that are not defects, resulting in smaller black patterns, meaning that noise exists in the image being inspected.
[0038] Step 2: Processing module 20 acquires the difference image between the image to be detected and the comparison image.
[0039] like Figure 5 As shown, for ease of description, the image to be detected and the comparison image are defined as single-channel images or black and white images. "0" and "255" in the figure represent the pixel value or grayscale value of a pixel. The following description uses black and white images for both the image to be detected and the comparison image. In a typical image, the pixel value of a pixel ranges from 0 to 255. It can be seen that after subtracting the comparison image from the image to be detected, the pixel value range of the difference image is -255 to 255.
[0040] like Figure 6 As shown, judging only the pixels in the image to be detected or the comparison image is insufficient to determine the pixel corresponding to the defect. However, by using a difference image, the pixel with the greatest difference between the image to be detected and the comparison image can be identified. Two comparison images are used to obtain two corresponding difference images. The significance of the difference image is to increase the difference in pixel values between the defect and the background, making it easier to filter out the defect during binarization. For example, as shown... Figure 6 As shown in the difference image, the absolute value of the pixel in the lower left corner is the largest, proving that the corresponding pixel in the image to be detected can be considered a defect.
[0041] Step 3: The processing module 20 determines the binarization threshold based on the grayscale histogram of the difference image, performs binarization processing on the difference image, and obtains the binarized image of the difference image.
[0042] like Figure 7As described above, after binarization of the two difference images, two binarized images are obtained. It can be seen that the defect, originally black, is set to white, and the background is set to black. Because the background occupies a large portion of the image to be detected, setting it to black results in a pixel value of 0, which speeds up the calculation during detection. Figure 3 In this comparison, both images contain defective regions. Therefore, after difference, difference image 1 retains the defective regions of comparison image 1 and the image to be detected, while difference image 2 retains the defective regions of comparison image 2 and the image to be detected. In other words, the binarized image of the difference image retains the parts that differ between the image to be detected and the comparison image, correspondingly retaining the information of the defective regions while subtracting the background information.
[0043] In one possible implementation, step 3 above, determining the binarization threshold based on the gray-level histogram of the difference image, may include the following steps:
[0044] Step 301: Obtain the preset defect area threshold based on the size of the image to be detected and the preset defect area ratio.
[0045] For example, if the dimensions of the image to be detected are 100 pixels long and 1000 pixels wide, then the area of the image is 100,000 pixels. If the preset defect area ratio is 0.001, then the preset defect area threshold is 100 pixels.
[0046] Step 302: Obtain the binarization threshold based on the grayscale histogram, the threshold deviation value, and the preset defect area threshold. Binarization using different thresholds will result in different images. Since binarization retains information corresponding to defects, a suitable binarization threshold is necessary to preserve this information and reduce noise.
[0047] Specifically, step 302 above may include:
[0048] Step 303: Use grayscale histograms Figure 1 By accumulating from one end to the other, a sum of pixel values in the grayscale histogram is obtained; by accumulating from the other end of the grayscale histogram to the other, another sum of pixel values in the grayscale histogram is obtained.
[0049] For example, when accumulating from the left to the middle, the number of pixel values -255, -254, -253, -252, and -251 are 1, 2, 3, 1, and 1 respectively. The sum of -255 to -251 is: 1 + 2 + 3 + 1 + 1 = 8. Similarly, accumulating from the right to the middle also results in a sum.
[0050] Step 304: Determine the first pixel value and the second pixel value corresponding to the two accumulated sums that are respectively equal to the preset defect area threshold. The first pixel value corresponds to the accumulated sum from left to middle, and the second pixel value corresponds to the accumulated sum from right to middle. Since the specific value of the binarization threshold can be directly determined manually, this method lacks correlation with the image to be detected and the defect. Therefore, the detection method provided by this invention, by associating the binarization threshold (corresponding to the accumulated sum) with the preset defect area threshold (corresponding to the image size and preset defect area ratio), is applicable to practical applications with different sizes of images to be detected and preset defect area ratios.
[0051] like Figure 8 As shown, the number of pixel values is counted from both sides of the grayscale histogram towards the center, and then accumulated until a preset defect area threshold is reached, at which point the count stops, yielding the corresponding first and second pixel values. For example, in... Figure 8 In the example, when the sum is 100, the corresponding pixel value is -60 on the left and 60 on the right (the thresholds on the left and right sides may not be equal), so the corresponding first pixel value is -60 and the second pixel value is 60.
[0052] Step 305: The threshold deviation values are superimposed on the first pixel value and the second pixel value respectively to obtain a binarized threshold. The binarized threshold includes a first threshold P1 and a second threshold P2, where P1 is the superposition value of the first pixel value and the threshold deviation value, and P2 is the superposition value of the second pixel value and the threshold deviation value. The concept of threshold deviation value is introduced to adjust the edges corresponding to defects. The superposition of threshold deviation values mentioned in this invention is not a direct superposition of A+B, but rather a superposition of A±B.
[0053] Specifically, for example, assuming the threshold for stopping on the left is -60 and on the right is 60, the final binarized threshold is the threshold corresponding to the stopping point plus the threshold deviation value. If the threshold deviation value is 15, the left side is added together, and the right side is subtracted, resulting in thresholds of -45 and 45. This can be understood as moving the first threshold P1 and the second threshold P2 closer to the middle.
[0054] For example, suppose the threshold for stopping on the left is -60 and on the right it is 60. Based on the threshold deviation value, the threshold corresponding to the stopping point plus the threshold deviation value is the final binarized threshold. If the threshold deviation value is 15, the left side is subtracted and the right side is added, so the thresholds are -75 and 75. This can be understood as expanding the first threshold P1 and the second threshold P2 outwards.
[0055] In one possible implementation, such as Figure 7 As shown, step 3 above, binarizing the difference image to obtain a binarized image of the difference image, may include:
[0056] Step 306: Set the pixel values of pixels with pixel values P of P1≤P≤P2 in the difference image to 0, and set the pixel values of pixels with other pixel values in the difference image to the first preset pixel value, such as 253, 254 or 255, to obtain the binarized image of the difference image.
[0057] pass Figure 8 As shown in the grayscale histogram, the pixel values of the difference image are concentrated between the first threshold P1 and the second threshold P2, corresponding to the background of the image to be detected. By setting the pixel values of the background region to 0, the binarized image becomes a sparse image, which improves the processing speed during detection and analysis. This reduces the noise generated in the image to be detected and removes potentially non-defective areas by "adjusting the pixel values to 0".
[0058] Step 4: The processing module 20 performs AND processing on at least two binarized images to obtain a binarized image of the image to be detected.
[0059] like Figure 9 As shown, in contrast to Figure 3 The image to be detected in the image, Figure 9 The binarized image of the image to be detected retains only the defective areas, while the background is set to black. It is evident that the detection method of this invention can perform high-quality binarization of the image to be detected without generating noise in the background area. By performing a bitwise AND operation on the binarized images of the two difference images, the different parts of the two difference images are removed, and the similar parts are retained; that is, the defective areas in the image to be detected are preserved. It can be understood that the two comparison images, after being differencing and then ANDed, serve as template images.
[0060] Step 5: The processing module 20 determines defects in the binarized image of the image to be detected whose area is greater than or equal to the preset defect area threshold, based on the preset defect area threshold, and obtains the defect detection result. Specifically, this may include the following steps:
[0061] Step 501: Perform connected component analysis on the binarized image of the image to be detected. The connected component analysis can be either four-connected component analysis or eight-connected component analysis. In this embodiment, eight-connected component analysis is used.
[0062] like Figure 10As shown, through octal connected component analysis, it can be found that there are four defects in a small region of the defect area. At this time, the location and area (number of pixels contained) of each defect can be analyzed. By using octal connected component analysis, adjacent defect features in the image to be detected are treated as a related defect, avoiding the problem that the same defect is split into two or more defects after image processing, and the different areas of multiple defects are all smaller than the preset defect area, which leads to the defect being incorrectly identified.
[0063] Step 502: Based on the preset defect area threshold, obtain the connected regions with an area greater than or equal to the preset defect area threshold.
[0064] For example, when the preset defect area threshold is 50, Figure 10 If only one defect corresponds to a connected region greater than 50, and the preset defect area threshold is 20, then... Figure 10 If two defects correspond to connected regions greater than 20, then the connected regions can be marked in the binarized image of the image to be detected, and the location and number of defects can be recorded for subsequent defect analysis.
[0065] Step 503: Obtain the defect area and location of the corresponding defect in the connected region. Processing module 20 sends the defect detection results to display module 30, where they are displayed. This can be done by displaying the binarized image of the marked image to be inspected on display module 30, or by outputting the defect area and location, and the number of defects exceeding a preset defect area threshold. For example, if the number of defects exceeds a preset threshold, the current part to be inspected is determined to be defective, and further inspection is discontinued, thereby improving inspection efficiency.
[0066] In summary, this detection method generates two difference images from two contrasting images, and obtains the binarized image of the image to be detected by ANDing the binarized images of the two difference images. This reduces the complex calculations required for binarizing the image to be detected and enables defect detection without a template image.
[0067] Those skilled in the art will understand that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the program can also be stored in a server, another computer, disk, optical disk, flash drive, or external hard drive, etc., and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.
[0068] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.
Claims
1. A method of detecting defects in a wafer, characterized by, The method comprises the following steps: acquiring a to-be-detected image and at least two contrast images adjacent to the to-be-detected image; wherein the to-be-detected image and the at least two contrast images correspond to different to-be-detected regions on a wafer; acquiring a difference image of the to-be-detected image and the contrast image; obtaining a preset defect area threshold according to the size of the to-be-detected image and a preset defect area ratio; obtaining an accumulated sum of the number of pixel values in the gray histogram of the difference image in a manner of accumulating from one end of the gray histogram to the middle; and obtaining another accumulated sum of the number of pixel values in the gray histogram in a manner of accumulating from the other end of the gray histogram to the middle; determining a first pixel value and a second pixel value corresponding to the two accumulated sums being equal to the preset defect area threshold, respectively; superimposing a threshold deviation value on the first pixel value and the second pixel value, respectively, to obtain a binarization threshold, and performing binarization processing on the difference image to obtain a binarization image of the difference image; performing AND processing on the at least two binarization images to obtain a binarization image of the to-be-detected image; determining defects with an area greater than or equal to the preset defect area threshold in the binarization image of the to-be-detected image according to the preset defect area threshold to obtain a defect detection result.
2. The detection method of claim 1, wherein, The binarization processing on the difference image to obtain the binarization image of the difference image comprises: setting the pixel value of a pixel point with a pixel value P in the difference image as 0, and setting the pixel value of a pixel point with other pixel values in the difference image as a first preset pixel value, to obtain the binarization image of the difference image, wherein P1 is the superimposed value of the first pixel value and the threshold deviation value, and P2 is the superimposed value of the second pixel value and the threshold deviation value.
3. The detection method according to claim 1 or 2, characterized in that, The determination of defects with an area greater than or equal to the preset defect area threshold in the binarization image of the to-be-detected image according to the preset defect area threshold to obtain the defect detection result comprises: performing connected component analysis on the binarization image of the to-be-detected image; obtaining connected regions with an area greater than or equal to the preset defect area threshold according to the preset defect area threshold; obtaining the defect area and the position of the connected regions corresponding to defects.
4. The detection method of claim 3, wherein, The connected component analysis is four-connected component analysis or eight-connected component analysis.
5. A wafer defect detection apparatus characterized by comprising: The method comprises the following steps: an image acquisition module, configured to acquire a to-be-detected image and at least two contrast images adjacent to the to-be-detected image; wherein the to-be-detected image and the at least two contrast images correspond to different to-be-detected regions on a wafer; The processing module is configured to: acquire a difference image of the to-be-detected image and the contrast image; obtain a preset defect area threshold according to a size of the to-be-detected image and a preset defect area ratio; obtain an accumulated sum of pixel values in a gray histogram of the difference image in a manner of accumulating from one end of the gray histogram to the middle; obtain another accumulated sum of pixel values in the gray histogram in a manner of accumulating from another end of the gray histogram to the middle; determine a first pixel value and a second pixel value corresponding to the two accumulated sums being equal to the preset defect area threshold, respectively; superimpose a threshold deviation value on the first pixel value and the second pixel value, respectively, to obtain a binarization threshold; perform binarization processing on the difference image to obtain a binarization image of the difference image; perform AND processing on at least two binarization images to obtain a binarization image of the to-be-detected image; and determine defects with an area greater than or equal to the preset defect area threshold in the binarization image of the to-be-detected image according to the preset defect area threshold, to obtain a defect detection result.
6. The detection device of claim 5, wherein, The processing module is configured to: determine defects with an area greater than or equal to the preset defect area threshold in the binarization image of the to-be-detected image according to the preset defect area threshold, to obtain a defect detection result, including: The processing module is configured to: perform connected domain analysis on the binarization image of the to-be-detected image; obtain a connected region with an area greater than or equal to the preset defect area threshold according to the preset defect area threshold; and obtain a defect area and a position of a defect corresponding to the connected region.
7. A computer readable storage medium characterized in that, The medium has a program stored thereon, and the program can be executed by the processor to implement the detection method according to any one of claims 1-4.
Citation Information
Patent Citations
Self-adaption image binaryzation method based on residual image histogram cyclic shift
CN106204617A
Template matching based precise detection method for steel strip surface defects
CN106645190A