Wafer notch detection method

CN122928779APending Publication Date: 2026-10-16KINGSEMI CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611100366.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]上述方式中,通常由人工裁切模板,以及设置匹配时的相似度阈值;然而,一旦模板选取存在偏差,或者晶圆缺口因制造公差或成像偏差发生形态变化,匹配准确率将急剧下降;匹配阈值的设定精确度依赖人工经验,阈值偏高易漏检、偏低易误报,影响检测精度及效率;此外,当工艺变更时,也需重新裁剪模板并调整阈值,影响生产效率

Benefits of technology

[0017] Compared with existing technologies, the wafer notch detection method provided in this application can adaptively, quickly and accurately identify and locate notches based on image features: by sampling the average grayscale values ​​of adjacent areas on the unfolded image through a sampling window, the wafer edge is automatically located, replacing traditional methods such as template matching or Hough transform; on this basis, the position and angle of the notch are obtained by detecting grayscale jump points row by row. The entire process does not require manual template trimming or setting of matching thresholds, effectively avoiding missed and false detections caused by template selection deviations, improper threshold settings, etc., thus improving detection accuracy; in addition, it can be used under different wafer types, different processes and different imaging conditions without re-trimming the template or setting matching thresholds, which has good versatility and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928779A_ABST
    Figure CN122928779A_ABST
Patent Text Reader

Abstract

The application relates to a wafer gap detection method, which comprises the following steps: acquiring a gray-scale image of a wafer, and dividing a wafer region at the gray-scale image; defining a ring-shaped region at the edge of the wafer region; converting the polar coordinates of the pixels in the ring-shaped region into rectangular coordinates, so that the ring-shaped region is converted into an unfolded graph; sequentially collecting the gray-scale mean values of the pixels in each region on the unfolded graph through a sampling window; calculating the difference value of the gray-scale mean values between adjacent regions; when the difference value is greater than a first preset value, a target region is acquired; calculating the gray-scale difference value between adjacent pixels in the target region row by row, and if the gray-scale difference value is greater than a second preset value, the current pixel is recorded as a sampling point; and based on the coordinates of the sampling point, the position information of the gap is acquired; the application can adaptively, quickly and accurately identify and position the gap based on image features, does not need manual template cutting or matching threshold setting, and improves the detection precision and production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of semiconductor manufacturing, specifically to a wafer notch detection method. Background Technology

[0002] In semiconductor manufacturing, wafer positioning is a crucial prerequisite for processes such as photolithography, etching, and thin film deposition, and its accuracy directly affects chip yield. Wafers are positioned by detecting and identifying notches at their edges.

[0003] In related technologies, template matching is usually used to locate the notch; that is, an image containing the wafer notch is pre-extracted from a standard image as a template, and then the template is traversed and searched on the image to be detected. The similarity between the template and the gray-scale distribution of the current region is calculated, and the position with the highest similarity is determined as the location of the target.

[0004] In the above methods, templates are usually cut manually, and similarity thresholds are set during matching. However, if there is a deviation in template selection, or if the wafer notch changes shape due to manufacturing tolerances or imaging deviations, the matching accuracy will drop sharply. The accuracy of setting the matching threshold depends on human experience. If the threshold is too high, it is easy to miss detections, and if it is too low, it is easy to make false alarms, affecting detection accuracy and efficiency. In addition, when the process changes, the template must be cut again and the threshold adjusted, which affects production efficiency. Summary of the Invention

[0005] The technical problem to be solved by this application is to provide a wafer notch detection method that can adaptively and quickly and accurately identify and locate notches based on image features, without the need for manual template cutting or setting matching thresholds, thereby improving detection accuracy and production efficiency.

[0006] According to an embodiment of this application, a wafer notch detection method is provided, comprising: Obtain a grayscale image of the wafer, and delineate the wafer region in the grayscale image; A ring-shaped region is defined at the edge of the wafer region; the polar coordinates of the pixels in the ring-shaped region are converted to rectangular coordinates, so that the ring-shaped region is converted into an unfolded image; The average grayscale value of pixels in each region is collected sequentially through the sampling window on the unfolded image; Calculate the difference in the mean grayscale values ​​between adjacent regions; when the difference is greater than a first preset value, obtain the target region; Calculate the grayscale difference between adjacent pixels in the target area line by line. If the grayscale difference is greater than a second preset value, record the current pixel as a sampling point. Based on the coordinates of the sampling points, the location information of the gap is obtained.

