A method for detecting micro-defects of a diamond wafer based on image enhancement

By decomposing the common-mode and differential-mode responses and normalizing the local scale in the micro-defect detection method on the surface of diamond wafers, and combining bidirectional extension and cross-verification, the problem of the low-response section being difficult to stably judge in the micro-crack detection of the surface of diamond wafers is solved, and more accurate identification and characterization of the continuous morphology of micro-cracks is achieved.

CN123160898APending Publication Date: 2026-11-24JIANGSU SUJIN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611554072.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-09
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing methods for detecting microcracks on diamond wafer surfaces are insufficient to reliably determine whether low-response regions belong to the same microcrack, making it difficult to accurately characterize the continuous morphology and extension range of microcracks.

Method used

By decomposing the common-mode and differential-mode responses of the opposing illumination image group, the brightness fluctuations of the crystal plane are corrected, and local scale normalization and orientation enhancement are implemented to form a micro-defect orientation response map. Combined with bidirectional extension and intersection verification, the strong response segments of the crack are connected to form a continuous micro-defect response map. Finally, the defect type and contour position are identified and recorded to form the micro-defect detection result.

Benefits of technology

It improves the accuracy of continuous microcrack identification, enhances the reliability of the correlation between low-response sections and real cracks, reduces crack fracture characterization caused by local response attenuation, and makes the continuous micro-defect response map more complete in maintaining the microcrack extension morphology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123160898A_ABST
    Figure CN123160898A_ABST
Patent Text Reader

Abstract

This invention discloses a method for detecting micro-defects in diamond wafers based on image enhancement, belonging to the field of defect detection technology. The method includes: dividing a high-response segment and a low-response interval from a micro-defect directional response map; performing bidirectional extension on the low-response interval; retaining extension positions with continuous changes within a preset allowable range; connecting the corresponding high-response segments after verification by intersection positions and opposing grayscale response relationships to form a continuous micro-defect response map; identifying linear micro-cracks, point-like micro-pits, and edge micro-notches based on the regional contour and skeleton length of the response area in the continuous micro-defect response map, combined with the intersection relationship between the regional contour and the edge of the diamond wafer; recording the defect type and contour position to form a micro-defect candidate set; and merging overlapping micro-defect candidate areas within adjacent scanning areas to form the micro-defect detection result. This invention improves the accuracy of continuous micro-crack identification through bidirectional extension verification of the low-response interval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of defect detection technology, and in particular to a method for detecting micro-defects in diamond wafers based on image enhancement. Background Technology

[0002] With the expanding applications of diamond materials in high-power electronic devices, precision optical devices, and advanced thermal management, the impact of diamond wafer surface quality on device performance and subsequent processing accuracy is receiving increasing attention. Diamond possesses high hardness, high thermal conductivity, a wide bandgap, and excellent chemical stability; however, during processing stages such as cutting, grinding, and polishing, micro-scale surface features such as microcracks, micropits, and edge micro-notches may form on the wafers. Current research on the detection of micro-defects on diamond wafer surfaces mainly employs microscopic optical imaging, dark-field imaging, directional illumination imaging, and digital image processing techniques, combined with grayscale characterization, edge analysis, texture analysis, and image enhancement methods to study the optical response laws and morphological characteristics of different micro-defects. Stable characterization of weak defect responses has become an important research direction for diamond wafer surface inspection.

[0003] For the continuous identification of microcracks on the surface of diamond wafers, existing image enhancement and crack detection methods still suffer from the problem of inaccurate association of low-response segments. Influenced by differences in crystal plane reflection, local brightness fluctuations, and variations in the intensity of microcrack response, the same microcrack may experience local response attenuation or even interruption along its extension direction, causing the crack to appear as multiple separate response segments in the image. Existing methods mainly rely on local grayscale, edge intensity, and spatial adjacency to determine crack continuity. When adjacent texture responses exist on both sides of a low-response interval, it is difficult to reliably determine whether the responses on both sides belong to the same microcrack. This can easily lead to the segmentation of truly continuous cracks, thus affecting the accurate characterization of the continuous morphology and extension range of microcracks. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides an image-enhanced method for detecting micro-defects in diamond wafers to solve the problem of difficulty in reliably determining whether the responses on both sides belong to the same micro-crack.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a method for detecting micro-defects in diamond wafers based on image enhancement, comprising: The common-mode and differential-mode responses of the opposite illumination images in the opposing illumination image group are decomposed. The brightness fluctuations of the crystal plane are corrected according to the common-mode response, and the local scale normalization and orientation enhancement are applied to the differential-mode response to form a micro-defect orientation response map. From the micro-defect directional response map, divide the crack strong response segment and low response interval, perform bidirectional extension on the low response interval, retain the extension position with continuous change within the preset allowable range, and connect the corresponding crack strong response segment after verifying the intersection position and the opposing gray-scale response relationship to form a continuous micro-defect response map. Based on the region contour and skeleton length of the response area in the continuous micro-defect response map, and combined with the intersection relationship between the region contour and the edge of the diamond wafer, linear microcracks, point micro-pits and edge micro-notches are identified, the defect type and contour position are recorded, and a micro-defect candidate set is formed. The coordinates of the diamond wafer surface are calculated based on the contour positions of the micro-defect candidate set, and overlapping micro-defect candidate regions in adjacent scanning areas are merged to form micro-defect detection results.

[0007] As a preferred embodiment of the image enhancement-based diamond wafer micro-defect detection method of the present invention, wherein: the formation of the micro-defect orientation response map specifically involves, The average grayscale value of the oppositely illuminated images at the same pixel location in the oppositely illuminated image group is calculated, and the absolute value of the grayscale difference between the oppositely illuminated images is calculated to form the common-mode response and the differential-mode response, respectively. Based on the median gray value of each pixel neighborhood in the common-mode response, when the median gray value is lower than the preset minimum brightness reference, the preset minimum brightness reference is determined as the correction denominator; when the median gray value is not lower than the preset minimum brightness reference, the median gray value is determined as the correction denominator. The ratio of the gray value amplitude of the differential-mode response to the corresponding correction denominator is calculated pixel by pixel to form the corrected differential-mode response. Based on the grayscale deviation scale of each pixel neighborhood in the corrected differential response, the differential response of the corresponding pixel is scaled to form a local scale-normalized differential response. The local gradient direction is calculated for the local scale normalized differential response. The response intensity of adjacent pixels is compared along the local gradient direction, and the differential response of the corresponding pixel is enhanced according to the comparison result to form a micro-defect direction response map.

[0008] As a preferred embodiment of the image enhancement-based diamond wafer micro-defect detection method of the present invention, wherein: the step of dividing the micro-defect directional response map into strong response segments and low response intervals is specifically as follows: Continuous response pixels are traced along the local extension direction in the response map of the micro-defect direction, and the response pixels with continuously changing local extension directions are aggregated into crack structure lines. Select and preserve continuous high-response locations from the crack structure line to form a strong crack response zone; Mark consecutive low response locations between adjacent strong response segments of cracks in the crack structure line. Compare the local gradient direction and response intensity of consecutive low response locations with those of strong response segments of cracks. Mark consecutive low response locations with continuous local gradient directions and response intensities lower than those of strong response segments of cracks as low response intervals.

[0009] In a preferred embodiment of the image enhancement-based diamond wafer micro-defect detection method of the present invention, the method of retaining the continuously varying extension positions within a preset allowable range specifically includes: Using the ends of the crack strong response sections corresponding to the two boundaries of the low response interval as the starting point for extension, the low response interval is subjected to directional constraint region growth along the extension direction of the ends of the crack strong response sections. The pixel positions connected to the extension starting point are sequentially included in the extension range to form the extension position. The extension extends position by position along the direction of extension, and the direction of extension of the next extension position is defined by the previous extension position, forming a continuous distribution of extension positions. By comparing the extension direction, crack width, and differential mode response of adjacent extension positions, the directional deflection, crack width change, and differential mode response change are obtained respectively. Check the directional deflection, crack width change, and differential mode response change within the preset allowable range, and retain the extension positions where the directional deflection, crack width change, and differential mode response change are all within the preset allowable range.

