Gallium nitride epitaxial wafer defect detection method based on image processing
Patent Information
- Application Number
- CN202611314570.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-10-27
AI Technical Summary
例如,仅计算多方向梯度后取最大值的方式,丢失了梯度方向之间的协变关系,对连续弯曲的纹理或各向异性程度变化的响应不够灵敏
采用不同旋转角度的各向同性高斯导数滤波器对原始显微图像进行卷积,获得多个方向梯度响应图并构造结构张量场,通过对结构张量矩阵进行特征值分解,提取出主方向角场和各向异性度量场。这一处理方式利用二阶梯度统计量完整保留各方向梯度之间的协变信息,而非仅保留最大梯度幅值,使得正常区域中纹理走向连续且各向异性分布均匀的结构特性,与缺陷区域中方向混杂、各向异性突变的结构特性在特征层面产生显著区分。主方向角场能够反映局部纹理的优势走向,各向异性度量场则量化该走向的显著程度和局部结构的一致性,二者共同构成了对氮化镓外延片微观结构取向和规整度的精细描述,为区分缺陷引起的结构异常与正常生长纹理提供了具有强区分度的信息基础。
Smart Images

Figure CN122989698A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to a gallium nitride epitaxial wafer defect detection method based on image processing. Background Technology
[0002] In the microscopic image detection of surface defects in gallium nitride epitaxial wafers, defective regions often exhibit subtle changes in crystal orientation, stress concentration, or microcracks, with texture directionality and structural anisotropy differing from normal regions. Existing defect detection methods mostly rely on direct thresholding or conventional edge detection operators. These methods depend on single grayscale gradient amplitude information, making it difficult to fully characterize the local structural changes caused by defects. Microscopic images of gallium nitride epitaxial wafers often contain complex growth textures and background brightness fluctuations. Detection based solely on gradient amplitude is highly susceptible to misclassifying normal textures as defects or missing small, low-contrast defects.
[0003] Existing defect analysis methods using fixed-direction gradient operators or phase consistency models can partially extract local directional information, but they fail to comprehensively quantify the degree of directional abrupt changes and the spatial fluctuations of structural anisotropy. For example, simply calculating the maximum value of multi-directional gradients loses the covariant relationship between gradient directions and is not sensitive enough to continuously curved textures or changes in anisotropy. In crystalline materials such as gallium nitride epitaxial wafers, the directional changes of defect boundaries often have non-rigid characteristics. Conventional methods cannot form stable anomalous responses in regions with drastic changes in orientation angles and local disturbances in anisotropy measurement, resulting in incomplete defect segmentation or blurred contours.
[0004] Improving the detection capability of small defects requires addressing how to utilize the second-order statistical properties of directional gradients to simultaneously capture breaks in directional continuity and non-uniformity in anisotropic distribution. Furthermore, constructing reliable defect candidate regions requires solving how to unify the spatial rate of change of the orientation angle with the local fluctuations of anisotropy measurements into a single defect response intensity map, thereby significantly enhancing the defect region while effectively suppressing background texture. Summary of the Invention
[0005] This invention provides a gallium nitride epitaxial wafer defect detection method based on image processing. It constructs a structural tensor field by multi-directional gradient response and extracts the principal direction angle field and anisotropic metric field. Then, it constructs a local phase consistency map based on the principal direction angle change rate and anisotropic fluctuation to achieve accurate extraction of gallium nitride epitaxial wafer defects.
[0006] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a gallium nitride epitaxial wafer defect detection method based on image processing, comprising: Obtain raw microscopic images of the surface of gallium nitride epitaxial wafers; Multi-directional gradient response calculations are performed on the original microscopic images to obtain a set of directional gradient response maps; Tensor construction is performed on the set of directional gradient response maps to obtain the structural tensor field; The structural tensor field is subjected to eigenvalue decomposition to obtain the principal direction angle field and anisotropic metric field; Based on the principal direction angle field and the anisotropic metric field, a local phase consistency map is constructed; The local phase consistency map is segmented by thresholding to obtain a binary map of the defect candidate region; Connectivity labeling is performed on the binary graph of the defect candidate region, and the defect detection result is output.
[0007] This method, through multi-directional gradient response extraction, can completely capture the intensity changes of the epitaxial wafer surface in multiple directions, avoiding missed detections caused by single-directional detection. The gradient response-based tensor construction process fuses dispersed directional information into a stable local structural representation, insensitive to noise and small-amplitude ripple fluctuations. Furthermore, eigenvalue decomposition of the structural tensor field yields a principal direction angle field that accurately describes the local texture orientation, while the anisotropic metric field effectively distinguishes between strongly directional normal texture regions and weakly directional or disordered defect regions. The local phase consistency map, jointly constructed using the principal direction angle change rate and anisotropic fluctuations, enhances the structural discontinuity caused by defects, suppresses the background response generated by normal lattice arrangement, and makes the defect region clearly prominent. Adaptive threshold segmentation and connected region area filtering further eliminate random noise and small artifacts, ensuring that the final defect detection result has high localization accuracy and a low false alarm rate.
[0008] As a technical solution of this invention, when obtaining the set of directional gradient response maps, multiple isotropic Gaussian derivative filters with different rotation angles are used to perform convolution operations on the original microscopic image to obtain multiple directional gradient response maps. Then, all directional gradient response maps are combined into the set of directional gradient response maps. The isotropic Gaussian derivative filter has a circularly symmetric frequency domain response, and its passband characteristics do not change after rotation, thus ensuring the balance of gradient responses in different directions, which is beneficial to the accuracy of subsequent structural tensor construction.
[0009] Preferably, when constructing a tensor from the set of directional gradient response maps, each directional gradient response map is first squared to obtain a set of squared response maps. Then, Gaussian smoothing filtering is applied to each squared response map in the set of squared response maps to obtain a set of smoothed squared response maps. Finally, the structure tensor field is constructed based on the product relationships between the smoothed squared response maps in the set of smoothed squared response maps. Gaussian smoothing of the squared responses can suppress high-frequency interference introduced by local gradient direction jumps, making the structure tensor field more stably reflect the second-order statistical features of local texture. In particular, the Gaussian smoothing filter uses a two-dimensional Gaussian kernel, and the standard deviation of the two-dimensional Gaussian kernel is the same as the scale parameter of the gradient operator, so that the smoothing degree matches the gradient extraction scale, avoiding over-smoothing leading to blurred defect boundaries or insufficient smoothing introducing false directional structures.
[0010] In the eigenvalue decomposition process of the structure tensor field, the structure tensor matrix at each pixel location is decomposed into eigenvalues to obtain the maximum and minimum eigenvalues and the eigenvector corresponding to the maximum eigenvalue. The angle of the eigenvector corresponding to the maximum eigenvalue is taken as the principal orientation angle at that pixel location, thus obtaining the principal orientation angle field. Based on the ratio of the difference between the maximum and minimum eigenvalues to their sum, an anisotropy measure is calculated to obtain the anisotropy measure field. This anisotropy measure can sensitively reflect the orientation concentration of the texture. The layered texture in the normal epitaxial region has obvious principal orientation and high anisotropy value, while the orientation consistency of defective regions such as dislocations and microcracks is significantly reduced, exhibiting low anisotropy values.
[0011] When constructing the local phase consistency map, a spatial difference operation is performed on the principal direction angle field to obtain the principal direction angle change rate map, and a local variance operation is performed on the anisotropic metric field to obtain the anisotropic fluctuation map. The two are then weighted and superimposed pixel-by-pixel to obtain the local phase consistency map. The principal direction angle change rate map is calculated as follows: for each pixel position in the principal direction angle field, the horizontal difference between the principal direction angle and its horizontal neighboring pixels, and the vertical difference between the principal direction angle and its vertical neighboring pixels are calculated. The square root of the sum of the squares of the horizontal and vertical differences is taken as the principal direction angle change rate at that pixel position. This change rate quantitatively characterizes the severity of the spatial deflection of the principal direction; abrupt changes in direction are often present at defect edges, resulting in larger change rate values. The anisotropic fluctuation map is constructed by defining local windows centered on each pixel within the anisotropic metric field, calculating the local mean of the anisotropic metric values within the window, and then calculating the ratio of the sum of squares of the differences between each value within the window and the local mean to the total number of pixels in the window. This yields the anisotropic fluctuation value at that pixel location. The anisotropic fluctuation value reflects the local oscillation amplitude of texture uniformity, exhibiting a significant peak at defect boundaries. By weighted superposition of the principal direction angle change rate map and the anisotropic fluctuation map, the defective region simultaneously exhibits high directional change rate and high anisotropic fluctuation, resulting in a stronger response, while the normal region shows a weak response due to its stable texture.
[0012] The threshold segmentation employs an adaptive approach. Histogram statistics are performed on all pixel values in the local phase consistency image to obtain a pixel value distribution histogram. A cumulative distribution function is calculated based on this histogram, and pixel values corresponding to a preset cumulative proportion within the cumulative distribution function are used as the segmentation threshold. Pixel positions in the image above the segmentation threshold are marked as the first value, and pixel positions less than or equal to the segmentation threshold are marked as the second value, generating a binary image of defect candidate regions. This threshold setting method is not dependent on a fixed threshold and can adapt to changes in the overall brightness and contrast of epitaxial wafer micrographs from different batches, improving the robustness of the method.
[0013] During connected component labeling and post-processing, the pixel positions marked with the first value in the binary image of the defect candidate region are traversed through eight connected components to obtain multiple connected regions. The pixel area of each connected region is calculated, and connected regions with pixel areas smaller than a preset area threshold are removed from the binary image to obtain an updated binary image of the defect candidate region. The retained connected regions are marked as defect regions, and the defect detection results are output. Area filtering effectively eliminates isolated small pseudo-defects formed by residual noise, allowing the output defect detection results to focus on real structural anomaly regions, improving the practicality and accuracy of the detection.
[0014] The technical effects and advantages provided by the present invention in the above technical solution are as follows: An isotropic Gaussian derivative filters with different rotation angles are used to convolve the original microscopic image to obtain multiple directional gradient response maps and construct a structure tensor field. By performing eigenvalue decomposition on the structure tensor matrix, the principal directional angular field and anisotropic metric field are extracted. This processing method utilizes second-order gradient statistics to fully preserve the covariance information between gradients in each direction, rather than just retaining the maximum gradient magnitude. This allows for a significant distinction at the feature level between the continuous texture orientation and uniform anisotropic distribution in normal regions and the mixed orientation and abrupt anisotropic distribution in defect regions. The principal directional angular field reflects the dominant orientation of the local texture, while the anisotropic metric field quantifies the significance of this orientation and the consistency of the local structure. Together, they constitute a detailed description of the orientation and regularity of the gallium nitride epitaxial wafer's microstructure, providing a highly discriminative information basis for distinguishing defect-induced structural anomalies from normal growth textures.
[0015] After obtaining the principal orientation angle field and the anisotropic metric field, a principal orientation angle rate of change map is obtained by performing spatial difference operations on the principal orientation angle field, and an anisotropic fluctuation map is obtained by performing local variance operations on the anisotropic metric field. The two maps are then weighted and superimposed pixel-by-pixel to form a local phase consistency map. The principal orientation angle rate of change map shows high values at pixel locations where the orientation changes or becomes disordered, directly locating discontinuous points in the texture direction. The anisotropic fluctuation map, on the other hand, forms a high response in areas where the anisotropic metric exhibits local fluctuations, capturing the non-stationary changes in structural anisotropy in space. Weighting and superimposing these two maps results in a very strong phase consistency response only in defect areas where both abrupt orientation changes and anisotropic disorder occur, while the response values in normal texture areas are significantly suppressed due to gentle orientation changes and stable anisotropy. The resulting local phase consistency map enhances different types of defects, such as microcracks, surface scratches, and crystal orientation deviations, without relying on preset defect templates or training samples. Background texture is effectively suppressed, improving the integrity and purity of defect candidate region extraction in subsequent threshold segmentation. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0017] Figure 1 This is a flowchart of a gallium nitride epitaxial wafer defect detection method based on image processing; Figure 2 This is a flowchart of the construction process for a local phase consistency map; Figure 3 This is a schematic diagram of the process of generating a smooth squared response plot; Figure 4 This is a schematic diagram of the pixel value distribution and segmentation threshold of the local phase consistency map; Figure 5 These are two-dimensional Gaussian kernel radial distribution curves with different standard deviations. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] See Figure 1 This invention provides a gallium nitride epitaxial wafer defect detection method based on image processing, comprising: acquiring an original microscopic image of the gallium nitride epitaxial wafer surface; performing multi-directional gradient response calculation on the original microscopic image to obtain a set of directional gradient response maps; constructing a tensor on the set of directional gradient response maps to obtain a structure tensor field; performing eigenvalue decomposition on the structure tensor field to obtain a principal directional angle field and an anisotropic metric field; constructing a local phase consistency map based on the principal directional angle field and the anisotropic metric field; performing threshold segmentation on the local phase consistency map to obtain a binary map of defect candidate regions; labeling connected components in the binary map of defect candidate regions, and outputting the defect detection result.
[0020] Example 1 In practice, the process of calculating the multi-directional gradient response of the original microscopic image to obtain a set of directional gradient response maps is as follows: the original microscopic image is convolved with gradient operators of different directions to obtain multiple directional gradient response maps; each directional gradient operator is an isotropic Gaussian derivative filter with different rotation angles; and all directional gradient response maps are combined into a set of directional gradient response maps.
[0021] An isotropic Gaussian derivative filter is obtained by taking the first-order directional derivative of a two-dimensional Gaussian function and performing rotational sampling within a set of angles. The expression for the two-dimensional Gaussian function is: in, The horizontal coordinates representing the pixel positions in the image plane. Represents the vertical coordinates of a pixel's position in the image plane. The scaling parameter represents the two-dimensional Gaussian function. The value of is determined based on the characteristic scale of the microstructure on the surface of the gallium nitride epitaxial wafer; for example, it can be set to . The pixel size is designed to accommodate the typical spatial extent of surface defects in gallium nitride epitaxial wafers. The horizontal partial derivative of the two-dimensional Gaussian function. and vertical partial derivatives They are respectively: The two-dimensional Gaussian function is angled with the horizontal axis as follows: Taking the directional derivative of the direction, we get the angle as... Continuous form of an isotropic Gaussian derivative filter : in, Indicates direction and angle. and These are the cosine and sine values of the direction angle, respectively, used to project the horizontal and vertical partial derivatives onto the angle. In the direction it points. (Yes / No) Sampling is performed on a discrete pixel grid, and the sample is truncated within a finite neighborhood to obtain the angle. The directional gradient operator template. The template size is based on... The value is determined, and is generally chosen to satisfy... The range of integer pixel coordinates allows the template to cover the main energy distribution region of the two-dimensional Gaussian function.
[0022] The set of angles includes From one angle, It is an integer greater than or equal to 4. From one angle Uniformly distributed within the interval, the first From one angle The value can be: in, This is the angle index number. For each angle... A corresponding gradient directional operator template is generated, and this template is then discretely convolved with the original microscopic image to obtain a gradient directional response map. The discrete convolution process involves aligning the center of the gradient directional operator template with the currently processed pixel position in the original microscopic image, calculating the product of the grayscale value of each pixel within the template coverage area and the corresponding coefficient in the template, and summing all products to obtain the gradient directional response value for that pixel position. This process is repeated for all pixel positions in the original microscopic image to generate a gradient directional response map of the same size as the original microscopic image. This process is repeated for all angles in the set of angles to obtain a total of [number missing]. The gradient response map in the amplitude direction will Combine the directional gradient response maps to obtain a set of directional gradient response maps.
[0023] Example 2 In practice, the process of constructing a tensor from the set of directional gradient response maps to obtain the structure tensor field is as follows: squaring each directional gradient response map in the set of directional gradient response maps to obtain a set of squared response maps; Gaussian smoothing filtering is applied to each squared response map in the set of squared response maps to obtain a set of smoothed squared response maps; and the structure tensor field is constructed based on the product relationship between each smoothed squared response map in the set of smoothed squared response maps.
[0024] The directional gradient response (RDG) map set consists of K RRG maps, where K is the total number of directional angles. Each RRG map is a two-dimensional matrix, where the row index corresponds to the vertical coordinate of the pixel, the column index corresponds to the horizontal coordinate of the pixel, and each element in the matrix represents the directional gradient response value at the corresponding pixel location. Squaring each RRG map means squaring the directional gradient response... Figure 2 The value of each element in the 2D matrix is squared to obtain a new 2D matrix, which serves as the squared response map. This squaring operation is performed on each directional gradient response map in the set, resulting in K squared response maps. All K squared response maps are combined to obtain the squared response map set.
[0025] Applying Gaussian smoothing filtering to each square response map in the set of square response maps involves convolving the square response maps with a two-dimensional Gaussian kernel. The expression for the two-dimensional Gaussian kernel is: in, This represents the horizontal offset of a pixel position relative to the center of a two-dimensional Gaussian kernel. This represents the vertical offset of a pixel position relative to the center of a two-dimensional Gaussian kernel. This represents the standard deviation of a two-dimensional Gaussian kernel. The value of and the scaling parameter of the isotropic Gaussian derivative filter Same, that is Using scale parameters Consistent The value is chosen to match the effective range of the Gaussian smoothing filter with the spatial extent of the directional gradient response, avoiding the introduction of additional scale bias. The size of the two-dimensional Gaussian kernel is determined based on... It is determined that the core radius is not less than The smallest integer is chosen to ensure that the 2D Gaussian kernel covers the main energy distribution region of the Gaussian function. During smoothing, the center of the 2D Gaussian kernel is aligned with the currently processed pixel position in the square response map. The product of each square response value within the coverage area of the 2D Gaussian kernel and its corresponding coefficient in the 2D Gaussian kernel is calculated, and all products are summed to obtain the value for the corresponding pixel position in the smoothed square response map. This process is repeated for all pixel positions in the square response map to generate a smoothed square response map. The Gaussian smoothing filter operation is then performed on all K square response maps in the set, resulting in K smoothed square response maps. Finally, all K smoothed square response maps are combined to obtain a set of smoothed square response maps.
[0026] Based on the product relationships between the smoothed squared response maps in the set, a structure tensor field is constructed. The set contains K smoothed squared response maps, with the k-th smoothed squared response map denoted as . , This is the index number of the smoothed squared response plot. In a structure tensor field, each pixel location corresponds to a structure tensor matrix, which is a... A symmetric matrix of the form: The four elements of the structure tensor matrix , , Determined in the following ways: This represents the cumulative value of the horizontal component corresponding to all smoothed squared response maps at that pixel location. The cumulative value of the vertical component corresponding to all smoothed squared response maps at this pixel location. This is the cumulative cross-value of the horizontal and vertical components at the pixel location.
[0027] In the method for constructing the set of orientation angles based on the orientation gradient response map, the k-th orientation angle... The corresponding projection coefficients of the directional gradient operator with respect to the horizontal direction are: The projection coefficient for the vertical direction is Based on this, the smoothed squared response plot The corresponding horizontal square response component contribution is The contribution of the squared response component in the vertical direction is The cross-direction component contribution is For each pixel location, the elements in the structure tensor matrix... The sum of the squared response components in the horizontal direction at this pixel location for all K smoothed squared response maps is, i.e. ;element The sum of the squared response components in the vertical direction at this pixel location for all K smoothed squared response maps is, i.e. ;element The sum of the cross-direction components of all K smoothed squared response maps at this pixel location, i.e. .in, The coordinates of the k-th smoothed squared response plot are: The grayscale value at the pixel location, This represents the horizontal coordinate of the pixel's position. This represents the vertical coordinate of the pixel location. A structure tensor matrix is constructed for each pixel location in the original microscopic image in the manner described above, and the structure tensor matrices of all pixel locations constitute a structure tensor field.
[0028] In some embodiments, the number K of angles in the direction angle set is set to 4, that is, using 0, , , Four angles. At this moment, and The value can be 0, 1, or 1 / 2, which simplifies the calculation of the elements of the structure tensor matrix.
[0029] After obtaining the structure tensor field, the process of performing eigenvalue decomposition on the structure tensor field to obtain the principal orientation angle field and the anisotropic metric field is as follows: Eigenvalue decomposition is performed on the structure tensor matrix at each pixel position in the structure tensor field to obtain the maximum eigenvalue, the minimum eigenvalue, and the eigenvector corresponding to the maximum eigenvalue; the angle of the eigenvector corresponding to the maximum eigenvalue is taken as the principal orientation angle at that pixel position to obtain the principal orientation angle field; based on the ratio of the difference between the maximum and minimum eigenvalues to their sum, the anisotropic metric at that pixel position is calculated to obtain the anisotropic metric field.
[0030] For the structure tensor matrix at a certain pixel location Its eigenvalues can be obtained by solving the characteristic equation. Obtain, among which for identity matrix Let represent the eigenvalues to be determined. The characteristic equation is: Solving the characteristic equation yields two eigenvalues, the larger of which is denoted as . , is the largest eigenvalue; smaller values are denoted as . This is the smallest eigenvalue. The eigenvector corresponding to the largest eigenvalue is... satisfy This can be obtained by solving the corresponding homogeneous linear equation system. Eigenvectors It can be represented as In form, This represents the orientation angle of the feature vector within the image plane. The principal orientation angle is... Its value can be obtained by inverse calculation using the following formula: Alternatively, a numerically stable arctangent function can be used for calculation. Perform the above eigenvalue decomposition and angle calculation on each pixel position in the structure tensor field to obtain the principal orientation angle of that pixel position. The principal orientation angles of all pixel positions constitute the principal orientation angle field.
[0031] The anisotropy measure is expressed by the formula: in, The largest eigenvalue, It is the smallest eigenvalue. When When this occurs, it indicates that there is no significant gradient energy at that pixel location, and anisotropy is measured. Set it directly to 0. For each pixel position in the structure tensor field, the corresponding anisotropy metric value is calculated, and the anisotropy metric values of all pixel positions constitute the anisotropy metric field.
[0032] Example 3 In specific implementation, please refer to Figure 2 The process of constructing a local phase consistency map based on the principal direction angle field and the anisotropic metric field is as follows: spatial difference operation is performed on the principal direction angle field to obtain the principal direction angle change rate map; local variance operation is performed on the anisotropic metric field to obtain the anisotropic fluctuation map; the principal direction angle change rate map and the anisotropic fluctuation map are superimposed pixel by pixel to obtain the local phase consistency map.
[0033] The method for obtaining the principal orientation angle rate of change map by performing spatial difference operations on the principal orientation angle field is as follows: The principal orientation angle field is a two-dimensional matrix, where each element corresponds to the principal orientation angle value of a pixel in the original microscopic image, expressed in radians. For any pixel in the principal orientation angle field, the principal orientation angle values of its horizontal and vertical neighboring pixels are obtained. The horizontal neighboring pixel is selected as the pixel immediately to the right of the current pixel along the horizontal direction; when the current pixel is located in the rightmost column of the principal orientation angle field, the horizontal neighboring pixel is taken as the current pixel itself, i.e., the principal orientation angle value of the horizontal neighboring pixel is taken as the principal orientation angle value of the current pixel. The vertical neighboring pixel is selected as the pixel immediately below the current pixel along the vertical direction; when the current pixel is located in the bottom row of the principal orientation angle field, the vertical neighboring pixel is taken as the current pixel itself, i.e., the principal orientation angle value of the vertical neighboring pixel is taken as the principal orientation angle value of the current pixel.
[0034] The horizontal difference value is obtained by subtracting the principal orientation angle values of the horizontal neighboring pixels from the principal orientation angle value of the current pixel position. The vertical difference value is obtained by subtracting the principal orientation angle values of the vertical neighboring pixels from the principal orientation angle value of the current pixel position. The sum of the squares of the horizontal and vertical difference values is calculated, and the square root of this sum is taken to obtain the rate of change of the principal orientation angle at the current pixel position. The square root operation can be implemented using the square root function in numerical computation. This process is repeated for all pixel positions in the principal orientation angle field to generate a principal orientation angle rate of change map with the same size as the principal orientation angle field. Each pixel value in the principal orientation angle rate of change map reflects the combined degree of change of the principal orientation angle in both the horizontal and vertical directions at the corresponding pixel position.
[0035] The anisotropic fluctuation map is obtained by performing local variance calculation on the anisotropic metric field as follows: The anisotropic metric field is a two-dimensional matrix, where each element corresponds to the anisotropic metric value at a pixel location in the original microscopic image. For any pixel location in the anisotropic metric field, a local window is defined centered on that pixel location. The size of the local window is determined based on the typical scale of surface defects in gallium nitride epitaxial wafers. The local window is set as a rectangular area with a width of M pixels and a height of N pixels, where M and N are both odd numbers, ensuring that the local window has a clearly defined center pixel location. An optional setting is to set M to 5 and N to 5, i.e., the local window is a 5-pixel × 5-pixel rectangular area, which strikes a balance between preserving local texture details and smoothing noise. When the current pixel location is close to the boundary of the anisotropic metric field, and the local window extends beyond the range of the anisotropic metric field, the pixel location extending beyond the boundary is mirror-filled, i.e., the pixel values near the boundary are symmetrically copied outward along the boundary to maintain the integrity of the local window.
[0036] Within a defined local window, the arithmetic mean of all anisotropic measurement values is calculated to obtain the local mean. The local mean is calculated by summing the anisotropic measurement values for each pixel within the local window and dividing by the total number of pixel locations contained in the local window. The total number of pixel locations is the product of M and N. For each pixel within the local window, the difference between the anisotropic measurement value and the local mean is calculated, and this difference is squared. The squared differences for all pixel locations within the local window are summed to obtain the sum of squared differences. This sum of squared differences is then divided by the total number of pixel locations contained in the local window to obtain the anisotropic fluctuation value for the current pixel location. This process is repeated for all pixel locations in the anisotropic measurement field to generate an anisotropic fluctuation map of the same size as the anisotropic measurement field. Each pixel value in the anisotropic fluctuation map reflects the dispersion of the anisotropic measurement values within the local window at that pixel location.
[0037] The process of obtaining a local phase consistency map by pixel-by-pixel weighted superposition of the principal orientation angle change rate map and the anisotropic fluctuation map is as follows: For each pixel location, the value of that pixel location in the principal orientation angle change rate map is multiplied by a first weighting coefficient, and the value of that pixel location in the anisotropic fluctuation map is multiplied by a second weighting coefficient. The two products are then added together to obtain the value of the corresponding pixel location in the local phase consistency map. The first and second weighting coefficients determine the relative contributions of the principal orientation angle change rate and anisotropic fluctuations to local phase consistency. The values of both the first and second weighting coefficients are between 0 and 1, and the sum of the first and second weighting coefficients is 1, thus normalizing the numerical range of the local phase consistency map. Since surface defects in gallium nitride epitaxial wafers simultaneously cause local disorder in principal orientation alignment and drastic fluctuations in anisotropy, the first and second weighting coefficients are both set to 0.5, giving equal weight to both types of information.
[0038] The aforementioned weighted superposition is applied to all pixel positions in the principal orientation angle change rate map and the anisotropic fluctuation map to generate a local phase consistency map. Each pixel value in the local phase consistency map combines the degree of principal orientation angle change and the degree of anisotropic fluctuation at that pixel position, exhibiting a high response value in defective areas and a low response value in normal areas.
[0039] Example 4 In specific implementation, the process of thresholding the local phase consistency map to obtain a binary map of the defect candidate region is as follows: perform histogram statistics on all pixel values in the local phase consistency map to obtain a pixel value distribution histogram; calculate the cumulative distribution function based on the pixel value distribution histogram, and use the pixel values that reach the preset cumulative ratio in the cumulative distribution function as the segmentation threshold; mark the pixel positions in the local phase consistency map that are greater than the segmentation threshold as the first value, and mark the pixel positions that are less than or equal to the segmentation threshold as the second value, thereby generating a binary map of the defect candidate region.
[0040] The method for obtaining the pixel value distribution histogram by performing histogram statistics on all pixel values in the local phase consistency map is as follows: The local phase consistency map is a grayscale image, and each pixel position in the grayscale image has a pixel value. Iterate through all pixel positions in the local phase consistency map and obtain the pixel value for each pixel position. The data type of the pixel value is a floating-point number. When calculating the pixel value distribution histogram, the range of pixel values in the local phase consistency map is divided into several continuous intervals, each interval is called a histogram bar. Each histogram bar corresponds to a pixel value interval, and the lower limit of the pixel value interval is denoted as . The upper limit is denoted as The width of the histogram bars It equals the difference between the upper and lower limits. The total number of bars in the histogram is denoted as... , The value range is related to the dynamic range of pixel values in the local phase consistency map. One possible setting is... This makes the width of each histogram bar... The value is equal to the total range of pixel values divided by 256. This setting strikes a balance between the detail of pixel value distribution and statistical stability. During the traversal, for each pixel value, it is determined which histogram bar the pixel value falls into, and the count value of that histogram bar is incremented by 1. After traversing all pixel positions, the count values of each histogram bar are obtained, and all histogram bars and their count values constitute a pixel value distribution histogram.
[0041] The method for calculating the cumulative distribution function based on the pixel value distribution histogram is as follows: Let the pixel value distribution histogram be... The count value of each histogram bar is ,in This represents the index number of the histogram bar. The total number of pixel positions in the local phase consistency map is denoted as... , The value of is equal to the product of the number of pixels in the horizontal direction and the number of pixels in the vertical direction in the local phase consistency map. The cumulative count value corresponding to each histogram bar From the 0th histogram bar to the 1st histogram bar The sum of the counts of the histogram bars is expressed by the formula: in, The index variables for the histogram bars in the summation operation range from 0 to 1. ; For the first The count values of each histogram bar; For the first The cumulative count values corresponding to each histogram bar. The cumulative distribution function value corresponding to each histogram bar For cumulative count value Total number of pixel positions The ratio, i.e. , The value ranges from 0 to 1.
[0042] After obtaining the cumulative distribution function, the method for determining the segmentation threshold is as follows: Based on the cumulative distribution function... Follow In the sequence of changes, find the first time that... Greater than or equal to the preset cumulative ratio Histogram column index Preset cumulative ratio The value ranges from 0 to 1, and its value is determined based on the statistical characteristics of the area ratio of gallium nitride epitaxial wafer surface defects in the entire image. Under normal process conditions, the proportion of gallium nitride epitaxial wafer surface defects in the imaging area typically does not exceed 5%, therefore, a preset cumulative ratio is used. Setting it to 0.95 ensures that pixels with values above the segmentation threshold account for approximately 5% of all pixels, corresponding to the defective regions with the most significant response values in the local phase consistency map. This histogram bar... The upper or middle value of the corresponding pixel value range is used as the segmentation threshold. One possible approach is to use the segmentation threshold... Take as the first The upper limit of the pixel value range corresponding to each histogram bar.
[0043] Determining the segmentation threshold Next, pixel positions in the local phase consistency map that are greater than the segmentation threshold are marked as the first value, and pixel positions that are less than or equal to the segmentation threshold are marked as the second value, generating a binary image of the defect candidate region. The first value is set to 1, and the second value is set to 0. The binary image of the defect candidate region is a binary image, in which pixel positions with a value of 1 correspond to the defect candidate region, and pixel positions with a value of 0 correspond to the background region.
[0044] The process of marking connected components in the binary map of the defect candidate region and outputting the defect detection result is as follows: Eight connected components are traversed at the pixel positions marked with the first value in the binary map of the defect candidate region to obtain multiple connected regions; the pixel area of each connected region is calculated, and connected regions with pixel areas less than a preset area threshold are removed from the binary map of the defect candidate region to obtain an updated binary map of the defect candidate region; the connected regions retained in the updated binary map of the defect candidate region are marked as defect regions, and the defect detection result is output.
[0045] The method for traversing the eight-connected regions of the pixel positions marked with the first value in the binary image of the defect candidate region is as follows: A two-pass connected region marking algorithm is used to scan the binary image of the defect candidate region row by row from top to bottom and from left to right. During the scanning process, for each pixel position marked with the first value, it is checked whether there are also pixels marked with the first value among its eight adjacent pixels (upper, lower, left, right, upper left, upper right, lower left, and lower right). Pixel positions marked with the first value that are connected to each other are grouped into the same connected region, and each connected region is assigned a unique identifier. After scanning all pixel positions, several connected regions are obtained, each consisting of a group of eight-connected pixels marked with the first value.
[0046] The pixel area of each connected region is calculated as follows: The number of pixel positions marked with a first value within each connected region is counted, and this number is taken as the pixel area of the corresponding connected region. Removing connected regions with pixel areas smaller than a preset area threshold from the defect candidate region binary map means modifying the values of all pixel positions within that connected region in the defect candidate region binary map from the first value to the second value. The preset area threshold is determined based on the pixel size of the smallest resolvable defect on the gallium nitride epitaxial wafer surface. The preset area threshold is set to 15 pixels. This value can filter out isolated small-area pseudo-defect regions caused by imaging noise or surface micro-textures, while retaining continuous regions with actual defect significance. After the removal operation, an updated defect candidate region binary map is obtained.
[0047] The connected regions retained in the updated binary map of candidate defect regions are marked as defect regions, and the defect detection results are output. The defect detection results include the location, boundary, and area information of each defect region. The location information is represented by the set of coordinates of all pixel positions within the defect region, the boundary information is represented by the sequence of contour points within the defect region, and the area information is represented by the total number of pixel positions within the defect region. The defect detection results are output in structured data format, which can be used for process analysis and quality assessment of gallium nitride epitaxial wafers.
[0048] See Figure 4 In the figure, the horizontal axis represents the pixel values of the local phase consistency map, the left side of the vertical axis corresponds to the blue bar chart representing the frequency distribution of pixel values, and the right side corresponds to the red curve representing the cumulative distribution function of pixel values. The blue bar chart shows that the pixel value distribution is highly concentrated in the range of 0 to 0.2, with the frequency reaching a peak near 0.05, after which the frequency gradually decreases. The frequency corresponding to pixel values above 0.5 is extremely low, indicating that the local phase consistency response value is low at most pixel locations. The red cumulative distribution function curve rises smoothly, reaching a cumulative ratio of 0.95 at a pixel value of approximately 0.57. The pixel value of approximately 0.57, marked by the vertical black dashed line in the figure, is used as the segmentation threshold. As described in Example 4, this threshold corresponds to a cumulative distribution function reaching a preset cumulative ratio of 0.95, which is used for threshold segmentation of the local phase consistency map. The pixel value proportion in the area to the left of the segmentation threshold is approximately 95%, marked as the background area; the pixel value proportion in the area to the right is approximately 5%, marked as the defect candidate area.
[0049] Example 5 In specific implementation, please refer to Figure 3 In constructing the structure tensor field, a two-dimensional Gaussian kernel is used when performing Gaussian smoothing filtering on each square response map in the set of square response maps. The expression for the two-dimensional Gaussian kernel is: in, This represents the horizontal offset of a pixel position relative to the center of a two-dimensional Gaussian kernel. This represents the vertical offset of a pixel position relative to the center of a two-dimensional Gaussian kernel. This represents the standard deviation of a two-dimensional Gaussian kernel. The value of is set to the scale parameter corresponding to the gradient operator. The same value, that is The size of the two-dimensional Gaussian kernel is based on It is determined that the core radius is not less than The smallest integer such that the generated discrete template covers the Gaussian function. The main energy distribution region within the range. The generated two-dimensional Gaussian kernel template is used to convolve each squared response map to obtain a smoothed squared response map. All squared response maps are filtered using the same two-dimensional Gaussian kernel template to obtain a set of smoothed squared response maps. Since... and With the same value, the spatial range of the smoothing operation is consistent with the spatial extension range of the directional gradient operator in the calculation of the directional gradient response.
[0050] See Figure 5 The current illustration shows the two-dimensional Gaussian kernel filter function as a function of radial offset in Example 5. A graph showing the change. The horizontal axis in the graph represents the radial offset. The units are pixels, ranging from 0 to approximately 7.5, representing the distance from the center of the Gaussian kernel outwards; the vertical axis represents the Gaussian kernel coefficients, with values ranging from approximately 0 to 0.075, indicating the weight of the two-dimensional Gaussian kernel at the corresponding radial offset. Three different standard deviations are plotted in the figure. The two-dimensional Gaussian kernel radial function curves, respectively, correspond to (Blue solid line) (Orange dashed line) and (Green dotted lines), among which is the scale parameter corresponding to the gradient operator.
[0051] Observing the trend of the curves, all three curves are in It reaches its maximum value at a certain point, and then monotonically decreases with increasing radial offset, and the decreasing trend continues... It increases but slows down. Specifically, The blue curve decays most rapidly, and the Gaussian kernel weights are at... The pixel value drops rapidly to near zero, indicating that when the standard deviation is small, the energy of the two-dimensional Gaussian kernel is concentrated and the spatial filtering range is small. The orange curve decays more slowly, with weights in... to The pixel count remains at a medium level, indicating that the filtering range has been relatively expanded. The green curve declines the slowest, with a weight of [missing information]. There are still noticeable values near the pixels, indicating a smoothing effect on a larger scale.
[0052] Furthermore, the energy distribution of the three curves in the figure is basically covered by... The value shall not exceed approximately Within the range, it conforms to the requirement in Example 5 that the size of the two-dimensional Gaussian kernel is not less than The design requires finding the smallest integer. This design ensures that the filter template covers the main energy distribution region of the Gaussian function, avoiding truncation errors.
[0053] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A gallium nitride epitaxial wafer defect detection method based on image processing, characterized in that, The method includes: Obtain raw microscopic images of the surface of gallium nitride epitaxial wafers; Multi-directional gradient response calculations are performed on the original microscopic images to obtain a set of directional gradient response maps; Tensor construction is performed on the set of directional gradient response maps to obtain the structural tensor field; The structural tensor field is subjected to eigenvalue decomposition to obtain the principal direction angle field and anisotropic metric field; Based on the principal direction angle field and the anisotropic metric field, a local phase consistency map is constructed; The local phase consistency map is segmented by thresholding to obtain a binary map of the defect candidate region; Connectivity labeling is performed on the binary graph of the defect candidate region, and the defect detection result is output.
2. The gallium nitride epitaxial wafer defect detection method based on image processing according to claim 1, characterized in that, Multi-directional gradient response calculations are performed on the original microscopic image to obtain a set of directional gradient response maps, including: The original microscopic image is convolved using gradient operators in different directions to obtain gradient response maps in multiple directions. The gradient operators in each direction are isotropic Gaussian derivative filters with different rotation angles; All the directional gradient response maps are combined into the directional gradient response map set.
3. The gallium nitride epitaxial wafer defect detection method based on image processing according to claim 2, characterized in that, Tensor construction is performed on the set of directional gradient response maps to obtain the structure tensor field, including: Squaring each directional gradient response map in the set of directional gradient response maps yields a set of squared response maps. Gaussian smoothing filtering is applied to each square response map in the square response map set to obtain a smoothed square response map set. The structure tensor field is constructed based on the product relationships between the various smooth square response maps in the set of smooth square response maps.
4. The gallium nitride epitaxial wafer defect detection method based on image processing according to claim 3, characterized in that, The structural tensor field is subjected to eigenvalue decomposition to obtain the principal direction angle field and anisotropic metric field, including: Eigenvalue decomposition is performed on the structural tensor matrix at each pixel position in the structural tensor field to obtain the maximum eigenvalue, the minimum eigenvalue, and the eigenvector corresponding to the maximum eigenvalue. The angle of the feature vector corresponding to the largest eigenvalue is used as the principal direction angle of the pixel position to obtain the principal direction angle field; The anisotropy measure of the pixel location is calculated based on the ratio of the difference between the maximum and minimum eigenvalues to the sum of the eigenvalues, thus obtaining the anisotropy measure field.
5. The image processing-based defect detection method for radium nitride epitaxial wafers according to claim 4, characterized in that, Based on the principal direction angular field and the anisotropic metric field, a local phase consistency map is constructed, including: Spatial difference operation is performed on the principal direction angle field to obtain the principal direction angle change rate map; Local variance calculation is performed on the anisotropic metric field to obtain an anisotropic wave map; The local phase consistency map is obtained by weighting and superimposing the principal direction angle change rate map and the anisotropic fluctuation map pixel by pixel.
6. The gallium nitride epitaxial wafer defect detection method based on image processing according to claim 5, characterized in that, Perform spatial difference operations on the principal direction angle field to obtain a principal direction angle change rate map, including: For each principal direction angle in the principal direction angle field, calculate the horizontal difference between the principal direction angle and the principal direction angle of its horizontal neighboring pixels, and the vertical difference between the principal direction angle and the principal direction angle of its vertical neighboring pixels. The square root of the sum of the squares of the horizontal and vertical differences is taken as the rate of change of the principal direction angle at the pixel position. By traversing all pixel positions in the principal direction angle field, the rate of change map of the principal direction angle is obtained.
7. The gallium nitride epitaxial wafer defect detection method based on image processing according to claim 5, characterized in that, Performing local variance calculation on the anisotropic metric field to obtain an anisotropic fluctuation map includes: For each anisotropic metric value in the anisotropic metric field, a local window is defined centered on the pixel position; Calculate the average of all anisotropy measures within the local window to obtain the local mean; The ratio of the sum of squares of the differences between all anisotropic measurement values and the local mean within the local window to the total number of pixels in the window is used as the anisotropic fluctuation value at that pixel location. By traversing all pixel positions in the anisotropic metric field, the anisotropic wave map is obtained.
8. The gallium nitride epitaxial wafer defect detection method based on image processing according to claim 1, characterized in that, Threshold segmentation is performed on the local phase consistency map to obtain a binary map of the defect candidate region, including: Histogram statistics are performed on all pixel values in the local phase consistency map to obtain a pixel value distribution histogram; Based on the pixel value distribution histogram, a cumulative distribution function is calculated, and the pixel values that reach a preset cumulative ratio in the cumulative distribution function are used as the segmentation threshold. The pixel positions in the local phase consistency map that are greater than the segmentation threshold are marked as first values, and the pixel positions that are less than or equal to the segmentation threshold are marked as second values, thereby generating the binary map of the defect candidate region.
9. The gallium nitride epitaxial wafer defect detection method based on image processing according to claim 8, characterized in that, Connectivity labeling is performed on the binary graph of the defect candidate region, and the defect detection results are output, including: The pixel positions marked with the first value in the binary image of the defect candidate region are traversed by eight connected components to obtain multiple connected regions; Calculate the pixel area of each connected region, and remove connected regions with pixel areas smaller than a preset area threshold from the defect candidate region binary map to obtain an updated defect candidate region binary map; The connected regions retained in the updated defect candidate region binary map are marked as defect regions, and the defect detection results are output.
10. The gallium nitride epitaxial wafer defect detection method based on image processing according to claim 3, characterized in that, The Gaussian smoothing filter uses a two-dimensional Gaussian kernel, and the standard deviation of the two-dimensional Gaussian kernel is the same as the scale parameter of the gradient operator.