A crystal angle identification method based on electrode characteristics

By generating multimodal feature templates and adaptive image processing technology, the problems of high misjudgment rate and high computational complexity in crystal angle recognition are solved, efficient and accurate crystal angle recognition is achieved, and production efficiency is improved.

CN120543891BActive Publication Date: 2025-09-23GTI(TIANJIN) TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511038744.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-09-23
Estimated Expiration
2045-07-28

AI Technical Summary

Technical Problem

Existing crystal angle recognition methods in high-end manufacturing have problems such as high misjudgment rate and high computational complexity, which makes it difficult to meet the real-time requirements of the production line and affects production efficiency.

Method used

By generating a multimodal feature template, combining the RGB-LBP-HOG joint feature space and SVM classifier, optimizing the image registration algorithm, binarizing the crystal electrodes and adaptive multi-scale morphological enhancement, the electrode features were extracted and secondary Blob analysis was performed to identify the crystal angle.

Benefits of technology

It improves the accuracy and production efficiency of crystal angle recognition, is suitable for complex crystal angle recognition scenarios, and meets the real-time requirements of industrial sites.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120543891B_ABST
    Figure CN120543891B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of crystal angle recognition, and in particular to a crystal angle recognition method based on electrode features, comprising the following steps: generating a multimodal feature template, matching a crystal target in an original crystal image with the multimodal feature template, and outputting a matching result; establishing an offset reference; dynamically correcting the pixel positions of an optimized and adjusted region of interest of a Blob analysis based on the offset reference, performing a first Blob analysis on the original crystal image within the region of interest of the corrected Blob analysis to obtain a binary image of the crystal electrode; performing adaptive multiscale morphological enhancement and feature intensification on the binary image of the crystal electrode to obtain an enhanced crystal electrode image; performing a second Blob analysis on the enhanced crystal electrode image to extract angle features, and completing the recognition of crystal angles based on electrode features. The method provided by the present invention can accurately and quickly identify crystal angles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of crystal angle recognition, and in particular to a crystal angle recognition method based on electrode characteristics. Background Art

[0002] In high-end manufacturing industries like semiconductors and photovoltaics, the increasing prevalence of wafer-level packaging technology and the intensification of device miniaturization have placed higher demands on processing precision in the process of surface-mounting crystal resonators, driver chips, and other core electronic components. The accuracy and speed of crystal angle recognition have become a key bottleneck restricting production efficiency. During pre-packaging frequency testing, abnormal crystal angle recognition will directly trigger an alarm and suspend equipment operation, requiring manual intervention. Frequent abnormal downtime has seriously affected crystal production capacity.

[0003] Existing methods for crystal angle recognition based on traditional image processing template matching have obvious limitations: in scenarios where electrode features (such as resonator pins and chip pads) are densely distributed on the crystal surface, they are easily interfered by tiny noises, resulting in feature mismatches and a high misjudgment rate. Although deep learning-based recognition algorithms can extract high-level semantic features, they are difficult to meet the real-time requirements of production lines (usually requiring less than 30ms / piece) due to their high computational complexity (such as CNN model inference taking more than 50ms). At the same time, the model deployment's reliance on computing resources further limits its application in industrial sites. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a crystal angle recognition method based on electrode characteristics, which can accurately and quickly identify crystal angles and improve the accuracy and efficiency of crystal processing.

[0005] The present invention is achieved through the following technical solutions:

[0006] A crystal angle recognition method based on electrode characteristics comprises the following steps:

[0007] S1: Acquire the original crystal image and generate a matching mask image and a shielding mask image, merge the matching mask image and the shielding mask image, generate a multimodal feature template, match the crystal target in the original crystal image with the multimodal feature template, and output the matching result;

[0008] S2: Calculate the offset angle of the crystal target area in the original crystal image relative to the multimodal feature template and the position coordinate offset of the multimodal feature template based on the matching results, and establish an offset reference;

[0009] S3: Determine the region of interest for Blob analysis of the original crystal image, and optimize and adjust the size of the region of interest for Blob analysis of the original crystal image based on the matching mask image and the shielding mask image to obtain the optimized and adjusted region of interest for Blob analysis; based on the offset reference, use the image registration algorithm to dynamically correct the pixel position of the optimized and adjusted region of interest for Blob analysis to obtain the corrected region of interest for Blob analysis; perform the first Blob analysis on the original crystal image within the corrected region of interest for Blob analysis, obtain a binary image of the crystal electrode, and extract the electrode features;

[0010] S4: Perform adaptive multi-scale morphological enhancement and feature enhancement on the binary image of the crystal electrode to obtain an enhanced crystal electrode image;

[0011] S5: Perform secondary Blob analysis on the enhanced crystal electrode image to extract angle features and complete the identification of crystal angles based on electrode features.

[0012] Furthermore, the original crystal image obtained in step S1 is preprocessed using a contrast-limited adaptive histogram equalization method before generating the matching mask image and the shielding mask image.

[0013] Optimized, when generating the matching mask image in step S1, a rectangular area based on the crystal geometric center and covering the electrode array body is selected in the original crystal image as the matching mask image area, the crystal body features are extracted, and the matching mask image is generated. When generating the shielding mask image, a rectangular area is selected in the matching mask image area as the shielding mask image area, and the shielding mask image is generated.