[0010] As a preferred embodiment of the image enhancement-based diamond wafer micro-defect detection method of the present invention, wherein: the formation of a continuous micro-defect response map specifically involves, Within a low response interval, locate the position where the extension positions corresponding to the two extension start points coincide, record the first coincidence position as the initial intersection position, and map the initial intersection position to the opposite illumination image in the opposing illumination image group; From the initial intersection position, check the opposing gray-scale response relationship of the extension positions towards the two extension starting points respectively. Compare the opposing gray-scale response changes of adjacent extension positions according to the extension order, and mark the initial intersection position with continuous opposing gray-scale response as the effective intersection position. Using the low response interval corresponding to the effective intersection position as the connecting segment, the crack strong response segments corresponding to the two boundaries of the low response interval are connected to form a continuous micro-defect response map.

[0011] In a preferred embodiment of the image enhancement-based diamond wafer micro-defect detection method of the present invention, the step of forming a micro-defect candidate set specifically involves: Freeman chain code is used to trace the contour of the response region in the continuous micro-defect response map, and the Zhang-Suen iterative refinement algorithm is used to iteratively refine the response region defined by the contour to form a connected skeleton and record the skeleton length. Based on the correspondence between the length and width of the minimum bounding rectangle of the region profile and the length of the skeleton, linear microcracks in the response region are identified. The connection state of the beginning and end of the region contour is checked along the Freeman chain code. The response region that remains closed and does not meet the recognition conditions of linear microcracks is regarded as point micropits. For response regions not identified as linear microcracks or point micropits, the intersection of the region contour and the edge of the diamond wafer is checked. Response regions with intersections are designated as edge micro-notches. The defect types and contour locations of linear microcracks, point micropits, and edge micro-notches are collected to form a candidate set of micro-defects.

[0012] As a preferred embodiment of the image enhancement-based diamond wafer micro-defect detection method of the present invention, wherein: the formation of micro-defect detection results specifically comprises, Based on the contour position of the micro-defect candidate set and the scanning area position of the adjacent scanning area on the diamond wafer surface, the contour position is converted into diamond wafer surface coordinates. In the coordinate system on the diamond wafer surface, the overlap range of the contours of adjacent scanned areas corresponding to micro-defect candidate regions is compared, and micro-defect candidate regions with overlapping contours are marked. Micro-defect candidate regions with overlapping contours and consistent defect types are merged according to the range of contour overlap to form micro-defect detection results.

[0013] As a preferred embodiment of the image enhancement-based diamond wafer micro-defect detection method of the present invention, wherein: the scanning area position on the diamond wafer surface is the spatial positioning position determined by each scanning field of view relative to the entire diamond wafer surface; The diamond wafer surface coordinates are the coordinate information of the spatial position of the micro-defect on the entire diamond wafer surface.

[0014] As a preferred embodiment of the image enhancement-based diamond wafer micro-defect detection method of the present invention, the preset allowable range includes the allowable range of directional deflection, the allowable range of crack width variation, and the allowable range of differential mode response variation.

[0015] In a preferred embodiment of the image enhancement-based diamond wafer micro-defect detection method of the present invention, the step of forming a connected skeleton and recording the skeleton length specifically involves: The Zhang–Suen iterative refinement algorithm is used to perform two sub-iteration stages on the foreground pixels. In each sub-iteration stage, foreground pixels whose number of eight neighboring foreground pixels is within the preset range of the number of foreground neighboring pixels, and whose number of times they are transformed from background pixels to foreground pixels in a clockwise cyclic order along the eight neighboring pixels is once. In the first sub-iteration phase, the filtering results with at least one background pixel in the upper, right, and lower adjacent positions, and at least one background pixel in the right, lower, and left adjacent positions are marked as pixels to be deleted, and then deleted uniformly after traversal is completed; The second sub-iteration phase, based on the updated response region, marks the filtering results where there is at least one background pixel in the upper, right, and left adjacent positions, and at least one background pixel in the upper, lower, and left adjacent positions as pixels to be deleted, and deletes them uniformly after traversal is completed; Repeat the two sub-iteration stages until no pixels to be deleted are generated in a complete refinement iteration, forming a connected skeleton, and calculate the skeleton length based on the distance between adjacent skeleton pixels and the actual spatial size corresponding to a single pixel.

[0016] The beneficial effects of this invention are as follows: By using bidirectional extension verification with a low response interval, the accuracy of continuous microcrack identification is improved. Based on the micro-defect direction response map formed by image enhancement, the extension is synchronously extended inward from the ends of the strong response sections on both sides of the low response interval. The extension position is continuously constrained by the direction deflection, crack width change, and differential mode response change, so that the crack extension relationship in the weak response region maintains stable consistency in direction and morphological continuity. Furthermore, by combining the intersection relationship of the extension positions on both sides and the continuity of the opposing grayscale response for verification, the reliability of the association between the low response section and the real crack can be enhanced, the crack fracture characterization caused by local response attenuation can be reduced, and the continuous micro-defect response map can more completely maintain the microcrack extension morphology, providing a more stable continuous response basis for subsequent linear microcrack identification and contour characterization. Attached Figure Description

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

[0018] Figure 1 This is a flowchart of an image enhancement-based method for detecting micro-defects in diamond wafers.

[0019] Figure 2 This is a bidirectional extension and intersection verification diagram for low response intervals.

[0020] Figure 3This is for micro-defect morphology identification and adjacent scan area merging.

[0021] Figure 4 This is a verification diagram of micro-defect response enhancement and continuous recovery. Detailed Implementation

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0023] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0024] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0025] Reference Figures 1-4 This is one embodiment of the present invention, which provides a method for detecting micro-defects in diamond wafers based on image enhancement, comprising the following steps: Under the same illumination and exposure conditions as the diamond wafer under test, a reference diamond wafer with opposite illumination was acquired. The imaging magnification and pixel spatial scale were fixed. Crystal plane regions without obvious micro-defects and regions with confirmed continuous microcracks were marked by microscopic verification. At the same time, the locations of confirmed point-like micro-pits and edge micro-notches were recorded to form a calibration image. Among them, crystal plane regions without obvious micro-defects were used to determine the background brightness and background response distribution, regions with confirmed continuous microcracks were used to determine the crack direction and continuous change characteristics, and response regions with confirmed defect types were used to calibrate the morphology recognition conditions. For the locations where adjacent scanning fields of view overlapped, the repetitive imaging relationship of the same micro-defect was confirmed by combining the wafer surface positioning marks and microscopic verification results, which was used to calibrate the contour coincidence judgment threshold. Percentiles were uniformly determined using the nearest rank method. The calibration image and the image under test used the same image processing parameters, and the calibration results remained unchanged during the same batch of testing.

[0026] S1. Decompose the common-mode response and differential-mode response of the opposite illumination image in the opposite illumination image group, correct the crystal plane brightness fluctuation according to the common-mode response, and implement local scale normalization and orientation enhancement on the differential-mode response to form a micro-defect orientation response map.

[0027] S1.1 Calculate the average grayscale value of the oppositely illuminated images at the same pixel location in the oppositely illuminated image group, and calculate the absolute value of the grayscale difference between the oppositely illuminated images to form the common-mode response and differential-mode response respectively. Specifically, Using the pixel coordinates after co-registration as the corresponding reference, the pixel positions of the first and second opposite illumination images are read. grayscale value at and .

[0028] The common-mode response is determined according to the following formula. and differential response : ; ; In the formula, Indicates pixel position The background brightness response of the crystal planes retained under opposite illumination conditions This represents the grayscale difference response at the same pixel location as the illumination direction changes.

[0029] All sorted by pixel coordinates and This yields common-mode and differential-mode responses with the same pixel size as the image under opposite illumination, and maintains a one-to-one correspondence between the two types of responses at the same pixel coordinates, providing a pixel-level correspondence for subsequent crystal plane brightness fluctuation correction.

