Wafer detection method and device, storage medium and equipment

Through image matching and fusion technology, the high cost and low efficiency problems of manually screening template images in existing wafer detection are solved, and efficient and accurate defect detection is achieved.

CN118967648AActive Publication Date: 2024-11-15JIANGSU JIANGLING SEMICON CO LTD

Patent Information

Application Number
CN202411168197.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-11-15
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

The existing wafer detection methods rely on manual screening of template images, which are cost-effective and inefficient, and the template images are not ideal and flawless, resulting in poor accuracy of the detection results.

Method used

By acquiring the surface image of the wafer to be detected, selecting the reference image and the test image, determining the positioning point using image matching, aligning the test images and fusing them into template images, and then performing defect detection.

Benefits of technology

The labor cost is reduced, the detection efficiency is improved, and the accuracy of defect detection is improved by fusion of template images based on the image collected in actual production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967648A_ABST
    Figure CN118967648A_ABST
Patent Text Reader

Abstract

The invention provides a wafer detection method and device, a storage medium and equipment, and the method comprises the steps: obtaining a surface image of a to-be-detected wafer, selecting a crystal grain image from the crystal grain images of the surface image as a reference image, taking the other crystal grain images as test images, determining a first mark point in the reference image, and carrying out the detection of the to-be-detected wafer through the first mark point; determining a positioning point aligned with the first mark point in each test image through image matching, aligning and fusing each test image according to the positioning point in each test image to obtain a template image, and comparing each crystal grain image one by one based on the template image to realize defect detection. The method has the advantages of simple operation, low cost, high efficiency and high template image precision, and the template image is a defect-free crystal grain image obtained by fusing all crystal grain images collected in actual production, so that the accuracy of defect detection is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer vision, and in particular to a wafer detection method, device, storage medium and equipment. Background Art

[0002] Defect detection on wafers can promptly discover and solve problems in the semiconductor chip production process, and is an important part of improving the yield rate of semiconductor chips.

[0003] At present, wafers are generally inspected through an automated optical inspection system (AOI), and the grain images with fewer defects are manually screened out from each grain image as a template image, and then the grain (Die) image in the wafer to be inspected is matched with the template image to determine the inspection result of the grain image. However, with the update of semiconductor chip production technology, manual repeated screening of template images is required, which is costly and inefficient, and the template image is not an ideal defect-free grain image, resulting in poor accuracy in determining the inspection result.

[0004] Based on this, this specification provides a wafer detection method, device, storage medium and equipment. Summary of the invention

[0005] This specification provides a wafer detection method, device, storage medium and equipment to partially solve the above-mentioned problems existing in the prior art.

[0006] This specification adopts the following technical solution: This specification provides a wafer detection method, the method comprising:

[0007] Acquire a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains;

[0008] Select one grain image from each grain image as a reference image and use the other grain images as test images;

[0009] Determine a first marking point in the reference image, and determine a positioning point aligned with the first marking point in each test image through image matching;

[0010] Aligning the test images according to the positioning points in the test images, and fusing them to obtain a template image;

[0011] The grain images are compared one by one according to the template image to achieve defect detection.

[0012] Optionally, the step of determining, in each test image, a positioning point aligned with the first marking point by image matching specifically includes:

[0013] calibrating a first window image in the reference image according to a position of a first marking point in the reference image;

[0014] For each test image, determine the position of a second marking point in the test image, and calibrate a second window image in the test image according to the position of the second marking point in the test image, wherein the second window image is larger than the first window image;

[0015] Performing image matching on the second window image and the first window image, and determining an area matching the first window image in the test image as a target area;

[0016] In the target area, a positioning point in the test image that is aligned with the first marking point is determined.

[0017] Optionally, the first marking point is located at the center of the first window image, and the second marking point is located at the center of the second window image.

[0018] Optionally, the step of calibrating the second window image according to the position of the second marking point in the test image specifically includes:

[0019] Determine the size of the second window according to the preset size of the first window image and the deviation of the machine movement and camera calibration;

[0020] A second window image of the second window size is calibrated according to the position of the second marking point in the test image.

[0021] Optionally, the step of determining the position of the second marking point in the test image specifically includes:

[0022] Based on the surface image of the wafer to be inspected, determining a distance deviation between the test image and the reference image, and determining a pixel deviation according to the distance deviation and a pixel size of the test image;

[0023] The position of the second marking point in the test image is determined according to the pixel deviation and the position of the first marking point.

[0024] Optionally, the step of performing image matching on the second window image and the first window image and determining an area matching the first window image in the test image as a target area specifically includes:

[0025] Taking the first window image as a window, traverse the second window image to determine each candidate area;

[0026] For each candidate region, determining a matching degree between the candidate region and the first window image;

[0027] A target area is selected from each candidate area according to a matching degree between each candidate area and the first window image.

[0028] Optionally, the step of determining, for each candidate region, a degree of matching between the candidate region and the first window image specifically includes:

[0029] For each candidate region, according to the gradient value of each pixel in the candidate region and the gradient value of each pixel in the first window image, a gradient matching value between the candidate region and the first window image is determined by a gradient template matching method;

[0030] The matching degree between the candidate region and the first window image is determined according to the gradient matching value.

[0031] Optionally, the step of determining, for each candidate region, a degree of matching between the candidate region and the first window image specifically includes:

[0032] For each candidate region, according to the grayscale value of each pixel in the candidate region and the grayscale value of each pixel in the first window image, determine the grayscale matching value between the candidate region and the first window image by using a square difference method;

[0033] The matching degree between the candidate region and the first window image is determined according to the grayscale matching value.

[0034] Optionally, the step of acquiring the surface image of the wafer to be inspected specifically includes:

[0035] Obtaining the original images of each wafer to be inspected obtained by scanning by each machine;

[0036] Calling the camera calibration parameters of each machine, and determining the image correction matrix according to the camera calibration parameters, wherein the camera calibration parameters include the camera orthogonal angle and the flat field coefficient;

[0037] Calling the camera parameters of each machine, wherein the camera parameters include the camera resolution of each machine, the lens magnification of each machine, the distortion coefficient of each machine, and the camera size of each machine;

[0038] Correcting the original image according to the camera parameters and the image correction matrix so that the size of each pixel in the corrected original image is consistent, thereby obtaining a surface image;

[0039] A surface image of at least one wafer to be inspected among the wafers to be inspected is obtained.

[0040] Optionally, the step of comparing each grain image one by one according to the template image to realize defect detection specifically includes:

[0041] For each grain image, determining a grayscale difference image between the grain image and the template image;

[0042] According to the grayscale difference image, determining the detection result of each pixel in the grayscale difference image through a preset grayscale detection range;

[0043] The defect detection result is determined according to the detection result of each pixel in the grayscale difference image.

