A method for intelligent identification of austenite grains in metallographic images
By optimizing austenite grain segmentation through distance transformation and Delaunay triangulation techniques, the problems of insufficient identification accuracy and stability in existing technologies are solved, achieving efficient and accurate automated austenite grain identification, which is suitable for industrial production.
Patent Information
- Application Number
- CN202510117230.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-01-24
AI Technical Summary
Existing technologies for austenite grain identification suffer from problems of over-segmentation and incomplete segmentation. In particular, when faced with noise and changes in illumination, the identification accuracy and stability are insufficient, making it difficult to meet the high efficiency and high consistency requirements of industrial production.
We employ a combination of distance transformation and Delaunay triangulation with local extremum detection. Through image preprocessing and the construction of a Delaunay triangulation map using the distance transformation map, we iteratively merge local maxima and optimize the segmentation results by incorporating convexity and aspect ratio verification mechanisms.
It improves the accuracy and stability of austenite grain identification, realizes automated analysis, adapts to different lighting and microscope conditions, reduces manual intervention, and is suitable for automated quality inspection in industrial production.
Smart Images

Figure CN120047940B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to an intelligent method for identifying austenite grains in metallographic images. Background Technology
[0002] Austenitic grains are widely present in various metallic materials, especially in stainless steel, high-manganese steel, and nickel-based alloys, where they exhibit significant properties. These materials, due to their excellent mechanical properties and corrosion resistance, are widely used in aerospace, chemical, automotive manufacturing, and construction industries. In the field of materials performance analysis, obtaining microstructural characteristics such as the size, shape, and distribution of austenitic grains facilitates accurate prediction of material strength and toughness, and allows for the study of mechanical properties and service life. For example, by quantitatively comparing the austenitic grain size distribution in different batches of steel, the stability of the production process can be effectively assessed, allowing for timely adjustments to process parameters to ensure consistent and stable product quality and reduce fluctuations in product performance caused by differences in microstructure. Accurate identification and segmentation of austenitic grains has become a crucial aspect of materials science research and industrial production.
[0003] In the metallographic analysis of materials, metallographic images obtained through a metallographic microscope are the primary means of studying the characteristics of austenite grains. Accurate identification and segmentation of austenite grains in metallographic images not only helps researchers gain a deeper understanding of the material's microstructure but also provides data support for optimizing material properties. Currently, the analysis of austenite grains mainly relies on manual annotation and measurement methods. Although manual analysis generally has good accuracy, it is cumbersome, time-consuming, and labor-intensive, and it is difficult to meet the high-efficiency and high-consistency analytical requirements of large-scale industrial production.
[0004] Existing automated algorithms for austenite grain segmentation are often limited by the material's inherent properties and the metallographic image preparation process. Firstly, regarding the accuracy of image feature recognition, due to uneven corrosion or insufficient microscope imaging clarity, the boundaries of austenite grains in metallographic images are often blurred, discontinuous, and have low contrast with the background. Furthermore, when dealing with complex boundaries, misjudgments and omissions are highly likely. All of these factors can lead to significant errors in the measured grain size, quantity, and other parameters. Secondly, the robustness of the algorithms needs improvement. Metallographic images are susceptible to various noise interferences during acquisition, and uneven illumination is also common. Existing automated algorithms exhibit poor stability when facing these noise and illumination variations, often failing to maintain effective grain segmentation performance. For example, in high-noise environments, some algorithms may misidentify noise points as part of a grain, severely impacting the reliability of the segmentation results. These problems not only affect the accuracy of grain measurement but also increase the complexity of subsequent data processing, hindering the application and promotion of automated analysis technology. Summary of the Invention
[0005] Based on the above analysis, the present invention aims to provide an intelligent method for identifying austenite grains in metallographic images, in order to solve the problems of over-segmentation and incomplete segmentation that easily occur in the identification of austenite grains in the prior art.
[0006] The objective of this invention is mainly achieved through the following technical solutions:
[0007] This invention provides an intelligent method for identifying austenite grains in metallographic images, comprising the following steps:
[0008] Image preprocessing is performed on the austenitic metallographic structure image to be detected to obtain a preprocessed image containing austenitic grains and grain boundaries;
[0009] The preprocessed image is subjected to distance transformation to obtain a distance transformation map containing the distance transformation values of each pixel within the austenite grain;
[0010] Local extremum detection is performed on the distance transformation graph to obtain a set of local maxima points;
[0011] A Delaunay triangulation map is constructed based on the set of local maxima points. The local maxima points are iteratively merged on the Delaunay triangulation map based on the distance transformation value to obtain a set of marked points.
[0012] Based on the set of marker points, the initial segmentation result of austenite grains is obtained;
[0013] The initial austenite grain segmentation results are checked and adjusted to obtain the final segmentation results.
[0014] Furthermore, based on all local maxima points, the distance transformation values corresponding to each point, and the Delaunay triangulation diagram, an initial list of local maxima is obtained.
[0015] Iterative merging of local maxima points based on the aforementioned list of local maxima includes:
[0016] Calculate the distance between the local maxima at both ends of each edge in the Delaunay triangulation diagram;
[0017] The edges of the Delaunay triangulation diagram are sequentially traversed. For each edge, the two local maxima are merged. If the distance between the two local maxima is less than the corresponding threshold, the two local maxima are merged. The corresponding threshold is determined based on the average of the distance transformation values of the two local maxima.
[0018] Update the list of local maxima and the Delaunay triangulation diagram, and repeat the above steps until all points in the list of local maxima no longer meet the merging condition; wherein, the merged set of local maxima points constitutes a set of marker points, and each local maximum point is a marker point.
[0019] Furthermore, obtaining the distance transformation map includes:
[0020] Calculate the distance from all pixels within the austenite grains in the preprocessed image to the nearest grain boundary pixel, and obtain the distance transformation value corresponding to each pixel;
[0021] The distance transformation map is obtained based on the distance transformation values of all pixels.
[0022] Furthermore, edge detection is performed on the distance transform graph using an 8-neighborhood, resulting in the set of local maxima points containing all local maxima points, represented as:
[0023]
[0024] Among them, P ext N(x,y) is the set of local maxima; N(x,y) is the neighborhood of pixel (x,y); D(x a ,y b ) represents the distance transformation value of each pixel in the neighborhood; D(x,y) is the distance transformation map.
[0025] Furthermore, constructing the Delaunay triangulation diagram includes:
[0026] Calculate the rectangular bounding box of the local maximum point set, and the bounding box encloses all points in the local maximum point set. Divide the bounding box into two hypertriangles to obtain the initial triangulation.
[0027] In the initial triangulation, points other than the extreme points on the bounding box in the local maximum point set are inserted sequentially. Any other point is connected to the three vertices of the triangle containing it, splitting it into a new triangle. The intermediate triangulation is formed by multiple such new triangles.
[0028] By using the method of detecting empty circumcircles and exchanging diagonals, all triangles in the intermediate triangulation are optimized in sequence to obtain the Delaunay triangulation diagram.
[0029] Furthermore, the initial austenite grain segmentation results are checked and adjusted using convexity and aspect ratio, including:
[0030] The regions S1 and S2 of all adjacent austenite grains in the segmentation result are merged to obtain multiple merged regions S. 12;
[0031] Based on the convexity(S) of any merged region 12 ) and aspect ratio (S 12 Perform a merging condition check and merge adjacent grains that meet the condition;
[0032] For each individual austenite grain region S, if its convexity(S) is less than the threshold and there are no adjacent austenite grains that meet the merging conditions, then the grain is abnormal, and an incomplete grain segmentation prompt is output.
[0033] Furthermore, the merging conditions include:
[0034] convexity(S 12 )-min{convexity(S1),convexity(S2)}≥a;
[0035] | aspect ratio(S 12 )-1|<min{|aspect ratio(S1)-1|,|aspect ratio(S2)-1|}, and 1≤aspect ratio(S 12 )≤b;
[0036] Where convexity(S1) and convexity(S2) represent the convexity of austenite grains S1 and S2, respectively; aspectratio(S1) and aspect ratio(S2) represent the aspect ratios of austenite grains S1 and S2, respectively; and a and b are the merging thresholds for convexity and aspect ratio, respectively.
[0037] Furthermore, the convexity is calculated based on the following formula:
[0038]
[0039] Where convexity(S) represents the convexity of a two-dimensional planar region S with grain shape; A(S) is the area of a two-dimensional planar region S with grain shape; and CH(S) is the smallest convex set containing S.
[0040] Furthermore, obtaining the preprocessed image includes:
[0041] The metallographic image to be inspected is converted to grayscale to obtain a grayscale image;
[0042] The grayscale image is thresholded using the maximum inter-class variance method to obtain a binarized image containing austenite grains and grain boundaries;
[0043] The binarized image is denoised based on the graph structure, and the dangling short branches with a length less than a threshold on the grain boundary in the graph structure of the binarized image are iteratively removed; wherein, the edge with a degree of 1 is regarded as the dangling branch, and the dangling branch includes dangling long branches and dangling short branches.
[0044] The preprocessed image is obtained based on the suspended long branches and other grain boundary portions retained after iteration.
[0045] Furthermore, based on the set of marked points, the initial segmentation result of austenite grains is obtained using the watershed segmentation method.
[0046] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0047] 1. This invention proposes to obtain local extrema points by introducing advanced image processing and geometric techniques based on distance transformation maps. In order to solve the problem of multiple extrema points, Delaunay triangulation combined with distance transformation values is used to screen local extrema points and obtain unique marker points within the grains. At the same time, a verification mechanism is used to further optimize the segmentation results, improve the phenomenon of over-segmentation or under-segmentation in metallographic images, and achieve high recognition accuracy even under different lighting conditions, different microscope imaging methods and different sample materials.
[0048] 2. It avoids the time-consuming and labor-intensive nature of manual annotation methods. Through preprocessing, it can effectively handle various noise interferences, accurately identify the boundaries and morphological characteristics of austenite grains, reduce subjective judgment, fatigue errors, and detection efficiency in manual analysis, and ensure the accuracy and consistency of the results.
[0049] 3. It automates the metallographic image analysis process, enabling rapid identification and quantitative analysis of austenite grains without manual intervention. It has the ability to efficiently process large amounts of metallographic image data, making it suitable for automated quality inspection and monitoring in production lines or laboratories. It has good adaptability and broad application potential.
[0050] 4. It has good system compatibility and can be seamlessly integrated with existing metallographic microscope equipment and automated testing platforms, which facilitates its application in actual industrial production and provides innovative technical means for the quality control, process optimization and product performance evaluation of metallic materials.
[0051] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description
[0052] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0053] Figure 1 This is a flowchart of the intelligent identification method for austenite grains in metallographic images according to an embodiment of the present invention;
[0054] Figure 2 This is a flowchart illustrating the initial segmentation result verification and adjustment process in the intelligent identification method for austenite grains in metallographic images according to an embodiment of the present invention.
[0055] Figure 3 This is a schematic diagram of an example of austenitic grain metallographic structure according to an embodiment of the present invention;
[0056] Figure 4a This is a partial schematic diagram of the austenitic metallographic structure to be tested in an embodiment of the present invention;
[0057] Figure 4b This is a grayscale schematic diagram of the austenitic metallographic structure to be tested in an embodiment of the present invention;
[0058] Figure 4c This is a schematic diagram of the austenite grain framework according to an embodiment of the present invention;
[0059] Figure 4d This is a schematic diagram of the preprocessed image after denoising, according to an embodiment of the present invention;
[0060] Figure 5a This is a schematic diagram of the distance transformation diagram according to an embodiment of the present invention;
[0061] Figure 5b This is a schematic diagram of a triangulation diagram according to an embodiment of the present invention;
[0062] Figure 5c This is a schematic diagram showing the location of the marker points after merging local maxima points in an embodiment of the present invention;
[0063] Figure 6a This is a schematic diagram of the austenitic metallographic structure under test in an embodiment of the present invention;
[0064] Figure 6b This is a diagram showing the segmentation result after intelligent identification of austenite grains in an embodiment of the present invention. Detailed Implementation
[0065] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0066] A specific embodiment of the present invention discloses an intelligent recognition method for austenite grains in metallographic images, such as... Figure 1 As shown, it includes the following steps:
[0067] Step S1: Perform image preprocessing on the image of the austenitic metallographic structure to be detected to obtain a preprocessed image containing austenitic grains and grain boundaries;
[0068] Step S2: Perform distance transformation on the preprocessed image to obtain a distance transformation map containing the distance transformation values of each pixel within the austenite grain;
[0069] Step S3: Perform local extremum detection on the distance transformation map to obtain a set of local maxima points;
[0070] Step S4: Construct a Delaunay triangulation map based on the set of local maxima points, and iteratively merge the local maxima points on the Delaunay triangulation map based on the distance transformation value to obtain a set of marked points;
[0071] Step S5: Based on the set of marked points, obtain the initial segmentation result of austenite grains;
[0072] Step S6: The initial austenite grain segmentation result is checked and adjusted to obtain the final segmentation result.
[0073] The above method involves performing distance transformation on the preprocessed image to obtain the distance transformation value of each pixel within the austenite grain. Based on the distance transformation value, a set of local maxima is obtained. Combined with the Delaunay triangulation diagram, a unique marker point within each grain is obtained. Based on all marker points, identification and segmentation are performed, which can significantly improve the identification accuracy of austenite grains and effectively reduce the phenomena of over-segmentation and incomplete segmentation in grain identification.
[0074] It should be noted that austenitic microstructure has unique microstructural characteristics, typically exhibiting an orderly and uniform arrangement of equiaxed polygonal grains. These polygonal grains are closely interlocked, forming a complex yet orderly microstructural network. Austenitic grains are widely found in various medium- and high-carbon steel systems. When a suitable heat treatment process is applied, a microstructural transformation occurs within these steels, leading to the formation of austenitic grains.
[0075] Specifically, in step S1, an image of the austenitic metallographic structure to be detected is acquired using equipment such as a metallographic microscope, for example... Figure 3 As shown. Since noise sources introduce low-contrast pixels, which reduce the sharpness of grain boundary details, preprocessing is used for noise reduction. The specific steps of preprocessing include:
[0076] S11. Perform grayscale processing on the metallographic image to be inspected to obtain a grayscale image;
[0077] For example, such as Figure 4a The image shown is a partial view of the austenitic metallographic structure to be tested. Using a weighted average method based on the ITU-R BT.601 standard, the RGB pixel values of each point in the image are adjusted by coefficients. The three component pixel values are then weighted and averaged with different weights to obtain the final grayscale image, represented as follows:
[0078] Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.114*B(i,j),
[0079] Where Gray(i,j) represents a grayscale image; R(i,j), G(i,j), and B(i,j) are the pixel values of the red, green, and blue components, respectively. Figure 4b As shown, a grayscale image (grayscale image) of austenitic metallographic structure containing only grayscale information is obtained.
[0080] S12. Threshold segmentation of the grayscale image of the metallographic image is performed based on the Otsu's method. Since the pixels of the austenitic metallographic image can be divided into two parts: austenitic grains (foreground) and grain boundaries (background), the Otsu's method is used to calculate the optimal threshold that maximizes the distinguishability between the two types of pixels, and then the two types of pixels are distinguished to obtain a binarized image.
[0081] S13. Denoising the binarized image based on the graph structure to obtain the preprocessed image; specifically including:
[0082] S131. Extract the framework portion of the grain structure from the binarized image, and convert the obtained framework result into a graph structure, such as... Figure 4c As shown.
[0083] For example, pixels at the background edge are continuously deleted through an iterative method until only a skeleton with a width of 1 pixel remains. The skeletonization result is then converted into a graph structure composed of nodes and edges. Based on the theory of vertex degree in graph structures, edges with a degree of 1 are used as dangling branches. Dangling branches include short dangling branches and long dangling branches.
[0084] S132. Based on the graph structure, iteratively remove dangling short branches with a length less than the threshold until the dangling short branches on the grain boundaries (grain boundaries) in the graph structure are completely removed, and the loop terminates upon convergence.
[0085] For example, in order to avoid the processed image being missed in subsequent segmentation, during the denoising process, a preset removal threshold is used to retain as many hanging branches as possible. A threshold is set by filtering all edges with a length greater than 10 pixels, and the threshold is the average length of all edges with a length greater than 10 pixels.
[0086] S133. Based on the retained dangling branches and other grain boundary portions after iteration, the denoised preprocessed image is obtained, such as... Figure 4d As shown.
[0087] Specifically, in step S2, the preprocessed image I... binary Perform a distance transformation operation on (x,y) to calculate the distance from any pixel position (x,y) in the foreground region (within the austenite grain) to its nearest background pixel position (x',y'), and obtain a distance transformation map containing the distance transformation values of each pixel point within the austenite grain.
[0088] For example, by employing Euclidean distance transformation, the nearest Euclidean distance from each foreground pixel to the background pixel is accurately calculated, resulting in a distance transformation map of the preprocessed image, as shown below. Figure 5a As shown, it is represented as:
[0089]
[0090] Where D(x,y) represents the distance transformation map; B is the set of foreground pixels.
[0091] It should be noted that when performing distance transformation on a preprocessed image, multiple similar extreme points may occur. This includes situations where, due to the existence of extreme point regions with certain continuous shapes, multiple adjacent pixels may have the same or very close maximum distance values after discretization; after performing distance transformation on symmetrical geometric shapes, the existence of flat maximum value regions in the center of the shape can cover multiple adjacent pixels, and each point can be regarded as a local extremum; in practical applications, image noise and edge irregularities can also cause the distance transformation to produce multiple approximately identical local maxima.
[0092] Specifically, in step S3, in order to solve the problem that multiple similar or repeated extreme points will appear in a single austenite grain, based on the equiaxed crystal properties of austenite grains, a unique local extreme point of each austenite grain is determined by geometric methods, and a set of local maxima is obtained by performing local extreme point detection on the preprocessed image.
[0093] For example, edge detection is performed on the distance transformation map D(x,y) using an 8-neighborhood to filter local maxima. The 8-neighborhood consists of the eight neighboring pixels surrounding the selected pixel, including pixels in the horizontal, vertical, and diagonal directions. The set of local maxima points P is obtained based on the following formula. ext :
[0094]
[0095] Where N(x,y) represents the neighborhood around pixel (x,y), and D(xa ,y b ) is the distance transformation value of each pixel in the neighborhood.
[0096] Specifically, in step S4, a Delaunay triangulation is constructed for the local maxima in the extreme point set using computational geometry methods, including:
[0097] S411. Calculate the set of local maxima P. ext The rectangular bounding box, whose four vertices are combined with the local maximum point set P. ext The set of points P in the middle ext ', and make the bounding box enclose the set of local maxima P. ext All points are identified, and the bounding box is divided into two super triangles, forming the initial triangulation;
[0098] S412. In the initial triangulation, insert the point set P sequentially. ext In the triangle, other than the bounding box vertices, whenever a new point is inserted as a vertex, that point is connected to the three vertices of the triangle containing it. The original triangle is split into 2-3 new triangles, and the intermediate triangulation is formed by the multiple new triangles after the split.
[0099] S413. Perform empty circumcircle detection on each triangle in the intermediate triangulation, and optimize by swapping diagonals to ensure that the resulting triangulation yields a Delaunay triangulation diagram. Figure 5b As shown.
[0100] To obtain a unique marker point in each austenite grain, an initial list of local maxima is constructed based on all local maxima, the distance transformation value corresponding to each point, and the Delaunay triangulation diagram. The list of local maxima includes three items: all local maxima, the distance transformation value corresponding to each local maxima, and the Delaunay triangulation diagram where each local maxima is located.
[0101] Based on the list, the local maxima points are iteratively merged to obtain a set of marked points. The specific steps include:
[0102] S421. Calculate the distance between the local maxima at both ends of each edge in the Delaunay triangulation diagram;
[0103] S422. Iterate through each edge of the Delaunay triangulation diagram in sequence. For each edge, merge the two local maxima points. If the distance between the two local maxima points is less than the corresponding threshold, then merge the two local maxima points.
[0104] For example, the threshold is set to 50% of the average of the distance transformation values of two local maxima.
[0105] S423. Update the list of local maxima and repeat the above steps until none of the points in the list of local maxima meet the merging condition.
[0106] Through the above process, a unique marker point is obtained in each austenite grain. The merged set of local maxima constitutes the marker point set, and each of the merged local maxima is a marker point, such as... Figure 5c As shown.
[0107] Specifically, in step S5, based on the marked point set, the watershed segmentation method is used to obtain the initial segmentation result of the austenite grains. This includes:
[0108] Taking the negative value of the distance transform image yields the gradient image;
[0109] The gradient image and the set of marker points obtained by merging after triangulation are used as the basis for segmentation and input into the watershed algorithm. Each marker point is a local minimum point of the watershed segmentation method. Each local minimum in the image will have an influence region. The boundary of these influence regions is the dividing line between austenite grains, thus obtaining the initial segmentation result of austenite grains.
[0110] Specifically, in step S6, based on the common characteristics of austenite grains—approximately convex and equiaxed—the initial segmentation result image of the segmented austenite grains is checked and adjusted using convexity and aspect ratio indices to obtain the final segmentation output result. For example... Figure 2 As shown, the specific steps include:
[0111] S61. Merge all adjacent austenite grains S1 and S2 in the initial segmentation result to obtain multiple merged regions S. 12 And S 12 =S1∪S2;
[0112] S62, based on the convexity (S) of any merged region 12 ) and aspect ratio (S 12 Perform a merge condition check and merge adjacent regions that meet the conditions;
[0113] For example, suppose the grain shape is a two-dimensional planar region S with area A(S). The convex hull of this grain shape is CH(S), which is the smallest convex set containing S. The convexity is defined as follows:
[0114]
[0115] If A(CH(S))≥A(S), it indicates that the grain shape is concave. According to the theoretical characteristic that the morphology of austenite grains is approximately convex, the value of convexity ranges from 0 to 1, and the closer the value is to 1, the more convex the shape tends to be.
[0116] Meanwhile, for the grain shape S, find its smallest bounding rectangle R, let the long side of this rectangle be L and the short side be W, then the aspect ratio is expressed as... The closer the aspect ratio is to 1, the closer the shape is to an isometric crystal.
[0117] Therefore, the initial segmentation results are detected and adjusted using two geometric properties: convexity and aspect ratio. This addresses the issues of over-segmentation or under-segmentation caused by the diversity of materials and grains, as well as excessive boundary blurring and abnormal defects due to corrosion during metallographic sample preparation. Specific merging conditions are as follows:
[0118] 1) Merged region S 12 The convexity of S1 is compared with the convexity of S2: if convexity(S) is satisfied... 12 )-min{convexity(S1),convexity(S2)}≥a, where a is the convexity merging threshold;
[0119] For example, taking a = 0.2, it is demonstrated that the convexity of the merged region is significantly improved;
[0120] 2) Merged region S 12 Determining the aspect ratio: If S 12 Its aspect ratio is closer to 1, satisfying |aspect ratio(S) 12 )-1|<min{|aspect ratio(S1)-1|,|aspect ratio(S2)-1|} and
[0121] 1≤aspect ratio(S 12 )≤b, where b is the aspect ratio merging threshold.
[0122] For example, to accurately reflect the properties of austenite grains in actual metallographic images, b = 1.25 is chosen, i.e., aspectratio(S) 12 If the value falls within the range of 1 to 1.25, it indicates that the merged shape is closer to the isometric crystal form.
[0123] If both the convexity enhancement condition and the aspect ratio proximity condition are met, then S1 and S2 are likely over-divided regions of the same integral grain. S1 and S2 should be merged into a new complete austenite grain region, or a suggestion should be output to merge S1 and S2 into a new complete austenite grain region.
[0124] S63. Detect the segmented individual austenite grains: For each individual austenite grain region S, if its convexity(S) is less than a threshold, such as satisfying convexity(S) < 0.75, and there are no adjacent austenite grains that meet the merging condition, then the grain is very likely not completely segmented. This indicates an austenite grain anomaly, and an incomplete austenite grain segmentation warning is output. The metallographic image is segmented using the above intelligent recognition method, such as... Figure 6a and 6b As shown.
[0125] Compared with existing technologies, this embodiment provides an intelligent identification method for austenite grains in metallographic images. By fully considering the morphological characteristics of austenite grains, it can automatically and accurately identify and segment austenite grains in metallographic images. Through a verification mechanism based on grain geometry, it effectively avoids over-segmentation and incomplete segmentation, and provides early warning prompts for special cases, helping analysts to quickly locate and handle abnormal situations. Ultimately, it achieves efficient and accurate identification of austenite grains, which can significantly improve the efficiency and accuracy of metallographic analysis and meet the needs of automated metallographic image analysis in industrial production.
[0126] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0127] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for intelligent identification of austenite grains in a metallographic image, characterized in that, The method comprises the following steps: An austenite metallographic structure image to be detected is preprocessed to obtain a preprocessed image containing austenite grains and grain boundaries; A distance transform is performed on the preprocessed image to obtain a distance transform image containing distance transform values of each pixel point in the austenite grains; Local extreme value points are detected from the distance transform image to obtain a local maximum value point set; A Delaunay triangulation graph is constructed based on the local maximum value point set, and the local maximum value points are iteratively merged on the Delaunay triangulation graph based on the distance transform values to obtain a marker point set; An initial austenite grain segmentation result is obtained based on the marker point set; The initial austenite grain segmentation result is adjusted to obtain a final segmentation result; The initial local maximum value list is obtained based on all local maximum value points, distance transform values corresponding to each point, and the Delaunay triangulation graph; The local maximum value points are iteratively merged based on the local maximum value list, which comprises: The distance between local maximum value points at both ends of each edge in the Delaunay triangulation graph is calculated; Each edge in the Delaunay triangulation graph is sequentially traversed, and the two local maximum value points of each edge are judged for merging. If the distance between the two local maximum value points is less than a corresponding threshold value, the two local maximum value points are merged. The corresponding threshold value is determined based on the average of the distance transform values of the two local maximum value points; The local maximum value list and the Delaunay triangulation graph are updated, and the above steps are repeated until no point in the local maximum value list meets the merging condition. The merged local maximum value point set constitutes a marker point set, and each local maximum value point is a marker point; The Delaunay triangulation graph is constructed, which comprises: A rectangular bounding box of the local maximum value point set is calculated, and the bounding box encloses all points in the local maximum value point set. The bounding box is divided into two super triangles to obtain an initial triangulation; In the initial triangulation, other points in the local maximum value point set except the extreme points on the bounding box are sequentially inserted. Any other point is connected to the three vertices of the triangle containing it to split into a new triangle. The intermediate triangulation is composed of the plurality of new triangles split. All triangles in the intermediate triangulation are sequentially optimized by using the empty circumscribed circle detection and the diagonal exchange method to obtain the Delaunay triangulation graph.
2. The intelligent recognition method for austenite grains in a metallographic image according to claim 1, characterized in that, The distance transform graph is obtained, which comprises: The distance from all pixel points in the preprocessed image to the nearest grain boundary pixel point is calculated to obtain the distance transform values corresponding to each pixel point; The distance transform graph is obtained based on the distance transform values of all pixel points.
3. The method according to claim 2, wherein, The distance transform graph is edge detected by using an 8-neighborhood to obtain the local maximum value point set containing all local maximum value points, which is represented as: , wherein, is a set of local maximum points; is a pixel point surrounding neighborhood; is a distance transform value for each pixel in the neighborhood; is a distance transform map.
4. The intelligent recognition method for austenite grains in a metallographic image according to claim 1, characterized in that, The initial austenite grain segmentation result is adjusted by using convexity and aspect ratio, which comprises: performing region merging on all adjacent two austenite grains in the segmentation result to obtain a plurality of merged regions and performing region merging on all adjacent two austenite grains in the segmentation result to obtain a plurality of merged regions ; Convexity based on any merged region and aspect ratio Merging condition is determined, and adjacent grains meeting the condition are merged. for each individual austenite grain region if the convexity of the grain is less than a threshold value and there is no austenite grain adjacent to it that satisfies the merging condition, the grain is abnormal, and an incomplete grain segmentation prompt is output.
5. The intelligent recognition method for austenite grains in a metallographic image according to claim 4, characterized in that, The merging condition comprises: ; , and ; in, They represent austenite grains respectively and convexity; , They represent austenite grains respectively and The aspect ratio; These are the merging thresholds for convexity and aspect ratio, respectively.
6. The intelligent recognition method for austenite grains in a metallographic image according to claim 4, characterized in that, The convexity is calculated based on the following formula: , wherein, represents a convexity of a crystal grain shape as a two-dimensional planar region ; is an area of a crystal grain shape as a two-dimensional planar region ; is a minimum convex set containing .
7. The method according to any one of claims 1-6, wherein, The obtaining the pre-processed image comprises: graying the metallographic image to be detected to obtain a gray image; threshold segmentation is performed on the gray image by using an OTSU method to obtain a binary image containing austenite grains and grain boundaries; noise reduction is performed on the binary image based on a graph structure, and suspended short branches with a length less than a threshold value on grain boundaries in the graph structure of the binary image are iteratively removed; wherein, a branch with a degree of 1 is regarded as a suspended branch, and the suspended branch includes a suspended long branch and a suspended short branch; the pre-processed image is obtained based on the suspended long branches and other grain boundary parts reserved after iteration.
8. The method of claim 1, wherein the method is characterized by: Based on the set of marker points, an initial segmentation result of the austenite grains is obtained by using a watershed segmentation method.
Citation Information
Patent Citations
Marked watershed segmentation-based steel grain boundary automatic extraction method
CN106599793A
Composite material CT image segmentation method based on improved watershed algorithm
CN111738256A