[0030] S1.2. Based on the median gray level of each pixel's neighborhood in the common-mode response, when the median gray level is lower than a preset minimum brightness reference, the preset minimum brightness reference is determined as the correction denominator; when the median gray level is not lower than the preset minimum brightness reference, the median gray level is determined as the correction denominator. The ratio of the gray level amplitude of the differential-mode response to the corresponding correction denominator is calculated pixel-by-pixel to form the corrected differential-mode response. Specifically... Based on the lateral response of the confirmed continuous microcrack region in the calibration image and the background on both sides, the local neighborhood size is determined. The square neighborhood with odd-numbered side lengths is gradually expanded with the marked crack position as the center until both sides of the crack contain background pixels and the number of background pixels in the neighborhood exceeds the number of crack response pixels. The neighborhood side length that first satisfies the above conditions at each calibration position is recorded, and the maximum side length in all records is used as the fixed neighborhood side length for this batch.

[0031] Centered on the current pixel position in the differential response, a local neighborhood of that size is extracted at the corresponding coordinates of the common-mode response. Mirror extension is used to supplement the neighboring pixels at the image boundary. The common-mode response in the local neighborhood is sorted by gray level to determine the median gray level corresponding to the current pixel, and this median gray level is used as the local crystal plane brightness reference.

[0032] Let the median gray level of the local neighborhood corresponding to the common-mode response be... The corrected differential mode response is determined according to the following formula. : ; In the formula, This represents the corrected differential mode response. Indicates pixel position Differential mode response, This represents the median gray level of the corresponding local neighborhood. This indicates the preset minimum brightness reference.

[0033] For crystal plane regions without obvious micro-defects in the calibration image, the median gray level is calculated using the same neighborhood size. All median gray levels greater than zero are counted, and the fifth percentile is determined as the preset minimum brightness reference. If no positive median gray level is obtained, a calibration image with valid exposure is re-acquired. If the median gray level of the current pixel is lower than the preset minimum brightness reference, the preset minimum brightness reference is used as the correction denominator, and the corresponding median gray level is used as the correction denominator for other positions. The calculation is completed pixel by pixel according to the ratio correction formula in this step, and the correction results are arranged according to the original pixel coordinates to form the corrected differential mode response.

[0034] S1.3. Based on the grayscale deviation scale of each pixel's neighborhood in the corrected differential response, scale normalize the differential response of the corresponding pixel to form a locally scale-normalized differential response. Specifically, Around the current pixel in the corrected differential response, the corresponding neighborhood is truncated according to the local neighborhood size determined in S1.2. The median gray level of the corrected differential response in the neighborhood is determined. The absolute deviation of each neighboring pixel relative to the median gray level is calculated, and the median of all absolute deviations is taken as the gray level deviation scale corresponding to the current pixel.

[0035] The normalized denominator is defined by a preset minimum grayscale deviation scale. When the current grayscale deviation scale is lower than the preset minimum grayscale deviation scale, the preset minimum grayscale deviation scale is used as the normalized denominator. For other positions, the current grayscale deviation scale is used as the normalized denominator. The local scale-normalized differential response is determined according to the following formula: ; In the formula, This represents the grayscale deviation scale of the corresponding local neighborhood. This represents the preset minimum grayscale deviation scale, which is set to 0.000001 in this embodiment to prevent the normalization denominator from being zero. This represents the local scale-normalized differential response; scale normalization is performed pixel by pixel, and the processing results are arranged according to the original pixel coordinates to form the local scale-normalized differential response.

[0036] S1.4 Calculate the local gradient direction for the local scale normalized differential mode response, compare the response intensity of adjacent pixels along the local gradient direction, and enhance the differential mode response of the corresponding pixels according to the comparison results to form a micro-defect direction response map. Specifically, For the local scale-normalized differential response, the local gradient is calculated using the central difference in the horizontal and vertical directions, and the local gradient direction is determined based on the horizontal and vertical gradients. When the gradient magnitude of the current pixel is zero, the non-zero gradient direction with the largest gradient magnitude in the eight neighborhoods is adopted. When the gradient magnitudes in the eight neighborhoods are all zero, the original response of the current pixel is maintained.

[0037] Along the determined local gradient direction, select directional comparison positions one pixel apart on both sides of the current pixel; when the directional comparison position falls on an integer pixel coordinate, directly read the value of the local scale-normalized differential response at that coordinate.

[0038] When the orientation comparison position is located at non-integer pixel coordinates, determine the four integer pixel positions surrounding the orientation comparison position, read the local scale-normalized differential response of the four positions, first perform one-dimensional linear interpolation on the two horizontal edges respectively, and then perform one-dimensional linear interpolation on the two interpolation results along the vertical direction to obtain the response intensity of the orientation comparison position; at the image boundary, mirror extension is used to determine the response required for interpolation.

[0039] Based on the response intensity of the current pixel and the comparison positions on both sides, the enhancement result is determined by the following formula. This mapping is fixed with an enhancement amplitude of one times the prominence. All directional comparisons use the local scale-normalized differential response before enhancement. The enhancement result is recorded separately to avoid changing the basis for directional comparison by changing the pixel processing order.

[0040] The enhanced response strength is expressed by the following formula: ; In the formula, Indicates the enhanced response strength. and These represent the response intensity at the comparison positions on both sides of the local gradient direction; when the current pixel is higher than both comparison positions, the current response is enhanced according to this mapping, while the original response remains at other positions; all enhancement results are recorded according to the original pixel coordinates to form a micro-defect direction response map.

[0041] S2. Divide the crack strong response section and low response interval from the micro-defect directional response map. Perform bidirectional extension on the low response interval, retain the extension position with continuous changes within the preset allowable range, and connect the corresponding crack strong response section after verifying the intersection position and the opposite gray level response relationship to form a continuous micro-defect response map.

[0042] S2.1. Tracing continuous response pixels along the local extension direction of the response map in the direction of the micro-defect, and collecting response pixels with continuously changing local extension directions into a crack structure line; extracting and retaining continuous high-response positions from the crack structure line to form a strong crack response segment, specifically... The local extension direction perpendicular to the micro-defect direction response map is determined based on the local gradient. An undirected angle is used to compare the extension directions of adjacent positions, ensuring that two opposite directions on the same straight line represent the same local orientation. Positions with zero gradient magnitude follow the neighborhood direction determination method from the direction enhancement step. For confirmed continuous microcrack regions in the calibration image, adjacent positions are arranged along the crack orientation marked by the microscopic verification mark. The angle between the local extension directions of adjacent positions, as well as the angle between the line connecting adjacent positions and the local extension direction, are statistically analyzed. The 99th percentile of all undirected angles is determined as the upper limit of the preset direction continuity range, with the lower limit set to zero. During tracking, the eight neighboring positions of the current response pixel are checked sequentially. Only response pixels that are spatially connected, whose adjacent line directions conform to the preset direction continuity range, and whose local extension direction changes conform to the preset direction continuity range are classified into the same crack structure line. Direction continuity indicates that both angle checks satisfy the preset direction continuity range.

[0043] The response intensity of regions without obvious micro-defects in the crystal plane area of ​​the calibration image is statistically analyzed in the response map of the micro-defect direction. The 99th percentile is determined as the preset background response threshold, and only pixels with response intensity higher than this threshold are listed as response pixels for tracking. The response intensities of the background region and the confirmed continuous micro-crack region are further aggregated, and all different response intensities are arranged in ascending order. The midpoint of adjacent different response intensities is used to form a candidate strong response judgment threshold. For candidate thresholds higher than the preset background response threshold, the proportion of background pixels misjudged as strong responses and the proportion of confirmed crack pixels judged as strong responses are statistically analyzed. Among the candidate thresholds with a background misjudgment ratio not exceeding one percent, the candidate threshold with the highest proportion of confirmed crack pixel recognition is selected. If the recognition ratios are the same, the candidate with the largest threshold value is selected. The selected result is fixed as the preset strong response judgment threshold, and response pixels that reach this threshold and are continuously distributed along the crack structure line are retained to form the crack strong response segment.

[0044] S2.2 Mark consecutive low-response locations between adjacent strong-response crack segments along the crack structure line. Compare these consecutive low-response locations with the local gradient direction and response intensity of the strong-response crack segments. Mark consecutive low-response locations where the local gradient direction is continuous and the response intensity is lower than that of the strong-response crack segments as low-response intervals. Specifically, Locate the response pixels that have not yet been included in the strong response zone between adjacent strong response zones along the crack structure line, and determine the continuous response pixels whose response intensity is higher than the preset background response threshold and lower than the preset strong response judgment threshold as the positions to be checked.