[0014] The optimized width of the mask image area is selected according to formula (1):

[0015] (1);

[0016] in: Indicates the width of the shielding mask image area, Indicates the crystal to be identified The distance between the active electrode pairs, Indicates the number of effective electrode pairs of the crystal to be identified.

[0017] Furthermore, in step S1, the crystal target in the original crystal image is matched with the multimodal feature template using the following method:

[0018] S11: Establish RGB-LBP-HOG joint feature space, use principal component analysis method to reduce dimension and remove redundant information, and then use SVM classifier to train feature weights to generate multimodal feature templates;

[0019] S12: downsampling the original crystal image and the multimodal feature template image layer by layer to generate a pyramid structure including a low-resolution layer and a high-resolution layer;

[0020] S13: Perform global search in the low-resolution layer and calculate the position according to formula (2) The similarity score between the multimodal feature template image and the original crystal image is calculated and compared with the set threshold. If the similarity score is greater than or equal to the set threshold, it is determined that the position The pixel points belong to the candidate area, and the final set of points in the candidate area is:

[0021] (2);

[0022] in: Indicates the location The similarity score between the multimodal feature template image and the original crystal image, Represents the multimodal feature template image at position The pixel value at represents the mean value of all pixels of the multimodal feature template image, Indicates that the sub-region of the original crystal image with the same size as the modal feature template image is at position The pixel value at Represents the mean value of all pixels in the sub-region of the original crystal image that has the same size as the modal feature template image;

[0023] S14: Calculate the gradient strength of the candidate region formed by the high-resolution layer pair using formula (3), and compare the gradient strength with the set threshold. The region with a gradient strength greater than the set threshold is retained as the final matching position:

[0024] (3);

[0025] in: represents the horizontal gradient, represents the vertical gradient, Represents the original crystal image at coordinates The gray value at Represents the original crystal image at coordinates The gray value at Represents the original crystal image at coordinates The gray value at Represents the original crystal image at coordinates The gray value at Represents the gradient strength.

[0026] Furthermore, in step S2, the offset angle of the crystal target area in the original crystal image relative to the multimodal feature template is calculated according to formula (4), and the position coordinate offset of the crystal target area in the original crystal image relative to the multimodal feature template is calculated according to formula (5):

[0027] (4);

[0028] (5);

[0029] in: represents the rotational offset angle of the crystal target area in the original crystal image relative to the multimodal feature template, Represents the vertical scaling and rotation components of the crystal target area in the original crystal image relative to the multimodal feature template, Represents the horizontal scaling and rotation components of the crystal target area in the original crystal image relative to the multimodal feature template, Indicates the position coordinate offset of the crystal target area in the original crystal image relative to the multimodal feature template, Represents the position coordinates of the crystal target area in the original crystal image, Indicates that among all possible displacements Find the position coordinate offset that maximizes the absolute value of the inverse Fourier transform result. represents the Fourier transform, represents the inverse Fourier transform, represents the complex conjugate operator, Indicates that the original crystal image is The pixel coordinates at position, Represents the multimodal feature template in The pixel coordinates at position, Represents a constant that prevents division by zero.

[0030] Furthermore, in step S3, the pixel positions of the region of interest of the optimized and adjusted Blob analysis are dynamically corrected using the image registration algorithm according to formula (6):

[0031] (6);

[0032] in: Indicates the dynamically corrected pixel coordinates of the region of interest in the optimized and adjusted Blob analysis.

[0033] Furthermore, in step S3, the first Blob analysis is performed on the original crystal image within the region of interest of the corrected Blob analysis according to the following method to obtain a binary image of the crystal electrode:

[0034] S31: Calculate the adaptive threshold of the pixel gray value according to formula (7):

[0035] (7);

[0036] in: Represents the adaptive threshold of the pixel gray value, Represents a candidate threshold that traverses all possible pixel grayscale values , find the candidate threshold that maximizes the between-class variance, Indicates the proportion of pixels within the region of interest of the corrected Blob analysis, Indicates the proportion of pixels outside the region of interest of the corrected Blob analysis, Indicates the discrete degree of pixel values ​​within the region of interest of the modified Blob analysis. Indicates the discrete degree of pixel values ​​outside the region of interest of the modified Blob analysis;

[0037] S32: Compare the grayscale value of each pixel in the region of interest of the corrected Blob analysis with the adaptive threshold of the pixel grayscale value, convert the pixel in the region of interest of the corrected Blob analysis whose grayscale value is greater than or equal to the adaptive threshold to pure white, and convert the pixel whose grayscale value is less than the adaptive threshold to pure black;

[0038] S33: Obtain the first blob analysis results, obtain a binary image of the crystal electrode, and extract electrode features.

[0039] Furthermore, in step S4, adaptive multi-scale morphological enhancement and feature enhancement are performed on the binary image of the crystal electrode according to the following method to obtain an enhanced crystal electrode image:

[0040] S41: performing a dilation operation on the binary image of the crystal electrode, adjusting the kernel size, and expanding the electrode feature area;

[0041] S42: Using the morphological gradient reconstruction algorithm, iterate according to formula (8) to perform edge-preserving expansion on the binary image of the crystal electrode:

[0042] (8);

[0043] in: Indicates that after The output image after the morphological dilation operation, Indicates that after The intermediate result after the secondary morphological expansion, Indicates the morphological dilation operation on the image. represents the first structuring element, Indicates the total number of iterations;

