A method for identifying defects in photomasks

By combining preprocessing, filtering, and morphological analysis, the problems of low efficiency and poor accuracy in photomask defect detection are solved, achieving efficient and automated photomask defect identification, adapting to different equipment imaging systems, and saving manpower and resources.

CN119540196BActive Publication Date: 2026-05-26青岛方益技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
青岛方益技术有限公司
Filing Date
2024-11-19
Publication Date
2026-05-26

Smart Images

  • Figure CN119540196B_ABST
    Figure CN119540196B_ABST
Patent Text Reader

Abstract

This invention discloses a method for identifying photomask defects, belonging to the field of photomask inspection technology. The method includes: S1, acquiring a surface defect image; S2, preprocessing the surface defect image based on the imaging characteristics of the defect; S3, correcting the preprocessed surface defect image using a filtering algorithm; S4, performing colorimetric analysis on the corrected surface defect image to obtain particle regions; S5, segmenting the particle regions based on the morphological features of the defect to obtain defect islands; S6, performing morphological analysis on the defect islands to obtain the defect type and size. The photomask defect identification method provided by this invention automatically processes surface defect images and extracts defect islands by combining morphological and colorimetric analysis methods, improving the accuracy of defect identification, overcoming the limitations of differences in imaging systems across different devices, achieving automatic batch processing, and saving manpower and material resources in mass production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of semiconductor inspection technology, and in particular to a method for identifying photomask defects. Background Technology

[0002] In semiconductor manufacturing, the photomask is a key component in photolithography, transferring circuit patterns onto a semiconductor substrate. Its surface quality directly impacts chip yield and performance. Therefore, the detection and control of surface defects in the photomask during production is a crucial step in semiconductor manufacturing. With advancements in photomask fabrication technology, the control over surface defects has reached new heights. During photomask production, workers repeatedly inspect the surface to obtain the morphology and location of defects, enabling them to diagnose the root cause of problems. Metal residues and defects on the etched photomask surface can often be traced back to particles on the surface of the raw materials used in the input process or inside the equipment.

[0003] Currently, methods for inspecting photomask surfaces include manual visual inspection and automated inspection based on image inspection software. Manual inspection often uses optical equipment to scan and shape the photomask surface. Measurements of particles and defect sizes are manually taken using the equipment's built-in software. If on-site confirmation of the inspection results is not possible, the defect image is kept in place. Later, measuring tools such as rulers are used to determine if the defect is suitable for production. However, the limited speed of manual review results in a large amount of photomask material remaining in place, significantly wasting human resources and machine time. Furthermore, the accuracy of manual review is difficult to guarantee.

[0004] Automated inspection methods typically utilize image detection software for automatic judgment. However, current image processing algorithms for photomasks are limited, and when processing optical images, threshold segmentation or image segmentation methods derived from threshold segmentation are commonly used. Because the photomask material includes a photoresist layer, it significantly interferes with the regular propagation of light, resulting in substantial noise and overlapping thresholds in the imaging, making it difficult to achieve the desired detection results. Therefore, there is an urgent need for a photomask defect identification method capable of effectively detecting and classifying defects on the photomask surface. Summary of the Invention

[0005] In view of the shortcomings of the prior art described above, the purpose of this application is to provide a photomask defect identification method to solve the problems of low detection efficiency and difficulty in guaranteeing accuracy of photomask defects in the prior art. This method can effectively detect photomask defects and has the characteristics of high efficiency and high accuracy.

[0006] To achieve the above and other related objectives, this application provides a method for identifying photomask defects, comprising the following steps:

[0007] Acquire images of surface defects;

[0008] Based on the imaging characteristics of defects, the surface defect images are preprocessed;

[0009] The preprocessed surface defect image is corrected using a filtering algorithm;

[0010] Colorimetric analysis is performed on the surface defect image after filtering algorithm correction to obtain the particle region;

[0011] Based on the morphological characteristics of the defects, the particle region is segmented to obtain several defect islands;

[0012] Morphological analysis is performed on the defect islands to obtain the defect size and defect type.

[0013] Optionally, acquiring a surface defect image includes the following steps:

[0014] Acquire an image of the photomask surface;

[0015] Set up a sample window for capturing the surface defect image from the photomask surface image;

[0016] The surface defect image is extracted from the photomask surface image using the sample window.

[0017] Optionally, the surface defect image is preprocessed, including the following steps:

[0018] A first mask is set for preprocessing, the first mask having a center point e;

[0019] A first pixel threshold is calculated based on the grayscale value of the pixels in the surface defect image, and a first target point is extracted from the surface defect image based on the first pixel threshold.

[0020] Align the center point e with the first target point, and assign grayscale values ​​to the pixels of the first mask.

[0021] Set a target grayscale range, and extract a second target point from the first mask based on the target grayscale range;

[0022] Calculate the first grayscale mean of multiple second target points and assign it to the first target point;

[0023] The preprocessing of the surface defect image is completed by assigning values ​​to all first target points in the surface defect image.

[0024] Optionally, the first mask is configured as a 3×3 dot matrix, and the center point e is located at the center of the first mask dot matrix;

[0025] The gray value of the first target point is assigned to the center point e, and the gray values ​​of the eight pixels surrounding and adjacent to the first target point in the surface defect image are respectively assigned to the other eight pixels in the first mask excluding the center point e, so as to complete the gray value assignment of the first mask.