[0045] The local extension direction angles between adjacent locations to be checked, as well as the local extension direction angles between the location to be checked and the ends of the strong crack response sections on both sides, are checked separately. When all direction angles are within the preset continuous range and the location to be checked and the strong crack response sections on both sides are pixel-connected, the corresponding continuous locations are marked as low response intervals. The strong response level of the strong crack response section is defined by the preset strong response judgment threshold. Locations with direction angles exceeding the preset continuous range are not included in the low response intervals, and the collection of the current continuous interval is terminated at the corresponding continuous location.

[0046] S2.3. Taking the ends of the crack strong response segments corresponding to the two boundaries of the low response interval as the extension starting point, directional constraint region growth is applied to the low response interval along the extension direction of the ends of the crack strong response segments. The pixel positions connected to the extension starting point are sequentially included in the extension range to form the extension positions. Specifically, The ends of adjacent strong response crack segments on both sides of the low response interval are selected as extension starting points. Five consecutive response pixels are selected from the ends inward along each strong response crack segment. If there are fewer than five consecutive response pixels, the actual consecutive response pixels are used. If there are fewer than two consecutive response pixels, the extension direction of the end is not established. A straight line is fitted according to the coordinates of the selected consecutive response pixels. The fitted straight line pointing to one side of the low response interval is used as the end extension direction. The undirected angle between the local extension direction of the selected response pixels and the fitted straight line is calculated.

[0047] Compare the maximum value of the aforementioned included angle with the upper limit of the preset direction continuous range, and use the maximum value of the two values ​​to determine the direction constraint half angle. Establish a symmetrical preset direction constraint range with the current extension direction as the center. Limit the low response interval to the region growth range, check the response positions that have not yet been passed in the eight neighborhoods from the two extension starting points, retain the connected response positions that are located in the low response interval and whose adjacent line directions meet the preset direction constraint range, and form the two-sided extension positions.

[0048] S2.4. Extend along the extension direction of each extension position, and define the extension direction of the next extension position by the previous extension position, forming a continuous distribution of extension positions, specifically, The last extended position already retained on each side is taken as the current expansion position. The pixel positions in its eight neighboring areas are checked. A maximum of eight positions are checked each time. Positions located outside the low response interval, positions that have already been passed, and positions that do not meet the preset direction constraint range are excluded in turn. The remaining positions are determined as the current candidate positions. The number of candidate positions is based on the results of this screening.

[0049] For each candidate position, record the angle between the adjacent line direction and the current extension direction, as well as the absolute value of the differential mode response change between the candidate position and the current extension position. First, select the candidate position with the smallest angle. If the angles are the same, select the candidate position with the smallest absolute value of the differential mode response change. If both comparison results are the same, determine the candidate position in the order of increasing vertical coordinate and increasing horizontal coordinate. Submit the selected candidate positions to the subsequent change check. Only positions that pass the check within the preset allowable range will be retained and the current extension direction will be updated. If there are no candidate positions, stop the extension on that side.

[0050] S2.5. Compare the extension direction, crack width, and differential mode response of adjacent extension positions to obtain the direction deflection, crack width change, and differential mode response change, respectively. Record the extension position numbers along the extension sequence on both sides of the low response interval, designating the extension start point as the zeroth extension position and the extension position to be checked as the... One extension location. According to the first... The extension position points to the first The line connecting the extension positions determines the extension direction, and the first extension position is extended. The direction angle of each extension position is denoted as The direction angle of the extension starting point is the extension direction of the end of the crack strong response section. All direction angles are in radians and have the same starting point and positive direction, and are limited to between zero and the full circle angle, excluding the full circle angle.

[0051] After the first Establish a transverse sampling line perpendicular to the extension direction at each extension position. Read the response intensity of the micro-defect direction response map at a one-pixel interval along the transverse sampling line to both sides. The response intensity is read using bilinear interpolation determined by the direction enhancement step for non-integer pixel coordinates. Locate the adjacent sampling positions on both sides of the transverse sampling line that first change from above the preset background response threshold to below the preset background response threshold. Use linear interpolation to determine the two transverse boundary positions where the response intensity is equal to the preset background response threshold.

[0052] The actual distance between the two lateral boundary positions is determined based on the image spatial calibration relationship, and the actual distance is recorded as the first... Crack width at each extension location and read the first The response value of each extension location in the differential mode response The initial crack width is recorded according to the processing method of establishing the transverse sampling line, locating the transverse boundary, and measuring the actual distance at the starting point of the extension, and the initial differential mode response value of the starting point of the extension is read from the differential mode response; the extension position to be checked that cannot be determined by the two transverse boundary positions will not continue to participate in the extension.

[0053] Based on the orientation angle, crack width, and differential mode response recorded at adjacent extension positions, determine the orientation deflection, crack width change, and differential mode response change, respectively: ; ; ; In the formula, and They represent the first The extension position and the first The orientation angle of each extension position and These represent the crack widths at two adjacent extension locations. and These represent the differential mode response values ​​at two adjacent extension positions, respectively. Indicates the amount of directional deflection. This indicates the change in crack width. The differential mode response change is represented by the change in crack width and the differential mode response, which retain the positive and negative signs. The three types of changes are recorded along the extension sequence on both sides to form a record of the changes at each extension position.

[0054] S2.6. Check the directional deflection, crack width variation, and differential mode response variation according to the preset allowable range, and retain the extension positions where the directional deflection, crack width variation, and differential mode response variation are all within the preset allowable range. Specifically, The preset allowable ranges include the allowable range of directional deflection, the allowable range of crack width variation, and the allowable range of differential mode response variation. The preset allowable ranges represent the combined names of the three constraints. The allowable range of directional deflection limits the value boundary of directional deflection, the allowable range of crack width variation limits the value boundary of crack width variation, and the allowable range of differential mode response variation limits the value boundary of differential mode response variation.

[0055] For the strong response segment of the continuous crack in the calibration image after microscopic verification, the positions of adjacent pixels are arranged in the extension order of the strong response segment of the continuous crack. The direction recording method, lateral sampling method and change formula determined by S2.5 are used to statistically analyze the direction deflection, crack width change and differential mode response change. The lower limit of the allowable interval of direction deflection is set to zero, and the upper limit is the 99th percentile of the direction deflection statistical result. The allowable interval of crack width change is a symmetrical interval centered at zero, and the upper limit is the 99th percentile of the absolute value of crack width change statistical result. The allowable interval of differential mode response change is a symmetrical interval centered at zero, and the upper limit is the 99th percentile of the absolute value of differential mode response change statistical result. All three allowable intervals include the endpoints and remain unchanged in the same batch of tests.

[0056] For each extension position to be checked, compare the directional deflection with the allowable range of directional deflection, the crack width change with the allowable range of crack width change, and the differential mode response change with the allowable range of differential mode response change. When all three types of changes simultaneously meet the corresponding allowable ranges, the extension position to be checked is retained as the extension position for subsequent expansion. If any of the three check results do not meet the allowable ranges, stop expanding along the extension position to be checked, and determine the extension position at the end of the extension sequence that has passed the three checks as the extension boundary.

[0057] S2.7. Within the low response interval, locate the position where the extension positions corresponding to the two extension starting points coincide. Record the first coincidence position as the initial intersection position, and map the initial intersection position to the opposite illumination image in the opposing illumination image group. Specifically, According to the extension order of the two extension starting points, the pixel coordinates of the extension positions retained on both sides are checked. When the extension sequence from the two extension starting points contains the same pixel coordinates for the first time in the low response interval, the corresponding pixel position is determined as the initial intersection position, and the position after the first intersection is no longer used as the intersection determination basis for the current low response interval. Based on the pixel coordinate correspondence established by the co-registration, the initial intersection position and the extension position between the initial intersection position and the two extension starting points are respectively located to the same pixel coordinates in the first and second opposite illumination images, providing the original image basis for checking whether the low response interval has a counter grayscale response consistent with the real crack.

