Image sub-pixel registration method and apparatus for defect detection

CN123015631APending Publication Date: 2026-10-30SKYVERSE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611409813.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

但实际检测中,受图像纹理复杂度、噪声干扰、离焦、散焦以及轻微旋转等因素影响,相关峰的形状往往呈现非对称畸变,沿用现有的方式,常常导致拟合结果出现偏差甚至完全失败

Benefits of technology

本申请通过先计算待检测图像与无缺陷的样品的参考图像之间的相关响应信号,获得能够反映两幅图像整体位移关系的峰值位置,再围绕该峰值位置截取局部邻域信号,并基于亚像素倍数K采用线性调频Z变换对该邻域信号进行二维频域细化处理,使得采样间隔缩小K倍,从而在相关峰附近形成采样密度更高的细化相关响应面。相比直接依据整像素峰值进行配准,或者仅通过空域插值、曲线拟合等方式估计亚像素位置,本申请能够在频域层面对相关峰局部区域进行高分辨率重建,具体体现在每个维度进行亚像素倍数的采样,增大了采样点数,提高了缺陷检测的抗噪能力,且显著提升了检测精度。同时,由于细化处理仅针对峰值邻域进行,而非对整幅相关响应信号进行全局高倍插值,因此能够在保证计算效率的基础上有效提高配准精度。通过将整像素偏移量与亚像素偏移修正量结合,可实现更加准确的横向和纵向配准,提高缺陷检测结果的准确性和可靠性。因此,本申请在待检测图像与参考图像之间的相关响应信号中搜索峰值位置,并在该峰值的邻域内进行处理,实现检测图像与参考图像的配准,实现了“粗定位+精定位”。此外,在精定位时,进一步通过在峰值的邻域内进行二维频域细化处理的步骤,在行、列维度分别进行亚像素倍数采样的线性调频Z变换,增大了采样点数,提高了抗噪能力。而且,还基于二维频域细化处理得到的细化相关响应面计算得到检测图像与参考图像像的亚像素偏移修正量,从而可实现检测图像与参考图像的高精度配准。因此,通过本申请的上述方案不仅提高了检测图像与参考图像的配准精度,而且提高了抗噪能力,能满足先进制程缺陷检测对匹配精度的严苛要求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015631A_ABST
    Figure CN123015631A_ABST
Patent Text Reader

Abstract

The application discloses an image sub-pixel registration method and device for defect detection. The method comprises the following steps: acquiring a to-be-detected image of a to-be-detected sample and a reference image of a sample without defects; calculating a correlation response signal between the to-be-detected image and the reference image, and searching for a peak position to determine an integer-pixel offset; intercepting a neighborhood signal of the peak position in the correlation response signal; performing two-dimensional frequency domain refinement processing on the neighborhood signal based on a linear frequency modulation Z transform based on a sub-pixel multiple, to obtain a refined correlation response surface; searching for a maximum value position from the refined correlation response surface, and calculating a sub-pixel offset correction amount according to the maximum value position; and realizing registration of the to-be-detected image and the reference image by using the integer-pixel offset and the sub-pixel offset correction amount. Thus, high-density resampling can be realized in a local area of a correlation peak, and offset correction can be performed, so that the sub-pixel registration precision of a defect detection image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of defect detection technology, and in particular to an image subpixel registration method and apparatus for defect detection. Background Technology

[0002] In advanced semiconductor manufacturing processes, the pattern precision of the photomask directly determines the chip yield. Photomask defect detection, as a critical step in process quality control, directly impacts the quality of subsequent photolithography processes. Currently, mainstream photomask defect detection methods generally rely on the differential signal between a reference image and the test image to identify and extract defects. This involves pixel-level comparison between the test image and a defect-free reference image to extract the areas of difference as potential defects.

[0003] If the difference operation is directly performed on two images, in actual inspection scenarios, due to factors such as machine vibration and insufficient positioning accuracy of the motion table, the real defect signal is easily masked by non-defect noise caused by positional errors, resulting in a significant decrease in the signal-to-noise ratio of the inspection results and a large number of false detections and missed detections. Therefore, it is necessary to perform high-precision position registration on the two images before the difference operation to suppress the error interference introduced by positional factors.

[0004] Existing methods typically employ a two-stage registration strategy of "coarse localization + fine localization" to achieve registration. In the fine localization stage, polynomial fitting methods such as quadratic polynomial or parabolic surface fitting are used to approximate the true extreme value location. However, in practical applications, this approach reveals significant limitations.

[0005] First, these methods rely on strong assumptions, assuming that the correlation peak shape of the two images obtained in the "coarse localization" stage conforms to an ideal quadratic parabola or Gaussian distribution. However, in actual detection, the shape of the correlation peak often exhibits asymmetrical distortion due to factors such as image texture complexity, noise interference, defocus, and slight rotation. Using existing methods often leads to deviations or even complete failure in the fitting results. Second, polynomial fitting only uses 3 or 5 sampling points in the neighborhood of the peak to estimate the extreme value location. The limited number of sampling points results in weak noise resistance, and the localization accuracy drops sharply in low-contrast or weak defect features scenarios. Furthermore, the order of the polynomial model is usually low to ensure computational stability. Low-order models cannot express high-frequency detail information, making the image registration accuracy a significant bottleneck and failing to meet the stringent requirements for image registration accuracy in advanced process mask defect detection.

[0006] Therefore, there is an urgent need in this field for a sub-pixel registration scheme for defect detection images that can achieve high precision under complex detection conditions, in order to break through the accuracy limit of existing registration schemes. Summary of the Invention

[0007] To address the aforementioned issues, this application provides a subpixel registration method and apparatus for defect detection, aiming to improve the registration accuracy of defect detection images.