[0026] Optionally, extracting a first target point from the surface defect image based on the first pixel threshold includes the following steps:

[0027] Obtain the maximum grayscale value of the pixels in the surface defect image;

[0028] Use 1 / 3 of the maximum grayscale value of the surface defect image as the first pixel threshold;

[0029] Pixels with gray values ​​greater than the first pixel threshold are selected from the surface defect image as the first target points.

[0030] Optionally, extracting the second target point from the first mask based on the target grayscale range includes the following steps:

[0031] Obtain the minimum grayscale value of the pixels in the surface defect image;

[0032] The minimum value of the target grayscale range is 2 / 4 of the minimum grayscale value of the surface defect image, and the maximum value of the target grayscale range is 5 / 6 of the maximum grayscale value of the surface defect image.

[0033] Pixels whose grayscale values ​​do not exceed the target grayscale range are selected from the first mask as the second target points.

[0034] Optionally, the preprocessed surface defect image is corrected using a filtering algorithm, including the following steps:

[0035] Set the mean filter parameters, the minimum filter parameters, the second mask for the mean filter, and the third mask for the minimum filter;

[0036] Based on the second mask and the mean filtering parameters, mean migration filtering is performed on the preprocessed surface defect image;

[0037] Based on the third mask and the minimum value filtering parameters, minimum value filtering is performed on the surface defect image after mean migration filtering.

[0038] Optionally, colorimetric analysis is performed on the surface defect image after filtering algorithm correction to obtain the particle region, including the following steps:

[0039] The difference between the maximum and minimum grayscale values ​​of the pixels in the surface defect image is calculated and denoted as the first grayscale difference.

[0040] Pixels whose grayscale value is less than or equal to 2 / 3 times the first grayscale difference value are extracted from the surface defect image and used as the third target points.

[0041] The average grayscale value of multiple third target points is calculated and denoted as the second average grayscale value;

[0042] The difference between the gray value of each pixel in the surface defect image and the second gray value is calculated and recorded as the second gray value difference.

[0043] Pixels whose second grayscale difference is greater than the second pixel threshold are selected from the surface defect image to obtain the particle region.

[0044] Optionally, the particle region is segmented to obtain several defect islands, including the following steps:

[0045] Perform Manhattan distance transformation on the particle region;

[0046] The third pixel threshold is calculated based on the particle region after Manhattan distance transformation;

[0047] Based on the third pixel threshold, the watershed algorithm is used to segment the particle region after Manhattan distance transformation to obtain several defect islands.

[0048] Optionally, morphological analysis is performed on the defect islands to obtain the defect size and defect type, including the following steps:

[0049] Obtain the rectangular coordinates of each pixel within the defect island as pixel coordinates;

[0050] The width and height of the defect island are calculated based on the pixel coordinates;

[0051] The dimensions are calculated based on the width and height of the defect island and the magnification ratio of the surface defect image;

[0052] The calculated average grayscale value of the defective island pixels is denoted as the third average grayscale value.

[0053] Based on the maximum and minimum values ​​of the pixel coordinates of the defect island, obtain the first endpoint h1, the second endpoint h2, the third endpoint h3, and the fourth endpoint h4 of the defect island;

[0054] The midpoint h is calculated. 12 Midpoint h 34 The coordinates of the center point O and the expression for the center line passing through the center point O; wherein the midpoint h12 The midpoint h is the point between the first endpoint h1 and the second endpoint h2. 34 The center point O is the midpoint between the third endpoint h3 and the fourth endpoint h4. 12 With the midpoint h 34 The midpoint of the line segment h, wherein the center line is perpendicular to the line segment h. 12 h 34 ;

[0055] Based on the expression of the centerline, obtain the first boundary point b1 and the second boundary point b2 of the defect island;

[0056] The calculation yields the line segments b1b2 and h. 12 h 34 The ratio between the shorter side and the longer side of a graph is called the aspect ratio.

[0057] Based on the preset fourth pixel threshold and concavity ratio threshold, the defect type is determined by the third grayscale mean and the aspect ratio.

[0058] The photomask defect identification method provided in this application has at least the following beneficial effects:

[0059] In the photomask defect recognition method of this application, the preprocessing process effectively filters background noise in the surface defect image, retains and enhances the characteristics of defect particles, and improves the contrast between the defect and the background, facilitating subsequent image processing and ensuring the accuracy of defect recognition. The mean-shift filtering combined with minimum filtering improves the filtering effect on noise in the surface defect image, while also enhancing the colorimetric and morphological features of the defect and its boundaries. By calculating the third pixel threshold as the segmentation threshold for the watershed algorithm, effective segmentation of the defect region is achieved, ensuring the independence between the resulting defect islands and reflecting the morphological and colorimetric features of the defect. Calculations are performed on the defect islands to obtain the defect size, third gray-scale mean, and aspect ratio, enabling effective judgment of the defect type and achieving automatic defect type recognition, thus improving detection efficiency and the accuracy of detection results. Furthermore, when the sample image changes, the photomask defect recognition method of this embodiment can adaptively adjust, eliminating the influence of equipment differences on the detection results and enabling automatic detection and recognition of defect size and type. The photomask defect identification method provided by this invention combines morphological and colorimetric analysis methods to automatically process surface defect images and extract defect islands, improving the accuracy of defect identification. It is free from the constraints of differences in imaging systems of different devices, realizes automatic batch processing, and saves manpower and material resources in the mass production process, making it highly practical and worthy of promotion. Attached Figure Description