[0058] S2.8. From the initial intersection position, check the opposing gray-scale response relationship of the extension positions towards the two extension starting points respectively. Compare the changes in opposing gray-scale response of adjacent extension positions according to the extension order. Mark the initial intersection position with continuous opposing gray-scale response as the valid intersection position. Specifically, A high-response section of a continuous crack, microscopically verified, is selected from the calibration image. The calibration image and the image to be tested maintain the same illumination conditions, exposure settings, and imaging magnification. The grayscale values ​​of the first and second opposite illumination images are read according to the pixel arrangement order of the high-response section of the continuous crack, and a grayscale correspondence record of the two opposite illumination images is established at the same pixel coordinates.

[0059] The gray-level relationship at the same pixel coordinate is represented by the signed opposing gray-level difference: ; In the formula, This indicates the first contrast-lit image in pixel coordinates. grayscale value, This indicates the second opposite illumination image in pixel coordinates. grayscale value, Represents pixel coordinates The difference in grayscale values ​​between the marked and opposite sides.

[0060] For adjacent crack pixels in the strong response section of a continuous crack, the absolute values ​​of grayscale changes in the first and second opposite illumination images, as well as the absolute value of the signed opposite grayscale difference change, are statistically analyzed to form three sets of continuity calibration records. The upper limit of the grayscale continuity interval of the first opposite illumination image is the 99th percentile of the absolute value of the grayscale change in the first opposite illumination image; the upper limit of the grayscale continuity interval of the second opposite illumination image is the 99th percentile of the absolute value of the grayscale change in the second opposite illumination image; the upper limit of the opposite grayscale difference continuity interval is the 99th percentile of the signed opposite grayscale difference change; the lower limits of all three grayscale continuity intervals are set to zero, and all three grayscale continuity intervals include endpoints, together forming a preset grayscale continuity range, which remains unchanged during the same batch of testing.

[0061] Taking the initial intersection position as the verification starting point, the gray values ​​of the first and second opposite illumination images are read along the two extension starting points on both sides. The absolute values ​​of the gray value changes of the first and second opposite illumination images, as well as the absolute values ​​of the signed opposite gray value difference changes, are determined according to the statistical method of continuous calibration records between adjacent extension positions.

[0062] The absolute value of the grayscale change in the first oppositely illuminated image is checked against the grayscale continuity interval of the first oppositely illuminated image. The absolute value of the grayscale change in the second oppositely illuminated image is checked against the grayscale continuity interval of the second oppositely illuminated image. The absolute value of the change in the signed opposing grayscale difference is checked against the opposing grayscale difference continuity interval. When all adjacent extension positions between the initial intersection position and the two extension starting points pass the three checks, the initial intersection position is marked as a valid intersection position. When there is a change in grayscale that has not passed the grayscale continuity check between any adjacent extension positions, the initial intersection position is not marked as a valid intersection position. The signed opposing grayscale difference is used to verify the opposing grayscale response relationship. The differential mode response in S1.1 still uses the absolute value of the grayscale difference of the oppositely illuminated image.

[0063] S2.9. Using the low-response intervals corresponding to the effective intersection locations as connecting segments, connect the crack strong-response segments corresponding to the two boundaries of the low-response intervals to form a continuous micro-defect response map, specifically as follows: The retained extension positions in the low response interval where the effective intersection position is located, extending from the extension starting points on both sides to the effective intersection position, are determined as the connection segments. The connection segments are written back to the corresponding positions in the micro-defect direction response map according to the original pixel coordinates, so that the connection segments maintain pixel connectivity with the crack strong response segments on both sides of the low response interval. For low response intervals that do not form an effective intersection position, the disconnected state between the original crack strong response segments is maintained, and no connection is implemented.

[0064] By combining the original strong crack response sections and the connected sections formed through effective intersection verification, a continuous micro-defect response map is obtained that can retain the strong crack response and restore the continuity of the low-response fracture position.

[0065] like Figure 4 As shown, the differential mode response along the crack extension position can retain the grayscale difference generated under opposite illumination conditions. However, due to the influence of local brightness of the crystal plane, changes in response amplitude, and weak local response of the microcrack, a low response interval may be formed in the response curve corresponding to the same continuous crack between two strong response segments. After local scale normalization, the response scale of different local regions is unified, so that the relative change relationship between the low response interval and the response segments on both sides can be stably characterized. After further directional enhancement according to the local gradient direction, the response continuity feature of the microcrack along the extension direction is highlighted. For the still existing low response interval, bidirectional extension is performed from the ends of the strong response segments on both sides along the corresponding extension direction, and the extension range is limited according to the directional deflection, crack width change, and differential mode response change at the extension position. When the extension positions on both sides are... The initial intersection position is determined upon first overlap. Then, the continuity of the opposing grayscale response is verified by the grayscale changes along the extension sequence and the signed opposing grayscale difference changes in the opposite illumination image. The initial intersection position that passes the verification is determined as the effective intersection position. After connecting the crack strong response segments on both sides of the low response interval by the retained extension position corresponding to the effective intersection position, the continuity of the low response fracture position can be restored, forming a continuous micro-defect response map. On this basis, the response area that extends continuously and has a corresponding skeleton length can be further identified as a linear microcrack, the response area with a closed contour that does not meet the identification conditions of a linear microcrack can be identified as a point micropit, and the remaining response area with an intersection position with the edge of the diamond wafer can be identified as an edge micro-notch. Thus, a continuous correspondence is formed between response enhancement, fracture connection and subsequent defect morphology identification.

[0066] S3. Based on the region contour and skeleton length of the response area in the continuous micro-defect response map, and combined with the intersection relationship between the region contour and the edge of the diamond wafer, identify linear microcracks, point micro-pits and edge micro-notches, record the defect type and contour position, and form a micro-defect candidate set.

[0067] S3.1. The response region in the continuous micro-defect response map is traced using Freeman chain code, and the response region defined by the Zhang-Suen iterative refinement algorithm is used to iteratively refine the region contour, forming a connected skeleton and recording the skeleton length. Specifically, The response regions in the continuous micro-defect response map are divided according to the pixel connectivity. Pixels belonging to the same connected region and having continuous responses are grouped into the same response region, and response pixels adjacent to at least one background pixel are determined as boundary pixels. From the boundary pixels of each response region, the boundary pixel with the highest vertical position and the smallest horizontal coordinate at the same vertical position is selected as the starting pixel for contour tracking. An eight-neighborhood directional encoding is established with the starting pixel of contour tracking as the center. The eight adjacent positions of right, upper right, upper, upper left, left, lower left, lower, and lower right are sequentially encoded as 0 to 7, and the directional encoding relationship remains unchanged during the contour tracking process of the same response region.

[0068] Using the background pixel to the left of the contour tracking start pixel as the initial neighborhood search benchmark, the eight adjacent positions around the start pixel are checked sequentially in a clockwise direction starting from the corresponding adjacent direction. The first pixel found that belongs to the current response region and meets the boundary pixel condition is determined as the first boundary pixel. At the same time, the Freeman direction code from the contour tracking start pixel to the first boundary pixel is recorded. For any subsequent current boundary pixel, the background adjacent position before entering the current boundary pixel is used as the new neighborhood search benchmark. The eight adjacent positions around the current boundary pixel are checked sequentially in the same clockwise order. The first boundary pixel found is determined as the next boundary pixel. The Freeman direction code from the current boundary pixel to the next boundary pixel is recorded. At the same time, the background position passed immediately before the next boundary pixel during the next boundary pixel search process is retained as the next neighborhood search benchmark.

[0069] The tracking proceeds pixel by pixel along the outer boundary of the response region according to the above tracking rules, and the coordinates of the boundary pixels passed through and the Freeman direction codes are recorded in sequence. When the current boundary pixel reaches the starting pixel of the contour tracking again, and the next boundary pixel determined subsequently is consistent with the first boundary pixel obtained in the first tracking, the contour tracking of the current response region is terminated, and the sequence of boundary pixel coordinates arranged in the tracking order and the corresponding Freeman direction code sequence are determined as the region contour of the current response region.