[0044] Optionally, the step of determining the detection result of each pixel in the grayscale difference image according to the grayscale difference image through a preset grayscale detection range specifically includes:

[0045] For each pixel in the grayscale difference image, determining whether the grayscale difference of the pixel falls within a preset grayscale detection range;

[0046] If yes, the pixel is considered defect-free as the detection result of the pixel;

[0047] If not, the defect type of the pixel is determined based on the grayscale difference of the pixel in the grayscale difference image and the size relationship of the grayscale detection range, and the detection result of the pixel is determined based on the defect type of the pixel.

[0048] Optionally, before determining, for each pixel in the grayscale difference image, whether the grayscale difference of the pixel falls within a preset grayscale detection range, the method further includes:

[0049] Determining a gradient image of the template image;

[0050] For each pixel in the grayscale difference image, the gradient value corresponding to the pixel in the gradient image is determined according to the position of the pixel in the grayscale difference image, and the grayscale detection range of the pixel is determined according to the gradient value and a preset grayscale detection range.

[0051] Optionally, the step of determining the defect type of the pixel according to the relationship between the grayscale value of the pixel in the grayscale difference image and the size of the grayscale detection range specifically includes:

[0052] When the grayscale difference of the pixel in the grayscale difference image is less than the grayscale detection range, the defect type of the pixel is a dark defect;

[0053] When the grayscale difference of the pixel in the grayscale difference image is greater than the grayscale detection range, the defect type of the pixel is a bright defect.

[0054] Optionally, the step of determining the defect detection result according to the detection result of each pixel in the grayscale difference image specifically includes:

[0055] Marking a defective area in the grain image according to a detection result of each pixel in the grayscale difference image, and determining a defect type of the defective area;

[0056] determining image features of the defective area;

[0057] According to the image features of the defect area and the defect type of the defect area, the process defect category to which the defect area belongs is determined as a defect detection result.

[0058] This specification provides a wafer inspection method, including:

[0059] Acquire a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains;

[0060] Select one grain image from each grain image as a reference image and use the other grain images as test images;

[0061] Determining an image matching position aligned with the reference image in each test image, and aligning and fusing the test images to obtain a template image;

[0062] Comparing each of the grain images one by one according to the template image to achieve defect detection;

[0063] Wherein, determining the image matching position includes:

[0064] First matching: determining a first marking point in the reference image, and determining a positioning point aligned with the first marking point in the test image through image matching as an image matching position of the test image;

[0065] If the first matching fails, a second matching is performed: by continuously reducing the reference image and the test image in the same proportion, image matching is performed between the reduced images to determine an image matching position in the test image that is aligned with the reference image.

[0066] This specification provides a wafer inspection device, including:

[0067] A first acquisition module is used to acquire a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains;

[0068] A first selection module is used to select one grain image from each grain image as a reference image and other grain images as test images;

[0069] A positioning point module, used to determine a first marking point in the reference image, and determine a positioning point aligned with the first marking point in each test image through image matching;

[0070] A template image module, used to align the test images according to the positioning points in the test images, and fuse them to obtain a template image;

[0071] The first detection module is used to compare the grain images one by one according to the template image to achieve defect detection.

[0072] This specification provides a wafer inspection device, including:

[0073] A second acquisition module is used to acquire a surface image of the wafer to be inspected, wherein the surface image includes grain images of a plurality of grains;

[0074] A second selection module is used to select one grain image from each grain image as a reference image and use other grain images as test images;

[0075] An image matching module is used to determine an image matching position aligned with the reference image in each test image, and align and fuse the test images to obtain a template image; wherein determining the image matching position includes: a first matching: determining a first marking point in the reference image, and determining a positioning point aligned with the first marking point in the test image through image matching as the image matching position of the test image; if the first matching fails, performing a second matching: by continuously reducing the reference image and the test image at the same ratio, performing image matching between the reduced images, and determining an image matching position in the test image that is aligned with the reference image;

[0076] The second defect detection module is used to compare the grain images one by one according to the template image to achieve defect detection.

[0077] This specification provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, a wafer detection method is implemented.

[0078] The present specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements a wafer detection method when executing the program.

[0079] At least one of the above-mentioned technical solutions adopted in the present specification can achieve the following beneficial effects: in a wafer inspection method provided in the present specification, by acquiring a surface image of the wafer to be inspected, and selecting a grain image as a reference image from each grain image of the surface image, and using other grain images as test images, a first marking point is determined in the reference image, and a positioning point aligned with the first marking point is determined in each test image through image matching, and each test image is aligned according to the determined positioning points in each test image, and fused to obtain a template image, and then each grain image is compared one by one based on the template image to achieve defect detection.

[0080] It can be seen from the above method that by matching the test image with the reference image, the positioning points of each test image are obtained, and then the test images are aligned and fused to obtain a template image. This method has low cost, high efficiency and high accuracy of the template image. At the same time, the template image is a defect-free grain image obtained by fusion of various grain images collected in actual production, which improves the accuracy of defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0082] Figure 1 A schematic diagram of a wafer inspection method provided in this specification;

[0083] Figure 2 A schematic diagram of determining a positioning point in a test image based on image matching provided in this specification;

[0084] Figure 3 A schematic diagram of determining a positioning point by combining the square difference method and the gradient template matching method provided in this specification;

[0085] Figure 4 A schematic diagram of a wafer inspection method provided in this specification;

[0086] Figure 5 A schematic diagram of a wafer inspection device provided in this specification;

[0087] Figure 6 A schematic diagram of a wafer inspection device provided in this specification;

[0088] Figure 7 A schematic diagram of the electronic device structure corresponding to a wafer detection method provided in this specification. DETAILED DESCRIPTION

[0089] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0090] The process of executing a wafer inspection method in this specification involves processing image data. Therefore, in the embodiments of this specification, the wafer inspection process can be executed by a server. Of course, this specification does not limit which device executes the wafer inspection process. For example, a personal computer, a mobile terminal and other devices perform wafer inspection, or in actual production, the wafer inspection process can also be executed by a machine. For the convenience of description, the following description is based on the server as the execution subject.

[0091] At present, AOI is generally used to detect defects on wafers. AOI is applied to defect detection in advanced packaging. Its working principle is to capture the grain image through a camera system, such as a charge coupled device (CCD) camera system, and after a series of algorithm processing such as an image processing card and a computer software system, it is compared with the template image to find defects and generate a report. However, with the update of semiconductor chip production technology, manual repeated screening of template images is required, which is costly and inefficient, and the template image is not an ideal defect-free grain image, resulting in poor accuracy in determining the detection results.