[0060] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 The diagram shown is a flowchart of the photomask defect identification method provided in Embodiment 1 of this application.

[0062] Figure 2 This is a schematic diagram of the structure of excessive image cropping in the prior art.

[0063] Figure 3 The diagram shown is a flowchart illustrating the preprocessing of surface defect images provided in Embodiment 1 of this application.

[0064] Figure 4 The image shown is a comparative diagram of surface defect images before and after preprocessing, as provided in Embodiment 1 of this application.

[0065] Figure 5 The image shown is a comparative diagram of surface defect images before and after filtering, as provided in Embodiment 1 of this application.

[0066] Figure 6 The diagram shown is a flowchart illustrating the process of obtaining the microparticle region from a surface defect image provided in Embodiment 1 of this application.

[0067] Figure 7 The diagram shown is a flowchart illustrating the process of obtaining particle size and defect type provided in Embodiment 1 of this application.

[0068] Figure 8 The diagram shown is a structural schematic of a surface defect image with three defects provided in an optional embodiment of Embodiment 1 of this application.

[0069] Figure 9 The diagram shows the positions of the first to fourth endpoints provided in an optional embodiment of Embodiment 1 of this application.

[0070] Figure 10 This diagram shows the positions of the first to fourth endpoints as provided in another optional embodiment of Embodiment 1 of this application. Detailed Implementation

[0071] To make the technical objectives, technical solutions, and technical effects of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with embodiments. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0072] Therefore, the following detailed description of embodiments of this application is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0073] In the description of this application, it should be noted that the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with an implementation or example, which are included in at least one implementation or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same implementation or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more implementations or examples.

[0074] This embodiment provides a method for identifying photomask defects, which addresses the problems of low detection efficiency and difficulty in guaranteeing accuracy in existing technologies for photomask defect detection and identification. (Refer to...) Figure 1 The photomask defect identification method provided in this embodiment includes steps S1 to S6.

[0075] Step S1: Obtain surface defect images.

[0076] In this embodiment, the surface defect image is used to provide samples for subsequent defect identification. Optionally, acquiring the surface defect image includes the following steps: acquiring a photomask surface image; setting a sample window for framing the surface defect image from the photomask surface image; and extracting the surface defect image from the photomask surface image using the sample window.

[0077] Specifically, an image of the photomask surface can be obtained through an optical device, thereby providing data samples for the photomask defect identification method of this embodiment; after obtaining the photomask surface image, the size and shape of the sample window are set, and the sample window is used as a selection box; the corresponding surface defect image is selected from the sample image using the sample window; wherein, the surface defect image contains one or more particles, and the particles are images of photomask defects in the surface defect image.

[0078] In an optional embodiment, the photomask surface image is, for example, a rectangular image of 480×640 pixels. This image contains defect information, location information, and equipment information. A sample window is set to a rectangular window of 200×300 pixels. The sample window is used to extract a 200×300 pixel surface defect image from the photomask surface image. The field of view corresponding to the 200×300 pixel size is 12.5μm×18.75μm, which can capture sufficient defect information, providing ample data samples for photomask defect identification. Furthermore, it can remove location information, equipment information, and other information irrelevant to defect identification. Extracting the surface defect image from the photomask surface image can be set as an adaptive process. Step S1 is a necessary step before preprocessing in the photomask defect identification method provided in this embodiment, effectively reducing noise interference and data processing volume, and improving detection efficiency.

[0079] Step S2: Based on the imaging characteristics of the defects, preprocess the surface defect images.

[0080] Surface defect images contain a large amount of noise. In existing technologies, reference... Figure 2 In the process of image processing, image segmentation methods are often used to further process the image. Generally, image segmentation methods are extremely sensitive to the presence of noise. When there is a lot of noise, it will seriously affect the image segmentation quality. There is a large overlap between the gray values ​​of defects and the gray values ​​of the background in the image. Multiple thresholds are needed to segment multiple defects, which can easily lead to over-segmentation and other undesirable phenomena.

[0081] To address the aforementioned issues, this embodiment preprocesses the surface defect image to filter background noise and prevent over-segmentation. Specifically, referring to... Figure 3 The surface defect image is preprocessed, including steps S21 to S26.

[0082] S21: Set a first mask for preprocessing; wherein the first mask has a center point e and a plurality of pixels surrounding the center point e. Optionally, the first mask may be, for example, a 3×3 array of pixels, including 9 points, namely the center point e, and points e1, e2, e3, e4, e5, e6, e7 and e8 surrounding the center point e.

[0083] S22: Calculate a first pixel threshold based on the grayscale values ​​of pixels in the surface defect image, and extract a first target point from the surface defect image based on the first pixel threshold. Specifically, obtain the maximum grayscale value of pixels in the surface defect image, take 1 / 3 of the maximum grayscale value as the first pixel threshold, and select pixels in the surface defect image whose grayscale values ​​are greater than the first pixel threshold as the first target point.