[0070] For the response region defined by the region outline, Zhang-Suen iterative refinement is performed. Pixels in the response region are recorded as foreground pixels, and pixels outside the response region are recorded as background pixels. The eight adjacent positions are arranged in a clockwise order around the foreground pixel to be checked, corresponding to the top, top right, right, bottom right, bottom, bottom left, left, and top left sides respectively. For each foreground pixel to be checked, the number of foreground pixels in the eight adjacent positions is counted. At the same time, the pixel state of the adjacent positions is checked in a clockwise cyclic order, and the number of times the background pixel state changes to the foreground pixel state is recorded.

[0071] Each Zhang–Suen iteration refinement includes a first sub-iteration stage and a second sub-iteration stage. In the first sub-iteration stage, when the number of foreground neighboring pixels around the foreground pixel to be checked is between two and six, and the eight-neighborhood is checked in a clockwise cyclic manner, there is only one case where the state changes from the background pixel state to the foreground pixel state. When there is at least one background pixel in the three adjacent positions on the top, right, and bottom sides, and at least one background pixel in the three adjacent positions on the right, bottom, and left sides, the current foreground pixel is marked as the pixel to be deleted in the first stage. After traversing all foreground pixels in the current response area, the pixels to be deleted in the first stage are deleted uniformly. During the traversal, the state of neighboring pixels that have not yet been checked is not changed.

[0072] The second sub-iteration phase uses the response area updated in the first sub-iteration phase as the object, and checks each foreground pixel again according to the same eight-neighbor order. When the number of foreground neighboring pixels around the current foreground pixel is still between two and six, and there is only one case of changing from background pixel state to foreground pixel state in the eight-neighbor, and there is at least one background pixel in the three adjacent positions on the top, right, and left, and at least one background pixel in the three adjacent positions on the top, bottom, and left, the current foreground pixel is marked as a pixel to be deleted in the second phase. After all foreground pixels are checked, the pixels to be deleted in the second phase are deleted uniformly.

[0073] The first and second sub-iteration stages are treated as a complete refinement iteration, and the next complete refinement iteration is performed based on the updated foreground pixel distribution. The iteration stops when no new pixels to be deleted are generated after a complete refinement iteration ends, and the final single-pixel width continuous pixel sequence is determined as the connected skeleton of the corresponding response region.

[0074] Record the pixel coordinates of adjacent skeletons along the connection order of the connected skeleton, and determine the skeleton length according to the following formula. : ; In the formula, and This represents the pixel coordinates of adjacent skeleton nodes in a connected skeleton. This indicates the number of skeleton pixels involved in the skeleton length recording. This indicates the actual spatial size corresponding to a single pixel in a contrasting illuminated image.

[0075] The region outline, connected skeleton, and skeleton length are recorded according to the corresponding response region identifier, providing the outline shape and extension length basis for subsequent defect shape identification.

[0076] Among them, Freeman chain code is a contour representation method that continuously tracks the boundary of the response region according to the discrete direction encoding order of adjacent boundary pixels in the region contour; Zhang–Suen iterative thinning algorithm is an image thinning algorithm that gradually shrinks the response region into a single-pixel-width skeleton by repeatedly deleting boundary pixels of the response region while keeping the region connectivity unchanged.

[0077] S3.2. Based on the correspondence between the length and width of the minimum bounding rectangle of the region profile and the length of the skeleton, identify the linear microcracks in the response region. Specifically, Based on the region contour of each response region, determine the bounding rectangle that can completely enclose the region contour and has the smallest area, and record the length of the longest side of the smallest bounding rectangle. and short side dimensions The ratio of the longer side to the shorter side represents the extent to which the response region extends in a single direction. ; Relationship between length and width The skeleton length of the corresponding response region Joint verification was conducted, and the identification criteria for linear microcracks were determined according to the following formula: ; In the formula, This indicates the preset threshold for determining the length and width of the line. The preset skeleton length determination threshold is indicated. The two recognition conditions are that the length-width relationship of the minimum bounding rectangle is not lower than the preset linear length-width determination threshold, and the skeleton length is not lower than the preset skeleton length determination threshold. When the same response area meets both recognition conditions at the same time, the response area is identified as a linear microcrack. The morphological characteristics of the linear microcrack are defined by the overall elongation of the area and the continuous extension length inside.

[0078] Using a calibration image that maintains the same lighting conditions, exposure settings, and imaging magnification as the image to be detected, the linear microcrack response areas after microscopic verification are recorded as crack calibration samples, and the point-like micro-pit response areas and edge micro-notch response areas after microscopic verification are recorded as non-crack calibration samples. According to the skeleton length calculation method in S3.1 and the minimum bounding rectangle length-width relationship calculation method in S3.2, the skeleton length and minimum bounding rectangle length-width relationship of the crack calibration samples and non-crack calibration samples are recorded respectively. The skeleton length and the preset skeleton length judgment threshold use the same actual length measurement unit.

[0079] The minimum bounding rectangle length-width relationships of different values ​​in the crack calibration samples and non-crack calibration samples are collected and arranged in ascending order. Candidate linear length-width thresholds are formed using the midpoints of adjacent different values. The same sorting and midpoint selection method is used for the skeleton length to form candidate skeleton length thresholds. The candidate linear length-width thresholds and candidate skeleton length thresholds are combined one by one to form candidate threshold combinations. All calibration samples are checked according to the judgment method where both identification conditions are simultaneously met. The proportion of crack calibration samples identified as linear microcracks is recorded as the crack calibration sample identification proportion, and the proportion of non-crack calibration samples misidentified as linear microcracks is recorded as the non-crack calibration sample misidentification proportion.

[0080] Among candidate threshold combinations where the misclassification rate of non-crack calibration samples does not exceed one percent, the candidate threshold combination with the highest recognition rate of crack calibration samples is selected. If the recognition rates of crack calibration samples are the same, the candidate threshold combination with the largest linear length and width judgment threshold value is selected first. If the linear length and width judgment thresholds are still the same, the candidate threshold combination with the largest skeleton length judgment threshold value is selected next. The two finally selected candidate thresholds are then designated as the preset linear length and width judgment threshold and the preset skeleton length judgment threshold, respectively, and remain unchanged during the same batch of testing. If a candidate threshold combination that meets the misclassification rate requirement is not obtained, the two judgment thresholds are not fixed, and recalibration is performed after supplementing calibration images.

[0081] S3.3. Check the beginning and end connection status of the region contour along the Freeman chain code. Response regions that remain closed and do not meet the criteria for linear microcrack identification are treated as point-like micropits. Specifically, For response regions that do not meet the criteria for linear microcrack identification, the boundary pixel coordinate sequence and Freeman orientation encoding sequence recorded in S3.1 are read according to the response region identifier. The Freeman orientation encoding sequence arranged in the contour tracking order is determined as the Freeman chain code corresponding to the response region, and the correspondence between the Freeman orientation encoding and the adjacent boundary pixel coordinates is retained.

[0082] The region contour is continuously tracked along the boundary pixel order recorded by the Freeman chain code, and the adjacency relationship between the last boundary pixel and the contour tracking start pixel is checked. When the boundary pixel can continuously return the contour tracking start pixel according to the discrete direction encoding of the Freeman chain code, and there is no boundary tracking interruption position in the region contour, the region contour of the response area is determined as a closed contour.

[0083] For response regions with closed contours that do not meet the criteria for identifying linear microcracks, they are identified as point-like micro-pits based on the local closed response morphology defined by the closed contour, and the boundary pixel coordinate sequence corresponding to the Freeman chain code is recorded as the contour position of the point-like micro-pits.

[0084] S3.4 For response regions not identified as linear microcracks or point-like micropits, verify the intersection of the region contour with the edge of the diamond wafer. Response regions with intersections are designated as edge micro-notches. The defect types and contour locations of linear microcracks, point-like micropits, and edge micro-notches are then aggregated to form a candidate set of micro-defects. Specifically, The response regions whose defect types have not yet been determined after passing through S3.2 and S3.3 are screened out. The edge position of the diamond wafer is determined according to the effective imaging boundary of the diamond wafer in the opposite illumination image. The region contour of the remaining response regions is checked position by position according to the same pixel coordinates. When the boundary pixel in the region contour extends to the edge of the diamond wafer and the contour tracking cannot form a complete closed boundary within the effective imaging range of the wafer, the pixel position where the region contour and the edge of the diamond wafer meet is recorded as the intersection position, and the corresponding response region is identified as the edge micro-notch.