[0044] S43: Perform top hat transformation according to formula (9):

[0045] (9);

[0046] in: represents the top hat transformation result, represents the input image matrix or signal, represents the opening operation, represents the second structural element;

[0047] S44: Adaptive histogram enhancement is performed using contrast stretching technology according to formula (10):

[0048] (10);

[0049] in: Indicates the output image after adaptive histogram enhancement at coordinates The gray value at Indicates that the calculation result is rounded to the nearest integer. represents the total number of gray levels, represents the cumulative distribution function, Indicates the image after morphological expansion at coordinates The gray value at represents the width of the image after morphological expansion, Indicates the height of the image after morphological expansion;

[0050] S44: performing wavelet domain fusion on the output image after adaptive histogram enhancement according to formula (11), retaining high-frequency edge information and low-frequency intensity features, and obtaining an enhanced crystal electrode image;

[0051] (11);

[0052] in: represents the enhanced crystal electrode image, represents the weight of high-frequency components, represents the weight of low-frequency components, Represents the output image after adaptive histogram enhancement.

[0053] Furthermore, in step S5, the following method is used to perform secondary Blob analysis on the enhanced crystal electrode image to extract angle features and complete the recognition of crystal angles based on electrode features:

[0054] S51: Perform secondary Blob analysis on the enhanced crystal electrode image to extract angle features;

[0055] S52: Sort the angle features in descending order by area, and select the largest area defect as the largest defect in the crystal;

[0056] S53: Calculate the distance and angle between the center of the largest missing angle area and the center of the crystal according to formula (12), and combine the distance and angle between the center of the largest missing angle area and the center of the crystal. Directional distance and the center of the maximum missing angle area and the center of the crystal The final crystal angle is determined by the directional distance and then output. The direction of the crystal is then determined based on the final crystal angle, completing the recognition of the crystal angle based on the electrode characteristics:

[0057] (12);

[0058] in: Indicates the horizontal angle between the center of the largest missing corner area in the original crystal image and the center of the crystal. are the coordinates of the crystal center, is the center coordinate of the area with the largest missing corner area, Indicates the center of the largest missing corner area and the center of the crystal Direction distance, Indicates the center of the largest missing corner area and the center of the crystal Direction distance.

[0059] Beneficial effects of the invention:

[0060] The present invention provides a crystal angle recognition method based on electrode features. The method generates a multimodal feature template, matches the crystal target in the original crystal image with the multimodal feature template, establishes an offset reference according to the matching result, and obtains a modified region of interest for Blob analysis based on the offset reference after optimization and adjustment. After a Blob analysis is performed on the crystal electrode image based on the crystal electrode features within the region of interest of the modified Blob analysis, the crystal electrode image is subjected to adaptive multi-scale morphological enhancement and feature enhancement to extract angle features. After a secondary Blob analysis is performed, the angle features are extracted. Finally, the crystal angle recognition based on the electrode features is completed, thereby improving the accuracy and production efficiency of crystal angle recognition. The method is applicable to various complex crystal angle recognition scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is a schematic flow chart of the present invention.

[0062] Figure 2 This is the original crystal image of the present invention.

[0063] Figure 3 This is a schematic diagram of the crystal characteristics of the first Blob analysis of the present invention.

[0064] Figure 4 This is the enhanced crystal electrode image of the present invention.

[0065] Figure 5 It is a schematic diagram of the crystal characteristics of the secondary Blob analysis of the present invention.

[0066] In the figure: 1, first electrode; 2, second electrode; 3, third electrode; 4, fourth electrode; 5, the area where the central resonant element of the crystal generates the reference frequency. DETAILED DESCRIPTION

[0067] A crystal angle identification method based on electrode characteristics, the flow chart is as follows Figure 1 As shown, the specific steps include:

[0068] S1: Acquire the original crystal image and generate a matching mask image and a shielding mask image, merge the matching mask image and the shielding mask image, generate a multimodal feature template, match the crystal target in the original crystal image with the multimodal feature template, and output the matching result;

[0069] When obtaining the original crystal image, the crystal can be imaged using an industrial area array camera and an industrial lens on the inspection table. The resolution of the industrial area array camera is preferably 1280×960, the pixel size is 3.45μm, and it is paired with a fixed-focus industrial lens with a focal length of 12mm and an aperture of F2.8. It is equipped with a coaxial ring light source with a wavelength of 470nm and an adjustable brightness range of 0-100%, ensuring that the illumination uniformity of the crystal surface is ≥90%.

[0070] The original crystal image is as follows Figure 2 As shown, the original crystal includes a first electrode 1, a second electrode 2, a third electrode 3, a fourth electrode 4 and a region 5 where the central resonant element of the crystal generates a reference frequency. In the figure, the missing angle of the fourth electrode is the largest.

[0071] After the original crystal image is generated, it can be preprocessed using the contrast-limited adaptive histogram equalization method. Specifically, the CLAHE (contrast-limited adaptive histogram equalization) algorithm can be used to limit the contrast enhancement amplitude (clip limit = 2.0) to avoid over-enhancement of noise. High-frequency noise can be removed through Gaussian filtering, retaining electrode edge details, thereby enhancing contrast and suppressing interference from uneven illumination. This is more conducive to subsequent crystal angle recognition and improves recognition accuracy and efficiency.