[0084] In this embodiment, setting the first pixel threshold to 1 / 3 of the maximum grayscale value of the surface defect image achieves the optimal preprocessing effect, preserving and enhancing the features of the defect, increasing the contrast between the defect and the background, effectively filtering background noise in the surface defect image, maximizing the effect of subsequent image processing, and ensuring effective identification of the type and size of the photomask defect; furthermore, when the surface defect image changes, the first pixel threshold can adapt to the surface defect image, ensuring that the preprocessing effect is not affected, thereby eliminating the influence of differences in optical equipment type on the photomask defect identification and detection effect.

[0085] S23: Align the center point e of the first mask with the first target point, and assign grayscale values ​​to the pixels of the first mask. Specifically, assign the grayscale value of the first target point to the center point e, and assign the grayscale values ​​of the pixels surrounding and adjacent to the first target point in the surface defect image to the other pixels in the first mask except for the center point e, so that the pixels surrounding the center point e correspond one-to-one with the pixels surrounding the first target point, thereby completing the assignment of values ​​to the pixels of the first mask.

[0086] In an optional embodiment, the first mask is a 3×3 mask, including 9 points, namely the center point e, and points e1, e2, e3, e4, e5, e6, e7 and e8 surrounding the center point e. The grayscale values ​​of points e1 to e8 are assigned by the 8 pixels surrounding the first target point and adjacent to the first target point, so as to complete the assignment of the pixel values ​​of the first mask.

[0087] S24: Set the target grayscale range and extract the second target point from the first mask according to the target grayscale range. Specifically, extract the grayscale values ​​of multiple pixels in the first mask, obtain the minimum grayscale value of the pixel in the surface defect image, and determine whether the grayscale value of the pixel in the first mask exceeds the range of the target grayscale range. When it does not exceed the range of the target grayscale range, the corresponding pixel is taken as the second target point.

[0088] In an optional embodiment, the first mask is a 3×3 mask, and it is determined whether the gray values ​​of the center point e, point e1, point e2, point e3, point e4, point e5, point e6, point e7 and point e8 exceed the target gray value range. When the gray value of the above pixel points is within the target gray value range (including the endpoints), the corresponding pixel point is taken as the second target point.

[0089] Furthermore, the minimum value of the target grayscale interval is set to 2 / 4 of the minimum grayscale value of the surface defect image, and the maximum value is set to 5 / 6 of the maximum grayscale value of the surface defect image. Setting the endpoints of the target grayscale interval to these values ​​maximizes the preservation of the features of the first target point, while simultaneously improving the contrast between the defect and the background. Moreover, when the surface defect image changes, the target grayscale interval can adaptively adapt to the surface defect image, overcoming the influence of differences in imaging systems from different devices.

[0090] S25: Calculate the first grayscale mean of multiple second target points and assign it to the first target point.

[0091] Specifically, the average gray value of multiple second target points is calculated and denoted as the first gray value, and the first gray value is assigned to the first target point.

[0092] S26: Complete the assignment of values ​​to all first target points in the surface defect image to complete the preprocessing of the surface defect image. Specifically, for the first target points in the surface defect image that have not undergone the above operation, execute steps S23 to S25 to complete the grayscale assignment of all first target points.

[0093] In an optional embodiment, steps S21 to S26 can be iterated to improve the preprocessing effect of the surface defect image. Optionally, the number of iterations is 1 or 2, in which case the best preprocessing effect can be obtained.

[0094] In this embodiment, refer to Figure 4 By setting a first pixel threshold and target grayscale range to preprocess the surface defect image, background noise in the surface defect image is effectively eliminated, the contrast between the defect and the background is increased, and over-segmentation is prevented. This greatly improves the accuracy and reliability of subsequent data processing, thereby ensuring the effectiveness of photomask defect detection and identification. Furthermore, it eliminates the influence of surface defect image differences caused by differences in imaging system types or parameters of different devices on the detection results. It can realize automatic detection of sample images, improve detection efficiency, save labor costs, and improve the accuracy and reliability of detection results.

[0095] Step S3: Correct the preprocessed surface defect image using a filtering algorithm.

[0096] In this embodiment, a suitable filtering method is selected to perform filtering algorithm correction on the preprocessed surface defect image in order to remove noise in the surface defect image. Optionally, mean migration filtering and minimum value filtering are used to filter the surface defect image. Specifically, the filtering algorithm correction on the preprocessed surface defect image includes steps S31 to S33.

[0097] S31: Set the mean filtering parameters, minimum filtering parameters, a second mask for mean filtering, and a third mask for minimum filtering. The second mask is used for mean migration filtering, and its parameters include its physical space radius, chromaticity space radius, number of mean filtering iterations, and migration stopping condition. The third mask is used for minimum filtering, and its parameters include the number of minimum filtering iterations.

[0098] In an optional embodiment, the second mask is a 3×3 array of dots, with a physical space radius of 3, a color space radius of 20, and a mean filtering iteration count of 5. The migration stops when the number of iterations reaches the mean filtering iteration count or the gray value at the center point of the second mask no longer changes. The third mask is set to a 3×3 mask, with a minimum filtering iteration count of 1.

[0099] S32: Based on the second mask and mean filtering parameters, perform mean migration filtering on the preprocessed surface defect image.

[0100] Specifically, the center point of the second mask is aligned with the fourth target point in the surface defect image, and the gray value of the center point of the second mask is made equal to the gray value of the fourth target point. Pixels surrounding the center point of the second mask are aligned one by one with pixels surrounding the fourth target point, and their corresponding gray values ​​are assigned to the pixels of the second mask. This allows the center point of the second mask to traverse all pixels in the surface defect image, thereby achieving mean shift filtering of the surface defect image. When the center point of the second mask shifts, the positions of the pixels surrounding that center point change accordingly. Shifting stops when the shifting stop condition is met.