[0007] In one implementation, the method for obtaining the target region is as follows: In the unfolded image, the total gray value of each row of pixels is calculated row by row, and the ordinate y1 of the row with the smallest total gray value is obtained; Within the sampling window, obtain the ordinate y2 of the pixel with the smallest gray value in each column of pixels; Take the average of the ordinates y1 and y2 as the edge ordinate Y; The target region is defined as the area between the row containing the edge's ordinate Y and the upper edge of the unfolded diagram.

[0008] In one implementation, the position and angle of the notch are obtained based on the coordinates of the sampling points, including: Remove edge points from the sampling points; Remove outliers from the sampling points; Calculate the mean X of the remaining sampling points' x-coordinates, and use the mean X and the edge's y-coordinate Y as the position coordinates (X, Y) of the gap. The mean value X is transformed into polar coordinates to obtain the angular position of the notch on the wafer.

[0009] In one implementation, removing edge points from the sampling points includes: Calculate the distance L between the sampling points with the same ordinate; If the distance L is within the first range, the current sampling point pair is determined to be a valid point and is retained; If the distance L exceeds the first range, the current sampling point pair is determined to be an edge point and is removed.

[0010] In one implementation, removing outliers from the sampling points includes: Each sampling point has a neighborhood defined with itself as the center and a preset radius ε. Obtain the number M of sampling points within the neighborhood; If the quantity M is greater than or equal to a third preset value, the current sampling point is determined to be a core point and is retained. If the quantity M is less than the third preset value, the current sampling point is determined to be an outlier and is removed.

[0011] In one embodiment, acquiring a grayscale image of a wafer and defining the wafer region within the grayscale image includes: Obtain the grayscale value G1 of the pixels located at the edge of the grayscale image, and obtain the grayscale value G2 of the pixels located at the center of the grayscale image; Based on the grayscale value G1 and the grayscale value G2, the threshold t of the wafer region is obtained; Based on the threshold t, the wafer region is divided in the grayscale image.

[0012] In one implementation, the wafer region is segmented in the grayscale image based on the threshold t, including: In the grayscale image, pixels with grayscale values ​​greater than or equal to the threshold t are assigned a first value, and pixels with grayscale values ​​less than the threshold t are assigned a second value. The region where the pixels assigned the first value are located is taken as the wafer region.

[0013] In one implementation, converting the polar coordinates of pixels in the annular region to Cartesian coordinates, thereby converting the annular region into a unfolded image, includes: Obtain the center coordinates (C) of the wafer region. x C y and radius R; Based on the following formula, the polar coordinates of the pixels in the annular region are converted to rectangular coordinates:

[0014] In the formula, R h The range of values ​​is W is the width of the annular region; the value of θ is 0 ≤ θ < 360°.

[0015] In one embodiment, the grayscale image is further subjected to correction and filtering processing.

[0016] In one embodiment, the radial depth H of the notch satisfies 1mm ≤ H ≤ 1.25mm.

[0017] Compared with existing technologies, the wafer notch detection method provided in this application can adaptively, quickly and accurately identify and locate notches based on image features: by sampling the average grayscale values ​​of adjacent areas on the unfolded image through a sampling window, the wafer edge is automatically located, replacing traditional methods such as template matching or Hough transform; on this basis, the position and angle of the notch are obtained by detecting grayscale jump points row by row. The entire process does not require manual template trimming or setting of matching thresholds, effectively avoiding missed and false detections caused by template selection deviations, improper threshold settings, etc., thus improving detection accuracy; in addition, it can be used under different wafer types, different processes and different imaging conditions without re-trimming the template or setting matching thresholds, which has good versatility and improves production efficiency. Attached Figure Description

[0018] Figure 1 This is a flowchart of a wafer notch detection method.