[0092] Based on this, this specification provides a wafer inspection method. In actual production, the process of the wafer inspection method can be executed by a machine. The machine includes a high-resolution CCD camera, an optical lens and a multi-angle color light source, that is, the machine has different lighting modes such as bright field and dark field, as well as adjustable wavelength and brightness. At the same time, a high-precision, high-speed motion platform cooperates with the camera to synchronously scan and acquire wafer images. While meeting various wafer surface defect detection needs, the template image can also be determined through image matching based on the collected images of each grain to reduce labor costs and improve efficiency.

[0093] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0094] Figure 1 A schematic diagram of a wafer inspection method provided in this specification includes the following steps:

[0095] S100: Acquire a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains.

[0096] In one or more embodiments of this specification, a wafer is a basic material in semiconductor manufacturing, usually a round sheet made of silicon, and a die refers to a single integrated circuit unit formed on a wafer through photolithography and other process steps during wafer processing. In order to determine the reference image and the test image in subsequent steps, in this step, the server needs to obtain the surface image of the wafer to be tested.

[0097] Specifically, the server can obtain a surface image of the wafer to be inspected, which includes grain images of several grains. This specification does not limit the method of obtaining the surface image, such as a scanning electron microscope, an optical microscope, etc. The surface image can also be captured by a camera system, and then the grain image can be processed by a series of algorithms such as an image processing card and a computer software system.

[0098] S102: selecting one grain image from each grain image as a reference image, and using the other grain images as test images.

[0099] In one or more embodiments of the present specification, in order to determine the positioning points for alignment in each grain image through image matching in the subsequent steps, in this step, a reference image needs to be selected from each grain image as a target for image matching.

[0100] Specifically, the server may select one grain image from each grain image obtained in step S100 as a reference image, and other grain images as test images. Among them, the technology of segmenting each grain image from the surface image can be achieved by edge detection or other mature technologies in the field. The specific method of selecting the reference image is not limited in this specification, such as random selection, selection of the first segmented grain image, etc. Of course, in the subsequent steps, the reference image is used as the target of image matching. Therefore, when selecting the reference image, the grain image that meets the selection rules can be selected as the reference image. The selection rules can be set according to actual needs, such as a grain image without large defects such as dirt marks and large scratches, that is, determining the area in the grain image where the grayscale is lower than / higher than the preset value. When the size of the area is greater than a certain value, it cannot be used as a reference image.

[0101] S104: Determine a first marking point in the reference image, and determine a positioning point aligned with the first marking point in each test image through image matching.

[0102] In one or more embodiments of the present specification, the mark point in the grain is a specific mark or test point on a single grain used to provide reference and positioning in grain testing and packaging, rather than a feature point. Feature points are usually "significant points" in an image, such as edge points, corner points, etc. Defects in grain images are often "significant points". If the matching between grain images is achieved based on feature points, whether the feature points in a partial area of ​​the grain image or the feature points in the entire image area are taken, the feature points of the "defects" in the grain image will affect the accuracy of the feature point matching between the grain images. Therefore, in order to improve the accuracy of the alignment of each test image in the subsequent steps, in this step, the server can identify and determine the mark points in each grain image, but since there may be errors in the recognition accuracy, the server can also "fine-tune" the second mark point in each test image based on the first mark point in the reference image through image matching to obtain a positioning point aligned with the first mark point.

[0103] In one or more embodiments of the present specification, the server may calibrate a first window image in the reference image according to the position of a first marker point in the reference image; then, for each test image, calibrate a second window image in the test image according to the position of a second marker point in the test image, and the second window image is larger than the first window image; finally, based on the image matching result between the second window image and the first window image, determine the positioning point in the test image that is aligned with the first marker point.

[0104] Specifically, first, the server may use the pixel point (coordinate) corresponding to the mark point (Mark) of the corresponding grain in the reference image as the first mark point, and calibrate the first window image in the reference image according to the position of the first mark point in the reference image.

[0105] At the same time, for each test image, the pixel point (coordinate) corresponding to the mark point (Mark) of the corresponding grain in the test image is used as the second mark point, and according to the position of the second mark point in the test image, a second window image is calibrated in the test image. The second window image is larger than the first window image.

[0106] It should be noted that in the surface image obtained in step S100, the position of the mark point (Mark) in the grain image may be deviated due to the machine movement and camera calibration, that is, based on the surface image, the position of the mark point identified in each grain image may be partially deviated. Therefore, in order to obtain the template image in the subsequent steps, the server aligns each test image and fuses it. In this step, the first mark point in the reference image is used as the alignment target, and the positioning point aligned with the first mark point is determined in each test image through image matching.

[0107] In one embodiment, when calibrating a window image, the positional relationship between the first marking point and the first window image is the same as the positional relationship between the second marking point and the second window image, or the positional relationship between the first marking point and the first window image is different from the positional relationship between the second marking point and the second window image, which is not limited in this specification.

[0108] In one embodiment, the present specification does not limit the positional relationship between the marking point and the window image when calibrating the window image, such as the marking point can be used as the center of the window image to calibrate the window image. In another embodiment, since the grain image includes blank parts and grain parts, and the window image is calibrated around the marking point, that is, the area around the marking point may include blank parts and grain parts, that is, for subsequent image matching, the weight of the grain part in the surrounding area is higher than the blank part. Therefore, the server can calibrate the first window image in the reference image according to the position of the first marking point in the reference image and the positional relationship between the preset marking point and the grain. The positional relationship of the first marking point in the first window image is made the same as the positional relationship between the preset marking point and the grain, so as to ensure that the first window image contains more grain parts, that is, more "grain part" information participates in the subsequent image matching between the first window image and the second window image, thereby improving the reliability and accuracy of the positioning point obtained by image matching.

[0109] Secondly, for each test image, the server can use the first window image as a window to traverse the second window image of the test image, and determine the candidate areas at each traversal position, and then for each candidate area, determine the matching degree between the candidate area and the first window image, and select the target area from each candidate area based on each matching degree. In this specification, the specific method of determining the matching degree between each candidate area and the first window image is not limited, such as the gradient template matching method, the square difference method, the Euclidean distance based on image vectorization, etc.

[0110] Finally, the server may determine, in the target area of ​​the test image, a positioning point in the test image that is aligned with the first marking point based on the positional relationship between the first marking point and the first window image.

[0111] It should be noted that, based on the gradient template matching method, determining the degree of matching between each candidate region and the first window image includes: for each candidate region, according to the gradient value of each pixel in the candidate region and the gradient value of each pixel in the first window image, determining the gradient matching value between the candidate region and the first window image as the degree of matching between the candidate region and the first window image. Based on the square difference method, determining the degree of matching between each candidate region and the first window image includes: for each candidate region, according to the grayscale value of each pixel in the candidate region and the grayscale value of each pixel in the first window image, determining the grayscale matching value between the candidate region and the first window image as the degree of matching between the candidate region and the first window image.

