Silicon carbide grain size detection method based on image processing
Through image processing technology, the edge chaos and internal consistency of silicon carbide grains are analyzed, and the equivalent circle diameter is adjusted, which solves the detection error caused by irregular shapes and adhesions in traditional detection methods, achieving more accurate grain size evaluation.
Patent Information
- Application Number
- CN202510748331.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-06
AI Technical Summary
The traditional silicon carbide grain size detection method has inaccurate calculation of equivalent circle diameter due to complex grain shape and irregularity and adhesion, which affects the evaluation of material mechanical properties.
Using an image processing-based method, the edge chaos and internal consistency of the grain region are obtained through edge detection and grayscale symbiosis matrix analysis, and the equivalent circle diameter is adjusted to improve accuracy.
The accuracy of silicon carbide grain size detection is improved, the errors caused by irregular shapes and adhesions in traditional methods are overcome, and the accuracy of material performance evaluation is improved.
Smart Images

Figure CN120259314A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing. More specifically, the present invention relates to a method for detecting the grain size of silicon carbide based on image processing. Background Art
[0002] As a core representative of the third-generation semiconductor materials, silicon carbide is widely used in various fields such as new energy vehicles due to its wide bandgap, high breakdown field strength, high thermal conductivity, etc. The grain size of silicon carbide (grain size and distribution) is a key parameter determining the mechanical properties of silicon carbide materials. Traditional grain size detection relies on microscopes combined with manual interpretation (such as the intercept method, area method), which has problems such as low efficiency, strong subjectivity, and difficult data traceability.
[0003] For the traditional detection of the grain size of silicon carbide by the equivalent circle diameter, it is known that the equivalent circle diameter is an index used to measure the grain size. It assumes that the grain is a circle and calculates a diameter value through the method of area equivalence. However, in reality, many silicon carbide grains have complex irregular shapes, such as long strips, polygons, etc. When using the equivalent circle diameter to measure the size of these irregular grains, it may not accurately reflect their true size and morphological characteristics, resulting in inaccurate grain size calculation. And when there is adhesion between grains, two grains may be misidentified as one grain, resulting in an overestimated calculation of the equivalent circle diameter, and further leading to inaccurate subsequent grain size calculation. Summary of the Invention
[0004] In order to solve the problem that the accuracy of the equivalent circle diameter of silicon carbide is relatively low due to the complex irregular shape and adhesion of silicon carbide grains, the present invention proposes a method for detecting the grain size of silicon carbide based on image processing. The method includes the following steps: Collect a grayscale image of silicon carbide; perform edge detection on the grayscale image of silicon carbide to obtain a plurality of grain regions; obtain the edge disorder degree of each grain region; Obtain the horizontal gray-level co-occurrence matrix and the vertical gray-level co-occurrence matrix of each grain region; obtain the internal consistency of each grain region according to the frequency value of each texture in the horizontal gray-level co-occurrence matrix and the vertical gray-level co-occurrence matrix of each grain region; Obtain an adjustment factor for each grain region according to the internal consistency and the edge disorder degree of each grain region; adjust the equivalent circle diameter of each grain region according to the adjustment factor to obtain the final equivalent circle diameter of each grain region; obtain the grain size of each grain region according to the final equivalent circle diameter of each grain region.
[0005] The innovation of the present invention lies in that by analyzing the edge disorder degree of each grain region and the internal consistency of each grain region, it is possible to evaluate whether the edge of the grain region is irregular or contains multiple grains. Then, according to the edge disorder degree and the internal consistency, an adjustment factor for each grain region is obtained. For the grain regions with irregular edges and the grain regions containing multiple grains, the equivalent circle diameter is adjusted to be a little smaller, thereby making the calculation of the grain size more accurate.
[0006] Preferably, the edge detection of the silicon carbide grayscale image to obtain a plurality of grain regions includes: Using the Canny edge detection algorithm to perform edge detection on the silicon carbide grayscale image to obtain a silicon carbide edge image. Presetting an edge point number threshold T, using the contour detection algorithm to extract a plurality of closed edges in the silicon carbide edge image, obtaining the number of edge points of each closed edge in the silicon carbide edge image, and removing the closed edges with the number of edge points less than T to obtain a plurality of final closed edges in the silicon carbide edge image; The region formed by each final closed edge is denoted as a grain region.
[0007] Obtaining the grain regions is convenient for subsequent analysis of the grain regions.
[0008] Preferably, the obtaining of the edge disorder degree of each grain region includes: Obtaining the minimum diameter and the maximum diameter in each grain region; ; In the formula, represents the boundary disorder degree of the i-th grain region; represents the number of pixel points in the i-th grain region; represents the square of the number of edge pixel points in the i-th grain region; represents the maximum diameter in the i-th grain region; represents the minimum diameter in the i-th grain region; exp() represents the exponential function with the natural constant as the base.
[0009] The greater the edge disorder degree, the more irregular the edge of the grain region, and the more the equivalent circle diameter of the grain region needs to be adjusted.
[0010] Preferably, the obtaining of the minimum diameter and the maximum diameter in each grain region includes: Obtain the centroid position of the \(i\)-th grain region; preset an angular parameter \(\theta\), starting from the vertical direction of the centroid position, and draw rays every \(\theta\) with the centroid position as the origin. Obtain the two intersection points of each ray and the edge pixels of the \(i\)-th grain region, and both are recorded as the target intersection points of each ray; record the Euclidean distance between the two target intersection points of each ray as the diameter length; obtain the maximum value of all diameter lengths and record it as the maximum diameter in the \(i\)-th grain region, and obtain the minimum value of all diameter lengths and record it as the minimum diameter in the \(i\)-th grain region.
[0011] Preferably, the obtaining of the horizontal gray-level co-occurrence matrix and the vertical gray-level co-occurrence matrix of each grain region includes: Obtain the gray-level co-occurrence matrix of the \(i\)-th grain region in the horizontal direction, and record it as the horizontal gray-level co-occurrence matrix of the \(i\)-th grain region; Obtain the gray-level co-occurrence matrix of the \(i\)-th grain region in the vertical direction, and record it as the vertical gray-level co-occurrence matrix of the \(i\)-th grain region.
[0012] Preferably, the obtaining of the internal consistency of each grain region includes: ; In the formula, represents the internal consistency of the \(i\)-th grain region; represents the number of texture types of the horizontal gray-level co-occurrence matrix of the \(i\)-th grain region; represents the square of the frequency value of the \(m\)-th texture in the horizontal gray-level co-occurrence matrix of the \(i\)-th grain region; represents the number of texture types of the vertical gray-level co-occurrence matrix of the \(i\)-th grain region; represents the square of the frequency value of the \(n\)-th texture in the vertical gray-level co-occurrence matrix of the \(i\)-th grain region; represents the number of pixel points in the \(i\)-th grain region; represents the gray value of the \(j\)-th pixel point in the \(i\)-th grain region; represents the average gray value of all pixel points in the \(i\)-th grain region; exp() represents the exponential function with the natural constant as the base.
[0013] The smaller the internal consistency, the more it means that the grain region contains multiple grains, and the more the equivalent circle diameter of the grain region needs to be adjusted.
[0014] Preferably, the obtaining of the adjustment factor of each grain region includes: ; In the formula, represents the adjustment factor of the \(i\)-th grain region; represents the internal consistency of the \(i\)-th grain region; represents the boundary disorder degree of the i-th grain region; min() represents the minimum value function.
[0015] Preferably, the obtaining of the final equivalent circle diameter of each grain region includes: Obtaining the equivalent circle diameter of each grain region; Taking the product of the equivalent circle diameter of each grain region and the adjustment factor of each grain region as the final equivalent circle diameter of each grain region.
[0016] Correcting the equivalent circle diameter of each grain region improves the accuracy of the equivalent circle diameter.
[0017] Preferably, the obtaining of the grain size of each grain region includes: Taking the final equivalent circle diameter of each grain region as the grain size of each grain region.
[0018] Preferably, the collecting of the gray-scale image of silicon carbide includes: Using a microscope to collect a microscopic image of silicon carbide and performing gray-scale processing on it to obtain a gray-scale image of silicon carbide.
[0019] The present invention has the following beneficial effects: The purpose of the present invention is to evaluate whether the edge of the grain region is irregular or contains multiple grains by analyzing the edge disorder degree of each grain region and the internal consistency of each grain region. Then, according to the edge disorder degree and internal consistency, the adjustment factor of each grain region is obtained. For the grain regions with irregular edges and the grain regions containing multiple grains, the equivalent circle diameter is adjusted a little smaller, thereby making the calculation of the grain size more accurate. Description of the Drawings
[0020] By referring to the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the drawings, several embodiments of the present invention are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 is a step flow chart of a method for detecting the grain size of silicon carbide based on image processing according to an embodiment of the present invention. Detailed Embodiments
[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention.
[0022] Please refer to Figure 1, which shows a step - flow chart of a method for detecting the grain size of silicon carbide based on image processing provided by an embodiment of the present invention. The method includes the following steps: S001. Collect a grayscale image of silicon carbide.
[0023] In an embodiment of the present invention, a microscope is used to collect a microscopic image of silicon carbide and perform grayscale processing on it to obtain a grayscale image of silicon carbide.
[0024] S002. Perform edge detection on the grayscale image of silicon carbide to obtain a grain region, and obtain the degree of edge disorder of each grain region.
[0025] It should be noted that there is an obvious grayscale difference between the silicon carbide grains and the surrounding area in the grayscale image of silicon carbide. Therefore, in the present invention, edge detection is first used to detect the silicon carbide grains in the silicon carbide image to obtain a number of closed edges. However, due to the possible presence of noise points in the image, some false edges may be generated after edge detection, and these false edges are usually composed of a small number of edge points. Therefore, it is necessary to remove the closed edges with a small number of edge points to obtain the final closed edges, and the region formed by the final closed edges is the grain region.
[0026] In an embodiment of the present invention, the Canny edge - detection algorithm is used to perform edge detection on the grayscale image of silicon carbide to obtain a silicon carbide edge image. A preset edge - point number threshold T = 50 is set. The contour - detection algorithm is used to extract a number of closed edges in the silicon carbide edge image, and the number of edge points of each closed edge in the silicon carbide edge image is obtained. The closed edges with the number of edge points less than T are removed to obtain a number of final closed edges in the silicon carbide edge image; the region formed by each final closed edge is denoted as the grain region.
[0027] It should be noted that for any grain region, the circularity of the edge shape of the grain region and the difference between the maximum diameter and the minimum diameter of the grain region can directly reflect the regularity of the grain region. Therefore, the present invention comprehensively considers the shape and diameter change of the grain region to more comprehensively and accurately reflect the irregular characteristics of the edge of the grain region.
[0028] In an embodiment of the present invention, the centroid position of the i - th grain region is obtained; a preset angle parameter θ = 2° is set. Taking the vertical direction of the centroid position as the starting direction, rays are made every θ with the centroid position as the origin to obtain two intersection points of each ray and the edge pixel points of the i - th grain region, and both are denoted as the target intersection points of each ray; the Euclidean distance between the two target intersection points of each ray is denoted as the diameter length; the maximum value of all diameter lengths is obtained and denoted as the maximum diameter in the i - th grain region, and the minimum value of all diameter lengths is obtained and denoted as the minimum diameter in the i - th grain region; Obtain the boundary disorder degree of each grain region: ; In the formula, represents the boundary disorder degree of the i-th grain region; represents the number of pixel points in the i-th grain region; represents the square of the number of edge pixel points in the i-th grain region; represents the maximum diameter in the i-th grain region; represents the minimum diameter in the i-th grain region; exp() represents the exponential function with the natural constant as the base; represents the difference between the maximum diameter and the minimum diameter in the i-th grain region. The larger the difference, the more irregular the edge of the i-th grain region, and at this time, the higher the boundary disorder degree of the i-th grain region; represents the circularity of the i-th grain region. The closer its value is to 1, the closer the shape of the i-th grain region is to a circle. Since the circular region is regular and the edge is smooth, the boundary disorder degree of the i-th grain region is smaller.
[0029] S003. According to the complexity of the gray distribution and the clutter degree of the texture distribution of each grain region, obtain the internal consistency of each grain region. According to the internal consistency and the boundary disorder degree of each grain region, obtain the adjustment factor of each grain region. Adjust the equivalent circle diameter of each grain region according to the adjustment factor to obtain the final equivalent circle diameter of each grain region.
[0030] It should be noted that for any grain region, in addition to the regularity of its edge shape affecting the accuracy of the equivalent circle diameter of the grain region, when there is adhesion between silicon carbide grains in the silicon carbide gray-scale image, resulting in two or more independent grains contacting each other in the silicon carbide gray-scale image and causing boundary blurring, it may lead to multiple silicon carbide grain individuals being included in the obtained grain region. Simply regarding this mixed region as a single grain and calculating the equivalent circle diameter will inevitably result in a value significantly larger than the size of a single real grain, leading to systematic deviation in the grain size evaluation result. Therefore, the present invention also needs to analyze the internal consistency of each grain region to determine whether each grain region is a mismerger of multiple grains, so as to correct the equivalent circle diameter and improve the overall accuracy of the grain size measurement; It should be further noted that if the gray distribution in any grain region is relatively complex, it indicates that this region may be a mismerger of multiple grains, and the internal consistency of this grain region is smaller; moreover, if the texture distribution in this grain region is cluttered, showing a phenomenon of multiple different texture patterns intertwined and mixed, it indicates that this region may be a mismerger of multiple grains, and the internal consistency of this grain region is smaller.
[0031] In an embodiment of the present invention, the gray-level co-occurrence matrix of the i-th grain region in the horizontal direction ( ) is obtained, which is denoted as the horizontal gray-level co-occurrence matrix of the i-th grain region; The gray-level co-occurrence matrix of the i-th grain region in the vertical direction ( ) is obtained, which is denoted as the vertical gray-level co-occurrence matrix of the i-th grain region; The internal consistency of each grain region is obtained: ; In the formula, represents the internal consistency of the i-th grain region; represents the number of texture types of the horizontal gray-level co-occurrence matrix of the i-th grain region; represents the square of the frequency value of the m-th texture in the horizontal gray-level co-occurrence matrix of the i-th grain region; represents the number of texture types of the vertical gray-level co-occurrence matrix of the i-th grain region; represents the square of the frequency value of the n-th texture in the vertical gray-level co-occurrence matrix of the i-th grain region; represents the number of pixel points in the i-th grain region; represents the gray value of the j-th pixel point in the i-th grain region; represents the average gray value of all pixel points in the i-th grain region; exp() represents the exponential function with the natural constant as the base; It is known that if the texture of the i-th grain region is highly consistent in a certain direction, that is, the texture is relatively concentrated, then there will be a relatively large frequency value and other relatively small frequency values in the texture frequency of the gray-level co-occurrence matrix of the i-th grain region in this direction; if the texture of the i-th grain region is not highly consistent in a certain direction, that is, the texture is relatively disordered, then there is no obvious relatively large frequency value in the texture frequency of the gray-level co-occurrence matrix of the i-th grain region in this direction; Therefore, when has a larger value, it amplifies the weight of the relatively large frequency value in the horizontal gray-level co-occurrence matrix of the i-th grain region, making the contribution of the relatively large frequency to the total sum significantly higher than other frequencies. At this time, it indicates that the texture of the i-th grain region is highly consistent in the horizontal direction, that is, the texture is relatively concentrated, which means that there is a repeated and stable gray pattern inside the i-th grain region in the horizontal direction, so the internal consistency of the i-th grain region is relatively high; similarly, when has a larger value, it indicates that the texture of the i-th grain region is highly consistent in the vertical direction, so the internal consistency of the i-th grain region is relatively high; represents the sum of the squares of the differences between the gray values of all pixel points in the i-th grain region and the gray mean value, which reflects the complexity of the gray distribution in the i-th grain region. The smaller its value, the smaller the difference in gray values between the pixel points in the i-th grain region, and the higher the internal consistency of the i-th grain region.
[0032] It should be noted that the degree of boundary disorder of the grain region describes whether the shape of the grain is regular, while the internal consistency of the grain region indicates whether the grain region is a mismerger of multiple grains. Therefore, considering the degree of boundary disorder and internal consistency of the grain region comprehensively, the adjustment factor of the grain region is obtained, and the adjustment factor is used to correct the equivalent circle diameter of the grain region.
[0033] In the embodiment of the present invention, the adjustment factor of each grain region is obtained: ; In the formula, represents the adjustment factor of the i-th grain region; represents the internal consistency of the i-th grain region; represents the degree of boundary disorder of the i-th grain region; min() represents the minimum value function, ensuring that the adjustment factor does not exceed 1 to avoid excessive amplification of the grain size adjustment coefficient; If the internal consistency of the i-th grain region is small and the degree of boundary disorder of the i-th grain region is large, the value of is significantly less than 1, which means that the internal texture of the grain region is disordered and the boundary is irregular, indicating that this grain has abnormal growth or structural defects and belongs to a grain with poor quality. At this time, it is necessary to reduce its equivalent circle diameter. Then, through the min() function, is assigned to so that the adjustment factor of the i-th grain region is small, realizing the compression of the equivalent circle diameter; If the internal consistency of the i-th grain region is large and the degree of boundary disorder of the i-th grain region is small, the value of is much greater than 1, indicating that the quality of this grain is good at this time. At this time, it is necessary not to adjust its equivalent circle diameter. Then, through the min() function, is assigned to 1 to ensure that the equivalent circle diameter remains unchanged.
[0034] To obtain the equivalent circle diameter of each grain region, it should be noted that the method for obtaining the equivalent circle diameter is a well-known technology. In the embodiment of the present invention, it will not be elaborated too much here.
[0035] The product of the equivalent circle diameter of each grain region and the adjustment factor of each grain region is used as the final equivalent circle diameter of each grain region.
[0036] S004. Obtain the grain size of each grain region according to the final equivalent circle diameter of each grain region.
[0037] It should be noted that the equivalent circle diameter can intuitively reflect the size of the grain region on the two-dimensional plane. Therefore, in the embodiments of the present invention, the final equivalent circle diameter of each grain region is used as the grain size of each grain region.
[0038] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for detecting the grain size of silicon carbide based on image processing, characterized in that, Including: Collecting a gray-scale image of silicon carbide; performing edge detection on the gray-scale image of silicon carbide to obtain a plurality of grain regions; Obtaining the edge disorder degree of each grain region; Obtaining the horizontal gray-level co-occurrence matrix and the vertical gray-level co-occurrence matrix of each grain region; obtaining the internal consistency of each grain region according to the frequency value of each texture in the horizontal gray-level co-occurrence matrix and the vertical gray-level co-occurrence matrix of each grain region; Obtaining an adjustment factor for each grain region according to the internal consistency and the edge disorder degree of each grain region; adjusting the equivalent circle diameter of each grain region according to the adjustment factor to obtain the final equivalent circle diameter of each grain region; obtaining the grain size of each grain region according to the final equivalent circle diameter of each grain region.
2. The method for detecting the grain size of silicon carbide based on image processing according to claim 1, wherein The performing edge detection on the gray-scale image of silicon carbide to obtain a plurality of grain regions includes: Performing edge detection on the gray-scale image of silicon carbide using the Canny edge detection algorithm to obtain a silicon carbide edge image, presetting an edge point number threshold T, using a contour detection algorithm to extract a plurality of closed edges in the silicon carbide edge image, obtaining the number of edge points of each closed edge in the silicon carbide edge image, removing the closed edges with the number of edge points less than T to obtain a plurality of final closed edges in the silicon carbide edge image; recording the region formed by each final closed edge as a grain region.
3. The method for detecting the grain size of silicon carbide based on image processing according to claim 1, wherein The obtaining the edge disorder degree of each grain region includes: Obtaining the minimum diameter and the maximum diameter in each grain region; ; wherein, represents the boundary disorder degree of the i-th grain region; represents the number of pixel points in the i-th grain region; represents the square of the number of edge pixel points in the i-th grain region; represents the maximum diameter in the i-th grain region; represents the minimum diameter in the i-th grain region; exp() represents the exponential function with the natural constant as the base.
4. A method for detecting the grain size of silicon carbide based on image processing according to claim 3, characterized in that, The obtaining the minimum diameter and the maximum diameter in each grain region includes: Obtaining the centroid position of the i-th grain region; presetting an angle parameter θ, using the vertical direction of the centroid position as the starting direction, making rays every θ with the centroid position as the origin, obtaining two intersection points of each ray and the edge pixel points of the i-th grain region, and both being recorded as the target intersection points of each ray; recording the Euclidean distance between the two target intersection points of each ray as the diameter length; obtaining the maximum value of all diameter lengths as the maximum diameter in the i-th grain region, and obtaining the minimum value of all diameter lengths as the minimum diameter in the i-th grain region.
5. A method for detecting the grain size of silicon carbide based on image processing according to claim 1, characterized in that, The obtaining the horizontal gray-level co-occurrence matrix and the vertical gray-level co-occurrence matrix of each grain region includes: Obtaining the gray-level co-occurrence matrix of the i-th grain region in the horizontal direction, and recording it as the horizontal gray-level co-occurrence matrix of the i-th grain region; Obtaining the gray-level co-occurrence matrix of the i-th grain region in the vertical direction, and recording it as the vertical gray-level co-occurrence matrix of the i-th grain region.
6. A method for detecting the grain size of silicon carbide based on image processing according to claim 1, characterized in that, The obtaining the internal consistency of each grain region includes: ; Wherein, represents the internal consistency of the i-th grain region; represents the number of texture types of the horizontal gray-level co-occurrence matrix of the i-th grain region; represents the square of the frequency value of the m-th texture in the horizontal gray-level co-occurrence matrix of the i-th grain region; represents the number of texture types of the vertical gray-level co-occurrence matrix of the i-th grain region; represents the square of the frequency value of the n-th texture in the vertical gray-level co-occurrence matrix of the i-th grain region; represents the number of pixel points in the i-th grain region; represents the gray value of the j-th pixel point in the i-th grain region; represents the average gray value of all pixel points in the i-th grain region; exp() represents the exponential function with the natural constant as the base.
7. A method for detecting the grain size of silicon carbide based on image processing according to claim 1, characterized in that, The obtaining the adjustment factor for each grain region includes: ; In the formula, represents the adjustment factor of the i-th grain region; represents the internal consistency of the i-th grain region; represents the degree of boundary disorder of the i-th grain region; min() represents the minimum value function.
8. A method for detecting the grain size of silicon carbide based on image processing according to claim 1, characterized in that, The obtaining the final equivalent circle diameter of each grain region includes: Obtaining the equivalent circle diameter of each grain region; Taking the product of the equivalent circle diameter of each grain region and the adjustment factor of each grain region as the final equivalent circle diameter of each grain region.
9. A method for detecting the grain size of silicon carbide based on image processing according to claim 1, characterized in that, The obtaining the grain size of each grain region includes: Taking the final equivalent circle diameter of each grain region as the grain size of each grain region.
10. A method for detecting the grain size of silicon carbide based on image processing according to claim 1, characterized in that, The collecting a gray-scale image of silicon carbide includes: Using a microscope, collect the microscopic image of silicon carbide and perform grayscale processing on it to obtain the grayscale image of silicon carbide.
Citation Information
Patent Citations
Method for detecting grain size of 6-series aluminum alloy
CN111562202A
6-series aluminum alloy grain boundary corrosive agent and grain size display method
CN112553629A
Method for displaying grain size of titanium alloy
CN114088759A
Semiconductor device
US20150255534A1
Sic material and method for manufacturing same
US20220148907A1
Cited By
Grain size rating method based on austenite feature extraction
CN121856133A
Method and system for detecting impurities in silicon carbide micro powder
CN122259638A
A method and system for detecting silicon carbide micro-powder impurities
CN122259638B