[0072] When generating a matching mask image, a rectangular area based on the geometric center of the crystal and covering the main body of the electrode array can be selected in the original crystal image as the matching mask image area to extract the main body features of the crystal and generate a matching mask image. The extracted main body features of the crystal include edge contours and color gradients.

[0073] Specifically, when generating a matching mask image, the aspect ratio of the selected rectangular area can be preferably 1:1.5, and then the local binary mode (rotation invariant mode, radius R=3, sampling point P=8) algorithm is used to extract the crystal surface texture, distinguish the oxide layer and the electrode area, and extract the gradient distribution of the crystal edge through the directional gradient histogram to enhance the robustness to rotation invariance and generate a matching mask area.

[0074] When generating a shielding mask image, a rectangular area can be selected within the matching mask image area as the shielding mask image area, and a shielding mask image is generated. The selected rectangular area is the electrode edge or background noise area, which can shield interference features such as oxide layers and oil stains.

[0075] Specifically, when generating the shielding mask image, the width of the shielding mask image area can be selected according to formula (1):

[0076] (1);

[0077] in: Indicates the width of the shielding mask image area, Indicates the crystal to be identified The distance between the active electrode pairs, Indicates the number of effective electrode pairs of the crystal to be identified.

[0078] K-means clustering was then used to perform semantic segmentation on the shielded area, automatically identifying the oxide layer (grayscale value < 50) and the background (grayscale value > 200).

[0079] The generated multimodal feature template includes RGB gradient features, LBP texture features and SIFT edge features.

[0080] Specifically, the following method can be used to match the crystal target in the original crystal image with the multimodal feature template:

[0081] S11: Establish RGB-LBP-SIFT joint feature space, use principal component analysis method to reduce dimension and remove redundant information, and then use SVM classifier to train feature weights to generate multimodal feature templates;

[0082] The principal component analysis method is used to reduce the dimension and remove redundant information, retaining 95% of the energy. The SVM classifier uses the radial basis function (RBF) kernel function with γ = 0.01, where γ represents the parameter of the kernel function and controls the width of the kernel function, that is, the range of influence of the sample points.

[0083] S12: downsampling the original crystal image and the multimodal feature template image layer by layer to generate a pyramid structure including a low-resolution layer and a high-resolution layer;

[0084] S13: Perform global search in the low-resolution layer and calculate the position according to formula (2) The similarity score between the multimodal feature template image and the original crystal image is calculated and compared with the set threshold. If the similarity score is greater than or equal to the set threshold, it is determined that the position The pixel points belong to the candidate area, and the final set of points in the candidate area is:

[0085] (2);

[0086] in: Indicates the location The similarity score between the multimodal feature template image and the original crystal image, Represents the multimodal feature template image at position The pixel value at represents the mean value of all pixels of the multimodal feature template image, Indicates that the sub-region of the original crystal image with the same size as the modal feature template image is at position The pixel value at Represents the mean value of all pixels in the sub-region of the original crystal image that has the same size as the modal feature template image;

[0087] Specifically, the threshold of the similarity score can be set to 0.5, the maximum number of targets allowed to be searched is set to 1, and the rotation angle range of the crystal target area in the original crystal image relative to the multimodal feature template is set to -180° to 180°.

[0088] By adopting the above method, a rough matching between the crystal target in the original crystal image and the multimodal feature template can be achieved, thereby quickly locating the potential target.

[0089] S14: Calculate the gradient strength of the candidate region formed by the high-resolution layer pair using formula (3), and compare the gradient strength with the set threshold. The region with a gradient strength greater than the set threshold is retained as the final matching position:

[0090] (3);

[0091] in: Represents the horizontal gradient, which is calculated by the grayscale difference between the adjacent pixels on the left and right of the current pixel.

[0092] Represents the vertical gradient, which is calculated by the grayscale difference between the upper and lower adjacent pixels of the current pixel. Represents the original crystal image at coordinates The gray value at Represents the original crystal image at coordinates The gray value at Represents the original crystal image at coordinates The gray value at Represents the original crystal image at coordinates The gray value at Represents the gradient strength, which indicates the strength of the edge at the pixel point.

[0093] The above method can achieve fine matching between the crystal target in the original crystal image and the multimodal feature template, retaining the local maximum gradient for fine adjustment of position and angle, thereby determining the final matching position.

[0094] The output matching results include angle and position coordinates, providing more accurate basic information for subsequent steps.

[0095] S2: Calculate the offset angle of the crystal target area in the original crystal image relative to the multimodal feature template and the position coordinate offset of the multimodal feature template based on the matching results, and establish an offset reference;

[0096] Specifically, the offset angle of the crystal target area in the original crystal image relative to the multimodal feature template can be calculated according to formula (4), and the position coordinate offset of the crystal target area in the original crystal image relative to the multimodal feature template can be calculated according to formula (5):

[0097] (4);

[0098] (5);