[0085] The defect types, namely linear microcracks, point micropits, and edge micro-notches, are recorded separately. The pixel coordinate sequence of the region contour corresponding to each response region is used as the contour position. The defect types and contour positions are associated one by one according to the response regions to form a micro-defect candidate set.

[0086] S4. Based on the contour position of the micro-defect candidate set, convert the diamond wafer surface coordinates, merge the micro-defect candidate areas with overlapping contours and consistent defect types in adjacent scanning areas, and form micro-defect detection results.

[0087] S4.1. Based on the contour positions of the micro-defect candidate set and the scan area positions of adjacent scan areas on the diamond wafer surface, the contour positions are converted into diamond wafer surface coordinates. Specifically, A unified planar coordinate system is established using a preset reference position on the entire diamond wafer surface. The starting position of each scanning field of view in the unified planar coordinate system is recorded as the corresponding scanning area position, while preserving the pixel spatial scale and the horizontal and vertical scanning directions of the scanning field of view. For each micro-defect candidate region in the micro-defect candidate set, the scanning area position corresponding to its respective scanning field of view is read according to the pixel coordinates in the region contour. With all scanning fields maintaining the same scanning direction, the contour pixel position is converted into diamond wafer surface coordinates according to the following formula: ; ; In the formula, ( ) indicates the first The starting spatial position of each scanning area relative to the entire diamond wafer surface. and These represent the actual spatial dimensions of a single pixel in the horizontal and vertical directions of the corresponding scanning field of view, respectively. ) represents the pixel coordinates in the contour of the candidate region of micro-defects; all pixel coordinates in the contour of the region are processed according to the same conversion relationship, and the contour positions that were originally located in each scanning field of view are uniformly converted to the spatial coordinate range of the entire diamond wafer surface, while maintaining the correspondence between the defect type and the converted contour position.

[0088] The scanning area position on the surface of the diamond wafer is the spatial positioning position of each scanning field of view relative to the entire surface of the diamond wafer.

[0089] S4.2. Compare the overlap range of the contours of adjacent scanned areas corresponding to micro-defect candidate regions in the coordinate system of the diamond wafer surface, and mark the micro-defect candidate regions with overlapping contours. Specifically, Adjacent scan regions with overlapping coverage on the diamond wafer surface are selected based on their scanning location. Only micro-defect candidate regions within the overlapping coverage area of ​​adjacent scan regions are checked for overlap. Based on the converted diamond wafer surface coordinates, the contour coverage of micro-defect candidate regions in two adjacent scan regions is determined according to their respective region contours. The common coverage area of ​​the two contour coverage areas under unified spatial coordinates is then determined, and the degree of contour overlap is characterized by the ratio of the common coverage area to the smaller area of ​​the two contour coverage areas. ; In the formula, This represents the area of ​​overlap of the contours of two micro-defect candidate regions in the diamond wafer surface coordinates. and These represent the contour areas of the two micro-defect candidate regions, respectively. Indicates the degree of overlap of the outlines; The results are compared with the preset contour overlap judgment threshold. When the contour overlap reaches the preset contour overlap judgment threshold, the corresponding two micro-defect candidate regions are marked as micro-defect candidate regions with contour overlap.

[0090] In the calibration image that maintains the same imaging magnification, pixel spatial scale and scanning positioning method as the image to be detected, the actual correspondence of micro-defects in adjacent scanning areas is confirmed by microscopic verification; the micro-defect candidate area pairs formed by adjacent scanning areas repeatedly covering the same micro-defect are recorded as repeated defect calibration samples; and the micro-defect candidate area pairs that are located within the overlapping coverage of adjacent scanning areas, have the same defect type and correspond to different actual micro-defects are selected and recorded as independent defect calibration samples.

[0091] According to the coordinate conversion method in S4.1 and the contour overlap formula in S4.2, the contour overlap of repeated defect calibration samples and independent defect calibration samples are calculated respectively, so that the scanning positioning deviation and contour extraction deviation are reflected in the statistical results of contour overlap.

[0092] The different contour overlap degrees in the repeated defect calibration samples and independent defect calibration samples are arranged in ascending order, and the midpoint of adjacent different values ​​is used to form the candidate contour overlap judgment threshold. For each candidate contour overlap judgment threshold, the proportion of repeated defect calibration samples judged as contour overlap and the proportion of independent defect calibration samples misjudged as contour overlap are respectively recorded as the repeated defect calibration sample recognition ratio and the independent defect calibration sample misjudgment ratio. The candidate contour overlap judgment threshold with the misjudgment ratio of independent defect calibration samples not exceeding one percent is retained, and the candidate contour overlap judgment threshold with the highest recognition ratio of repeated defect calibration samples is selected. When the recognition ratios of repeated defect calibration samples are the same, the candidate contour overlap judgment threshold with the largest value is selected and determined as the preset contour overlap judgment threshold. When no candidate contour overlap judgment threshold that meets the misjudgment ratio requirement is obtained, the preset contour overlap judgment threshold is not fixed, and recalibration is performed after supplementing calibration images. The preset contour overlap judgment threshold remains unchanged in the same batch of inspections, and recalibration is performed after changes in imaging magnification, pixel spatial scale, and scanning positioning method.

[0093] Among them, the diamond wafer surface coordinates are the coordinate information of the spatial position of the micro-defect on the entire diamond wafer surface.

[0094] S4.3. Merge candidate regions for micro-defects that have overlapping contours and the same defect type according to the range of contour overlap to form micro-defect detection results, specifically, Based on the verification results of adjacent scanning areas, micro-defect candidate areas marked as having overlapping contours and consistent defect types are grouped into the same overlapping candidate group. The candidate areas within the same overlapping candidate group are then verified along the spatial connection relationship between adjacent scanning areas to avoid duplicate recording of the same micro-defect when it crosses more than two scanning areas. For the same overlapping candidate group, the outer boundaries of each micro-defect candidate area contour in the diamond wafer surface coordinates are retained, and the overlapping internal contour segments are hidden. The merged micro-defect contours are formed according to the spatial connection relationship of the remaining outer boundaries, and the defect type corresponding to the overlapping candidate group is used. For micro-defect candidate areas without overlapping contours, the original defect type and contour position remain unchanged. The merged micro-defect contours are then combined with the micro-defect candidate areas that have not been duplicated to obtain micro-defect detection results that characterize the defect position using diamond wafer surface coordinates and eliminate duplicate recordings in adjacent scanning areas.

[0095] This embodiment also provides a computer device applicable to the image enhancement-based diamond wafer micro-defect detection method, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the image enhancement-based diamond wafer micro-defect detection method proposed in the above embodiment.

[0096] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0097] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the image enhancement-based diamond wafer micro-defect detection method as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0098] In summary, this invention improves the integrity, stability, and positional consistency of micro-defect detection in diamond wafers through opposing illumination response decomposition, local image enhancement, low-response interval continuity recovery, defect morphology recognition, and cross-scanning region merging. Conversely, after common-mode response correction and differential-mode response enhancement, the illumination image weakens the interference of crystal plane brightness fluctuations on weak defect responses, making the directional features of microcracks more concentrated. For low-response intervals appearing in the middle of cracks, local fractures caused by weak responses can be recovered through bidirectional extension, morphological continuity constraint, and opposing grayscale response verification, maintaining the true extension relationship of microcracks. Furthermore, by utilizing region contours, skeleton lengths, and edge junction relationships, linear microcracks, point-like micropits, and edge micro-notches can be distinguished, allowing for clear characterization of different defect morphologies. Finally, by uniformly converting the defect contours in each scanning region to the diamond wafer surface coordinates and merging duplicate candidate regions, redundant recording in adjacent fields of view can be reduced, ensuring that the final micro-defect detection results simultaneously possess good defect continuity, type identification ability, and spatial positioning consistency.