[0019] Figure 2 This is a flowchart for obtaining the threshold; Figure 3 This is a flowchart for obtaining the location and angle of the gap.

[0020] Figure 4 This is a schematic diagram of a grayscale image of a wafer.

[0021] Figure 5 This is a partial schematic diagram of the polar coordinate unfolded diagram of the annular region.

[0022] Figure 6 This is a schematic diagram of the sampling points obtained in step S4.

[0023] Figure 7 It is to remove Figure 3 A schematic diagram after sampling points for outliers.

[0024] Figure 8 This is a schematic diagram of the center point of the gap.

[0025] Figure 9 This is a schematic diagram illustrating how noise occurs when the threshold t is too small in existing technologies.

[0026] Figure 10 This is a schematic diagram illustrating how a hole can appear if the threshold t is too large in existing technology. Detailed Implementation

[0027] Unless otherwise defined, the technical or scientific terms used in this specification and claims shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. Specific embodiments of this application will be described below in conjunction with the accompanying drawings. It should be noted that, in order to provide a concise description, this specification cannot exhaustively describe all features of the actual embodiments. Without departing from the spirit and scope of this application, those skilled in the art can modify and substitute the embodiments of this application, and the resulting embodiments are also within the protection scope of this application.

[0028] This application provides a wafer notch detection method, including: S1: Obtain a grayscale image of the wafer and delineate the wafer region in the grayscale image; S2: Define a ring-shaped region at the edge of the wafer area; convert the polar coordinates of the pixels in the ring-shaped region to rectangular coordinates, so that the ring-shaped region is converted into an unfolded image; S3: Collect the average grayscale value of pixels in each region on the unfolded image sequentially through the sampling window; S4: Calculate the difference in grayscale mean between adjacent regions; when the difference is greater than the first preset value, obtain the target region; S5: Calculate the grayscale difference between adjacent pixels in the target area line by line. If the grayscale difference is greater than the second preset value, record the current pixel as a sampling point. S6: Obtain the location information of the gap based on the coordinates of the sampling points.

[0029] In step S2, the annular region has a preset radial width, and the edge of the wafer region passes through the annular region to ensure that the annular region can completely encompass the wafer edge and notch; Reference Figure 5 As shown in the unfolded diagram, when the annular region is unfolded in polar coordinates, the radial direction of the annular region corresponds to the y-direction of the unfolded diagram, and the circumferential direction corresponds to the x-direction of the unfolded diagram.

[0030] In step S3, the sampling window can be a rectangular window, and the sampling window is set on the unfolded image in a sliding manner along the y-direction to traverse the entire unfolded image; the width of the sampling window along the x-direction is the same as the width of the unfolded image to ensure that the sampling window can completely capture the gray-scale change features of the wafer edge; the gray-scale value of the pixel in the wafer area is higher than the gray-scale value of the background area located outside the wafer area.

[0031] In step S4, the sampling window slides along the y-direction from the bottom (background area side) to the top (wafer area side) of the unfolded image, with a sliding step size of 1 pixel row. At each position, the difference between the average gray value of all pixels in the area covered by the current sampling window and the average gray value of the previous window is calculated, and the difference is compared with a first preset value. If the difference is less than or equal to the first preset value, it means that the area inside the window is still the background area (the gray value difference between adjacent positions is small), and the sampling window continues to slide. If the difference is greater than the first preset value, it means that the edge of the wafer area with high gray value pixels has entered the sampling window, the sampling window stops sliding, and the row where the edge of the wafer area is located in the current sampling window is obtained. The area between the row where the edge of the wafer area is located and the top of the unfolded image is taken as the target area. The first preset value can be preset according to the image contrast. In this embodiment, the first preset value can be set to 20.