[0099] in: represents the rotational offset angle of the crystal target area in the original crystal image relative to the multimodal feature template, Represents the vertical scaling and rotation components of the crystal target area in the original crystal image relative to the multimodal feature template, ,in: represents the scaling factor, represents the rotation angle of the crystal target area in the original crystal image relative to the multimodal feature template, Represents the horizontal scaling and rotation components of the crystal target area in the original crystal image relative to the multimodal feature template, , Indicates the position coordinate offset of the crystal target area in the original crystal image relative to the multimodal feature template, Represents the position coordinates of the crystal target area in the original crystal image, Indicates that among all possible displacements Find the position coordinate offset that maximizes the absolute value of the inverse Fourier transform result. represents the Fourier transform, represents the inverse Fourier transform, represents the complex conjugate operator, Indicates that the original crystal image is The pixel coordinates at position, Represents the multimodal feature template in The pixel coordinates at position, Represents a constant that prevents division by zero.

[0100] This can remove the effects of image distortion and noise, establish a more accurate offset reference, and make the subsequent crystal angle identification more accurate.

[0101] S3: Determine the region of interest for Blob analysis of the original crystal image, and optimize and adjust the size of the region of interest for Blob analysis of the original crystal image based on the matching mask image and the shielding mask image to obtain the optimized and adjusted region of interest for Blob analysis. Based on the offset reference, use the image registration algorithm to dynamically correct the pixel position of the optimized and adjusted region of interest for Blob analysis to obtain the corrected region of interest for Blob analysis. Perform the first Blob analysis on the original crystal image within the corrected region of interest for Blob analysis to obtain the binary image of the crystal electrode and extract the electrode features. The schematic diagram of the crystal features for the first Blob analysis is shown in FIG. Figure 3 shown.

[0102] The region of interest for blob analysis of the original crystal image can be fine-tuned based on the width and height of the matching mask image and the actual shape of the crystal.

[0103] Optimized, the width of the region of interest for Blob analysis of the original crystal image can be taken as 0.8 times the width of the matching mask image, and the height of the region of interest for Blob analysis of the original crystal image can be taken as 0.9 times the height of the matching mask image, and the center of the original crystal image is used as the center to avoid interference from the electrode edge and specify the analysis range.

[0104] Specifically, the pixel positions of the region of interest of the optimized and adjusted Blob analysis can be dynamically corrected using the image registration algorithm according to formula (6):

[0105] (6);

[0106] in: Indicates the dynamically corrected pixel coordinates of the region of interest in the optimized and adjusted Blob analysis.

[0107] Based on the offset reference, the region of interest of the blob analysis is dynamically corrected to obtain the corrected region of interest for the blob analysis. Then, blob analysis is performed on the corrected region of interest for the blob analysis. This can shield interference areas, such as electrode edge burrs and tiny impurities, and improve the accuracy of the blob analysis.

[0108] Specifically, the first Blob analysis is performed on the original crystal image within the region of interest of the corrected Blob analysis according to the following method to obtain a binary image of the crystal electrode:

[0109] S31: Calculate the adaptive threshold of the pixel gray value according to formula (7):

[0110] (7);

[0111] in: Represents the adaptive threshold of the pixel gray value, Represents a candidate threshold that traverses all possible pixel grayscale values , find the candidate threshold that maximizes the between-class variance, Indicates the proportion of pixels within the region of interest of the corrected Blob analysis, Indicates the proportion of pixels outside the region of interest of the corrected Blob analysis, Indicates the discrete degree of pixel values ​​within the region of interest of the modified Blob analysis. Indicates the discrete degree of pixel values ​​outside the region of interest of the modified Blob analysis;

[0112] S32: Compare the grayscale value of each pixel in the region of interest of the corrected Blob analysis with the adaptive threshold of the pixel grayscale value, convert the pixel in the region of interest of the corrected Blob analysis whose grayscale value is greater than or equal to the adaptive threshold to pure white, and convert the pixel whose grayscale value is less than the adaptive threshold to pure black;

[0113] S33: Obtain the first blob analysis result, obtain a binary image of the crystal electrode, and extract electrode features. The extracted electrode features include the area size of each blob, the circularity of the blob, and the coordinates of the blob center of mass.

[0114] The adaptive threshold of the pixel grayscale value is calculated according to formula (7), so that the threshold range of the pixel grayscale value is dynamically adjusted according to the grayscale distribution of the crystal electrode, and the connectivity is adaptively selected according to the electrode shape, thereby adapting to the recognition of crystal angles of different sizes and shapes.

[0115] S4: Adaptive multi-scale morphological enhancement and feature enhancement are performed on the binary image of the crystal electrode to obtain an enhanced crystal electrode image; the enhanced crystal electrode image is as follows Figure 4 shown.

[0116] Specifically, the following method can be used to perform adaptive multi-scale morphological enhancement and feature enhancement on the binary image of the crystal electrode to obtain an enhanced crystal electrode image:

[0117] S41: performing a dilation operation on the binary image of the crystal electrode, adjusting the kernel size, and expanding the electrode feature area;

[0118] The size of the core can be dynamically adjusted according to the size and shape of the electrode feature, ranging from 3×3 to 9×9, thereby expanding the electrode feature area and eliminating small fractures.

[0119] Specifically, the kernel size can be calculated according to the following formula:

[0120] ;

[0121] in: represents the width of the kernel, represents the height of the nucleus, Indicates the degree of dispersion of the measured data. It can be preferably 8 microns, Indicates the measured center value of the electrode spacing, It can be preferably 50 microns, Indicates rounding down;

[0122] S42: Using the morphological gradient reconstruction algorithm, iterate according to formula (8) to perform edge-preserving expansion on the binary image of the crystal electrode:

[0123] (8);

[0124] in: Indicates that after The output image after the morphological dilation operation, Indicates that after The intermediate result after the secondary morphological expansion, when When it is equal to 1, is the original input image, Indicates the morphological dilation operation on the image. Represents the first structural element, which is The core parameters of morphological operations determine the shape and range of the dilation operation. Indicates the total number of iterations;

[0125] The total number of iterations here It is determined by the electrode fracture density and can be calculated according to the following formula:

[0126] ;

[0127] in: Indicates the proportion of broken pixels, represents the total area of ​​the electrode region, Indicates rounding up.

[0128] Through edge-preserving expansion processing, the significance of electrode features can be enhanced, such as increasing edge contrast by ≥30%, thereby improving the accuracy of subsequent crystal angle positioning.

[0129] 43: Perform top hat transformation according to formula (9):

[0130] (9);

[0131] in: represents the top hat transformation result, It is the difference between the original image and the result of the opening operation, which can highlight the structural elements. Small bright details.

[0132] represents the input image matrix or signal, is the initial data of top-hat transformation, represents the opening operation, represents the second structural element, Determines the neighborhood shape and size for morphological operations;

[0133] After top hat transformation, the electrode edge details can be highlighted.

[0134] S44: Adaptive histogram enhancement is performed using contrast stretching technology according to formula (10):

[0135] (10);

[0136] in: Indicates the output image after adaptive histogram enhancement at coordinates The gray value at Indicates that the calculation result is rounded to the nearest integer. represents the total number of gray levels, The value is usually 256. represents the cumulative distribution function, Represents grayscale values ​​from 0 to The cumulative number of pixels, Indicates the image after morphological expansion at coordinates The gray value at represents the width of the image after morphological expansion, Indicates the height of the image after morphological expansion;

[0137] S44: performing wavelet domain fusion on the output image after adaptive histogram enhancement according to formula (11), retaining high-frequency edge information and low-frequency intensity features, and obtaining an enhanced crystal electrode image;

[0138] (11);

[0139] in: represents the enhanced crystal electrode image, It is the result of combining detail enhancement and overall contrast adjustment. represents the weight of high-frequency components, Mainly for edge information, the preferred value is 0.7. represents the weight of low-frequency components, Mainly for strength characteristics, the preferred value is 0.3. represents the output image after adaptive histogram enhancement, Used to indicate overall contrast.

[0140] Through the above optimization and adjustment, the electrode features of the enhanced crystal electrode image are more obvious, the contrast is stronger, and it is more conducive to the identification of crystal angles.

[0141] S5: Perform secondary Blob analysis on the enhanced crystal electrode image to extract angle features and complete the identification of crystal angles based on electrode features. The schematic diagram of crystal features of secondary Blob analysis is shown in Figure 5 shown.

[0142] Specifically, the following method can be used to perform secondary Blob analysis on the enhanced crystal electrode image to extract angle features and complete the recognition of crystal angles based on electrode features:

[0143] S51: Perform secondary Blob analysis on the enhanced crystal electrode image to extract angle features;

[0144] S52: Sort the angle features in descending order by area, and select the largest area defect as the largest defect in the crystal;

[0145] S53: Calculate the distance and angle between the center of the largest missing angle area and the center of the crystal according to formula (12), and combine the distance and angle between the center of the largest missing angle area and the center of the crystal. Directional distance and the center of the maximum missing angle area and the center of the crystal The final crystal angle is determined by the directional distance and then output. The direction of the crystal is then determined based on the final crystal angle, completing the recognition of the crystal angle based on the electrode characteristics:

[0146] (12);

[0147] in: Indicates the horizontal angle between the center of the largest missing corner area in the original crystal image and the center of the crystal. are the coordinates of the crystal center, is the center coordinate of the area with the largest missing corner area, Indicates the center of the largest missing corner area and the center of the crystal Direction distance, Indicates the center of the largest missing corner area and the center of the crystal Direction distance.

[0148] Specifically, the following method can be used to combine the center of the largest missing corner area with the center of the crystal Directional distance and the center of the maximum missing angle area and the center of the crystal The orientation distance determines the final crystal angle:

[0149] like The value of is greater than 0, The value of is greater than 0, then the final crystal angle ;like The value of is greater than 0, The value of is less than 0, then the final crystal angle ;like The value of is less than 0, The value of is less than 0, then the final crystal angle ;like The value of is less than 0, The value of is greater than 0, then the final crystal angle .

[0150] When determining the direction of the crystal based on the final crystal angle, compare the quadrant where the calculated final crystal angle is located with the quadrant where the maximum missing angle of the crystal required by the actual production line is located. The coordinate system is based on the crystal center coordinates. As the origin, if the calculated final crystal angle is consistent with the quadrant where the maximum missing angle of the crystal required by the actual production line is located, it means that the crystal is in the forward direction and no direction adjustment is required. If the calculated final crystal angle is opposite to the quadrant where the maximum missing angle of the crystal required by the actual production line is located, it means that the crystal is in the reverse direction and it is necessary to flip the crystal direction by using a suction nozzle or the like before proceeding to the next step.