[0101] S33: Based on the third mask and the minimum value filtering parameters, perform minimum value filtering on the surface defect image after mean migration filtering. Specifically, similar to step S32, align the center point of the third mask with the fifth target point of the surface defect image, assign grayscale values ​​to the third mask, assign the minimum pixel value within the third mask to the fifth target point, and complete minimum value filtering according to the minimum value filtering parameters.

[0102] In this embodiment, refer to Figure 5By combining mean migration filtering and minimum filtering, noise in surface defect images can be further filtered out, and the chromatic and morphological features of defects and their boundaries within the surface defect images can be enhanced, compensating for missing defect boundaries. In addition, setting both the second and third masks to 3×3 masks, setting the physical space radius to 3, the chromatic space radius to 20, and setting the number of iterations to 5 and 1 respectively can optimize the filtering and enhancement effects. Furthermore, in this embodiment, when other filtering methods are used or the relevant parameters during filtering are changed, the filtering effect will be significantly reduced, and the enhancement effect on defects and their boundary features will not meet expectations, thus affecting the accuracy and precision of subsequent optical defect identification and detection results.

[0103] Step S4: Perform colorimetric analysis on the surface defect image after filtering algorithm correction to obtain the particle region.

[0104] In this embodiment, colorimetric analysis and identification are performed on the filtered surface defect image based on a preset second pixel threshold, and then images containing defective microparticles are extracted from the surface defect image and recorded as microparticle regions. Extracting microparticle regions removes relatively obvious background areas, facilitating subsequent data processing, reducing computational load, and improving computational efficiency. Optionally, refer to... Figure 6 The process of performing colorimetric analysis on the surface defect image after filtering algorithm correction to obtain the particle region includes steps S41 to S45.

[0105] S41: The difference between the maximum and minimum grayscale values ​​of the pixels in the surface defect image is calculated and denoted as the first grayscale difference. Specifically, the maximum and minimum grayscale values ​​of the pixels in the filtered surface defect image are obtained, and the first grayscale difference is obtained by subtracting the minimum grayscale value from the maximum grayscale value.

[0106] S42: Extract a third target point from the surface defect image based on the first grayscale difference. Optionally, extract pixels from the surface defect image whose grayscale value is less than or equal to 2 / 3 times the first grayscale difference as the third target point.

[0107] S43: Calculate the average gray value of multiple third target points and denot it as the second gray value.

[0108] S44: The difference between the gray value of each pixel in the surface defect image and the second gray value is calculated and recorded as the second gray difference.

[0109] S45: Select pixels from the surface defect image whose second gray-level difference is greater than a second pixel threshold to obtain the particle region. Specifically, determine whether the second gray-level difference is greater than a preset second pixel threshold. When the second gray-level difference is greater than the second pixel threshold, determine that the corresponding pixel is a pixel within the particle region. When the second gray-level difference is less than or equal to the second pixel threshold, determine that the corresponding pixel is a pixel within the background region. Obtain all pixels within the detection image whose second gray-level difference is greater than the second pixel threshold to form the particle region. Optionally, the second pixel threshold is set to 50.

[0110] In this embodiment, the third target point is selected by setting 2 / 3 of the first grayscale difference, and the second pixel threshold is set to 50. The particle region is obtained from the surface defect image using the second grayscale difference. This effectively removes obviously irrelevant background areas and achieves optimal recognition results, while ensuring that the particle region contains the defects within the surface defect image. This reduces the computational load of data processing and improves the efficiency of photomask defect detection. Furthermore, when the surface defect image changes, the first and second grayscale differences can adaptively change with the surface defect image, thus overcoming the influence of differences in imaging system types or parameters of different devices and achieving automatic recognition of the particle region.

[0111] Step S5: Based on the morphological features of the defects, the particle region is segmented to obtain several defect islands.

[0112] In this embodiment, the microparticle region contains one or more defective microparticles. Different defective microparticles may be independent of each other or may overlap to form a defective microparticle with a larger size. By using image segmentation methods to segment the microparticle region, one or more microparticles with defects that are independent of each other can be obtained and recorded as defect islands to reflect the morphological characteristics of independent defects.

[0113] In an optional embodiment, segmenting the particle region to obtain several defect islands includes the following steps: performing a Manhattan distance transformation on the particle region; calculating a third pixel threshold based on the particle region after the Manhattan distance transformation; segmenting the particle region after the Manhattan distance transformation using a watershed algorithm according to the third pixel threshold to obtain one or more independent defect islands; wherein, a defect island is a set of defect pixels that can reflect the morphological and chromatic features of the defect; optionally, segmenting the particle region to obtain defect islands further includes the following step: obtaining the number of defect islands based on the obtained defect islands.

[0114] After the Manhattan distance transformation, the farther a pixel is from the defect boundary, the higher its grayscale value; conversely, the closer it is to the defect boundary, the lower its grayscale value. Optionally, the third pixel threshold is 2 / 5 of the maximum grayscale value of the pixels in the particle region after the Manhattan distance transformation. This third pixel threshold is used as the threshold for the watershed algorithm to segment the particle region.

