A method and system for detecting water marks and drug residues on a mask
By combining brightness calibration, homomorphic filtering, and bilateral filtering, the mask image is preprocessed, which solves the problem of insufficient detection accuracy of water stains and drug residues in the existing technology, realizes more efficient defect detection, and reduces false detections and production waste.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU ROADWAY OPTOELECTRONICS CO LTD
- Filing Date
- 2026-05-12
- Publication Date
- 2026-07-07
AI Technical Summary
Existing technologies lack sufficient accuracy in detecting water stains and drug residues on photomasks, making it difficult to effectively identify semi-transparent and low-contrast defects.
A combination of brightness calibration, homomorphic filtering, and bilateral filtering is used to preprocess the mask image to enhance the features of water stains and drug residues. This includes brightness calibration and homomorphic filtering to compress the brightness range and enhance contrast, and bilateral filtering to remove noise and preserve edge features.
It improves the detection accuracy of water stains and drug residues on photomasks, reduces false detections of defects, achieves more efficient defect detection, and avoids product scrapping and production capacity waste caused by failure to detect defects in a timely manner.
Smart Images

Figure CN122347709A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mask defect detection, and more specifically, to a method and system for detecting water stains and drug residues in masks. Background Technology
[0002] In photomask manufacturing, the front-end processes play a crucial role in the mask's production effect and quality. These front-end processes include: coating, resist application, photolithography, development, etching, and photoresist removal. After photolithography, the pattern is etched onto the photomask. After development, the general outline of the pattern is revealed. Typically, after development, it's necessary to check for significant deviations in the photolithography effect and to identify any defects that might affect the etching process. If any abnormalities are found, such as large pattern deviations or residual chemicals, water stains, dirt, or dust, ADI (Advanced Device Diagnostics) must intercept these abnormalities after development, requiring only rework of photoresist removal, resist application, and photolithography for further inspection. If ADI scanning is not used for interception before proceeding, major abnormalities could lead to product scrap or severely impact delivery time. After photoresist development comes etching, which corrodes the plated chromium. Only after etching is completed and photoresist scanning is performed can abnormalities be detected. However, since the chromium plating has already been etched away, even rework would take more than twice the time of producing the product. Therefore, ADI scanning is essential.
[0003] Water stains and pesticide residues, before they dry completely, are translucent and thin, making them difficult for AOI equipment to detect. AOI uses a TDI linear camera to take pictures, and the images are then processed by a defect detection algorithm. Therefore, the image uploaded to the defect detection algorithm is one of the key factors determining whether a defect can be detected. A common method to adjust the detection capability of AOI is to adjust the grayscale thresholds of each judgment algorithm. While this can achieve the desired control precision, overly strict threshold parameter adjustments can also introduce unnecessary false defects (false defects that don't need to be detected). AOI typically performs preprocessing before the defect image is judged by the algorithm. This usually involves using a noise reduction filter and a contrast enhancement filter. For example, a median filter is first used to homogenize the image's grayscale values to eliminate salt-and-pepper noise (manifested as randomly appearing black and white bright spots in the image) and remove noise with significant signal interference. Then, a Gaussian filter is used to smooth the image and remove Gaussian noise (a type of random noise caused by sensor thermal disturbances, uniform lighting, etc.) and remove noise with low signal strength. This conventional method works well for defects with high contrast, but it is less effective for defects like water stains and drug residues that have high transmittance and low contrast. Due to the characteristics of water stains and drug residues, median filtering weakens their overall features to some extent, while Gaussian filtering blurs the details at the edges of the film surface. Although the conventional method improves the contrast of the intermediate droplets in water stains and drug residues to some extent, it is not entirely suitable for these defects, which is a challenge for AOI equipment in detecting them. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for detecting water stains and drug residues on photomasks, which solves the problem of insufficient detection accuracy in the current detection of water stains and drug residues on photomasks.
[0005] The above-mentioned technical objective of the present invention is achieved through the following technical solution:
[0006] In a first aspect, the present invention provides a method for detecting water stains and drug residues on a photomask, the method comprising:
[0007] Acquire image data from the mask;
[0008] The image data is subjected to brightness calibration to obtain a brightness-corrected image;
[0009] Homomorphic filtering is applied to the brightness-corrected image to compress its brightness range and enhance its contrast, resulting in an enhanced image.
[0010] The enhanced image is subjected to bilateral filtering to remove interference noise and retain edge feature values, resulting in a final image.
[0011] The result image is subjected to defect determination using a preset AOI logic algorithm to identify defective areas that may contain water stains and drug residues.
[0012] The defective area is re-inspected, and the defect detection results for water stains and drug residues are output.
[0013] In one implementation, brightness calibration of the image data includes:
[0014] On the calibration mask gold plate, a defect-free chromium area is selected as the background bright area, and another defect-free glass area is selected as the background dark area. H points are evenly spaced between the background bright area and the background dark area. The gray value of each point is scanned, and the average gray value of the background bright area and the background dark area is calculated. The background bright area is used as the upper limit of the calibration gray value, and the background dark area is used as the lower limit of the calibration gray value; H is a positive integer.
[0015] Different light intensities are used to scan the calibrated water stains and drug residue defects, and the gray values of the middle low-frequency signal and the edge high-frequency signal of the defect are obtained. The average value of the gray values of the middle low-frequency signal and the edge high-frequency signal is used as the gray value of the calibrated defect.
[0016] The average gray values of the bright and dark background areas are averaged to obtain the reference average. The difference between the calibrated defect gray values under different light intensities and the reference average is calculated. The light intensity corresponding to the defect gray value with the smallest absolute difference is selected as the light intensity for the brightness calibration.
[0017] In one implementation, homomorphic filtering is performed on the brightness-corrected image, including:
[0018] The logarithms of the illuminance and reflectance components of the brightness-corrected image are taken, and the logarithmic results are processed by Fast Fourier Transform to obtain the low-frequency information of the illuminance component and the high-frequency information of the reflectance component.
[0019] The low-frequency and high-frequency information is filtered by the transfer function of homomorphic filtering to obtain the filtering result;
[0020] The filtering result is then inversely processed to complete the homomorphic filtering of the brightness-corrected image.
[0021] In one implementation, the cutoff frequency of the transfer function is determined based on the size of the drug residue and water stains.
[0022] In one implementation, bilateral filtering is performed on the enhanced image, including:
[0023] The neighborhood range of the bilateral filter is preset, the standard deviation of the spatial distance and the standard deviation of the pixel gray value of each coordinate point within the neighborhood are calculated, and the standard deviation of the spatial distance and the standard deviation of the pixel gray value are summed.
[0024] The weighted value is obtained by multiplying the standard deviation of the summed spatial distances by the standard deviation of the summed pixel grayscale values.
[0025] The weighted values of each coordinate point are summed and normalized to obtain the resulting image, thus completing the bilateral filtering process of the enhanced image.
[0026] A second aspect of the present invention provides a system for detecting water stains and drug residues on a photomask, the system comprising:
[0027] The image acquisition unit is used to acquire image data from the mask.
[0028] A brightness calibration unit is used to perform brightness calibration on the image data to obtain a brightness-corrected image;
[0029] The first processing unit is used to perform homomorphic filtering on the brightness-corrected image to compress the brightness range of the brightness-corrected image and enhance the contrast of the brightness-corrected image to obtain an enhanced image;
[0030] The second processing unit is used to perform bilateral filtering on the enhanced image to remove interference noise and retain the edge feature values of the enhanced image, so as to obtain the result image;
[0031] The defect determination unit is used to determine the defects in the result image using a preset AOI logic algorithm to obtain defect areas that may contain water stains and drug residues.
[0032] The defect detection unit is used to re-inspect the defective area and output the defect detection results for water stains and drug residues.
[0033] In one implementation, the brightness calibration unit is specifically used for:
[0034] On the calibration mask gold plate, a defect-free chromium area is selected as the background bright area, and another defect-free glass area is selected as the background dark area. H points are evenly spaced between the background bright area and the background dark area. The gray value of each point is scanned, and the average gray value of the background bright area and the background dark area is calculated. The background bright area is used as the upper limit of the calibration gray value, and the background dark area is used as the lower limit of the calibration gray value; H is a positive integer.
[0035] Different light intensities are used to scan the calibrated water stains and drug residue defects, and the gray values of the middle low-frequency signal and the edge high-frequency signal of the defect are obtained. The average value of the gray values of the middle low-frequency signal and the edge high-frequency signal is used as the gray value of the calibrated defect.
[0036] The average gray values of the bright and dark background areas are averaged to obtain the reference average. The difference between the calibrated defect gray values under different light intensities and the reference average is calculated. The light intensity corresponding to the defect gray value with the smallest absolute difference is selected as the light intensity for the brightness calibration.
[0037] In one implementation, the first processing unit is specifically used for:
[0038] The logarithms of the illuminance and reflectance components of the brightness-corrected image are taken, and the logarithmic results are processed by Fast Fourier Transform to obtain the low-frequency information of the illuminance component and the high-frequency information of the reflectance component.
[0039] The low-frequency and high-frequency information is filtered by the transfer function of homomorphic filtering to obtain the filtering result;
[0040] The filtering result is then inversely processed to complete the homomorphic filtering of the brightness-corrected image.
[0041] In one implementation, the cutoff frequency of the transfer function is determined based on the size of the drug residue and water stains.
[0042] In one implementation, the second processing unit is specifically used for:
[0043] The neighborhood range of the bilateral filter is preset, the standard deviation of the spatial distance and the standard deviation of the pixel gray value of each coordinate point within the neighborhood are calculated, and the standard deviation of the spatial distance and the standard deviation of the pixel gray value are summed.
[0044] The weighted value is obtained by multiplying the standard deviation of the summed spatial distances by the standard deviation of the summed pixel grayscale values.
[0045] The weighted values of each coordinate point are summed and normalized to obtain the resulting image, thus completing the bilateral filtering process of the enhanced image.
[0046] Compared with the prior art, the present invention has the following beneficial effects:
[0047] This invention addresses the systematic deviations in image brightness / grayscale caused by two types of semi-transparent defects: water stains and drug residues. It proposes a brightness calibration method to process mask image data and eliminate these systematic deviations. Based on this brightness calibration, homomorphic filtering combined with bilateral filtering is used to enhance the detection of water stain and drug residue features. Homomorphic filtering is used to reveal details in dark areas, address uneven illumination, and enhance feature contrast. Bilateral filtering is used to remove noise interference from edge feature values, achieving noise reduction while preserving edges. This suppresses low-frequency signals in a uniform background while retaining or enhancing mid-to-high-frequency signals representing subtle texture changes at the edges of the liquid film. This solves the problem of insufficient detection accuracy in existing technologies for detecting water stains and drug residues on masks. Attached Figure Description
[0048] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0049] Figure 1 A flowchart for ADI scanning provided for existing technology;
[0050] Figure 2 A schematic flowchart illustrating a method for detecting water stains and drug residues on a photomask, provided in an embodiment of the present invention;
[0051] Figure 3 This is a schematic diagram of a system for detecting water stains and drug residues on a photomask, provided as an embodiment of the present invention. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0053] It should be noted that the terms "comprising" or "may include" used in the various embodiments of this application indicate the presence of the claimed function, operation, or element, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in the various embodiments of this application, the terms "comprising," "having," and their cognates are intended only to indicate a specific feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or adding one or more combinations of the foregoing.
[0054] It should be understood that terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0055] A photomask (also known as a lithography mask) is a precision pattern transfer template. It is a coated glass substrate containing images of precise electronic circuits and is used for the mass production of microelectronic products. High-precision photolithography is used to etch micro- and nano-scale circuit patterns onto the photomask substrate to obtain the photomask product.
[0056] Automated Optical Inspection (AOI) equipment is a type of inspection device based on optical principles and machine vision technology, widely used in the electronics manufacturing industry. It automatically scans the object being inspected using a high-resolution TDI camera, captures images, and compares them with preset standard drawing data to detect various defects. AOI equipment is used for production process monitoring and quality control, enabling real-time detection of defects during production, timely identification and correction of problems, and ensuring stable product quality.
[0057] After Develop Inspection (ADI) is performed after photolithography and development. The photomask fabrication process includes coating, resist application, photolithography, development, etching, photoresist removal, scanning, repair, and cleaning. ADI is the final inspection performed after photolithography and development. After development, the initial outline of the pattern is already present, and line widths and seams can be roughly inspected. ADI is a final inspection performed before etching to prevent defects caused by development from affecting the formation of precise patterns in the etching process. Intercepting product abnormalities before etching avoids more time and cost waste than intercepting them after the formal scanning.
[0058] In photomask manufacturing, the front-end processes play a crucial role in the mask's production effect and quality. These front-end processes include: coating, resist application, photolithography, development, etching, and photoresist removal. After photolithography, the pattern is etched onto the photomask. After development, the general outline of the pattern is revealed. Typically, after development, it's necessary to check for significant deviations in the photolithography effect and to identify any defects that might affect the etching result. If any abnormalities are found, such as large pattern deviations or residual chemicals, water stains, dirt, or dust, ADI (Advanced Diode Removal) is used to intercept these abnormalities after development. Only rework of photoresist removal, resist application, and photolithography is required for further inspection. If ADI scanning is not used for interception before proceeding, major abnormalities could lead to product scrap or severely impact delivery time. After photoresist development comes etching, which corrodes the plated chromium. Only after etching is completed and photoresist is removed can abnormalities be detected. However, since the chromium has already been etched away, even rework takes more than twice the time of producing the product. Therefore, ADI is essential. Water stains and drug residues are translucent and thin before they are completely dry, making them difficult to detect with AOI equipment. Therefore, it is necessary to establish a method and system for AOI detection of water stains and drug residues to achieve convenient, fast and accurate detection of photomasks.
[0059] This invention addresses the characteristics of chemical residues and water stains by proposing a preprocessing method for TDI camera images. Two filters are used to optimize the image, enabling optical inspection (AOI) equipment to more accurately detect these defects. Furthermore, to improve efficiency, a method and process for preliminary visual inspection of large defects before ADI are proposed, establishing an ADI inspection system. The aim is to provide a more convenient, faster, and more accurate detection method for photoresist and chromium plating pattern rendering on photomask products, particularly for detecting semi-transparent chemical residues and water stains. This avoids situations where product scrap, wasted production capacity, and raw material losses occur due to the failure to detect and intercept abnormalities after the developing process, thereby improving detection efficiency and reducing scrap rates.
[0060] The developer is typically a 2.38% pure tetramethylammonium hydroxide (TMAH). Pure TMAH is colorless and has high transmittance. Therefore, during ADI (Automatic Inspection) testing, because the high transmittance of liquid TMAH does not affect the grayscale value of the lens scan, AOI usually does not consider it an anomaly, leading to missed detection of chemical residues. However, TMAH is a strongly alkaline solution, while the subsequent process is etching, which uses a strongly acidic etching solution. If any chemical residue remains in the etching process during ADI, an acid-base neutralization reaction will occur, causing the following effects:
[0061] 1. Changing the composition and concentration of the etching solution will consume some of the acid in the etching solution, causing the local or even overall concentration of the etching solution to decrease, deviating from the preset process parameters.
[0062] 2. Uneven Etching Rate: Due to the potentially uneven distribution of TMAH residue, the degree of neutralization reaction varies at different locations. This can lead to inconsistent etching rates on the wafer surface, potentially resulting in under-etching or over-etching in certain areas, affecting the accuracy of pattern transfer.
[0063] 3. Contamination risk: Byproducts (tetramethylammonium salt) generated during the reaction may adhere to the wafer surface, becoming new contaminants and affecting the reliability of subsequent processes.
[0064] Therefore, between the developing and etching processes, setting up an efficient and thorough cleaning step through precise chemical residue detection to completely remove TMAH residue is a necessary step in the photomask production process to ensure process stability and product yield.
[0065] Based on size, drug residues can be classified into large residues and small residues. Large residues (area ≥ 100 μm) 2 It must be cleaned again; small drug residues (area ≤100um) 2 A portion of the residue can be released based on control specifications. Large residues are visually visible, while small residues can only be confirmed via ADI (Advanced Device Inspection) before deciding whether to proceed with the etching process. To ensure production efficiency, a visual inspection process is proposed to quickly determine whether direct cleaning is necessary before the ADI process, saving significant time on ADI and transportation. The steps involved in ADI can then be summarized as follows: Figure 1As shown, the visual inspection process and specific steps are as follows: Post-development visual inspection method: After development, place the mask vertically on an inspection device that facilitates visual inspection, and inspect it using a high-brightness white light according to the set method. The visual inspection process includes: 1. Vertical placement is to prevent dust from settling on the mask surface during the visual inspection process and causing dust contamination. 2. Use a high-brightness white light to inspect the product area in the order of center first and then the perimeter. Different illumination angles are required during inspection. When inspecting, the white light is first perpendicular to the mask surface, and then the illumination angle of the white light is adjusted to 60°, 45° and 30° with the mask surface. Each angle needs to be carefully inspected in the order of center first and then the perimeter. 3. Visual inspection can detect pinholes larger than 1mm2, larger dust (greater than 1mm2), and undried water stains and drug residues (≥100um2). Pinholes can be directly seen as light-transmitting points under white light, dust can be seen as black shadows, and undried water stains and drug residues appear as bright reflective white spots under a strong light at a specific angle. The purpose of visual inspection is to check for pinholes, large anomalies in the pattern, and visually visible dust areas (greater than 1 mm²). 4. Rules: Larger dust particles need to be blown away from the mask surface at a 45° angle using a clean air gun. Pinholes detected by visual inspection require rework. Large anomalies in the pattern, such as overall pattern tilt or visual differences in CD uniformity, require rework, removal of photoresist, recoating, and then photolithography. When large areas of water stains or residual reagent are detected, the decision to continue etching depends on the control precision of the mask.
[0066] Large drug residues can be screened out visually using the above steps and methods, while small drug residues cannot be directly identified by the human eye. In these cases, AOI (Automated Optical Inspection) equipment is needed for confirmation. AOI uses a TDI (Total Discharge Diameter) linear camera to take pictures, and the images are used for defect detection by a defect judgment logic algorithm. Therefore, the image uploaded to the defect judgment logic is one of the key factors determining whether a defect can be detected. The conventional method for adjusting the detection capability of AOI is to adjust the grayscale thresholds of each judgment logic algorithm. While this can achieve the desired control accuracy, overly strict threshold parameter adjustments can also cause unnecessary false defects (false defects that do not need to be considered). This invention focuses on the key factor of the TDI-captured images. Considering the characteristics of drug residues and water stains, it chooses to preprocess the images before uploading them to the judgment logic algorithm. This allows for detection without changing the threshold parameters, by enhancing the features of the captured images of drug residues and water stains.
[0067] Water stains and pesticide residues, before they dry completely, are translucent and thin, making them difficult for AOI equipment to detect. AOI uses a TDI linear camera to take pictures, and the images are then processed by a defect detection algorithm. Therefore, the image uploaded to the defect detection algorithm is one of the key factors determining whether a defect can be detected. A common method to adjust the detection capability of AOI is to adjust the grayscale thresholds of each judgment algorithm. While this can achieve the desired control precision, overly strict threshold parameter adjustments can also introduce unnecessary false defects (false defects that don't need to be detected). AOI typically performs preprocessing before the defect image is judged by the algorithm. This usually involves using a noise reduction filter and a contrast enhancement filter. For example, a median filter is first used to homogenize the image's grayscale values to eliminate salt-and-pepper noise (manifested as randomly appearing black and white bright spots in the image) and remove noise with significant signal interference. Then, a Gaussian filter is used to smooth the image and remove Gaussian noise (a type of random noise caused by sensor thermal disturbances, uniform lighting, etc.) and remove noise with low signal strength. This conventional method works well for defects with high contrast, but it is less effective for defects like water stains and drug residues that have high transmittance and low contrast. Due to the characteristics of water stains and drug residues, median filtering weakens their overall features to some extent, while Gaussian filtering blurs the details at the edges of the film surface. Although the conventional method improves the contrast of the intermediate droplets in water stains and drug residues to some extent, it is not entirely suitable for these defects, which is a challenge for AOI equipment in detecting them.
[0068] Analysis of water stains and drug residues revealed that undried water stains and drug residues exhibited overall low contrast and weak edge signals. The core optimization strategy of this invention is to suppress low-frequency signals in a uniform background while preserving or enhancing mid-to-high-frequency signals representing subtle texture variations at the edges of the liquid film. The technical concept provided by this invention involves using homomorphic filtering combined with bilateral filtering to enhance the detection of water stain and drug residue features. Homomorphic filtering is used to reveal details in dark areas, addressing uneven illumination and enhancing feature contrast. Bilateral filtering is used to remove noise interference from edge feature values, achieving both noise reduction and edge preservation.
[0069] The method provided by the present invention will be described in detail below with reference to specific embodiments. Please refer to [link / reference]. Figure 2 , Figure 2 This is a flowchart illustrating a method for detecting water stains and drug residues on a photomask, as provided in an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:
[0070] S101, acquires image data from the mask.
[0071] In this embodiment, a TDI linear camera is used to acquire image data of the mask, which is existing technology and will not be described in detail here.
[0072] S102, perform brightness calibration on the image data to obtain a brightness-corrected image.
[0073] Specifically, under different lighting conditions, the gray values returned by water stains and drug residue defects are different, so the brightness of the image data needs to be calibrated before filtering.
[0074] Specifically, for translucent defects such as water stains and drug residues, this embodiment processes them in parts, dividing them into the grayscale values of low-frequency signals in the middle of the liquid film surface and the grayscale values of high-frequency edge features. Therefore, a new calibration method is needed, as follows:
[0075] On the calibration mask gold plate, a defect-free chromium area is selected as the background bright area, and another defect-free glass area is selected as the background dark area. H points are evenly spaced between the background bright area and the background dark area. The gray value of each point is scanned, and the average gray value of the background bright area and the background dark area is calculated. The background bright area is used as the upper limit of the calibration gray value, and the background dark area is used as the lower limit of the calibration gray value; H is a positive integer.
[0076] Different light intensities are used to scan the calibrated water stains and drug residue defects, and the gray values of the middle low-frequency signal and the edge high-frequency signal of the defect are obtained. The average value of the gray values of the middle low-frequency signal and the edge high-frequency signal is used as the gray value of the calibrated defect.
[0077] The average gray values of the bright and dark background areas are averaged to obtain the reference average. The difference between the calibrated defect gray values under different light intensities and the reference average is calculated. The light intensity corresponding to the defect gray value with the smallest absolute difference is selected as the light intensity for the brightness calibration.
[0078] For example, H can be 9, and the grayscale value of each point can still be scanned using a TDI linear camera. Scanning calibrated water stains and drug residue defects by setting reflected light with different illumination intensities can also be achieved using a TDI linear camera.
[0079] S103, homomorphic filtering is performed on the brightness-corrected image to compress the brightness range of the brightness-corrected image and enhance the contrast of the brightness-corrected image, thereby obtaining an enhanced image.
[0080] In this embodiment, homomorphic filtering is a non-linear image processing technique that excels at handling images with uneven illumination. By dividing the image into illuminance and reflectance components and applying them separately using algorithmic formulas, it simultaneously compresses the brightness range of the image and enhances its contrast. This is highly suitable for AOI detection of water stains and pesticide residues. Typically, it is necessary to convert the image from the spatial domain (pixel information) to the frequency domain (small signals) for processing.
[0081] Homomorphic filtering is applied to the brightness-corrected image, including:
[0082] S1031, take the logarithm of the illuminance component and the reflection component of the brightness-corrected image, and process the logarithm result through fast Fourier transform to obtain the low-frequency information of the illuminance component and the high-frequency information of the reflection component.
[0083] Specifically, image data is divided into illumination and reflectance components. Image data is represented as... ,in The illuminance component represents ambient light, which changes slowly and corresponds to low-frequency information. The reflection component represents the object's details and texture, which changes dramatically and corresponds to high-frequency information.
[0084] Taking the logarithm of the image facilitates its transformation into a linear problem. A two-dimensional Fourier fast transform then converts the spatial domain to the frequency domain. After two-dimensional fast Fourier transform Convert to the frequency domain.
[0085] At this point, the low-frequency and high-frequency components of the image are separated, for and The zero-frequency component is moved to the center using FFTshift.
[0086] S1032 filters low-frequency and high-frequency information using the transfer function of homomorphic filtering to obtain the filtering result.
[0087] In this embodiment, the transfer function of the homomorphic filter is: Where D(u, v) is the distance from a point in the frequency domain to the origin of the frequency, D0 is the cutoff frequency, which controls the transition of the filter, and c is a constant that controls the steepness of the transition from low frequency to high frequency; γL (low frequency gain): usually set to a value less than 1, used to attenuate the low frequency illuminance component and make the illumination more uniform; γH (high frequency gain): usually set to a value greater than 1, used to enhance the high frequency reflection component and make the image details clearer.
[0088] The parameters of the transfer function are set as follows: Calculate the distance from any point to the origin with zero frequency as the center. .
[0089] D0 refers to a parameter indicating whether water stains and pesticide residues have been filtered out. It needs to be set based on the size of the water stains and pesticide residues. In this context, ImagePix refers to the number of pixels in the image. K is set based on the size of the defect to be controlled (usually 0.05~0.2). For larger, diffused defects, a smaller K value is needed, as low-frequency components (large-area gradients) will be treated as light and removed. For smaller, dotted defects, a larger K value is needed to retain more mid-frequency information and prevent small droplets from being mistaken for light noise and filtered out. The K value should be set according to the defect control specifications.
[0090] The larger the value of C, the better the edge sharpening. The setting (0.5~2) usually needs to be fine-tuned according to the false detection rate.
[0091] The outer surface of the photoresist in the ADI process is relatively smooth and the grayscale value is very uniform, so γL (low-frequency gain) can be set to 0.5. γH (high-frequency gain) represents the edge grayscale value of the drug residue. The grayscale value is obtained through TDI. The more transparent the drug solution, the higher γH needs to be. The average value can be set to 2.
[0092] Filtering is performed using the transfer function described in the above embodiments, i.e. The filter and the frequency domain of the Fourier-transformed image are convolved.
[0093] S1033 performs an inverse operation on the filtering result to complete the homomorphic filtering process on the brightness-corrected image.
[0094] Specifically, after filtering, the feature frequency information that needs to be enhanced for comparison is retained. To convert it back to the spatial domain for easy recognition by logical algorithms, an inverse Fourier transform (IFFT) and exponentiation (exp) are performed to finally obtain the enhanced image.
[0095] S104. Perform bilateral filtering on the enhanced image to remove interference noise and retain edge feature values, resulting in the final image.
[0096] In this embodiment, bilateral filtering is a nonlinear, edge-preserving smoothing filter. It considers not only the spatial distance between pixels but also their grayscale similarity. Smoothing is only applied when neighboring pixels are both close to the center pixel and have similar grayscale values, thus ensuring that feature values are not blurred. Bilateral filtering primarily processes pixels and does not require conversion to the frequency domain. Essentially, it assigns weights to image pixels based on both spatial distance and pixel differences before filtering.
[0097] The bilateral filtering formula is: ,in, The output image, For the input enhanced image, is the coordinate within the neighborhood, and N is the selected neighborhood range. For the components of spatial distance; The component representing pixel differences. It is the pixel grayscale value of the coordinate point in the neighborhood. It is a normalization coefficient, and its function is to maintain the brightness of the filtered image unchanged, ensuring that the filtered image does not become inexplicably brighter or darker.
[0098] Bilateral filtering is applied to the enhanced image, specifically as follows:
[0099] S1041, preset the neighborhood range of the bilateral filter, calculate the standard deviation of the spatial distance and the standard deviation of the pixel gray value of each coordinate point within the neighborhood range, and sum the standard deviation of the spatial distance and the standard deviation of the pixel gray value.
[0100] Specifically, N is an n*n area in space, where n is an odd number, representing the filtering range of the bilateral filter. N is set to the resolution of the image (an odd number).
[0101] In spatial components It represents the distance between two pixels in the neighborhood.
[0102] The standard deviation of spatial distance is It determines the filtering range; the larger the range, the more distant pixels can participate in the calculation. The standard deviation of the spatial distance of each point within its neighborhood is calculated and summed.
[0103] In pixel difference components It represents the grayscale difference between two pixels within the same area.
[0104] The standard deviation of pixel grayscale values is It determines the tolerance for differences in grayscale values. The standard deviation of the pixel grayscale values in the neighborhood of each coordinate point is calculated and summed.
[0105] S1042, the weighted value is obtained by multiplying the standard deviation of the summed spatial distance by the standard deviation of the summed pixel grayscale values.
[0106] S1043, the weighted values of each coordinate point are summed and normalized to obtain the result image, thereby completing the bilateral filtering process of the enhanced image.
[0107] Specifically, after summing the weighted values of each point, a normalization process is performed, which involves dividing by the sum of all weights. This ensures that the value range of the pixels remains consistent with the input enhanced image.
[0108] S105, the preset AOI logic algorithm is used to determine the defects in the result image, and the defect areas that may contain water stains and drug residues are obtained.
[0109] Specifically, the AOI logic algorithm provided in this embodiment is a detection algorithm inherent in the AOI device itself, which is existing technology well known to those skilled in the art. Therefore, this embodiment does not describe how the AOI logic algorithm performs defect judgment on the result image.
[0110] S106 performs a defect re-inspection of the defective area and outputs the defect detection results for water stains and drug residues.
[0111] In this embodiment, the defect review of the defective area is a well-known prior art technique, so this embodiment will not describe it in detail.
[0112] like Figure 3 As shown, this embodiment of the invention also provides a system for detecting water stains and drug residues on a photomask. The system includes:
[0113] Image acquisition unit 310 is used to acquire image data of the mask;
[0114] The brightness calibration unit 320 is used to calibrate the brightness of the image data to obtain a brightness-corrected image;
[0115] The first processing unit 330 is used to perform homomorphic filtering on the brightness-corrected image to compress the brightness range of the brightness-corrected image and enhance the contrast of the brightness-corrected image to obtain an enhanced image.
[0116] The second processing unit 340 is used to perform bilateral filtering on the enhanced image to remove interference noise and retain edge feature values of the enhanced image, so as to obtain the result image.
[0117] The defect determination unit 350 is used to determine the defects in the result image using a preset AOI logic algorithm to obtain defect areas that may contain water stains and drug residues.
[0118] The defect detection unit 360 is used to re-inspect the defect area and output the defect detection results of water stains and drug residues.
[0119] In some embodiments, the brightness calibration unit 320 is specifically used for:
[0120] On the calibration mask gold plate, a defect-free chromium area is selected as the background bright area, and another defect-free glass area is selected as the background dark area. H points are evenly spaced between the background bright area and the background dark area. The gray value of each point is scanned, and the average gray value of the background bright area and the background dark area is calculated. The background bright area is used as the upper limit of the calibration gray value, and the background dark area is used as the lower limit of the calibration gray value; H is a positive integer.
[0121] Different light intensities are used to scan the calibrated water stains and drug residue defects, and the gray values of the middle low-frequency signal and the edge high-frequency signal of the defect are obtained. The average value of the gray values of the middle low-frequency signal and the edge high-frequency signal is used as the gray value of the calibrated defect.
[0122] The average gray values of the bright and dark background areas are averaged to obtain the reference average. The difference between the calibrated defect gray values under different light intensities and the reference average is calculated. The light intensity corresponding to the defect gray value with the smallest absolute difference is selected as the light intensity for the brightness calibration.
[0123] In some embodiments, the first processing unit 330 is specifically used for:
[0124] The logarithms of the illuminance and reflectance components of the brightness-corrected image are taken, and the logarithmic results are processed by Fast Fourier Transform to obtain the low-frequency information of the illuminance component and the high-frequency information of the reflectance component.
[0125] The low-frequency and high-frequency information is filtered by the transfer function of homomorphic filtering to obtain the filtering result;
[0126] The filtering result is then inversely processed to complete the homomorphic filtering of the brightness-corrected image.
[0127] In some embodiments, the cutoff frequency of the transfer function is determined based on the size of the drug residue and water stains.
[0128] In some embodiments, the second processing unit 340 is specifically used for:
[0129] The neighborhood range of the bilateral filter is preset, the standard deviation of the spatial distance and the standard deviation of the pixel gray value of each coordinate point within the neighborhood are calculated, and the standard deviation of the spatial distance and the standard deviation of the pixel gray value are summed.
[0130] The weighted value is obtained by multiplying the standard deviation of the summed spatial distances by the standard deviation of the summed pixel grayscale values.
[0131] The weighted values of each coordinate point are summed and normalized to obtain the resulting image, thus completing the bilateral filtering process of the enhanced image.
[0132] The present invention provides a system for detecting water stains and drug residues on a photomask, which is similar to the one described above. Figure 1 The method for detecting water stains and drug residues on a photomask shown is a technical solution based on the same inventive concept. Through the detailed description of the method for detecting water stains and drug residues on a photomask provided in the above embodiments, those skilled in the art can clearly understand the implementation process of a system for detecting water stains and drug residues on a photomask in this embodiment. Therefore, for the sake of brevity, it will not be described in detail here.
[0133] Accordingly, this invention addresses the systematic deviations in image brightness / grayscale caused by two types of semi-transparent defects: water stains and drug residues. It proposes a brightness calibration method to process the mask image data and eliminate these systematic deviations. Based on this brightness calibration, homomorphic filtering combined with bilateral filtering is used to enhance the detection of water stain and drug residue features. Homomorphic filtering is used to clarify details in dark areas, solve the problem of uneven illumination, and enhance feature contrast. Bilateral filtering is used to remove interference noise from edge feature values, achieving noise reduction while preserving edges. This suppresses low-frequency signals in a uniform background while retaining or enhancing mid-to-high-frequency signals of subtle texture changes at the edges of the liquid film. This solves the problem of insufficient detection accuracy in existing technologies for detecting water stains and drug residues on masks.
[0134] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for detecting water stains and drug residues on a photomask, characterized in that, The methods include: Acquire image data from the mask; The image data is subjected to brightness calibration to obtain a brightness-corrected image; Homomorphic filtering is applied to the brightness-corrected image to compress its brightness range and enhance its contrast, resulting in an enhanced image. The enhanced image is subjected to bilateral filtering to remove interference noise and retain edge feature values, resulting in a final image. The result image is subjected to defect determination using a preset AOI logic algorithm to identify defective areas that may contain water stains and drug residues. The defective area is re-inspected, and the defect detection results for water stains and drug residues are output.
2. The method according to claim 1, characterized in that, Brightness calibration of the image data includes: On the calibration mask gold plate, a defect-free chromium area is selected as the background bright area, and another defect-free glass area is selected as the background dark area. H points are evenly spaced between the background bright area and the background dark area. The gray value of each point is scanned, and the average gray value of the background bright area and the background dark area is calculated. The background bright area is used as the upper limit of the calibration gray value, and the background dark area is used as the lower limit of the calibration gray value; H is a positive integer. Different light intensities are used to scan the calibrated water stains and drug residue defects, and the gray values of the middle low-frequency signal and the edge high-frequency signal of the defect are obtained. The average value of the gray values of the middle low-frequency signal and the edge high-frequency signal is used as the gray value of the calibrated defect. The average gray values of the bright and dark background areas are averaged to obtain the reference average. The difference between the calibrated defect gray values under different light intensities and the reference average is calculated. The light intensity corresponding to the defect gray value with the smallest absolute difference is selected as the light intensity for the brightness calibration.
3. The method according to claim 1, characterized in that, Homomorphic filtering is performed on the brightness-corrected image, including: The logarithms of the illuminance and reflectance components of the brightness-corrected image are taken, and the logarithmic results are processed by Fast Fourier Transform to obtain the low-frequency information of the illuminance component and the high-frequency information of the reflectance component. The low-frequency and high-frequency information is filtered by the transfer function of homomorphic filtering to obtain the filtering result; The filtering result is then inversely processed to complete the homomorphic filtering of the brightness-corrected image.
4. The method according to claim 3, characterized in that, The cutoff frequency of the transfer function is determined based on the size of the drug residue and water stains.
5. The method according to claim 1, characterized in that, Performing bilateral filtering on the enhanced image includes: The neighborhood range of the bilateral filter is preset, the standard deviation of the spatial distance and the standard deviation of the pixel gray value of each coordinate point within the neighborhood are calculated, and the standard deviation of the spatial distance and the standard deviation of the pixel gray value are summed. The weighted value is obtained by multiplying the standard deviation of the summed spatial distances by the standard deviation of the summed pixel grayscale values. The weighted values of each coordinate point are summed and normalized to obtain the resulting image, thus completing the bilateral filtering process of the enhanced image.
6. A system for detecting water stains and drug residues on a photomask, characterized in that, The system includes: The image acquisition unit is used to acquire image data from the mask. A brightness calibration unit is used to perform brightness calibration on the image data to obtain a brightness-corrected image; The first processing unit is used to perform homomorphic filtering on the brightness-corrected image to compress the brightness range of the brightness-corrected image and enhance the contrast of the brightness-corrected image to obtain an enhanced image; The second processing unit is used to perform bilateral filtering on the enhanced image to remove interference noise and retain the edge feature values of the enhanced image, so as to obtain the result image; The defect determination unit is used to determine the defects in the result image using a preset AOI logic algorithm to obtain defect areas that may contain water stains and drug residues. The defect detection unit is used to re-inspect the defective area and output the defect detection results for water stains and drug residues.
7. The system according to claim 6, characterized in that, The brightness calibration unit is specifically used for: On the calibration mask gold plate, a defect-free chromium area is selected as the background bright area, and another defect-free glass area is selected as the background dark area. H points are evenly spaced between the background bright area and the background dark area. The gray value of each point is scanned, and the average gray value of the background bright area and the background dark area is calculated. The background bright area is used as the upper limit of the calibration gray value, and the background dark area is used as the lower limit of the calibration gray value; H is a positive integer. Different light intensities are used to scan the calibrated water stains and drug residue defects, and the gray values of the middle low-frequency signal and the edge high-frequency signal of the defect are obtained. The average value of the gray values of the middle low-frequency signal and the edge high-frequency signal is used as the gray value of the calibrated defect. The average gray values of the bright and dark background areas are averaged to obtain the reference average. The difference between the calibrated defect gray values under different light intensities and the reference average is calculated. The light intensity corresponding to the defect gray value with the smallest absolute difference is selected as the light intensity for the brightness calibration.
8. The system according to claim 6, characterized in that, The first processing unit is specifically used for: The logarithms of the illuminance and reflectance components of the brightness-corrected image are taken, and the logarithmic results are processed by Fast Fourier Transform to obtain the low-frequency information of the illuminance component and the high-frequency information of the reflectance component. The low-frequency and high-frequency information is filtered by the transfer function of homomorphic filtering to obtain the filtering result; The filtering result is then inversely processed to complete the homomorphic filtering of the brightness-corrected image.
9. The system according to claim 8, characterized in that, The cutoff frequency of the transfer function is determined based on the size of the drug residue and water stains.
10. The system according to claim 6, characterized in that, The second processing unit is specifically used for: The neighborhood range of the bilateral filter is preset, the standard deviation of the spatial distance and the standard deviation of the pixel gray value of each coordinate point within the neighborhood are calculated, and the standard deviation of the spatial distance and the standard deviation of the pixel gray value are summed. The weighted value is obtained by multiplying the standard deviation of the summed spatial distances by the standard deviation of the summed pixel grayscale values. The weighted values of each coordinate point are summed and normalized to obtain the resulting image, thus completing the bilateral filtering process of the enhanced image.