[0112] It should be noted that in the surface image acquired in step S100, the positions of the marking points in each grain image in the surface image obtained by identification are not completely consistent due to the machine movement and camera calibration, that is, there is a deviation in the position of the marking point in the grain image where it is located. Therefore, in this step, by matching the image of the area near the marking point, a positioning point aligned with the first marking point is determined in each test image to ensure that the reference image and / or each test image can be accurately aligned through the positioning point determined in this step.

[0113] Specific reference Figure 2 As shown, the first window image is calibrated at the position of the first marking point in the reference image, and the second window image is calibrated at the position of the second marking point in the test image, and the target area is determined by image matching between the second window image and the first window image, and based on the target area, a positioning point aligned with the first marking point is determined in the test image, wherein a pattern-filled rectangle in the reference image or the test image represents a grain portion, and the figure is only a schematic diagram, and the present specification does not limit the calibration of the first window image / second window image to only a rectangle, and can be set according to requirements.

[0114] S106: Align the test images according to the positioning points in the test images, and fuse them to obtain a template image.

[0115] In one or more embodiments of the present specification, in order to perform defect detection on each grain image in subsequent steps, in this step, each test image needs to be aligned and fused to obtain a template image according to the positioning points in each test image determined in step S104.

[0116] Specifically, the server may align the test images according to the positioning points in the test images, determine the average grayscale value of each pixel based on the aligned test images, and determine the template image according to the average grayscale value of each pixel.

[0117] Optionally, the server may align each test image with the reference image according to the positioning point in the test image and the first marking point of the reference image, and determine the average grayscale value of each pixel based on the aligned test images and the reference image, and determine the template image according to the average grayscale value of each pixel position.

[0118] It should be noted that generally, a large number of grain images are involved in the fusion, and for each pixel, the defective grayscale value is small. Therefore, even if defective grain images are involved in the fusion, the obtained template image is close to defect-free and can be used for defect detection in subsequent steps.

[0119] At the same time, in this specification, for each pixel, the defective grayscale value of the pixel in each test image can be eliminated, so as to further improve the accuracy of the template image. The specific method of eliminating defective grayscale values ​​is not limited in this specification, and can be set according to actual needs. In one or more embodiments of the specification, when the template image is fused, the normal value detection range can be determined for each pixel according to the grayscale value corresponding to the pixel in each test image, and the average grayscale value of the pixel can be determined according to the grayscale value corresponding to the pixel in the normal value detection range. Among them, the mean and standard deviation of the grayscale value of the pixel in each test image can be determined, and the normal value detection range can be determined according to the mean and standard deviation. If the mean is Mean and the standard deviation is std, the normal value detection range can be (Mean-n*std)~(Mean+n*std), n is a positive integer, which can be set according to actual needs. Of course, the specific method of determining the normal value detection range is not limited in this specification. In one or more embodiments of the specification, when the template image is obtained by fusion, for each pixel, the probability distribution of the grayscale value of the pixel in each test image is determined, the grayscale values ​​with a probability lower than a preset threshold are removed, and the average grayscale value of the pixel is determined based on each grayscale value with a probability greater than the preset threshold in the probability distribution. The preset threshold can be set according to actual needs. Of course, when the template image is obtained by fusion, the reference image can also participate in the alignment of each test image.

[0120] It should be noted that in order to facilitate defect detection of each grain image based on the template image in the subsequent steps, the size of the template image can be consistent with the grain image. Therefore, when determining the template image based on the aligned test images, a test image can be randomly selected, and for each pixel in the selected test image, the grayscale value of the pixel in the reference image and other test images is determined, and then the average grayscale value of the pixel is obtained, and the template image is determined based on the average grayscale value of each pixel.

[0121] Of course, the alignment point position can also be determined based on the position of the first marking point or the positioning point, and the empty template image can be determined based on the alignment point position and the size of the grain image, and for each pixel in the empty template image, the grayscale value of the pixel in the reference image and each test image is determined to obtain the average grayscale value of the pixel, and then the empty template image is filled based on the average grayscale value of each pixel to obtain the template image, wherein the specific method of determining the alignment point position is not limited, such as taking the average or median according to the coordinates of each positioning point or the first marking point to obtain the alignment point position.

[0122] S108: comparing the grain images one by one according to the template image to achieve defect detection.

[0123] In one or more embodiments of the present specification, in this step, defect detection may be performed on the grain image of each grain in the wafer to be inspected according to the template image determined in step S106.

[0124] Specifically, first, the server may determine, for each grain image of the grain, a grayscale difference image between the grain image and the template image.

[0125] Secondly, for each pixel in the grayscale difference image, determine whether the grayscale difference of the pixel falls within the preset grayscale detection range. If the grayscale difference of the pixel falls within the preset grayscale detection range, the pixel is considered to be defect-free as the detection result of the pixel. If the grayscale difference of the pixel does not fall within the preset grayscale detection range, the defect type of the pixel is determined, and then the detection result of the pixel is determined based on the defect type.

[0126] Finally, based on the detection results of each pixel in the grayscale difference image, mark the defect area in the grain image, and determine the defect type and image features of the defect area. According to the defect type and image features of the defect area, determine the process defect category to which the defect area belongs, and determine the defect detection result of the grain according to the process defect category of each defect area. Among them, the image features include the shape, length, width, area, etc. of the defect area. The process defect category can be divided into large defects, scratches, etc. For example, when the length of the defect area exceeds the preset threshold, the defect area is a large defect. According to the size relationship between the grayscale difference of the pixel and the grayscale detection range, determine the defect type of the pixel, as follows:

[0127] When the grayscale difference of the pixel in the grayscale difference image is less than the preset grayscale detection range, the defect type of the pixel is a dark defect. When the grayscale difference of the pixel in the grayscale difference image is greater than the preset grayscale detection range, the defect type of the pixel is a bright defect.

[0128] It should be noted that the grayscale value range is 0 to 255. When determining the grayscale difference image, in order to facilitate the observation of the defects of each pixel, the grain image and the template image can be subtracted, and then the grayscale value of each pixel obtained after the subtraction is added with a fixed grayscale value (such as 128, which is only used for example and is not a limitation on the fixed grayscale value). If the grayscale difference after adding the grayscale value of each pixel to the fixed grayscale value exceeds the grayscale value range, the endpoint grayscale value adjacent to the grayscale value of the pixel can be selected in the grayscale value range as the grayscale difference of the pixel, and then the grayscale difference image of the grain can be obtained based on the grayscale difference of each pixel.