[0032] In step S5, in each row of the target area, the grayscale difference between adjacent pixels is calculated sequentially along the x-direction. When the grayscale difference between a pair of adjacent pixels is greater than the second preset value (grayscale jump), it indicates that this is the boundary between the wafer area and the notch area (the grayscale value of the pixel in the notch is much lower than the grayscale value of the pixel in the wafer area). The pixel with the larger grayscale value is recorded as a sampling point, which is the pixel at the notch outline. Based on the coordinates of the sampling point, the position information of the notch is determined to achieve rapid identification and positioning of the notch. The position information of the notch includes the position coordinates of the notch in the unfolded image and the angular position of the notch on the wafer. A grayscale jump refers to a sudden change in the pixel grayscale value, such as the grayscale value dropping suddenly from 255 to 0. The second preset value can be 240.

[0033] The wafer notch detection method provided in this application can adaptively, quickly, and accurately identify and locate notches based on image features: by sampling a window to collect and compare the average grayscale values ​​of adjacent areas on the unfolded image, the wafer edge is automatically located, replacing traditional methods such as template matching or Hough transform; based on this, the position and angle of the notch are obtained by detecting grayscale jump points row by row. The entire process does not require manual template trimming or setting matching thresholds, effectively avoiding missed and false detections caused by template selection deviations or improper threshold settings, thus improving detection accuracy; in addition, it can be used under different wafer types, different processes, and different imaging conditions without the need to re-trimming the template or setting matching thresholds, exhibiting good versatility and improving production efficiency.

[0034] In one implementation, the method for obtaining the target region is as follows: S41: In the unfolded diagram, calculate the total gray value of each row of pixels row by row, and obtain the ordinate y1 of the row with the smallest total gray value; S42: Within the sampling window, obtain the ordinate y2 of the pixel with the smallest gray value in each column of pixels; S43: Take the average of the ordinates y1 and y2 as the marginal ordinate Y; S44: The area between the row containing the edge's y-coordinate and the upper edge of the unfolded diagram is taken as the target area.

[0035] In step S41, since the bottom of the unfolded image is the background area (lower grayscale value) and the top is the wafer area (higher grayscale value), the row with the smallest total grayscale value among all rows of pixels is the row of pixels closest to the wafer edge in the background area, and the vertical coordinate y1 of the pixels in that row is recorded; where the total grayscale value is the sum of the grayscale values ​​of all pixels in that row.

[0036] In step S42, when the sampling window is in its current position, the edge of the wafer region enters the sampling window; therefore, among the pixels in each column, the pixel with the smallest gray value is the pixel closest to the edge of the wafer region, and the ordinate y2 of this pixel is recorded.

[0037] It should be added that, since the pixel with the smallest grayscale value may be in different rows in different columns, the mode of the ordinate of the pixel with the smallest grayscale value in each column is taken as the ordinate y2, so as to exclude abnormal data caused by local noise, dirt or abnormal pixels in individual columns and improve the accuracy of the edge ordinate Y.

[0038] In step S43, the mean of the vertical coordinates y1 and y2 is calculated and used as the edge vertical coordinate Y of the wafer.

[0039] In step S44, the area between the row containing the edge's vertical coordinate Y and the upper edge of the unfolded image is taken as the target area. The unfolded image has a relative upper edge and lower edge along the y-direction, with the upper edge located on the wafer area side and the lower edge located on the background area side. Subsequent steps only need to detect grayscale jumps row by row within this area to eliminate interference from the background area below the row containing the edge's vertical coordinate Y, thereby reducing the scanning range and improving detection efficiency. Specifically, starting from the row containing the edge's vertical coordinate Y, grayscale jump points are detected row by row towards the direction closer to the upper edge.

[0040] In this embodiment, by obtaining the vertical coordinates y1 and y2, and taking their average as the edge vertical coordinate Y of the wafer, we can avoid the deviation introduced by background noise when using only the vertical coordinate y1, and avoid the error caused by the limitation of the window coverage area when using only the vertical coordinate y2. Taking the average of the two is used to obtain the accurate edge vertical coordinate Y.

[0041] In one implementation, the position and angle of the notch are obtained based on the coordinates of the sampling points, including: S61: Remove edge points from the sampling points; S62: Remove outliers from the sampling points; S63: Calculate the mean X of the remaining sampling points' x-coordinates, and use the mean X and the edge's y-coordinate Y as the location coordinates (X, Y) of the gap. S64: Perform polar coordinate transformation on the mean X to obtain the angular position of the notch on the wafer.