[0008] The embodiments of this application disclose the following technical solutions: A first aspect of this application provides an image sub-pixel registration method for defect detection, the method comprising: Acquire the image of the sample to be tested and the reference image of the defect-free sample; The correlation response signal between the image to be detected and the reference image is calculated, and a peak position is searched from the correlation response signal; the correlation response signal is used to characterize the cross-correlation relationship between the image to be detected and the reference image; the peak position indicates the integer pixel offset between the image to be detected and the reference image. In the relevant response signal, the neighborhood signal at the peak position is extracted, and the neighborhood signal is subjected to two-dimensional frequency domain refinement based on linear frequency modulated Z-transform based on sub-pixel multiple to obtain a refined relevant response surface; wherein, the sub-pixel multiple is sampled in the two-dimensional frequency domain refinement process respectively; The maximum value position is searched from the refined relevant response surface, and the subpixel offset correction between the image to be detected and the reference image is calculated based on the maximum value position; The registration of the image to be detected and the reference image is achieved based on the integer pixel offset and the sub-pixel offset correction.

[0009] In an optional implementation of the first aspect, calculating the sub-pixel offset correction between the image to be detected and the reference image based on the maximum value position includes: The subpixel offset correction amount between the image to be detected and the reference image is calculated based on the maximum value position, the subpixel multiple, and the size of the cropping window.

[0010] In an optional implementation of the first aspect, the size of the cropping window is L×L, and the sub-pixel offset correction amount between the image to be detected and the reference image is: Where △x and △y are the sub-pixel offset corrections in the x and y directions, respectively, i max j max These are the x and y coordinates corresponding to the position of the maximum value, respectively, and K is the sub-pixel multiple.

[0011] In an optional implementation of the first aspect, the registration of the image to be detected with the reference image based on the integer pixel offset and the sub-pixel offset correction includes: The total offset is obtained by summing the integer pixel offset and the sub-pixel offset correction, and the registration of the image to be detected and the reference image is achieved based on the total offset.

[0012] In an optional implementation of the first aspect, the step of performing two-dimensional frequency domain refinement processing on the neighborhood signal based on linear frequency modulation Z-transform to obtain a refined correlation response surface includes: The neighborhood signal is transformed in the frequency domain to obtain the frequency domain matrix corresponding to the neighborhood signal; Perform a linear frequency-modulated Z-transform on each row of the frequency domain matrix to obtain the first refined frequency domain data; Perform a linear frequency-modulated Z-transform on each column of the first refined frequency domain data to obtain two-dimensional refined frequency domain data; The refined frequency domain data is subjected to an inverse transform to obtain the refined correlation response surface.

[0013] In an optional implementation of the first aspect, the size of the truncated window is L×L, and the number of output points after linear frequency modulation Z-transform is M=L×K, where K is the sub-pixel multiple; the step factor of the linear frequency modulation Z-transform is determined according to M, so that the frequency sampling interval of the linear frequency modulation Z-transform in the row and column directions is reduced by a factor of K.

[0014] In an alternative implementation of the first aspect, the starting complex frequency of the linear frequency modulated Z-transform is determined based on the center position of the neighborhood signal, and the starting complex frequency is used to make the center position of the refined correlation response surface correspond to the center position of the neighborhood signal.

[0015] In an optional implementation of the first aspect, calculating the correlation response signal between the image to be detected and the reference image includes: Fourier transforms are performed on the image to be detected and the reference image respectively to obtain the spectral data of the image to be detected and the spectral data of the reference image; a cross-power spectrum is constructed based on the spectral data of the image to be detected and the spectral data of the reference image, and the cross-power spectrum is normalized; an inverse Fourier transform is performed on the normalized cross-power spectrum to obtain the correlation response signal; or, In the spatial domain, the normalized cross-correlation values ​​of the image to be detected and the reference image under multiple candidate relative displacements are calculated to obtain the normalized cross-correlation matrix as the correlation response signal.

[0016] In an optional implementation of the first aspect, extracting the neighborhood signal of the peak position from the relevant response signal includes: Based on the response distribution of the relevant response signal in the vicinity of the peak position, the main lobe width of the relevant peak corresponding to the peak position is determined; The size parameter L of the cropping window is determined based on the width of the main lobe; wherein, L is greater than or equal to 3, and L is less than or equal to twice the width of the main lobe; Centered on the peak position, a two-dimensional window of size L×L is extracted from the relevant response signal according to the size parameter L of the extraction window to obtain the neighborhood signal.

[0017] A second aspect of this application provides an image subpixel registration apparatus for defect detection, the apparatus comprising: The image acquisition module is used to acquire the image of the sample to be inspected and the reference image of the defect-free sample. The integer pixel offset calculation module is used to calculate the correlation response signal between the image to be detected and the reference image, and to search for the peak position from the correlation response signal; the correlation response signal is used to characterize the cross-correlation relationship between the image to be detected and the reference image; the peak position indicates the integer pixel offset between the image to be detected and the reference image. A two-dimensional frequency domain refinement module is used to extract the neighborhood signal at the peak position from the correlation response signal, and perform two-dimensional frequency domain refinement processing on the neighborhood signal based on linear frequency modulation Z-transform based on sub-pixel multiples to obtain a refined correlation response surface; wherein, the sub-pixel multiples are sampled respectively in the two-dimensional frequency domain refinement processing; The subpixel offset correction calculation module is used to search for the maximum value position from the thinned related response surface, and calculate the subpixel offset correction between the image to be detected and the reference image based on the maximum value position; The registration module is used to register the image to be detected with the reference image based on the integer pixel offset and the sub-pixel offset correction.