[0115] In this embodiment, by calculating the third pixel threshold and using it as the segmentation threshold of the watershed algorithm, the organic combination of colorimetric and morphological features is achieved. This effectively ensures that the defect islands obtained by cutting are independent of each other and can reflect the morphological and colorimetric features of the actual defects, thereby achieving effective segmentation of the particle region. Furthermore, when the surface defect image changes, the third pixel threshold changes accordingly, ensuring adaptive adjustment of the particle region segmentation process and realizing automation of particle region segmentation.

[0116] Step S6: Perform morphological analysis on the defect islands to obtain the defect size and defect type.

[0117] Specifically, in this embodiment, the calculated size of the defect island is used as the defect size, and the defect type is determined by combining the shape of the defect island. Optionally, refer to... Figure 7 The defect islands are processed to obtain the defect size and defect type, including steps S61 to S69.

[0118] S61: Obtain the rectangular coordinates of each pixel within the defect island as pixel coordinates.

[0119] In this embodiment, the rectangular coordinates of each pixel in the defect island include the horizontal coordinate and the vertical coordinate. Optionally, a pixel can be selected from the defect island as the origin of the coordinate system, and two mutually perpendicular directions can be selected as the x-axis and y-axis respectively to establish a rectangular coordinate system, thereby obtaining the rectangular coordinates of each pixel in the defect island; or, a rectangular coordinate system is pre-set in the surface defect image, and the coordinates of each pixel in the defect island are obtained according to the rectangular coordinate system.

[0120] S62: Obtain the width and height of the defect island based on the pixel coordinates.

[0121] Specifically, the maximum and minimum x-coordinates, maximum and minimum y-coordinates of the pixels within the defect island are obtained. The difference between the maximum and minimum x-coordinates is calculated as the width of the defect island, and the difference between the maximum and minimum y-coordinates is calculated as the height of the defect island.

[0122] S63: The defect size is calculated based on the width and height of the defect island and the magnification ratio of the surface defect image.

[0123] Specifically, the ratio between the width of the defect island and the magnification ratio of the surface defect image is calculated to obtain the width of the defect; the ratio between the height of the defect island and the magnification ratio of the surface defect image is calculated to obtain the height of the defect.

[0124] In an optional embodiment, for example, a sample image of 480×640 pixels corresponds to a field of view size of 30μm×40μm. Using the above relationship, the width and height of the defect at the same magnification ratio can be calculated, referring to... Figure 8 For example, the sizes of defect islands are 3×4 pixels, 7×7 pixels, and 6×6 pixels, and the corresponding view sizes are calculated to be 0.1875μm×0.25μm, 0.4375μm×0.4375μm, and 0.375μm×0.375μm.

[0125] S64: The average gray value of the defective island pixels is calculated and recorded as the third gray value.

[0126] S65: Based on the maximum and minimum values ​​of the pixel coordinates of the defect island, obtain the first endpoint h1, the second endpoint h2, the third endpoint h3, and the fourth endpoint h4 of the defect island.

[0127] In an optional embodiment, refer to Figure 9 Based on the maximum and minimum values ​​of the ordinates of pixels within the defect island, the first endpoint h1, second endpoint h2, third endpoint h3, and fourth endpoint h4 of the defect island are obtained. Specifically, the maximum and minimum values ​​of the ordinates of pixels within the defect island are obtained; when the ordinate is at its maximum value, the x-coordinate has a minimum and a maximum value, and the maximum value of the ordinate and the corresponding maximum value of the x-coordinate are used as the ordinate and x-coordinate of the first endpoint h1, respectively; the maximum value of the ordinate and the corresponding minimum value of the x-coordinate are used as the ordinate and x-coordinate of the second endpoint h2, respectively; when the ordinate is at its minimum value, the x-coordinate has a maximum and a minimum value, and the minimum value of the ordinate and the corresponding maximum value of the x-coordinate are used as the ordinate and x-coordinate of the third endpoint h3, respectively; the minimum value of the ordinate and the corresponding minimum value of the x-coordinate are used as the ordinate and x-coordinate of the fourth endpoint h4, respectively.

[0128] In another alternative embodiment, refer to Figure 10Based on the maximum and minimum values ​​of the x-coordinates of the pixels within the defect island, the first endpoint h1, second endpoint h2, third endpoint h3, and fourth endpoint h4 of the defect island are obtained. Specifically, the maximum and minimum values ​​of the x-coordinates of the pixels within the defect island are obtained; when the x-coordinate is at its maximum value, the y-coordinate has both a minimum and a maximum value. The maximum value of the x-coordinate and the corresponding maximum value of the y-coordinate are used as the x-coordinate and y-coordinate of the first endpoint h1, respectively, and the maximum value of the x-coordinate and the corresponding minimum value of the y-coordinate are used as the x-coordinate and y-coordinate of the second endpoint h2, respectively; when the x-coordinate is at its minimum value, the y-coordinate has both a maximum and a minimum value. The minimum value of the x-coordinate and the corresponding maximum value of the y-coordinate are used as the x-coordinate and y-coordinate of the third endpoint h3, respectively, and the minimum value of the x-coordinate and the corresponding minimum value of the y-coordinate are used as the x-coordinate and y-coordinate of the fourth endpoint h4, respectively.