[0042] In step S61, edge points in the sampling points are removed, including: S611: Calculate the distance L between sampling points with the same ordinate; S612: If the distance L is within the first range, the current sampling point pair is determined to be a valid point and is retained; S613: If the distance L exceeds the first range, the current sampling point pair is determined to be an edge point and is removed.

[0043] For details, please refer to Figure 6 For sampling points located on both sides of the gap, the two transition points on the same row (same vertical coordinate) correspond to the left and right edges of the gap, respectively, and the distance L between them is the actual opening width of the gap. Therefore, when the distance L is within the first range, it indicates that the pair of sampling points conforms to the width characteristics of the gap and belongs to the valid sampling points on both sides of the gap, and is retained. When the distance L exceeds the first range, it indicates that the pair of sampling points does not conform to the width characteristics of the gap and belongs to the false transition points generated by other areas or image noise, and is discarded. The first range can be preset according to the physical size of the gap and the image resolution.

[0044] Specifically, in step S62, outliers in the sampling points are removed, including: S621: Each sampling point has a neighborhood set with itself as the center and a preset radius ε; S622: Obtain the number M of sampling points in the neighborhood; S623: If the quantity M is greater than or equal to the third preset value, the current sampling point is determined to be a core point and is retained; S624: If the quantity M is less than the third preset value, the current sampling point is determined to be an outlier and is removed.

[0045] Specifically, for sampling points located at gaps, since the gap contour is continuously distributed in the unfolded image, the sampling points collected along the gap contour are spatially clustered. Each sampling point has a large number of adjacent sampling points within its preset radius ε. Therefore, the number of sampling points M in the neighborhood is usually large, satisfying the condition of being greater than or equal to the third preset value, and is judged as a core point and retained. On the other hand, for false sampling points caused by image noise, edge burrs, or small holes, they exist in isolation in spatial location, and there are no or only a very few adjacent sampling points in their neighborhood. The number of sampling points M in the neighborhood is less than the third preset value, and is therefore judged as outliers and removed.

[0046] Optionally, the preset radius ε and the third preset value can be preset according to the sampling point density. For example, ε can be set to 5 pixels and the third preset value can be set to 2 points. The specific values ​​can be adjusted according to the actual image resolution and sampling accuracy, and are not limited here.

[0047] After steps S61 and S62, refer to Figure 7 The sampling points have largely eliminated noise interference, forming two clear and continuous point clusters at the gap (the left and right sides of the gap), arranged in a V-shape. Since the two sides of the gap are symmetrical about the center of the gap, the mean X of the abscissas of all remaining sampling points is calculated, and this mean X is used as the abscissa of the gap center in the unfolded diagram. Furthermore, the ordinate Y of the edge obtained in step S43 is used as the ordinate of the gap center in the unfolded diagram to obtain the position coordinates (X, Y) of the gap center, which is... Figure 8 The coordinates of the point located at the center of the gap.

[0048] Furthermore, based on the x-coordinate X of the notch center in the unfolded diagram, and combined with the mapping relationship established between the x-coordinate of the unfolded diagram and the wafer polar angle θ during polar coordinate unfolding, the x-coordinate X is converted into the actual angle value of the notch on the wafer, thus quickly determining the angular position of the notch center on the wafer and achieving notch localization.

[0049] In one embodiment, acquiring a grayscale image of the wafer and dividing the wafer region at the grayscale image includes: S11: Obtain the gray value G1 of the pixels located at the edge of the grayscale image, and obtain the gray value G2 of the pixels located at the center of the grayscale image; S12: Obtain the threshold t of the wafer region based on gray values ​​G1 and G2; S13: Based on the threshold t, the wafer region is divided in the grayscale image.

[0050] Specifically, in step S11, the grayscale values ​​of pixels at the top, bottom, left, and right edges of the grayscale image are obtained; among the obtained pixel grayscale values, the maximum value is taken as G1; in step S12, a central region of a preset size is defined with the geometric center of the grayscale image as the center, and the grayscale values ​​of all pixels within the central region are obtained; among the obtained pixel grayscale values, the minimum value is taken as G2; then, the average value of G1 and G2 is taken as the threshold t; pixels above the threshold t are divided into wafer regions, and pixels below the threshold t are divided into background regions.