[0018] Compared with the prior art, this application has the following advantages: This application first calculates the correlation response signal between the image to be detected and a reference image of a defect-free sample to obtain the peak position that reflects the overall displacement relationship between the two images. Then, it extracts a local neighborhood signal around this peak position and performs two-dimensional frequency domain refinement processing on this neighborhood signal based on a sub-pixel multiple K using linear frequency-modulated Z-transform, reducing the sampling interval by a factor of K, thereby forming a refined correlation response surface with higher sampling density near the correlation peak. Compared with direct registration based on integer pixel peaks or estimating sub-pixel positions solely through spatial interpolation or curve fitting, this application can perform high-resolution reconstruction of the local region of the correlation peak at the frequency domain level. Specifically, it performs sub-pixel multiple sampling in each dimension, increasing the number of sampling points, improving the noise resistance of defect detection, and significantly improving detection accuracy. Furthermore, since the refinement processing is only performed on the peak neighborhood, rather than global high-multiple interpolation of the entire correlation response signal, it effectively improves registration accuracy while maintaining computational efficiency. By combining integer pixel offsets with sub-pixel offset corrections, more accurate lateral and vertical registration can be achieved, improving the accuracy and reliability of defect detection results. Therefore, this application searches for peak positions in the correlation response signals between the image to be detected and the reference image, and processes the neighborhood of these peaks to achieve registration between the detected image and the reference image, realizing "coarse localization + fine localization". Furthermore, in fine localization, a two-dimensional frequency domain refinement process is performed in the neighborhood of the peaks, with linear frequency-modulated Z-transforms of sub-pixel multiple sampling in both row and column dimensions, increasing the number of sampling points and improving noise resistance. Moreover, the sub-pixel offset correction between the detected image and the reference image is calculated based on the refined correlation response surface obtained from the two-dimensional frequency domain refinement process, thereby achieving high-precision registration between the detected image and the reference image. Therefore, the above-mentioned scheme of this application not only improves the registration accuracy between the detected image and the reference image but also enhances noise resistance, meeting the stringent requirements for matching accuracy in advanced process defect detection. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic flowchart illustrating an image subpixel registration method for defect detection provided in an embodiment of this application; Figure 2 A flowchart illustrating one method for obtaining a refined relevant response surface; Figure 3This is a schematic diagram of an image subpixel registration device for defect detection provided in an embodiment of this application. Detailed Implementation

[0021] As described in the background section, in the defect detection process of samples such as masks, the difference between the image to be detected and the reference image is often used as an important basis for defect identification. However, in actual acquisition, due to factors such as machine vibration, stage positioning error, changes in optical imaging state, and image noise, there is usually a sub-pixel-level positional deviation between the two images. Although this positional deviation is small, it will be amplified by differential operations in high-precision mask pattern detection scenarios, thus forming a non-defect difference signal and reducing the signal-to-noise ratio of the real defect signal.

[0022] Existing techniques typically first obtain the position of the correlation peak at the integer pixel level through normalized cross-correlation or phase correlation, and then use quadratic polynomial, parabolic, or similar curve models for local fitting near the correlation peak to estimate the sub-pixel offset. The inventors discovered in their research that this type of approach essentially pre-defines the shape of the correlation peak as an ideal model and uses a small number of neighborhood sampling points to infer the peak position. When the image texture is complex, affected by noise, or has defocus, slack, or slight rotation, the correlation peak may exhibit asymmetry or local distortion, leading to deviations in the model fitting and making it difficult to reliably meet the registration accuracy requirements of advanced process defect detection.

[0023] Based on this, embodiments of this application provide an image sub-pixel registration method and apparatus for defect detection. This scheme no longer relies on the polynomial fitting assumption of spatial peak shapes, but transforms the sub-pixel offset solution from a peak shape fitting problem into a high-density frequency domain reconstruction problem of the neighborhood of the relevant peak. Specifically, the integer pixel offsets of the two images are first determined using the correlation response signals. Then, local neighborhood signals are extracted around the correlation peak, and based on the sub-pixel multiple, a linear frequency-modulated Z-transform (CZT) is used to refine the neighborhood signals in the two-dimensional direction, thereby obtaining a refined correlation response surface with higher sampling density. Subsequently, the maximum value position is searched from the refined correlation response surface, the sub-pixel offset correction is calculated, and the sub-pixel offset correction is used to correct the integer pixel offset, achieving high-precision registration between the image to be detected and the reference image. Thus, while maintaining controllable local computational load, the accuracy of sub-pixel registration can be improved, providing a more reliable analytical basis for subsequent defect detection.