[0129] In the above method, a partial area (first window image) around the first marking point is determined in the reference image, and a partial area (second window image) around the second marking point in each test image is searched for the first marking point, and then through image matching between the first window image and the second window image, a positioning point aligned with the first marking point is found from the second window image, that is, only matching between partial areas is required. Therefore, the size of each grain image determined in the embodiment of this specification does not need to be completely consistent, that is, there is no need to consider the size consistency of each grain image, that is, each grain image obtained from the wafer to be tested can have different sizes, thereby avoiding the workload of image processing such as "image scaling, cropping, size matching", that is, reducing complexity. And the matching between partial areas reduces the workload of image matching compared to the full image matching. The server then aligns the test images based on the obtained positioning points and fuses them to obtain a template image. After the template image is fused, the defective grayscale values ​​can be further eliminated for each pixel, so that the average grayscale value of the pixel is close to being defect-free, that is, the fused template image is a defect-free grain image, and then when defect detection is performed on each grain image according to the template image, the cost is low, the efficiency is high, and the accuracy is high.

[0130] Among them, the first marking point / the second marking point is a marking point (mark) in the grain image, and the marking point (mark) is a physical feature that can be accurately located in the integrated circuit production process. The alignment between the grain images is achieved through the pixel points corresponding to the marking point (mark) in the grain image, and the deviation of the position of the marking point (mark) in the grain image caused by machine movement and camera calibration is eliminated, so that the positioning process is convenient and accurate.

[0131] In a preferred embodiment, the first window image is calibrated with the first marking point as the center, and the second window image is calibrated with the second marking point as the center. In actual application, the calibration provided by this embodiment is convenient and the subsequent related image matching calculations are simple.

[0132] In addition, in one or more embodiments of the present specification, when selecting a target area from each candidate area in step S104, the server may determine a comprehensive matching degree for each candidate area based on a gradient matching value between the candidate area and the first window image, and a grayscale matching value between the candidate area and the first window image, and then select the target area based on the comprehensive matching degree. The present specification does not limit the specific method of determining the comprehensive matching degree, such as taking the sum or weighted sum of the gradient matching value and the grayscale matching value.

[0133] It should be noted that in the combination of the square difference method and the gradient template matching method, the comprehensive matching degree of each candidate area with the first window image is considered from the two perspectives of gradient and grayscale, and then the target area is selected based on each comprehensive matching degree, which is more accurate. However, since the gradient template matching method requires additional gradient calculation, more computing resources are required. Therefore, this specification also provides a method of first using the square difference method to determine the grayscale matching area, and then using the gradient template matching method to determine the target area, as follows:

[0134] In one or more embodiments of the present specification, a grayscale matching area can be first selected from each candidate area through the square difference method, and then a third window image can be calibrated at the position of the first marking point of the reference image. Based on the third window image and the grayscale matching area, a target area can be selected from each sub-area in the grayscale matching area through a gradient template matching method.

[0135] Specifically, first, the server can use the first window image calibrated in step S104 as a window, traverse the second window image, and determine the candidate areas at each traversed position, and for each candidate area, according to the grayscale value of each pixel in the candidate area and the grayscale value of each pixel in the first window image, determine the grayscale matching value of the candidate area and the first window image through the square difference method. According to each grayscale matching value, a grayscale matching area is selected from each candidate area.

[0136] Secondly, the server can mark the third window image at the position of the first mark point in the reference image, and use the third window image as a window to traverse the grayscale matching area to determine the sub-areas corresponding to each traversal position, wherein the third window image is smaller than the first window image. The positional relationship between the third window image and the first mark point can refer to the "positional relationship between the first mark point and the first window image" in step S104.

[0137] Finally, the server can determine the matching degree between the sub-region and the third window image by using a gradient template matching method for each sub-region in the grayscale matching region according to the gradient value of each pixel in the sub-region and the gradient value of each pixel in the third window image. According to the matching degree between each sub-region and the third window image, a target region is selected from each sub-region.

[0138] It should be noted that, since the gradient template matching method requires additional regional gradient calculation, while the square difference method only requires subtraction and squaring of the grayscale values ​​of each pixel, the square difference method is first used to select a grayscale matching area in each candidate area, and then based on a third window image that is smaller than the first window image, the gradient template matching method is performed with the grayscale matching area, which can reduce the use of computing resources while ensuring the accuracy of determining the target area based on the two angles of grayscale and gradient. Of course, this specification does not limit the order of using the square difference method and the gradient template matching method when determining the target area, and the gradient template matching method can also be used first and then the gradient template matching method.

[0139] Specific reference Figure 3 As shown, following the above example, the first image matching is to determine the grayscale matching area through the square difference method. Secondly, the third window image is calibrated at the position of the first marking point in the reference image, and the second image matching is performed through the gradient template matching method based on the grayscale matching area and the third window image to determine the target area. Finally, based on the target area, a positioning point aligned with the first marking point is determined in the test image.

[0140] In addition, in one or more embodiments of the present specification, ideally, the distance between the test image and the reference image should be an integer multiple of the grain image size. Therefore, the server can determine the distance deviation between the test image and the reference image for each test image, and determine the pixel deviation based on the distance deviation and the pixel size of the test image, and then determine the position of the second marking point in the test image based on the pixel deviation and the position of the first marking point in the reference image, as follows:

[0141] Specifically, the server can determine the distance deviation between the test image and the reference image for each test image based on the surface image of the wafer to be inspected, and determine the pixel deviation based on the distance deviation and the pixel size of the test image, and then determine the position of the second mark point in the test image based on the pixel deviation and the position of the first mark point.

[0142] The distance deviation between the test image i and the reference image 0 is determined as follows:

[0143] N x =round[(x i -x 0 ) / pitch x ]

[0144] N y =round[(y i -y 0 ) / pitchy ]

[0145] Δx=x i -x 0 -N x *pitch x

[0146] Δy=y i -y 0 -N y *pitch y

[0147] Among them, N x is the number of grain images between the test image i and the reference image 0 in the x dimension, N y is the number of grain images between the test image i and the reference image 0 in the y dimension. (x i ,y i ) is the physical coordinate of the test image i in the surface image, (x 0 ,y 0 ) is the physical coordinate of the reference image 0 in the surface image. x is the size of the grain image in the x dimension, pitch y is the size of the grain image in the y dimension; round(*) is the rounding function. Δx is the distance deviation between the test image i and the reference image 0 in the x dimension; Δy is the distance deviation between the test image i and the reference image 0 in the y dimension.

[0148] According to the distance deviation and the pixel size of the test image, the pixel deviation is determined, and then according to the pixel deviation and the position of the first marking point, the position of the second marking point in the test image is determined as follows:

[0149] R i =R 0 -Δy / pixel y

[0150] C i =C 0 +Δx / pixel x

[0151] Among them, (R i ,C i ) is the pixel coordinate of the second marking point in the test image i; (R 0 ,C 0 ) is the pixel coordinate of the first marking point in the reference image 0. x is the size of the pixel in the x dimension, pixel yis the size of the pixel size in the y dimension. The pixel size is determined during camera calibration, that is, pixel size = (camera size / camera resolution) / lens magnification. The pixel size of each grain image is consistent.