[0099] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for detecting micro-defects in diamond wafers based on image enhancement, characterized in that: include, The common-mode and differential-mode responses of the opposite illumination images in the opposing illumination image group are decomposed. The brightness fluctuations of the crystal plane are corrected according to the common-mode response, and the local scale normalization and orientation enhancement are applied to the differential-mode response to form a micro-defect orientation response map. From the micro-defect directional response map, divide the crack strong response segment and low response interval, perform bidirectional extension on the low response interval, retain the extension position with continuous change within the preset allowable range, and connect the corresponding crack strong response segment after verifying the intersection position and the opposing gray-scale response relationship to form a continuous micro-defect response map. Based on the region contour and skeleton length of the response area in the continuous micro-defect response map, and combined with the intersection relationship between the region contour and the edge of the diamond wafer, linear microcracks, point micro-pits and edge micro-notches are identified, the defect type and contour position are recorded, and a micro-defect candidate set is formed. The coordinates of the diamond wafer surface are calculated based on the contour positions of the micro-defect candidate set, and overlapping micro-defect candidate regions in adjacent scanning areas are merged to form micro-defect detection results.

2. The image enhancement-based method for detecting micro-defects in diamond wafers as described in claim 1, characterized in that: The formation of the micro-defect directional response map specifically involves... The average grayscale value of the oppositely illuminated images at the same pixel location in the oppositely illuminated image group is calculated, and the absolute value of the grayscale difference between the oppositely illuminated images is calculated to form the common-mode response and the differential-mode response, respectively. Based on the median gray value of each pixel neighborhood in the common-mode response, when the median gray value is lower than the preset minimum brightness reference, the preset minimum brightness reference is determined as the correction denominator; when the median gray value is not lower than the preset minimum brightness reference, the median gray value is determined as the correction denominator. The ratio of the gray value amplitude of the differential-mode response to the corresponding correction denominator is calculated pixel by pixel to form the corrected differential-mode response. Based on the grayscale deviation scale of each pixel neighborhood in the corrected differential response, the differential response of the corresponding pixel is scaled to form a local scale-normalized differential response. The local gradient direction is calculated for the local scale normalized differential response. The response intensity of adjacent pixels is compared along the local gradient direction, and the differential response of the corresponding pixel is enhanced according to the comparison result to form a micro-defect direction response map.

3. The image enhancement-based method for detecting micro-defects in diamond wafers as described in claim 2, characterized in that: Specifically, dividing the crack pattern into strong response segments and low response intervals in the micro-defect directional response map involves... Continuous response pixels are traced along the local extension direction in the response map of the micro-defect direction, and the response pixels with continuously changing local extension directions are aggregated into crack structure lines. Select and preserve continuous high-response locations from the crack structure line to form a strong crack response zone; Mark consecutive low response locations between adjacent strong response segments of cracks in the crack structure line. Compare the local gradient direction and response intensity of consecutive low response locations with those of strong response segments of cracks. Mark consecutive low response locations with continuous local gradient directions and response intensities lower than those of strong response segments of cracks as low response intervals.

4. The image enhancement-based method for detecting micro-defects in diamond wafers as described in claim 3, characterized in that: Specifically, the retention of continuous variations within a preset allowable range at the extended positions is as follows: Using the ends of the crack strong response sections corresponding to the two boundaries of the low response interval as the starting point for extension, the low response interval is subjected to directional constraint region growth along the extension direction of the ends of the crack strong response sections. The pixel positions connected to the extension starting point are sequentially included in the extension range to form the extension position. The extension extends position by position along the direction of extension, and the direction of extension of the next extension position is defined by the previous extension position, forming a continuous distribution of extension positions. By comparing the extension direction, crack width, and differential mode response of adjacent extension positions, the directional deflection, crack width change, and differential mode response change are obtained respectively. Check the directional deflection, crack width change, and differential mode response change within the preset allowable range, and retain the extension positions where the directional deflection, crack width change, and differential mode response change are all within the preset allowable range.

5. The image enhancement-based method for detecting micro-defects in diamond wafers as described in claim 4, characterized in that: The formation of the continuous micro-defect response map specifically involves... Within a low response interval, locate the position where the extension positions corresponding to the two extension start points coincide, record the first coincidence position as the initial intersection position, and map the initial intersection position to the opposite illumination image in the opposing illumination image group; From the initial intersection position, check the opposing gray-scale response relationship of the extension positions towards the two extension starting points respectively. Compare the opposing gray-scale response changes of adjacent extension positions according to the extension order, and mark the initial intersection position with continuous opposing gray-scale response as the effective intersection position. Using the low response interval corresponding to the effective intersection position as the connecting segment, the crack strong response segments corresponding to the two boundaries of the low response interval are connected to form a continuous micro-defect response map.

6. The image enhancement-based method for detecting micro-defects in diamond wafers as described in claim 5, characterized in that: The formation of the micro-defect candidate set specifically involves, Freeman chain code is used to trace the contour of the response region in the continuous micro-defect response map, and the Zhang-Suen iterative refinement algorithm is used to iteratively refine the response region defined by the contour to form a connected skeleton and record the skeleton length. Based on the correspondence between the length and width of the minimum bounding rectangle of the region profile and the length of the skeleton, linear microcracks in the response region are identified. The connection state of the beginning and end of the region contour is checked along the Freeman chain code. The response region that remains closed and does not meet the recognition conditions of linear microcracks is regarded as point micropits. For response regions not identified as linear microcracks or point micropits, the intersection of the region contour and the edge of the diamond wafer is checked. Response regions with intersections are designated as edge micro-notches. The defect types and contour locations of linear microcracks, point micropits, and edge micro-notches are collected to form a candidate set of micro-defects.

7. The image enhancement-based method for detecting micro-defects in diamond wafers as described in claim 6, characterized in that: The formation of micro-defect detection results specifically refers to, Based on the contour position of the micro-defect candidate set and the scanning area position of the adjacent scanning area on the diamond wafer surface, the contour position is converted into diamond wafer surface coordinates. In the coordinate system on the diamond wafer surface, the overlap range of the contours of adjacent scanned areas corresponding to micro-defect candidate regions is compared, and micro-defect candidate regions with overlapping contours are marked. Micro-defect candidate regions with overlapping contours and consistent defect types are merged according to the range of contour overlap to form micro-defect detection results.

8. The image enhancement-based method for detecting micro-defects in diamond wafers as described in claim 7, characterized in that: The scanning area position on the surface of the diamond wafer is the spatial positioning position of each scanning field of view relative to the entire surface of the diamond wafer; The diamond wafer surface coordinates are the coordinate information of the spatial position of the micro-defect on the entire diamond wafer surface.

9. The image enhancement-based method for detecting micro-defects in diamond wafers as described in claim 4, characterized in that: The preset allowable ranges include the allowable range of directional deflection, the allowable range of crack width variation, and the allowable range of differential mode response variation.

10. The image enhancement-based method for detecting micro-defects in diamond wafers as described in claim 6, characterized in that: The process of forming a connected skeleton and recording its length specifically involves: The Zhang–Suen iterative refinement algorithm is used to perform two sub-iteration stages on the foreground pixels. In each sub-iteration stage, foreground pixels whose number of eight neighboring foreground pixels is within the preset range of the number of foreground neighboring pixels, and whose number of times they are transformed from background pixels to foreground pixels in a clockwise cyclic order along the eight neighboring pixels is once. In the first sub-iteration phase, the filtering results with at least one background pixel in the upper, right, and lower adjacent positions, and at least one background pixel in the right, lower, and left adjacent positions are marked as pixels to be deleted, and then deleted uniformly after traversal is completed; The second sub-iteration phase, based on the updated response region, marks the filtering results where there is at least one background pixel in the upper, right, and left adjacent positions, and at least one background pixel in the upper, lower, and left adjacent positions as pixels to be deleted, and deletes them uniformly after traversal is completed; Repeat the two sub-iteration stages until no pixels to be deleted are generated in a complete refinement iteration, forming a connected skeleton, and calculate the skeleton length based on the distance between adjacent skeleton pixels and the actual spatial size corresponding to a single pixel.