[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application are clearly and completely described below with reference to the accompanying drawings and specific embodiments. It is understood that the following embodiments are for illustrative purposes only and do not constitute a limitation on the scope of protection of the present application. Other implementation methods obtained by those skilled in the art based on the embodiments of the present application without creative effort are all within the scope of protection of the present application.

[0025] See Figure 1 , Figure 1 This is a flowchart illustrating a subpixel registration method for defect detection provided in an embodiment of this application. This method can be applied to mask defect detection scenarios, as well as wafer inspection, panel inspection, precision industrial vision inspection, and other scenarios requiring subpixel-level registration between the image to be inspected and a reference image. The following explanation uses mask defect detection as an example.

[0026] This embodiment provides an image subpixel registration method for defect detection, which may include the following steps: S101, acquire the image of the sample to be tested and the reference image of the defect-free sample.

[0027] In this embodiment, the sample to be inspected can be a mask, and the reference sample can be a defect-free mask, or a defect-free reference object obtained based on a design layout, historical defect-free images, adjacent repeating units, etc. Correspondingly, the image to be inspected can be denoted as... I ( x , y The reference image can be denoted as... I 0( x , y The pixel dimensions of the image to be detected and the reference image can be... N x × N y ,in, N x Indicates the number of pixels in the x-direction. N y This indicates the number of pixels in the y-direction.

[0028] In some implementations, the image to be detected and the reference image may have undergone preprocessing such as grayscale correction, noise suppression, brightness normalization, background subtraction, and bad pixel repair before entering the subpixel registration process of this embodiment. This preprocessing reduces the interference of non-displacement factors on the relevant response signal, making subsequent correlation peak localization more stable.

[0029] It should be noted that the image to be detected and the reference image in this embodiment can be a complete field of view image or a local image obtained from a complete image. For mask detection, due to the dense graphic details and large field of view size, in actual systems, registration processing can usually be performed separately for each detection region or image block.

[0030] S102, calculate the correlation response signal between the image to be detected and the reference image, and search for the peak position from the correlation response signal to obtain the integer pixel offset between the image to be detected and the reference image.

[0031] After obtaining the image to be detected and the reference image, the correlation response signal between them can be calculated. The correlation response signal is used to characterize the cross-correlation relationship between the image to be detected and the reference image, which can also be understood as the degree of matching between the image to be detected and the reference image under different relative displacements. The peak position in the correlation response signal corresponds to the position where the degree of matching between the two images is the highest, and therefore can be used to indicate the integer pixel offset between the image to be detected and the reference image.

[0032] In one implementation, the correlation response signal can be calculated based on phase correlation. Specifically, a Fast Fourier Transform (FFT) is performed on both the reference image and the image to be detected to obtain corresponding spectral data. Then, a cross-power spectrum is constructed based on the spectral data of the reference image and the image to be detected, and the cross-power spectrum is normalized. Next, an Inverse Fast Fourier Transform (IFFT) is performed on the normalized cross-power spectrum to obtain the spatial domain correlation response signal. The peak position of this correlation response signal corresponds to the integer pixel offset between the image to be detected and the reference image.

[0033] In another implementation, the normalized cross-correlation (NCC) matrix between the image to be detected and the reference image can be directly calculated in the spatial domain. Specifically, the normalized cross-correlation value between the image to be detected and the reference image can be calculated under multiple candidate relative displacements, and the correlation response signal is formed by the normalized cross-correlation value corresponding to each candidate relative displacement. The peak position corresponds to the candidate displacement that makes the two images match the most.

[0034] Regardless of whether phase correlation or spatial domain NCC is used, after obtaining the correlation response signal, the location of the maximum response value, i.e., the peak position, can be searched in the correlation response signal.

[0035] This step allows us to obtain coarse localization results at the integer pixel level. Compared to performing sub-pixel searches directly on the entire image, performing integer pixel localization first significantly narrows the subsequent refinement search range, thereby reducing computational complexity.

[0036] S103, extract the neighborhood signal at the peak position from the relevant response signal.

[0037] After determining the position of the whole pixel peak, this embodiment does not directly use a small number of sampling points in the peak neighborhood for polynomial fitting, but instead extracts a two-dimensional neighborhood window around the peak position in the relevant response signal as the input for subsequent CZT frequency domain refinement.

[0038] Specifically, it can be based on the peak position ( x 0, y Centered on 0), a two-dimensional neighborhood window of size L×L is extracted from the relevant response signal to obtain the neighborhood signal. For ease of understanding, Q will be used to refer to the neighborhood signal obtained in this step below.

[0039] In some implementations, L can be 5 or 7. For example, when the main lobe of the correlation peak is narrow and the side lobe interference is significant, a smaller window size can be used, such as L=5, to avoid introducing too much side lobe information; when the correlation peak is wide or the image has some defocus or blurring, a larger window size can be used, such as L=7, to more completely include the main lobe region.

[0040] Furthermore, the window size L can be determined based on the response distribution of the relevant response signal near the peak position. Specifically, the main lobe width of the relevant peak can be determined first based on the response distribution in the region adjacent to the peak position; then, the size parameter L of the truncated window can be determined based on the main lobe width. In one example, L can satisfy: L≥3 and L≤2B, where B represents the main lobe width of the relevant peak. That is, the window size is not less than 3 to ensure that sufficient local information is included; at the same time, the window size is not greater than twice the main lobe width of the relevant peak to avoid truncating the main lobe or introducing too much sidelobe interference.

[0041] After this step, only the local correlation response region most closely related to subpixel peak localization is retained, so that subsequent frequency domain refinement focuses on the neighborhood of the correlation peak. This avoids the increased computational load caused by global high-magnification interpolation of the entire correlation response signal, and also reduces the impact of noise and sidelobes far from the peak region on subpixel localization.

[0042] S104 performs two-dimensional frequency domain refinement processing on the neighborhood signal based on linear frequency modulation Z-transform based on subpixel multiples to obtain a refined correlation response surface.

[0043] This step is a crucial one that distinguishes this embodiment from the traditional polynomial fitting subpixel localization method. The traditional approach selects 3×3 or 5×5 sampling points in the neighborhood of the spatial correlation peak and assumes that the correlation peak conforms to a specific shape such as a quadratic parabola or Gaussian surface, thereby estimating the peak position through fitting. The accuracy of this method is significantly affected by the model assumptions and the number of sampling points.

[0044] The embodiments of this application employ CZT to perform two-dimensional frequency domain refinement processing on the neighboring signals in both row and column directions, based on a subpixel multiplier K. The subpixel multiplier K characterizes the factor by which higher-density sampling is performed within adjacent integer pixel sampling intervals. For example, K=10 indicates that the original integer pixel interval is subdivided into 10 subpixel sampling intervals; K=20 indicates that the original integer pixel interval is subdivided into 20 subpixel sampling intervals. By setting the subpixel multiplier, the sampling density of the refined relevant response surface can be controlled, thereby controlling the resolution of the subpixel offset estimation.

[0045] Figure 2 This is a flowchart illustrating one method for obtaining a refined relevant response surface. Step S104 may specifically include... Figure 2 Sub-steps S1041-S1044 shown: S1041, perform frequency domain transformation on the neighborhood signal to obtain the frequency domain matrix corresponding to the neighborhood signal.

[0046] Using the neighborhood signal Q obtained in step S103 as input, perform FFT on the neighborhood signal Q to obtain the frequency domain matrix F. Here, the frequency domain matrix F is a two-dimensional frequency domain representation corresponding to the neighborhood signal Q. Since the neighborhood signal is extracted from a window of size L×L, the frequency domain matrix can also be a two-dimensional matrix of size L×L.

[0047] S1042, perform linear frequency modulation Z-transform on each row of the frequency domain matrix F to obtain the first refined frequency domain data.

[0048] For each row of the frequency domain matrix F, it can be regarded as a one-dimensional discrete sequence x[n] of length L, and the CZT transform is performed on the sequence as follows: k=0,1,...,M-1 In the formula, N represents the length of the input sequence x[n], which is the number of original sampling points participating in the CZT transformation. For example, in this embodiment, if a CZT transformation is performed on a row of an L×L dimension neighborhood matrix F, the length of that row sequence is L, and N=L in the formula. k represents the index of the CZT transformation output sequence, which is the number of the output sampling point, and it is an integer with a value range of 0~M-1. M is the number of output points after the CZT transformation. In the example of this application, the sub-pixel multiple is K, and the window size is L, so M=L×K. A is the initial complex frequency, and W is the step factor. In this embodiment, when performing a CZT transformation on each row of the frequency domain matrix F, the local index can be set as: n=0,1, ,L-1.

[0049] The initial complex frequency A of the CZT can be determined based on the center position of the neighboring signal, and is used to align the center position of the refined correlation response surface with the center position of the neighboring signal. For example, the initial complex frequency A can be set to exp(-j·0.5π). This setting allows the center of the CZT refinement region to be aligned with the continuous spectral position corresponding to the integer pixel peak, thereby achieving local frequency domain focusing around the integer pixel peak.

[0050] The step factor W of the CZT is determined based on the number of output points M, reducing the frequency sampling interval of the CZT in the row direction by a factor of K compared to the frequency interval of the conventional Discrete Fourier Transform (DFT). In one example, the step factor W can be set as follows:

[0051] With this parameter setting, CZT performs uniform sampling along the unit circle from the start point to the end point, outputting M sampling points, which is equivalent to performing a frequency oversampling of the original adjacent integer pixel interval by a factor of K.

[0052] By performing the CZT transformation described above on each row of the frequency domain matrix, the first refined frequency domain data can be obtained. This first refined frequency domain data has already achieved frequency refinement based on sub-pixel multiples K in the row direction.

[0053] S1043, perform linear frequency modulation Z-transform on each column of the first refined frequency domain data to obtain two-dimensional refined frequency domain data.

[0054] After refining in the row direction, a CZT transformation with the same or corresponding parameters as the row direction can be performed on each column of the first refined frequency domain data, thereby achieving sampling based on the sub-pixel multiple K in the column direction as well.

[0055] In other words, the two-dimensional frequency domain thinning process in this embodiment is not performed in only one direction, but rather by sampling at sub-pixel multiples in both the row and column directions. Therefore, the original L×L neighborhood response region can be thinned into two-dimensional thinned frequency domain data of size M×M. This two-dimensional thinning method can simultaneously improve the resolution of horizontal and vertical peak localization, making it suitable for handling situations where there is sub-pixel offset in both the x and y directions between the image to be detected and the reference image.

[0056] S1044 performs an inverse transform on the two-dimensional refined frequency domain data to obtain the refined correlation response surface.

[0057] After obtaining the two-dimensional refined frequency domain data, an inverse transform, such as an inverse Fourier transform, can be performed to obtain the refined correlation response surface (CZTD). The size of the refined correlation response surface (CZTD) can be M×M.

[0058] By combining the initial complex frequency A and the step factor W in the CZT parameters mentioned above, CZT can achieve local magnification and high-density sampling within the neighborhood of the correlation peak of an integer pixel, obtaining a high-resolution response distribution near the correlation peak. Compared with traditional methods, CZT can flexibly sample for frequency bands of interest or local regions; compared with polynomial fitting methods, CZT does not require the correlation peak to satisfy parametric models such as quadratic surfaces or Gaussian surfaces, thus reducing the positioning error caused by model mismatch.

[0059] In this embodiment, the subpixel multiplier is not a simple display magnification factor, but a key parameter used to control the frequency domain refinement sampling density of the correlation peak neighborhood. By setting the subpixel multiplier K, the frequency sampling interval of the conventional DFT can be reduced to 1 / K of the original, thereby constructing a higher density response surface in the local region of the correlation peak. Since the maximum value search is performed on this high-density response surface, the minimum resolution unit of the subpixel offset can be reduced from the integer pixel level to the 1 / K pixel level. Therefore, the larger the subpixel multiplier, the finer the positioning resolution can be theoretically obtained; however, in practical applications, an appropriate K can be selected based on computing resources, image signal-to-noise ratio, and registration accuracy requirements.

[0060] S105, search for the maximum value position from the refined relevant response surface, and calculate the sub-pixel offset correction amount between the image to be detected and the reference image based on the maximum value position.

[0061] After obtaining the refined correlation response surface CZTD, the location of the maximum value (i) can be searched within this refined correlation response surface. max ,j max i max and j max These represent the x-coordinate and y-coordinate of the location of the maximum value in the refined correlation response surface, respectively.

[0062] Since the refined response surface is obtained by refining the neighborhood of the integer pixel peak by a factor of K, its coordinate position can be mapped to a sub-pixel offset correction relative to the integer pixel peak position. For the case where the cropping window size is L×L and the sub-pixel factor is K, the sub-pixel offset correction can be calculated based on the maximum value position, the sub-pixel factor, and the cropping window size.

[0063] In one implementation, the sub-pixel offset correction amount can be expressed as:

[0064] Where Δx and Δy are the subpixel offset corrections in the x and y directions, respectively, K is the subpixel multiplier, and L is the size parameter of the cropping window.

[0065] The above formula means that since a sampling interval in the refined correlation response surface corresponds to a 1 / K pixel interval in the original neighborhood signal, the maximum value coordinate divided by K can be converted into the position in the original pixel coordinate scale; then, by subtracting the neighborhood window center position (L-1) / 2, the subpixel correction amount relative to the integer pixel peak position can be obtained.

[0066] For example, when L=5 and K=10, the center of the neighborhood window is 2. If the maximum value in the refined relevant response surface is located at coordinate 23 in the x-direction, then the corresponding sub-pixel correction in the x-direction is:

[0067] This means that in addition to the integer pixel offset, a correction of 0.3 pixels is needed in the x-direction. Similarly, the sub-pixel offset correction in the y-direction can be calculated.

[0068] It should be noted that the above coordinates can be indexed starting from 0 or 1 according to the image coordinate system definition; when the system uses different index starting points, the constant terms in the formula can be adjusted equivalently, as long as they can express the sub-pixel offset of the maximum value position relative to the neighborhood center.

[0069] This embodiment directly searches for peak values ​​in the refined correlation response surface, eliminating the need for quadratic polynomial or parabolic fitting of the original correlation peak. This avoids the problem of low-order models failing to describe complex actual peak shapes and also reduces numerical instability issues that may arise from high-order polynomial fitting.

[0070] S106, the registration of the image to be detected and the reference image is achieved based on the integer pixel offset and the sub-pixel offset correction.

[0071] After obtaining the integer pixel offset (x0, y0) and the sub-pixel offset correction (Δx, Δy), the two can be summed to obtain the total offset: Tx =x0+Δx T y =y0+Δy Among them, (T) x ,T y Let be the total offset between the image to be detected and the reference image. Then, position compensation can be performed on either the image to be detected or the reference image based on this total offset. For example, the image to be detected can be adjusted according to (-T)... x ,-T y The image is translated to align the image to be detected with the reference image; alternatively, the reference image can be translated according to (T) x ,T y The reference image is translated to align with the image to be detected.

[0072] After registration is completed, differential operations can be performed on the registered image to be detected and the reference image to extract candidate defect regions. Because the positional deviation is compensated more accurately, non-defect noise in the differential image is suppressed, and the real defect signal is more prominent, which helps to reduce the false detection rate and the missed detection rate.

[0073] As can be seen from the above process, this embodiment transforms the sub-pixel registration problem in defect detection from a spatial domain fitting problem into a frequency domain local high-density reconstruction problem through a processing chain of integer pixel coarse positioning, neighborhood truncation, CZT two-dimensional frequency domain refinement based on sub-pixel multiples, sub-pixel offset correction calculation, and total offset registration. This scheme can form equivalent virtual sampling points of tens to hundreds in the local region of the correlation peak, which has stronger noise resistance and higher positioning resolution compared with the traditional 3×3 or 5×5 small-point fitting method.

[0074] Furthermore, since CZT refinement is performed only on the peak neighborhood window, rather than on the entire image or the entire relevant response surface, it can balance computational efficiency and registration accuracy, making it suitable for online defect detection systems that require both throughput and accuracy.

[0075] Based on the above embodiments, this embodiment further illustrates optional calculation methods for the relevant response signals. It should be understood that the content described in this embodiment can be combined with the steps in the preceding embodiments.

[0076] In one alternative implementation, the correlation response signal can be obtained using phase correlation. Phase correlation utilizes the translation property of the Fourier transform, providing good displacement estimation for two images with a translation relationship. Specifically, if the image to be detected is translated relative to the reference image, there is a linear phase difference between their spectral phases related to the displacement. Therefore, by normalizing the cross-power spectrum and then performing an inverse Fourier transform, a correlation response signal with a distinct peak can be obtained in the spatial domain.

[0077] In another alternative implementation, the correlation response signal can be obtained using a normalized cross-correlation matrix. Normalized cross-correlation can suppress the influence of brightness and contrast variations on the matching results to some extent, making it suitable for use when there are local fluctuations in image grayscale.

[0078] In practical systems, phase correlation or NCC methods can be selected based on the noise level, grayscale stability, computational resources, and detection cycle of the image to be detected. For example, when large images need to be processed quickly, phase correlation implemented by FFT can be preferred; when robustness to grayscale amplitude changes needs to be enhanced, spatial domain NCC or frequency domain accelerated NCC methods can be used. Regardless of the method used, as long as the obtained correlation response signal can reflect the cross-correlation relationship between the image to be detected and the reference image, and can indicate the integer pixel offset by the peak position, it can be used as the input basis for the CZT two-dimensional frequency domain thinning processing in the embodiments of this application.

[0079] Based on the above embodiments, this embodiment further illustrates the setting method of the neighborhood window size L and the sub-pixel multiplier K.

[0080] The neighborhood window size L is used to determine the neighborhood range of the relevant peak participating in CZT frequency domain refinement. If L is too small, it may not be able to completely cover the main lobe of the relevant peak, causing the position of the maximum value after refinement to be affected by local truncation; if L is too large, it may introduce more side lobes, background noise, or other local peaks, reducing the stability of subpixel positioning. Therefore, L can be determined based on the width of the main lobe of the relevant peak.

[0081] In one example, the decay trend of the response value can be analyzed along the x and y directions, centered on the peak position, in the relevant response signal. The main lobe width is determined based on the full width at half maximum (FWHM), zero-crossing points, local minima, or a preset threshold. Subsequently, L is set to an odd value not less than 3 and not greater than twice the main lobe width, such as 5 or 7. Using an odd window size helps to center integer pixel peaks within the neighboring window.

[0082] The subpixel multiplier K determines the density of CZT refinement. If K is small, the sampling interval of the refinement-related response surface remains large, limiting the resolution of the subpixel correction. If K is too large, while the theoretical resolution increases, the computational load also increases, and it may be affected by noise peaks in low signal-to-noise ratio scenarios. Therefore, K can be set according to the system's accuracy requirements and computational resources. For example, K=8, K=10, K=16, K=20, or higher multipliers can be selected. In this embodiment, the number of CZT output points is M=L×K.

[0083] That is, for a neighborhood signal of size L×L, the final refined correlation response surface can reach a sampling scale of M×M. Thus, each pixel interval in the original neighborhood is divided into K sub-pixel intervals, allowing peak search to be performed on a finer coordinate grid.

[0084] For example, when L=5 and K=20, the size of the refined correlation response surface is 100×100. Compared to the original 5×5 neighborhood, this refined correlation response surface provides 20 times the sampling density in each direction, enabling a more detailed characterization of the local structure of the correlation peak. Compared to the traditional method of using only 3×3 or 5×5 sampling points for polynomial fitting, this method significantly increases the equivalent sampling information used for peak determination, which is beneficial for improving noise resistance.

[0085] Traditional subpixel registration schemes typically perform local surface fitting near integer pixel peaks, such as quadratic or parabolic surface fitting. The fundamental premise of these methods is that the local shape of the correlation peak approximately satisfies a certain analytical model. However, in mask defect detection scenarios, images often contain numerous high-frequency edges, periodic patterns, and complex textures; simultaneously, the detection process may be affected by optical defocus, defocusing, noise, slight rotation, and local grayscale variations. These factors can cause the correlation peak to deviate from the ideal quadratic surface, resulting in a mismatch between the fitted model and the true peak shape. This application employs CZT to refine the peak neighborhood in a two-dimensional frequency domain, without assuming the correlation peak is a quadratic, Gaussian, or other specific function. CZT achieves high-resolution reconstruction of the local correlation response surface by performing high-density sampling along a specified frequency path. In other words, this application does not guess the true peak location using a small number of points, but rather generates a denser response surface near the peak through frequency domain refinement controlled by subpixel multiples, and then directly searches for the maximum value location. This reduces model mismatch error, increases sampling density, enhances noise resistance, and balances accuracy and efficiency, while also adjusting for accuracy issues.

[0086] Specifically: Since polynomial fitting is unnecessary, the correlation peaks are no longer required to satisfy an ideal quadratic or Gaussian distribution. Even when the image has uneven texture, noise, defocus, or slight rotation, the maximum value can still be searched based on the refined actual response surface, improving positioning stability. Traditional methods may only use 3×3 or 5×5 neighborhood points for fitting; this application, through CZT refinement, can perform K-fold sampling in each direction, forming dozens to hundreds of equivalent sampling points in the neighborhood response surface, thereby improving peak localization resolution. A higher density correlation response surface can more fully reflect the overall trend of change near the peak, rather than relying on a very small number of sampling points. For low-contrast or weak-texture scenes, it can reduce the impact of a single noisy sampling point on the fitting results. CZT refinement is only performed on the local neighborhood near the integer pixel peak, without requiring global high-magnification interpolation of the entire image or the complete correlation response surface; therefore, the computational load is relatively controllable and suitable for online detection workflows. By adjusting the sub-pixel multiplier K, the refinement level can be flexibly set according to the accuracy and processing speed requirements of different detection tasks. For example, for advanced process mask inspection, a larger K can be selected to improve registration accuracy; for inspection tasks with higher throughput requirements, a moderate K can be selected to balance efficiency and accuracy.

[0087] Corresponding to the above method embodiments, this application also provides an image subpixel registration device for defect detection. See also Figure 3 , Figure 3 This is a schematic diagram of an image subpixel registration device provided in an embodiment of this application. The device may include: an image acquisition module 31, an integer pixel offset calculation module 32, a two-dimensional frequency domain thinning processing module 33, a subpixel offset correction calculation module 34, and a registration module 35.

[0088] The image acquisition module 31 is used to acquire the image of the sample to be tested and the reference image of the defect-free sample.

[0089] The sample to be tested can be a mask, and the reference image can be a defect-free mask image, a reference image generated from design data, or other images that can serve as a defect-free standard. The image acquisition module 31 can also be used to perform preprocessing such as grayscale correction, denoising, and normalization on the image to be tested and the reference image, or to receive preprocessed images output by an external preprocessing module.

[0090] The integer pixel offset calculation module 32 is used to calculate the correlation response signal between the image to be detected and the reference image, and to search for the peak position from the correlation response signal.

[0091] Among them, the correlation response signal is used to characterize the cross-correlation relationship between the image to be detected and the reference image, and the peak position is used to indicate the integer pixel offset between the image to be detected and the reference image.

[0092] In one embodiment, the integer pixel offset calculation module 32 may include a frequency domain correlation calculation unit. This unit performs Fourier transforms on the image to be detected and the reference image respectively to obtain the spectral data of the image to be detected and the spectral data of the reference image; constructs a cross-power spectrum based on the spectral data of both images, and normalizes the cross-power spectrum; and performs an inverse Fourier transform on the normalized cross-power spectrum to obtain the correlation response signal.

[0093] In another embodiment, the integer pixel offset calculation module 32 may include a spatial domain correlation calculation unit. This spatial domain correlation calculation unit is used to calculate the normalized cross-correlation values ​​between the image to be detected and the reference image under multiple candidate relative displacements in the spatial domain, obtaining a normalized cross-correlation matrix as the correlation response signal.

[0094] The two-dimensional frequency domain refinement module 33 is used to extract the neighborhood signal at the peak position in the correlation response signal, and perform two-dimensional frequency domain refinement processing on the neighborhood signal based on linear frequency modulation Z-transform based on the sub-pixel multiple to obtain the refined correlation response surface.

[0095] Specifically, the two-dimensional frequency domain refinement processing module 33 may include a neighborhood extraction unit, a frequency domain transformation unit, a row-direction CZT refinement unit, a column-direction CZT refinement unit, and an inverse transformation unit.

[0096] The neighborhood extraction unit is used to extract a two-dimensional window of size L×L from the correlated response signal, centered on the peak position, to obtain the neighborhood signal. Further, the neighborhood extraction unit can determine the main lobe width of the correlated peak based on the response distribution of the correlated response signal in the region adjacent to the peak position, and determine the window size parameter L based on the main lobe width. Here, L can be greater than or equal to 3, and less than or equal to twice the main lobe width.

[0097] The frequency domain transformation unit is used to perform frequency domain transformation on the neighborhood signal to obtain the frequency domain matrix corresponding to the neighborhood signal.

[0098] The row-direction CZT refinement unit performs a CZT transform on each row of the frequency domain matrix to obtain the first refined frequency domain data. The column-direction CZT refinement unit performs a CZT transform on each column of the first refined frequency domain data to obtain the two-dimensional refined frequency domain data. The inverse transform unit performs an inverse transform on the two-dimensional refined frequency domain data to obtain the refined correlation response surface.

[0099] In one implementation, the two-dimensional frequency domain refinement processing module 33 can set the number of output points M=L×K after CZT transformation according to the sub-pixel multiplier K, and determine the step factor of CZT transformation according to M, so that the frequency sampling interval of CZT transformation in the row and column directions is reduced by a factor of K. The starting complex frequency of CZT can be determined according to the center position of the neighboring signal, so that the center position of the refined correlation response surface corresponds to the center position of the neighboring signal.

[0100] The subpixel offset correction calculation module 34 is used to search for the maximum value position from the thinning related response surface and calculate the subpixel offset correction between the image to be detected and the reference image based on the maximum value position.

[0101] In one implementation, the subpixel offset correction calculation module 34 can calculate the subpixel offset correction based on the maximum value position, the subpixel multiple, and the truncated window size.

[0102] The registration module 35 is used to register the image to be detected with the reference image based on the integer pixel offset and the sub-pixel offset correction.

[0103] Specifically, the registration module 35 can sum the integer pixel offset and the sub-pixel offset correction to obtain the total offset. Then, it performs translation compensation on the image to be detected or the reference image based on this total offset to align the two. After registration is completed, the registration module 35 can also output the registered image to the subsequent detection module for defect identification and extraction.

[0104] The apparatus provided in this embodiment belongs to the same inventive concept as the method embodiment described above. The specific working process, parameter setting methods, and technical effects of each module in the apparatus can be found in the relevant descriptions in the foregoing method embodiments, and will not be repeated here.

[0105] It should be noted that the various embodiments in this specification can be described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments. Especially for the device embodiments, since they basically correspond to the method embodiments, relevant parts can be referred to the description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate; the components indicated as modules may or may not be physical units, that is, they may be located in one location or distributed across multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments of this application.

[0106] The above descriptions are merely some specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations, substitutions, or combinations that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A sub-pixel registration method for image defect detection, characterized in that, include: Acquire the image of the sample to be tested and the reference image of the defect-free sample; The correlation response signal between the image to be detected and the reference image is calculated, and a peak position is searched from the correlation response signal; the correlation response signal is used to characterize the cross-correlation relationship between the image to be detected and the reference image; the peak position indicates the integer pixel offset between the image to be detected and the reference image. In the relevant response signal, the neighborhood signal at the peak position is extracted, and the neighborhood signal is subjected to two-dimensional frequency domain refinement based on linear frequency modulated Z-transform based on sub-pixel multiple to obtain a refined relevant response surface; wherein, the sub-pixel multiple is sampled in the two-dimensional frequency domain refinement process respectively; The maximum value position is searched from the refined relevant response surface, and the sub-pixel offset correction between the image to be detected and the reference image is calculated based on the maximum value position; The registration of the image to be detected and the reference image is achieved based on the integer pixel offset and the sub-pixel offset correction.

2. The method according to claim 1, characterized in that, The calculation of the sub-pixel offset correction between the image to be detected and the reference image based on the maximum value position includes: The subpixel offset correction amount between the image to be detected and the reference image is calculated based on the maximum value position, the subpixel multiple, and the size of the cropping window.

3. The method according to claim 2, characterized in that, The size of the cropping window is L×L, and the sub-pixel offset correction amount between the image to be detected and the reference image is: Where △x and △y are the sub-pixel offset corrections in the x and y directions, respectively, i max j max These are the x and y coordinates corresponding to the position of the maximum value, respectively, and K is the sub-pixel multiple.

4. The method according to claim 3, characterized in that, The step of registering the image to be detected with the reference image based on the integer pixel offset and the sub-pixel offset correction includes: The total offset is obtained by summing the integer pixel offset and the sub-pixel offset correction, and the registration of the image to be detected and the reference image is achieved based on the total offset.

5. The method according to claim 1, characterized in that, The two-dimensional frequency domain refinement process based on linear frequency modulation Z-transform is applied to the neighborhood signal based on sub-pixel multiples to obtain a refined correlation response surface, including: The neighborhood signal is transformed in the frequency domain to obtain the frequency domain matrix corresponding to the neighborhood signal; Perform a linear frequency-modulated Z-transform on each row of the frequency domain matrix to obtain the first refined frequency domain data; Perform a linear frequency-modulated Z-transform on each column of the first refined frequency domain data to obtain two-dimensional refined frequency domain data; The refined frequency domain data is subjected to an inverse transform to obtain the refined correlation response surface.

6. The method according to claim 5, characterized in that, The size of the capture window is L×L, and the number of output points after linear frequency modulation Z-transform is M=L×K, where K is the sub-pixel multiple; the step factor of the linear frequency modulation Z-transform is determined according to M, so that the frequency sampling interval of the linear frequency modulation Z-transform in the row and column directions is reduced by a factor of K.

7. The method according to claim 5, characterized in that, The starting complex frequency of the linear frequency modulated Z-transform is determined based on the center position of the neighborhood signal. The starting complex frequency is used to make the center position of the refined correlation response surface correspond to the center position of the neighborhood signal.

8. The method according to claim 1, characterized in that, The calculation of the correlation response signal between the image to be detected and the reference image includes: Fourier transforms are performed on the image to be detected and the reference image respectively to obtain the spectral data of the image to be detected and the spectral data of the reference image; a cross-power spectrum is constructed based on the spectral data of the image to be detected and the spectral data of the reference image, and the cross-power spectrum is normalized; an inverse Fourier transform is performed on the normalized cross-power spectrum to obtain the correlation response signal; or, In the spatial domain, the normalized cross-correlation values ​​of the image to be detected and the reference image under multiple candidate relative displacements are calculated to obtain the normalized cross-correlation matrix as the correlation response signal.

9. The method according to claim 1, characterized in that, Extracting the neighborhood signal of the peak position from the relevant response signal includes: Based on the response distribution of the relevant response signal in the vicinity of the peak position, the main lobe width of the relevant peak corresponding to the peak position is determined; The size parameter L of the cropping window is determined based on the width of the main lobe; wherein, L is greater than or equal to 3, and L is less than or equal to twice the width of the main lobe; Centered on the peak position, a two-dimensional window of size L×L is extracted from the relevant response signal according to the size parameter L of the extraction window to obtain the neighborhood signal.

10. An image subpixel registration device for defect detection, characterized in that, include: The image acquisition module is used to acquire the image of the sample to be inspected and the reference image of the defect-free sample. The integer pixel offset calculation module is used to calculate the correlation response signal between the image to be detected and the reference image, and to search for the peak position from the correlation response signal; the correlation response signal is used to characterize the cross-correlation relationship between the image to be detected and the reference image; the peak position indicates the integer pixel offset between the image to be detected and the reference image. A two-dimensional frequency domain refinement module is used to extract the neighborhood signal at the peak position from the correlation response signal, and perform two-dimensional frequency domain refinement processing on the neighborhood signal based on linear frequency modulation Z-transform based on sub-pixel multiples to obtain a refined correlation response surface; wherein, the sub-pixel multiples are sampled respectively in the two-dimensional frequency domain refinement processing; The subpixel offset correction calculation module is used to search for the maximum value position from the thinned related response surface, and calculate the subpixel offset correction between the image to be detected and the reference image based on the maximum value position; The registration module is used to register the image to be detected with the reference image based on the integer pixel offset and the sub-pixel offset correction.