[0129] S66: Calculate the midpoint h 12 Midpoint h 34 The coordinates of the center point O and the expression for the centerline passing through the center point O. Where, the midpoint h... 12 Let h be the midpoint between the first endpoint h1 and the second endpoint h2. 34 The midpoint between the third endpoint h3 and the fourth endpoint h4 is given by the center point O, which is the midpoint h. 12 With midpoint h 34 The midpoint of the line segment h, with the center line perpendicular to the line segment h. 12 h 34 line segment h 12 h 34 For the midpoint h 12 With midpoint h 34 The connection.

[0130] In this embodiment, the coordinates of the first endpoint h1 are (x1, y1), the coordinates of the second endpoint h2 are (x2, y2), the coordinates of the third endpoint h3 are (x3, y3), the coordinates of the fourth endpoint h4 are (x4, y4), and the midpoint h... 12 The coordinates are (x 12 y 12 ), midpoint h 34 The coordinates are (x 34 y 34 Given that the coordinates of the center point O are (x0, y0), then x 12 =0.5(x1+x2), y 12 =0.5(y1+y2), x 34 =0.5(x³ + x⁴), y 34 =0.5(y3+y4), x0=0.5(x 12 +x 34 ), y0=0.5(y 12 +y 34When x1+x2 is odd, it is automatically incremented by 1. Similarly, the same operation is applied to the other coordinates.

[0131] S67: Based on the centerline expression, obtain the first boundary point b1 and the second boundary point b2 of the defect island.

[0132] In this embodiment, the pixels are iterated along the center line to both sides of the center point O, and it is determined whether the current pixel of the iterative cycle is located within the defect island, thereby obtaining the first boundary point b1 and the second boundary point b2 of the defect island.

[0133] In an optional embodiment, the expression for the center line is y = kx + b, and the coordinates of the pixels iteratively moving along the center line towards both sides of the center point O can be represented as (x0 ± x). n+1 y0±y n+1 ), where (x n+1 y n+1 Let be the coordinates of the pixel located on the center line, and let n be the index of the pixel located further away from the center point O along the center line. The index n is an integer greater than or equal to 0. Specifically, n is initially set to 0, and then incremented sequentially. Simultaneously, the coordinates of the pixel (x0 ± x) are determined. n+1 y0±y n+1 Whether it is located within a defect island. When the next pixel is located outside the defect island, the current pixel is taken as the boundary point of the defect island, and then the first boundary point b1 and the second boundary point b2 are obtained.

[0134] S68: Calculate the line segments b1b2 and h. 12 h 34 The ratio between the shorter side and the longer side of a given element is called the aspect ratio. Specifically, refer to... Figure 9 and Figure 10 According to the midpoint h 12 and midpoint h 34 The coordinates of line segment h are calculated. 12 h 34 The length of line segment b1b2 is calculated based on the coordinates of the first boundary point b1 and the second boundary point b2. Then, the length of line segment b1b2 is calculated based on the coordinates of line segment b1b2 and line segment h. 12 h 34 Calculate the length of the length of the short side to the length of the long side, and record it as the aspect ratio. The aspect ratio is less than or equal to 1.

[0135] S69: Based on the preset fourth pixel threshold and concavity ratio threshold, the defect type is determined by the third grayscale mean and aspect ratio.

[0136] Specifically, in this embodiment, when the average third grayscale value is greater than the fourth pixel threshold, the defect type is determined to be a depression; when the average third grayscale value is less than or equal to the fourth pixel threshold, the defect type is determined to be a particle; when the average third grayscale value is greater than the third pixel threshold and the aspect ratio is less than the depression ratio threshold, the defect type is a crack; and when the average third grayscale value is less than or equal to the fourth pixel threshold and the aspect ratio is greater than or equal to the depression ratio threshold, the defect type is flocculent particles. Optionally, the fourth pixel threshold is set to 200, and the depression ratio threshold is set to 0.1.

[0137] In the photomask defect recognition method provided in this embodiment, the surface defect image is preprocessed to effectively filter background noise, retain and enhance the features of the particles, improve the contrast between the particles and the background, and enhance the effect of subsequent image processing. Mean migration filtering combined with minimum filtering, and the setting of specific parameters, improves the filtering effect on noise in the surface defect image, while also enhancing the colorimetric and morphological features of the particles and their boundaries, further improving contrast. By calculating the first gray-level difference and based on the second pixel threshold, the particle region is obtained from the surface defect image. The third pixel threshold is calculated as the segmentation threshold for the watershed algorithm, achieving effective segmentation of the particle region, ensuring the independence between the cut defect islands, and reflecting the morphological and colorimetric features of the defect particles. By calculating the size of the defect island as the defect size output, and based on the third gray-level mean and aspect ratio of the defect island, the type of defect can be judged and output. Furthermore, when the sample image changes, the photomask defect recognition method of this embodiment can adaptively adjust, eliminating the influence of differences in imaging systems or parameters of different devices on the detection results, and realizing the automation of the defect recognition process. Compared to existing technologies, the photomask defect identification method in this embodiment combines morphological and colorimetric analysis methods to automatically process surface defect images and extract defect islands, effectively improving the applicability, accuracy, and reliability of the method. It also breaks free from the constraints of differences in imaging systems of different devices, improves detection efficiency, and saves manpower and material costs, making it highly practical and worthy of promotion.

[0138] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify, alter, or combine the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A method for identifying defects in a photomask, characterized in that, Includes the following steps: Acquire images of surface defects; Based on the imaging characteristics of defects, the surface defect images are preprocessed; The preprocessed surface defect image is corrected using a filtering algorithm; Colorimetric analysis is performed on the surface defect image after filtering algorithm correction to obtain the particle region; Based on the morphological characteristics of the defects, the particle region is segmented to obtain several defect islands; Morphological analysis is performed on the defect islands to obtain the defect size and defect type; The preprocessing of the surface defect image includes the following steps: A first mask is set for preprocessing, the first mask having a center point e; The steps include: calculating a first pixel threshold based on the grayscale values ​​of pixels in the surface defect image, and extracting a first target point from the surface defect image based on the first pixel threshold; obtaining the maximum grayscale value of pixels in the surface defect image; using 1 / 3 of the maximum grayscale value of the surface defect image as the first pixel threshold; and selecting pixels in the surface defect image with grayscale values ​​greater than the first pixel threshold as the first target point. Align the center point e with the first target point, and assign grayscale values ​​to the pixels of the first mask. The steps of setting a target grayscale range and extracting a second target point from the first mask according to the target grayscale range include: obtaining the minimum grayscale value of the pixels in the surface defect image; taking 2 / 4 of the minimum grayscale value of the surface defect image as the minimum value of the target grayscale range and taking 5 / 6 of the maximum grayscale value of the surface defect image as the maximum value of the target grayscale range; and selecting pixels from the first mask whose grayscale value does not exceed the target grayscale range as the second target point. Calculate the first grayscale mean of multiple second target points and assign it to the first target point; The preprocessing of the surface defect image is completed by assigning values ​​to all first target points in the surface defect image.

2. The photomask defect identification method according to claim 1, characterized in that, Obtaining images of surface defects includes the following steps: Acquire an image of the photomask surface; Set up a sample window for capturing the surface defect image from the photomask surface image; The surface defect image is extracted from the photomask surface image using the sample window.

3. The photomask defect identification method according to claim 1, characterized in that, The first mask is set as a 3×3 array of dots, and the center point e is located at the center of the first mask dot array; The gray value of the first target point is assigned to the center point e, and the gray values ​​of the eight pixels surrounding and adjacent to the first target point in the surface defect image are respectively assigned to the other eight pixels in the first mask excluding the center point e, so as to complete the gray value assignment of the first mask.

4. The photomask defect identification method according to claim 1, characterized in that, The preprocessed surface defect image is corrected using a filtering algorithm, including the following steps: Set the mean filter parameters, the minimum filter parameters, the second mask for the mean filter, and the third mask for the minimum filter; Based on the second mask and the mean filtering parameters, mean migration filtering is performed on the preprocessed surface defect image; Based on the third mask and the minimum value filtering parameters, minimum value filtering is performed on the surface defect image after mean migration filtering.

5. The photomask defect identification method according to claim 1, characterized in that, Performing colorimetric analysis on the surface defect image after filtering algorithm correction to obtain particle regions includes the following steps: The difference between the maximum and minimum grayscale values ​​of the pixels in the surface defect image is calculated and denoted as the first grayscale difference. Pixels whose grayscale value is less than or equal to 2 / 3 times the first grayscale difference value are extracted from the surface defect image and used as the third target points. The average grayscale value of multiple third target points is calculated and denoted as the second average grayscale value; The difference between the gray value of each pixel in the surface defect image and the second gray value is calculated and recorded as the second gray value difference. Pixels whose second grayscale difference is greater than the second pixel threshold are selected from the surface defect image to obtain the particle region.

6. The photomask defect identification method according to claim 1, characterized in that, The process of segmenting the microparticle region to obtain several defect islands includes the following steps: Perform Manhattan distance transformation on the particle region; The third pixel threshold is calculated based on the particle region after Manhattan distance transformation; Based on the third pixel threshold, the watershed algorithm is used to segment the particle region after Manhattan distance transformation to obtain several defect islands.

7. The photomask defect identification method according to claim 1, characterized in that, Morphological analysis of the defect islands to obtain defect size and type includes the following steps: Obtain the rectangular coordinates of each pixel within the defect island as pixel coordinates; The width and height of the defect island are calculated based on the pixel coordinates; The defect size is calculated based on the width and height of the defect island and the magnification ratio of the surface defect image; The calculated average grayscale value of the defective island pixels is denoted as the third average grayscale value. Based on the maximum and minimum values ​​of the pixel coordinates of the defect island, obtain the first endpoint h1, the second endpoint h2, the third endpoint h3, and the fourth endpoint h4 of the defect island; The midpoint h is calculated. 12 Midpoint h 34 The coordinates of the center point O and the expression for the center line passing through the center point O; wherein the midpoint h 12 The midpoint h is the midpoint between the first endpoint h1 and the second endpoint h2. 34 The center point O is the midpoint between the third endpoint h3 and the fourth endpoint h4, and the center point O is the midpoint h. 12 With the midpoint h 34 The midpoint of the line segment h, wherein the center line is perpendicular to the line segment h. 12 h 34 ; Based on the expression of the centerline, obtain the first boundary point b1 and the second boundary point b2 of the defect island; The calculation yields the line segments b1b2 and h. 12 h 34 The ratio between the shorter side and the longer side of a graph is called the aspect ratio. Based on the preset fourth pixel threshold and concavity ratio threshold, the defect type is determined by the third grayscale mean and the aspect ratio.