[0152] It should be noted that the pixel coordinates of the marker point are R i ,C i , are the coordinates in the x-dimension and y-dimension respectively. Since in the physical coordinate system, the x-dimension is positive on the right and negative on the left, and the y-dimension is positive at the top and negative at the bottom, in the image coordinate system, the x-dimension is positive on the right and negative on the left, and the y-dimension is negative at the top and positive at the bottom, that is, the distance deviation from the physical coordinate to the pixel deviation of the pixel coordinate in the y-dimension should differ by one sign.

[0153] Based on the distance deviation between the test image and the reference image, the position of the second marking point in the test image is obtained, and the process of determining the positioning point in the test image is as follows:

[0154] First, the server can calibrate a first window image in the reference image according to the position of a first marking point in the reference image, and for each test image, calibrate a second window image in the test image according to a second marking point in the test image, wherein the second window image is larger than the first window image.

[0155] Secondly, the server may perform image matching on the second window image and the first window image, and determine an area matching the first window image in the test image as a target area;

[0156] Finally, the server may determine, in the target area of ​​the test image, a positioning point in the test image that is aligned with the first marking point based on the positional relationship between the first marking point and the first window image.

[0157] In addition, in step S104, when the server calibrates the second window image in step S104, it can obtain the second window size based on the size of the first window image plus the deviation of the machine movement and the camera calibration, and for each test image, calibrate the second window image of the second window size according to the position of the second mark point in the test image.

[0158] In addition, when the surface image of the wafer to be inspected is obtained in step S100, the distortion of the image and the differences in camera resolution and lens magnification between the machines can be corrected based on the camera calibration parameters of each machine, so that the actual size represented by the images collected by each machine is consistent. In this way, if the wafers to be inspected are of the same product, that is, the wafers to be inspected have the same pattern, a template image obtained based on the surface image of a wafer to be inspected can be used as the defect detection of the grain image in each wafer to be inspected, thereby reducing the workload of repeatedly determining the template image.

[0159] In one or more embodiments of the present specification, the server can obtain the original image of each wafer to be inspected obtained by scanning each machine, and call the camera calibration parameters of each machine, and determine the image correction matrix according to the camera calibration parameters, wherein the camera calibration parameters include the camera orthogonal angle and the flat field coefficient. The camera parameters of each machine are called, and the camera parameters include the camera resolution of each machine, the lens magnification of each machine, the distortion coefficient of each machine, and the camera size of each machine. Then, based on the camera parameters and the image correction matrix, the original image of each wafer to be inspected is corrected so that the size of each pixel in the corrected original image is consistent, and a surface image is obtained. At least the surface image of one wafer to be inspected among the wafers to be inspected is obtained for determining the template image in the subsequent steps.

[0160] It should be noted that in actual production, since the machine includes a high-resolution CCD camera, an optical lens, and a multi-angle color light source, that is, the machine has different lighting modes such as bright field and dark field, and the wavelength and brightness are adjustable. Therefore, in a preferred embodiment, when acquiring the surface image of each wafer, it is necessary to collect it under the same lighting mode, the same wavelength, and the same brightness.

[0161] In addition, in step S108, when performing defect detection on each pixel in the grayscale difference image based on the preset grayscale detection range, since there is a gradient change relationship between each pixel in the template image, the server can determine the grayscale detection range of each pixel based on the gradient value of each pixel in the gradient image of the template image, as follows:

[0162] In one or more embodiments of the present specification, the server may determine the gradient image of the template image in step S106, and for each test image, determine the grayscale difference image between the test image and the template image, and then for each pixel in the grayscale difference image, determine the gradient value corresponding to the pixel in the gradient image of the template image according to the position of the pixel in the grayscale difference image, and determine the grayscale detection range of the pixel based on the gradient value and a preset grayscale detection range.

[0163] For each pixel G in the grayscale difference image x,y , based on the preset grayscale detection range, determine the detection result of the pixel as follows:

[0164] The preset grayscale detection range is: G dark ~G bright

[0165] Determine the gradient image G of the template image grad , then determine the gradient value G corresponding to the pixel in the gradient image grad (x, y), based on the gradient value and the preset grayscale detection range, the grayscale detection range of the pixel is determined to be Gdark -k*G grad (x,y)~G bright +k*G grad (x,y).

[0166] Among them, G dark is the preset dark defect threshold, G bright is the preset bright defect threshold, and k is the gradient coefficient, which can be set according to actual needs.

[0167] Figure 4 A schematic diagram of a wafer inspection method provided in this specification includes the following steps:

[0168] S400: Acquire a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains.

[0169] S402: Select one grain image from each grain image as a reference image, and use the other grain images as test images.

[0170] S404: Determine the image matching position aligned with the reference image in each test image, and align and fuse the test images to obtain a template image. Determine the image matching position includes: first matching: determine a first marking point in the reference image, determine a positioning point aligned with the first marking point in the test image through image matching, and use it as the image matching position of the test image; if the first matching fails, perform a second matching: continuously reduce the reference image and the test image by the same proportion, perform image matching between the reduced images, and determine the image matching position in the test image that is aligned with the reference image.

[0171] S406: comparing the grain images one by one according to the template image to achieve defect detection.

[0172] In the above, the relevant contents of step S400, step S402, the first matching in step S404 and step S406 are referred to Figure 1 The contents of each step in the provided wafer detection method are not repeated here.

[0173] In step S406, the server can determine the image matching position in each test image that is aligned with the reference image by continuously reducing the reference image and each test image in the same proportion and performing image matching between the reduced images. Based on the image matching positions of each test image, a template image is obtained by fusion. Defect detection is performed on each grain image according to the template image. That is, by matching each test image with the reference image respectively, an image matching position that matches the reference image is found.

[0174] The above is a wafer detection method provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding wafer detection device, such as Figure 5 shown.

[0175] A first acquisition module 500 acquires a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains;

[0176] A first selection module 501 selects one grain image from each grain image as a reference image and uses other grain images as test images;

[0177] A positioning point module 502 is configured to determine a first marking point in the reference image, and to determine a positioning point aligned with the first marking point in each test image through image matching;

[0178] The template image module 503 aligns the test images according to the positioning points in the test images, and fuses them to obtain a template image;

[0179] The first detection module 504 compares the grain images one by one according to the template image to achieve defect detection.

[0180] Optionally, the positioning point module 502 is specifically used to calibrate a first window image in the reference image according to the position of the first marking point in the reference image; for each test image, determine the position of the second marking point in the test image, and calibrate a second window image in the test image according to the position of the second marking point in the test image, wherein the second window image is larger than the first window image; perform image matching on the second window image and the first window image, and determine an area in the test image that matches the first window image as a target area; and in the target area, determine a positioning point in the test image that is aligned with the first marking point.