[0151] like Figure 2 As shown, the maximum missing angle of the crystal required for the actual production line is in the third quadrant. If the final crystal angle calculated is , it means that the calculated final crystal angle is opposite to the quadrant where the maximum missing angle of the crystal required by the actual production line is located, which means that the crystal is reversed and the crystal direction needs to be flipped; if the calculated final crystal angle is , it means that the calculated final crystal angle is consistent with the quadrant where the maximum missing angle of the crystal required by the actual production line is located, which means that the crystal is positive and there is no need to adjust the crystal angle. If the calculated final crystal angle is neither relative to nor consistent with the quadrant where the maximum missing angle of the crystal required by the actual production line is located, it means that the crystal to be identified is abnormal and will not enter the next process.

[0152] In summary, the present invention provides a crystal angle recognition method based on electrode features, which improves the accuracy of crystal angle recognition and the production efficiency of crystal processing, and can be applied to various complex crystal angle recognition scenarios.

[0153] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A crystal angle identification method based on electrode characteristics, characterized by comprising the following steps: S1: Acquire the original crystal image and generate a matching mask image and a shielding mask image, merge the matching mask image and the shielding mask image, generate a multimodal feature template, match the crystal target in the original crystal image with the multimodal feature template, and output the matching result; S2: Calculate the offset angle of the crystal target area in the original crystal image relative to the multimodal feature template and the position coordinate offset of the multimodal feature template based on the matching results, and establish an offset reference; S3: Determine the region of interest for Blob analysis of the original crystal image, and optimize and adjust the size of the region of interest for Blob analysis of the original crystal image based on the matching mask image and the shielding mask image to obtain the optimized and adjusted region of interest for Blob analysis; based on the offset reference, use the image registration algorithm to dynamically correct the pixel position of the optimized and adjusted region of interest for Blob analysis to obtain the corrected region of interest for Blob analysis; perform the first Blob analysis on the original crystal image within the corrected region of interest for Blob analysis, obtain a binary image of the crystal electrode, and extract the electrode features; S4: Perform adaptive multi-scale morphological enhancement and feature enhancement on the binary image of the crystal electrode to obtain an enhanced crystal electrode image; S5: Perform secondary Blob analysis on the enhanced crystal electrode image to extract angle features and complete the identification of crystal angles based on electrode features.

2. The crystal angle identification method based on electrode characteristics according to claim 1, characterized in that: The original crystal image obtained in step S1 is preprocessed using a contrast-limited adaptive histogram equalization method before generating the matching mask image and the shielding mask image.

3. The crystal angle identification method based on electrode characteristics according to claim 1, characterized in that: When generating a matching mask image in step S1, a rectangular area based on the geometric center of the crystal and covering the main body of the electrode array is selected in the original crystal image as the matching mask image area, the main body features of the crystal are extracted, and a matching mask image is generated. When generating a shielding mask image, a rectangular area is selected within the matching mask image area as the shielding mask image area, and a shielding mask image is generated.

4. The crystal angle identification method based on electrode characteristics according to claim 3, characterized in that: The width of the shielding mask image area is selected according to formula (1): (1); in: Indicates the width of the shielding mask image area, Indicates the crystal to be identified The distance between the effective electrode pairs, Indicates the number of effective electrode pairs of the crystal to be identified.

5. The crystal angle identification method based on electrode characteristics according to claim 1, characterized in that: In step S1, the following method is used to match the crystal target in the original crystal image with the multimodal feature template: S11: Establish RGB-LBP-HOG joint feature space, use principal component analysis method to reduce dimension and remove redundant information, and then use SVM classifier to train feature weights to generate multimodal feature templates; S12: downsampling the original crystal image and the multimodal feature template image layer by layer to generate a pyramid structure including a low-resolution layer and a high-resolution layer; S13: Perform global search in the low-resolution layer and calculate the position according to formula (2) The similarity score between the multimodal feature template image and the original crystal image is calculated and compared with the set threshold. If the similarity score is greater than or equal to the set threshold, it is determined that the position The pixel points belong to the candidate area, and the final set of points in the candidate area forms the candidate area: (2); in: Indicates the location The similarity score between the multimodal feature template image and the original crystal image, Represents the multimodal feature template image at position The pixel value at represents the mean value of all pixels of the multimodal feature template image, Indicates that the sub-region of the original crystal image with the same size as the modal feature template image is at position The pixel value at Represents the mean value of all pixels in the sub-region of the original crystal image that has the same size as the modal feature template image; S14: Calculate the gradient strength of the candidate region formed by the high-resolution layer pair using formula (3), and compare the gradient strength with the set threshold. The region with a gradient strength greater than the set threshold is retained as the final matching position: (3); in: represents the horizontal gradient, represents the vertical gradient, Represents the original crystal image at coordinates The gray value at Represents the original crystal image at coordinates The gray value at Represents the original crystal image at coordinates The gray value at Represents the original crystal image at coordinates The gray value at Represents the gradient strength.