[0051] In this embodiment, by acquiring the grayscale peak value in the background area and the grayscale valley value in the wafer area, and taking the average of the two as the threshold t, adaptive threshold calculation is achieved. Compared with the method of manually setting the threshold in related technologies, this method has good adaptability to different wafers and avoids over-segmentation or under-segmentation defects caused by improper threshold setting; Figure 9 The threshold t was set too small, resulting in noise in the grayscale image. Figure 10 If the threshold t is too large, holes will appear in the grayscale image, which will affect the accuracy of subsequent gap detection.

[0052] In one implementation, a wafer region is defined in the grayscale image based on a threshold t, including: assigning a first value to pixels in the grayscale image whose grayscale value is greater than or equal to the threshold t, assigning a second value to pixels whose grayscale value is less than the threshold t, and using the region where the pixels assigned the first value are located as the wafer region, thereby converting the original grayscale image into a binary image containing only two types of pixels; wherein the first value can be 1 or 255, and the second value can be 0, forming a black and white binary image.

[0053] In one implementation, converting the polar coordinates of pixels in the annular region to Cartesian coordinates to transform the annular region into a unfolded image includes: S21: Obtain the center coordinates of the wafer region (C x C y and radius R; S22: Based on the following formula, convert the polar coordinates of pixels in the annular region to rectangular coordinates:

[0054] In the formula, R h The range of values ​​is W is the width of the annular region; the value of θ is 0 ≤ θ < 360°.

[0055] In this embodiment, in step S21, based on the binarized image, the circumscribed rectangle of the wafer region is obtained, and the width w and height h of the circumscribed rectangle are acquired; the center coordinates (C0, C0, h0) of the wafer are calculated based on the following formula. x C y and radius R:

[0056] Furthermore, in step S22, based on the obtained center coordinates (C... x C y The polar coordinates of pixels in the shaped region are converted to rectangular coordinates using θ and radius R; where θ ranges from 0° to 360°, and R... h from arrive Polar coordinate expansion is performed on all polar coordinate points within the annular region to obtain the following result: Figure 5 The rectangular unfolded diagram shown.

[0057] In this embodiment, by converting the annular region into a rectangular unfolded image, the subsequent notch detection operation can be completed by scanning on the rectangle, without having to deal with the complex geometric relationships such as the curvature of the annular region, effectively reducing the complexity and computational load of image processing; at the same time, this mapping relationship is reversible, so the angular position of the notch on the wafer can be calculated from the notch position coordinates detected in the unfolded image, thus achieving localization.

[0058] In one embodiment, the method further includes correcting and filtering the grayscale image. Due to radial and tangential distortion of the imaging lens, the wafer edge appears as a slight barrel or pincushion distortion in the image, directly affecting the accuracy of subsequent wafer circumscribed rectangle extraction, center positioning, and polar coordinate unfolding. By obtaining the lens distortion coefficient and performing inverse distortion mapping on the image, the wafer edge can be restored to its true geometric shape, ensuring the accuracy of subsequent measurement results. Subsequently, the aspect ratio of the corrected image can be detected; if the aspect ratio exceeds a preset range, aspect ratio correction is performed to make the wafer circumscribed rectangle approach a square. Gaussian filtering is then applied to the corrected image to suppress image noise.

[0059] In one embodiment, the radial depth H of the notch satisfies 1mm≤H≤1.25mm; wherein the notch size is determined based on the wafer size and process requirements; further, the longitudinal dimension and sampling spacing of the sampling window can be preset according to the notch size so that the sampling window has sufficient coverage in the unfolded y direction.

[0060] The above description of the embodiments is intended to enable those skilled in the art to understand and apply this application. It will be apparent to those skilled in the art that various modifications can be easily made to these embodiments, and the general principles described herein can be applied to other embodiments without creative effort. Therefore, this application is not limited to the embodiments described herein, and any improvements and modifications made by those skilled in the art based on the disclosure of this application without departing from the scope and spirit of this application are within the scope of this application.

Claims

1. A wafer notch detection method, characterized in that, include: Obtain a grayscale image of the wafer, and delineate the wafer region in the grayscale image; A ring-shaped region is defined at the edge of the wafer region; Convert the polar coordinates of the pixels in the annular region to rectangular coordinates, and convert the annular region into an unfolded image; The average grayscale value of pixels in each region is collected sequentially through the sampling window on the unfolded image; Calculate the difference in the mean gray level between adjacent regions; When the difference is greater than the first preset value, the target area is obtained; Calculate the grayscale difference between adjacent pixels in the target area line by line. If the grayscale difference is greater than a second preset value, record the current pixel as a sampling point. Based on the coordinates of the sampling points, the location information of the gap is obtained.

2. The wafer notch detection method as described in claim 1, characterized in that, The method for obtaining the target region is as follows: In the unfolded image, the total gray value of each row of pixels is calculated row by row, and the ordinate y1 of the row with the smallest total gray value is obtained; Within the sampling window, obtain the ordinate y2 of the pixel with the smallest gray value in each column of pixels; Take the average of the ordinates y1 and y2 as the edge ordinate Y; The target region is defined as the area between the row containing the edge's ordinate Y and the upper edge of the unfolded diagram.

3. The wafer notch detection method as described in claim 2, characterized in that, Based on the coordinates of the sampling points, the position and angle of the notch are obtained, including: Remove edge points from the sampling points; Remove outliers from the sampling points; Calculate the mean X of the remaining sampling points' x-coordinates, and use the mean X and the edge's y-coordinate Y as the position coordinates (X, Y) of the gap. The mean value X is transformed into polar coordinates to obtain the angular position of the notch on the wafer.

4. The wafer notch detection method as described in claim 3, characterized in that, Removing edge points from the sampling points includes: Calculate the distance L between the sampling points with the same ordinate; If the distance L is within the first range, the current sampling point pair is determined to be a valid point and is retained; If the distance L exceeds the first range, the current sampling point pair is determined to be an edge point and is removed.

5. The wafer notch detection method as described in claim 3, characterized in that, Removing outliers from the sampling points includes: Each sampling point has a neighborhood defined with itself as the center and a preset radius ε. Obtain the number M of sampling points within the neighborhood; If the quantity M is greater than or equal to a third preset value, the current sampling point is determined to be a core point and is retained. If the quantity M is less than the third preset value, the current sampling point is determined to be an outlier and is removed.

6. The wafer notch detection method as described in claim 1, characterized in that, Acquiring a grayscale image of the wafer, and dividing the wafer region into areas within the grayscale image, includes: Obtain the grayscale value G1 of the pixels located at the edge of the grayscale image, and obtain the grayscale value G2 of the pixels located at the center of the grayscale image; Based on the grayscale value G1 and the grayscale value G2, the threshold t for dividing the wafer region is obtained; Based on the threshold t, the wafer region is divided in the grayscale image.

7. The wafer notch detection method as described in claim 6, characterized in that, Based on the threshold t, the wafer region is divided in the grayscale image, including: In the grayscale image, pixels with grayscale values ​​greater than or equal to the threshold t are assigned a first value, and pixels with grayscale values ​​less than the threshold t are assigned a second value. The region where the pixels assigned the first value are located is taken as the wafer region.

8. The wafer notch detection method as described in claim 7, characterized in that, Converting the polar coordinates of pixels in the annular region to Cartesian coordinates, and converting the annular region into a unfolded image, includes: Obtain the center coordinates (C) of the wafer region. x C y and radius R; Based on the following formula, the polar coordinates of the pixels in the annular region are converted to rectangular coordinates: In the formula, R h The range of values ​​is W is the width of the annular region; the value of θ is 0 ≤ θ < 360°.

9. The wafer notch detection method as described in claim 1, characterized in that, It also includes correcting and filtering the grayscale image.

10. The wafer notch detection method as described in claim 1, characterized in that, The radial depth H of the notch satisfies 1mm ≤ H ≤ 1.25mm.