[0181] Optionally, the positioning point module 502 may also be used to locate the first marking point at the center of the first window image and the second marking point at the center of the second window image.

[0182] Optionally, the positioning point module 502 can also be used to determine the second window size based on the preset size of the first window image and the deviation of the machine movement and camera calibration; and calibrate the second window image of the second window size based on the position of the second marking point in the test image.

[0183] Optionally, the positioning point module 502 can also be used to determine the distance deviation between the test image and the reference image based on the surface image of the wafer to be inspected, and determine the pixel deviation according to the distance deviation and the pixel size of the test image; determine the position of the second marking point in the test image according to the pixel deviation and the position of the first marking point.

[0184] Optionally, the positioning point module 502 is specifically used to traverse the second window image with the first window image as a window to determine each candidate area; for each candidate area, determine the matching degree between the candidate area and the first window image; and select the target area from the candidate areas based on the matching degree between the candidate areas and the first window image.

[0185] Optionally, the positioning point module 502 can also be used to determine, for each candidate area, a gradient matching value between the candidate area and the first window image based on the gradient value of each pixel in the candidate area and the gradient value of each pixel in the first window image through a gradient template matching method; and determine the degree of matching between the candidate area and the first window image based on the gradient matching value.

[0186] Optionally, the positioning point module 502 can also be used to determine, for each candidate area, a grayscale matching value between the candidate area and the first window image based on the grayscale value of each pixel in the candidate area and the grayscale value of each pixel in the first window image by a square difference method; and determine the degree of matching between the candidate area and the first window image based on the grayscale matching value.

[0187] Optionally, the first acquisition module 500 is specifically used to obtain the original image of each wafer to be inspected obtained by scanning each machine; call the camera calibration parameters of each machine, and determine the image correction matrix according to the camera calibration parameters, the camera calibration parameters include the camera orthogonal angle and the flat field coefficient; call the camera parameters of each machine, wherein the camera parameters include the camera resolution of each machine, the lens magnification of each machine, the distortion coefficient of each machine and the camera size of each machine; according to the camera parameters and the image correction matrix, correct the original image so that the size of each pixel in the corrected original image is consistent, and obtain a surface image; obtain the surface image of at least one wafer to be inspected among the wafers to be inspected.

[0188] Optionally, the first detection module 504 is specifically used to determine, for each grain image, a grayscale difference image between the grain image and the template image; based on the grayscale difference image, determine the detection result of each pixel in the grayscale difference image through a preset grayscale detection range; and determine the defect detection result based on the detection result of each pixel in the grayscale difference image.

[0189] Optionally, the first detection module 504 is specifically used to determine, for each pixel in the grayscale difference image, whether the grayscale difference of the pixel falls within a preset grayscale detection range; if so, the pixel is considered to be defect-free as the detection result of the pixel; if not, the defect type of the pixel is determined based on the relationship between the grayscale difference of the pixel in the grayscale difference image and the size of the grayscale detection range, and the detection result of the pixel is determined based on the defect type of the pixel.

[0190] Optionally, the first detection module 504 is specifically used to, when the grayscale difference of the pixel in the grayscale difference image is less than the grayscale detection range, the defect type of the pixel is a dark defect; when the grayscale difference of the pixel in the grayscale difference image is greater than the grayscale detection range, the defect type of the pixel is a bright defect.

[0191] Optionally, the first detection module 504 is specifically used to mark the defective area in the grain image and determine the defect type of the defective area according to the detection results of each pixel in the grayscale difference image; determine the image features of the defective area; and determine the process defect category to which the defective area belongs according to the image features of the defective area and the defect type of the defective area as the defect detection result.

[0192] The above is a wafer detection method provided in one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding wafer detection device, such as Figure 6 shown.

[0193] A second acquisition module 600 acquires a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains;

[0194] A second selection module 601 selects one grain image from each grain image as a reference image and uses other grain images as test images;

[0195] The image matching module 602 determines the image matching position aligned with the reference image in each test image, and aligns and fuses the test images to obtain a template image; wherein determining the image matching position includes: a first matching: determining a first marking point in the reference image, and determining a positioning point aligned with the first marking point in the test image through image matching as the image matching position of the test image; if the first matching fails, performing a second matching: by continuously reducing the reference image and the test image at the same ratio, performing image matching between the reduced images, and determining the image matching position in the test image that is aligned with the reference image;

[0196] The second defect detection module 603 compares the grain images one by one according to the template image to achieve defect detection.

[0197] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 or Figure 4 A wafer inspection method is provided.

[0198] This manual also provides Figure 7 The schematic structure diagram of the electronic device shown in FIG. Figure 7 As mentioned above, at the hardware level, the device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 or Figure 4 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0199] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0200] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0201] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0202] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0203] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0204] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0205] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0206] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0207] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0208] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0209] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0210] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0211] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0212] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0213] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A wafer detection method, characterized in that: include: Acquire a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains; Select one grain image from each grain image as a reference image and use the other grain images as test images; Determine a first marking point in the reference image, and determine a positioning point aligned with the first marking point in each test image through image matching; Aligning the test images according to the positioning points in the test images, and fusing them to obtain a template image; The grain images are compared one by one according to the template image to achieve defect detection.

2. The method according to claim 1, characterized in that The step of determining, in each test image, a positioning point aligned with the first marking point by image matching specifically includes: According to the position of the first marking point in the reference image and the positional relationship between the preset marking point and the grain, calibrating a first window image in the reference image; For each test image, determine the position of a second marking point in the test image, and calibrate a second window image in the test image according to the position of the second marking point in the test image, wherein the second window image is larger than the first window image; Performing image matching on the second window image and the first window image, and determining an area matching the first window image in the test image as a target area; In the target area, a positioning point in the test image that is aligned with the first marking point is determined.

3. The method according to claim 2, characterized in that The first marking point is located at the center of the first window image, and the second marking point is located at the center of the second window image.

4. The method according to claim 2, characterized in that The step of calibrating the second window image according to the position of the second marking point in the test image specifically includes: The size of the second window is determined according to the preset size of the first window image and the deviation of the machine movement and camera calibration.

5. The method according to claim 2, characterized in that The step of determining the position of the second marking point in the test image specifically includes: Based on the surface image of the wafer to be inspected, determining a distance deviation between the test image and the reference image, and determining a pixel deviation according to the distance deviation and a pixel size of the test image; The position of the second marking point in the test image is determined according to the pixel deviation and the position of the first marking point.

6. The method according to claim 2, characterized in that The step of performing image matching between the second window image and the first window image and determining an area matching the first window image in the test image as a target area specifically includes: Taking the first window image as a window, traverse the second window image to determine each candidate area; For each candidate region, determining a matching degree between the candidate region and the first window image; A target area is selected from each candidate area according to a matching degree between each candidate area and the first window image.