6. The crystal angle identification method based on electrode characteristics according to claim 1, characterized in that: In step S2, the offset angle of the crystal target area in the original crystal image relative to the multimodal feature template is calculated according to formula (4), and the position coordinate offset of the crystal target area in the original crystal image relative to the multimodal feature template is calculated according to formula (5): (4); (5); in: represents the rotational offset angle of the crystal target area in the original crystal image relative to the multimodal feature template, Represents the vertical scaling and rotation components of the crystal target area in the original crystal image relative to the multimodal feature template, Represents the horizontal scaling and rotation components of the crystal target area in the original crystal image relative to the multimodal feature template, Indicates the position coordinate offset of the crystal target area in the original crystal image relative to the multimodal feature template, Represents the position coordinates of the crystal target area in the original crystal image, Indicates that among all possible displacements Find the position coordinate offset that maximizes the absolute value of the inverse Fourier transform result. represents the Fourier transform, represents the inverse Fourier transform, represents the complex conjugate operator, Indicates that the original crystal image is The pixel coordinates at position, Represents the multimodal feature template in The pixel coordinates at position, Represents a constant that prevents division by zero.

7. The crystal angle identification method based on electrode characteristics according to claim 6, characterized in that: In step S3, the image registration algorithm is used according to formula (6) to dynamically correct the pixel positions of the region of interest of the optimized and adjusted Blob analysis: (6); in: Indicates the dynamically corrected pixel coordinates of the region of interest in the optimized and adjusted Blob analysis.

8. The crystal angle identification method based on electrode characteristics according to claim 1, characterized in that: In step S3, the first Blob analysis is performed on the original crystal image within the region of interest of the corrected Blob analysis according to the following method to obtain a binary image of the crystal electrode: S31: Calculate the adaptive threshold of the pixel gray value according to formula (7): (7); in: Represents the adaptive threshold of the pixel gray value, Represents a candidate threshold that traverses all possible pixel grayscale values , find the candidate threshold that maximizes the between-class variance, Indicates the proportion of pixels within the region of interest of the corrected Blob analysis, Indicates the proportion of pixels outside the region of interest of the corrected Blob analysis, Indicates the discrete degree of pixel values ​​within the region of interest of the modified Blob analysis. Indicates the discrete degree of pixel values ​​outside the region of interest of the modified Blob analysis; S32: Compare the grayscale value of each pixel in the region of interest of the corrected Blob analysis with the adaptive threshold of the pixel grayscale value, convert the pixel in the region of interest of the corrected Blob analysis whose grayscale value is greater than or equal to the adaptive threshold to pure white, and convert the pixel whose grayscale value is less than the adaptive threshold to pure black; S33: Obtain the first blob analysis result, obtain the binary image of the crystal electrode, and extract the electrode features.

9. The crystal angle identification method based on electrode characteristics according to claim 6, characterized in that: In step S4, adaptive multi-scale morphological enhancement and feature enhancement are performed on the binary image of the crystal electrode according to the following method to obtain an enhanced crystal electrode image: S41: performing a dilation operation on the binary image of the crystal electrode, adjusting the kernel size, and expanding the electrode feature area; S42: Using the morphological gradient reconstruction algorithm, iterate according to formula (8) to perform edge-preserving expansion on the binary image of the crystal electrode: (8); in: Indicates that after The output image after the morphological dilation operation, Indicates that after The intermediate result after the secondary morphological expansion, Indicates the morphological dilation operation on the image. represents the first structuring element, Indicates the total number of iterations; S43: Perform top hat transformation according to formula (9): (9); in: represents the top hat transformation result, represents the input image matrix or signal, represents the opening operation, represents the second structural element; S44: Adaptive histogram enhancement is performed using contrast stretching technology according to formula (10): (10); in: Indicates the output image after adaptive histogram enhancement at coordinates The gray value at Indicates that the calculation result is rounded to the nearest integer. represents the total number of gray levels, represents the cumulative distribution function, Indicates the image after morphological expansion at coordinates The gray value at represents the width of the image after morphological expansion, Indicates the height of the image after morphological expansion; S44: performing wavelet domain fusion on the output image after adaptive histogram enhancement according to formula (11), retaining high-frequency edge information and low-frequency intensity features, and obtaining an enhanced crystal electrode image; (11); in: represents the enhanced crystal electrode image, represents the weight of high-frequency components, represents the weight of low-frequency components, Represents the output image after adaptive histogram enhancement.

10. The crystal angle identification method based on electrode characteristics according to claim 1, characterized in that: In step S5, the following method is used to perform secondary Blob analysis on the enhanced crystal electrode image to extract angle features and complete the recognition of crystal angle based on electrode features: S51: Perform secondary Blob analysis on the enhanced crystal electrode image to extract angle features; S52: Sort the angle features in descending order by area, and select the largest area defect as the largest defect in the crystal; S53: Calculate the distance and angle between the center of the largest missing angle area and the center of the crystal according to formula (12), and combine the distance and angle between the center of the largest missing angle area and the center of the crystal. Directional distance and the center of the maximum missing angle area and the center of the crystal The final crystal angle is determined by the directional distance and then output. The direction of the crystal is then determined based on the final crystal angle, completing the recognition of the crystal angle based on the electrode characteristics: (12); in: Indicates the horizontal angle between the center of the largest missing corner area in the original crystal image and the center of the crystal. are the coordinates of the crystal center, is the center coordinate of the area with the largest missing corner area, Indicates the center of the largest missing corner area and the center of the crystal Direction distance, Indicates the center of the largest missing corner area and the center of the crystal Direction distance.

Citation Information

Patent Citations

  • Wafer defect detection method, device and equipment and computer storage medium

    CN114300375A

  • Optical collimators for under-screen optical sensor module for on-screen fingerprint sensing

    WO2017211152A1