7. The method according to claim 6, characterized in that The step of determining, for each candidate region, a degree of matching between the candidate region and the first window image specifically comprises: Determine a gradient matching value between the candidate area and the first window image by a gradient template matching method according to the gradient value of each pixel in the candidate area and the gradient value of each pixel in the first window image; The matching degree between the candidate region and the first window image is determined according to the gradient matching value.

8. The method according to claim 6, characterized in that The step of determining, for each candidate region, a degree of matching between the candidate region and the first window image specifically comprises: For each candidate region, according to the grayscale value of each pixel in the candidate region and the grayscale value of each pixel in the first window image, determine the grayscale matching value between the candidate region and the first window image by using a square difference method; The matching degree between the candidate region and the first window image is determined according to the grayscale matching value.

9. The method according to claim 1, characterized in that The step of obtaining the surface image of the wafer to be inspected specifically includes: Obtaining the original images of each wafer to be inspected obtained by scanning by each machine; Calling the camera calibration parameters of each machine, and determining the image correction matrix according to the camera calibration parameters, wherein the camera calibration parameters include the camera orthogonal angle and the flat field coefficient; Calling the camera parameters of each machine, wherein the camera parameters include the camera resolution of each machine, the lens magnification of each machine, the distortion coefficient of each machine, and the camera size of each machine; Correcting the original image according to the camera parameters and the image correction matrix so that the size of each pixel in the corrected original image is consistent, thereby obtaining a surface image; A surface image of at least one wafer to be inspected among the wafers to be inspected is obtained.

10. The method according to claim 1, characterized in that The step of comparing the grain images one by one according to the template image to realize defect detection specifically includes: For each grain image, determining a grayscale difference image between the grain image and the template image; According to the grayscale difference image, determining the detection result of each pixel in the grayscale difference image through a preset grayscale detection range; The defect detection result is determined according to the detection result of each pixel in the grayscale difference image.

11. The method according to claim 10, characterized in that The step of determining the detection result of each pixel in the grayscale difference image through a preset grayscale detection range according to the grayscale difference image specifically includes: For each pixel in the grayscale difference image, determining whether the grayscale difference of the pixel falls within a preset grayscale detection range; If yes, the pixel is considered defect-free as the detection result of the pixel; If not, the defect type of the pixel is determined based on the grayscale difference of the pixel in the grayscale difference image and the size relationship of the grayscale detection range, and the detection result of the pixel is determined based on the defect type of the pixel.

12. The method according to claim 11, characterized in that Before determining, for each pixel in the grayscale difference image, whether the grayscale difference of the pixel falls within a preset grayscale detection range, the method further includes: Determining a gradient image of the template image; For each pixel in the grayscale difference image, the gradient value corresponding to the pixel in the gradient image is determined according to the position of the pixel in the grayscale difference image, and the grayscale detection range of the pixel is determined according to the gradient value and a preset grayscale detection range.

13. The method according to claim 12, characterized in that The step of determining the defect type of the pixel according to the grayscale value of the pixel in the grayscale difference image and the size relationship of the grayscale detection range specifically includes: When the grayscale difference of the pixel in the grayscale difference image is less than the grayscale detection range, the defect type of the pixel is a dark defect; When the grayscale difference of the pixel in the grayscale difference image is greater than the grayscale detection range, the defect type of the pixel is a bright defect.

14. The method according to claim 11, characterized in that The step of determining the defect detection result according to the detection result of each pixel in the grayscale difference image specifically includes: Marking a defective area in the grain image according to a detection result of each pixel in the grayscale difference image, and determining a defect type of the defective area; determining image features of the defective area; According to the image features of the defect area and the defect type of the defect area, the process defect category to which the defect area belongs is determined as a defect detection result.

15. A wafer inspection method, characterized in that: include: Acquire a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains; Select one grain image from each grain image as a reference image and use the other grain images as test images; Determining an image matching position aligned with the reference image in each test image, and aligning and fusing the test images to obtain a template image; Comparing each of the grain images one by one according to the template image to achieve defect detection; Wherein, determining the image matching position includes: First matching: determining a first marking point in the reference image, and determining a positioning point aligned with the first marking point in the test image through image matching as an image matching position of the test image; If the first matching fails, a second matching is performed: by continuously reducing the reference image and the test image in the same proportion, image matching is performed between the reduced images to determine an image matching position in the test image that is aligned with the reference image.

16. A wafer inspection device, characterized in that: include: A first acquisition module is used to acquire a surface image of a wafer to be inspected, wherein the surface image includes grain images of a plurality of grains; A first selection module is used to select one grain image from each grain image as a reference image and other grain images as test images; A positioning point module, used to determine a first marking point in the reference image, and determine a positioning point aligned with the first marking point in each test image through image matching; A template image module, used to align the test images according to the positioning points in the test images, and fuse them to obtain a template image; The first detection module is used to compare the grain images one by one according to the template image to achieve defect detection.

17. A wafer inspection device, characterized in that: include: A second acquisition module is used to acquire a surface image of the wafer to be inspected, wherein the surface image includes grain images of a plurality of grains; A second selection module is used to select one grain image from each grain image as a reference image and use other grain images as test images; An image matching module is used to determine an image matching position aligned with the reference image in each test image, and align and fuse the test images to obtain a template image; wherein determining the image matching position includes: a first matching: determining a first marking point in the reference image, and determining a positioning point aligned with the first marking point in the test image through image matching as the image matching position of the test image; if the first matching fails, performing a second matching: by continuously reducing the reference image and the test image at the same ratio, performing image matching between the reduced images, and determining an image matching position in the test image that is aligned with the reference image; The second defect detection module is used to compare the grain images one by one according to the template image to achieve defect detection.

18. A computer-readable storage medium, characterized in that: The storage medium contains a computer program, and when the computer program is executed by a processor, the method described in any one of claims 1 to 15 is implemented.

19. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the method according to any one of claims 1 to 15 is implemented when the processor executes the program.

Citation Information

Patent Citations

  • ROI mark point matching method based on intravascular unltrasound image

    CN104537645A

  • Wafer defect detection method based on characteristic matching

    CN106600600A

  • Image registration method and device

    CN107146243A

  • Visible light and infrared camera combined calibration method based on mutual information registration

    CN110969669A

  • Wafer defect detection method and application

    CN115564723A

Cited By

  • Image matching method, defect detection method and storage medium

    CN120765626A

  • Wafer defect detection method and computer program product

    CN120823157A

  • Chip surface defect detection method, electronic equipment and readable medium

    CN121033048A

  • Wafer defect detection method and computer program product

    CN121236454A

  • Wafer side surface defect detection method and system, and generation method of reference template group of wafer side surface defect detection system

    CN121280449A