Intelligent identification method for austenite grains in metallographic image

By preprocessing and distance transformation of metallographic images, detecting local extreme points and iteratively merged with Delaunay triangulation maps, the problems of over-segmentation and incomplete segmentation in austenite grain recognition are solved, and efficient and accurate identification effect is achieved, which is suitable for automated analysis in industrial production.

CN120047940AActive Publication Date: 2025-05-27RESEARCH INSTITUTE OF ADVANCED MATERIALS (SHENZHEN) CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202510117230.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-27
Estimated Expiration
2045-01-24

AI Technical Summary

Technical Problem

The prior art is prone to oversegment and incomplete segmentation in austenite grain recognition, and the stability is poor when facing noise and light changes, making it difficult to meet the analysis needs of high efficiency and high consistency in industrial production.

Method used

The preprocessed image is obtained by preprocessing the metallographic image, including grayscale, threshold segmentation and noise reduction. Then, distance transformation is performed, local extreme points are detected, and Delaunay triangulation diagram is constructed, and local maximum points are iteratively merged to obtain a set of marking points, thereby realizing the initial segmentation of austenite grains. Through inspection and adjustment, including the judgment of convexity and aspect ratio, the final segmentation result is obtained.

Benefits of technology

It improves the recognition accuracy of austenite grains, reduces the phenomenon of oversegment and incomplete segmentation, enhances the stability and consistency of the method under different light conditions and microscope imaging methods, and meets the demand for automated analysis in industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047940A_ABST
    Figure CN120047940A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent identification method for austenite grains in a metallographic image, belongs to the technical field of image processing, and solves the problems of excessive segmentation and incomplete segmentation in austenite grain identification in the prior art. The method comprises the following specific steps: carrying out image preprocessing on an austenite metallographic structure image to be detected to obtain a preprocessed image; performing distance transformation on the preprocessed image to obtain a distance transformation diagram; performing local extremum detection on the distance transformation diagram to obtain a local maximum point set; constructing a Delaunay triangulation graph based on the local maximum point set, and performing iterative combination on the local maximum points on the Delaunay triangulation graph based on the distance transformation value to obtain a mark point set; based on the mark point set, an austenite grain initial segmentation result is obtained; and checking and adjusting the initial segmentation result of the austenite grains to obtain a final segmentation result, so that the segmentation precision of the austenite grains is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to an intelligent recognition method for austenite grains in a metallographic image. Background Art

[0002] Austenite grains widely exist in various metal materials, especially in materials such as stainless steel, high manganese steel, and nickel-based alloys, where they exhibit significant characteristics. Due to their excellent mechanical properties and corrosion resistance, these materials are widely used in fields such as aerospace, chemical industry, automotive manufacturing, and construction. In the field of material property analysis, by obtaining microscopic structure characteristics such as the size, shape, and distribution of austenite grains, it is convenient to correctly estimate the strength and toughness of the material, and study the mechanical properties and service life of the material. For example, by quantitatively comparing the size distributions of austenite grains in different batches of steel, the stability of the production process can be effectively judged, so as to timely adjust the process parameters, ensure the consistency and stability of product quality, and reduce product performance fluctuations caused by tissue differences. The accurate identification and segmentation of austenite grains have become an important link in material science research and industrial production.

[0003] In the process of metallographic analysis of materials, metallographic pictures obtained by a metallographic microscope are the main means for studying the characteristics of austenite grains. Accurately identifying and segmenting austenite grains in metallographic pictures can not only help researchers deeply understand the microscopic structure of materials, but also provide data support for material property optimization. Currently, the analysis of austenite grains mainly relies on manual annotation and measurement methods. Although manual analysis usually has good accuracy, the process is cumbersome, time-consuming and laborious, and it is difficult to meet the analysis requirements of high efficiency and high consistency in large-scale industrial production.

[0004] When existing automatic algorithms are used to process austenite grain segmentation, they are often restricted by the characteristics of the material itself and the preparation process of metallographic pictures. First, in terms of the accuracy of image feature recognition, due to uneven corrosion treatment or insufficient clarity of microscope imaging, the boundaries of austenite grains in metallographic images often have blurriness, discontinuity, and low contrast with the background. When dealing with complex boundaries, misjudgment and missed judgment are likely to occur. All of the above situations will cause large errors in parameters such as the measured grain size and quantity. Secondly, the robustness of the algorithm needs to be improved. Metallographic images are easily affected by various noise interferences during the acquisition process, and uneven illumination of the images is also quite common. When existing automatic algorithms face these noises and illumination changes, their stability is poor, and they often cannot maintain effective grain segmentation performance. For example, in a high-noise environment, some algorithms may misidentify noise points as part of the grains, thus seriously affecting 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, restricting the application and popularization of automated analysis technology. Summary of the Invention

[0005] In view of the above analysis, embodiments of the present invention aim to provide an intelligent recognition method for austenite grains in a metallographic image to solve the problems of over-segmentation and incomplete segmentation that are prone to occur in the recognition of austenite grains in the prior art.

[0006] The object of the present invention is mainly achieved through the following technical solutions:

[0007] Embodiments of the present invention provide an intelligent recognition method for austenite grains in a metallographic image, including the following steps:

[0008] Perform image preprocessing on the austenite metallographic tissue image to be detected to obtain a preprocessed image containing austenite grains and grain boundaries;

[0009] Perform distance transformation on the preprocessed image to obtain a distance transformation map containing the distance transformation values of each pixel point within the austenite grains;

[0010] Perform local extreme value detection on the distance transformation map to obtain a set of local maximum points;

[0011] Construct a Delaunay triangulation map based on the set of local maximum points, and perform iterative merging of the local maximum points on the Delaunay triangulation map based on the distance transformation values to obtain a set of marked points;

[0012] Based on the set of marked points, obtain an initial segmentation result of the austenite grains;

[0013] Perform inspection and adjustment on the initial segmentation result of the austenite grains to obtain a final segmentation result.

[0014] Further, based on all local maximum points, the distance transformation values corresponding to each point, and the Delaunay triangulation map, obtain an initial local maximum list;

[0015] The iterative merging of local maximum points based on the local maximum list includes:

[0016] Calculate the distance between the local maximum points at both ends of each edge in the Delaunay triangulation map;

[0017] Traverse each edge in the Delaunay triangulation map in sequence, perform a merging judgment on the two local maximum points of each edge. If the distance between the two local maximum points is less than the corresponding threshold, then merge the two local maximum points; wherein, the corresponding threshold is determined based on the average value of the distance transformation values of the two local maximum points;

[0018] Update the local maximum list and the Delaunay triangulation graph, and loop the above steps until each point in the local maximum list does not satisfy the merging condition; among them, the merged set of local maximum points constitutes the set of marked points, and each local maximum point is a marked point.

[0019] Further, obtaining the distance transformation graph includes:

[0020] Calculate the distance from all pixel points within the austenite grains in the preprocessed image to the pixel points of the nearest grain boundary, and obtain the distance transformation values corresponding to each pixel point;

[0021] Based on the distance transformation values of all pixel points, obtain the distance transformation graph.

[0022] Further, use the 8-neighborhood to perform edge detection on the distance transformation graph to obtain the set of local maximum points containing all local maximum points, denoted as:

[0023]

[0024] where P ext is the set of local maximum points; N(x, y) is the neighborhood around the pixel point (x, y); D(x a , y b ) is the distance transformation value of each pixel in the neighborhood; D(x, y) is the distance transformation graph.

[0025] Further, constructing the Delaunay triangulation graph includes:

[0026] Calculate the rectangular bounding box of the set of local maximum points, and this bounding box encloses all points in the set of local maximum points. Divide the bounding box into two super triangles to obtain the initial triangulation;

[0027] In the initial triangulation, sequentially insert other points in the set of local maximum points except the extreme points on the bounding box. Connect any other point to the three vertices of the triangle containing it and split it into new triangles. The multiple new triangles formed by the splitting constitute the intermediate triangulation;

[0028] Use the method of empty circumcircle detection and diagonal exchange to optimize all triangles in the intermediate triangulation in sequence to obtain the Delaunay triangulation graph.

[0029] Further, use convexity and aspect ratio to check and adjust the initial segmentation result of the austenite grains, including:

[0030] For all adjacent pairs of austenite grains S 1 and S 2Perform region merging to obtain multiple merged regions S 12 ;

[0031] Based on the convexity (convexity(S 12 )) and aspect ratio (aspect ratio(S 12 )) of any merged region, perform merging condition judgment to merge adjacent grains that meet the conditions;

[0032] For each individual austenite grain region S, if its convexity (convexity(S)) is less than the threshold and there is no adjacent austenite grain that meets the merging conditions, then this grain is abnormal, and an incomplete grain segmentation prompt is output.

[0033] Furthermore, the merging conditions include:

[0034] convexity(S 12 ) - min{convexity(S 1 ), convexity(S 2 )} ≥ a;

[0035] |aspect ratio(S 12 ) - 1| < min{|aspect ratio(S 1 ) - 1|, |aspect ratio(S 2 ) - 1|}, and 1 ≤ aspect ratio(S 12 ) ≤ b;

[0036] Among them, convexity(S 1 ), convexity(S 2 ) respectively represent the convexity of austenite grains S 1 and S 2 ; aspect ratio(S 1 ), aspect ratio(S 2 ) respectively represent the aspect ratio of austenite grains S 1 and S 2 ; a and b are respectively the merging thresholds for convexity and aspect ratio.

[0037] Furthermore, calculate the convexity based on the following formula:

[0038]

[0039] Among them, convexity(S) represents the convexity of the grain shape as a two-dimensional planar region S; A(S) is the area of the grain shape as a two-dimensional planar region S; CH(S) is the smallest convex set containing S.

[0040] Further, obtaining the preprocessed image includes:

[0041] Performing grayscale processing on the metallographic image to be detected to obtain a grayscale image;

[0042] Using the maximum inter-class variance method to perform threshold segmentation on the grayscale image to obtain a binary image including austenite grains and grain boundaries;

[0043] Based on the graph structure, performing noise reduction processing on the binary image, and iteratively removing the hanging short branches with lengths less than the threshold on the grain boundaries in the graph structure of the binary image; wherein, the edges with a degree of 1 are used as hanging branches, and the hanging branches include hanging long branches and hanging short branches;

[0044] Based on the remaining hanging long branches and other grain boundary parts after iteration, obtaining the preprocessed image.

[0045] Further, based on the set of marked points, using the watershed segmentation method to obtain an initial segmentation result of austenite grains.

[0046] Compared with the prior art, the present invention can at least achieve one of the following beneficial effects:

[0047] 1. The present invention proposes to introduce advanced image processing and geometry techniques, based on the distance transformation graph, to obtain local extreme points. To solve the problem of multiple extreme points, the Delaunay triangulation is used in combination with the distance transformation value to screen the local extreme points, obtain the unique marked points within the grains, and at the same time use the verification mechanism to further optimize the segmentation result, improve the over-segmentation or under-segmentation phenomenon in the metallographic image, 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 laborious of the manual annotation method. Through preprocessing operations, it can effectively handle the interference of various noises, accurately identify the boundaries and morphological characteristics of austenite grains, reduce the subjective judgment, fatigue error, and detection efficiency of manual analysis, and ensure the accuracy and consistency of the results.

[0049] 3. It realizes the automation of the metallographic image analysis process, can quickly complete the recognition and quantitative analysis of austenite grains without manual intervention, has the ability to efficiently process a large amount of metallographic image data, is suitable for automated quality inspection and monitoring in production lines or laboratories, and has good adaptability and broad application potential.

[0050] 4. It has good system compatibility and can be seamlessly connected with existing metallographic microscope equipment and automated detection platforms, facilitating its popularization and application in actual industrial production, and providing innovative technical means for the quality control, process optimization, and product performance evaluation of metal materials.

[0051] In the present invention, the above technical solutions can also be combined with each other to achieve more preferred combination schemes. Other features and advantages of the present invention will be described in the subsequent specification, and some advantages can be made obvious from the specification or understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained from the content specifically pointed out in the specification and the drawings. Description of the Drawings

[0052] The drawings are only for the purpose of showing specific embodiments and are not considered as limitations on the present invention. Throughout the drawings, the same reference signs denote the same components.

[0053] Figure 1 It is a flowchart of the intelligent recognition method for austenite grains in the metallographic image of the embodiment of the present invention;

[0054] Figure 2 It is a flowchart of the inspection and adjustment of the initial segmentation result in the intelligent recognition method for austenite grains in the metallographic image of the embodiment of the present invention;

[0055] Figure 3 It is a schematic diagram of an example of austenite grain metallographic structure in the embodiment of the present invention;

[0056] Figure 4a It is a partial schematic diagram of the austenite metallographic structure to be measured in the embodiment of the present invention;

[0057] Figure 4b It is a grayscale schematic diagram of the austenite metallographic structure to be measured in the embodiment of the present invention;

[0058] Figure 4c It is a schematic diagram of the austenite grain skeleton in the embodiment of the present invention;

[0059] Figure 4d It is a schematic diagram of the preprocessed image after denoising in the embodiment of the present invention;

[0060] Figure 5a It is a schematic diagram of the distance transformation graph in the embodiment of the present invention;

[0061] Figure 5b It is a schematic diagram of the triangulation graph in the embodiment of the present invention;

[0062] Figure 5c It is a schematic diagram of the position of the marked points after merging the local maximum points in the embodiment of the present invention;

[0063] Figure 6a Schematic diagram of the austenite metallographic structure image to be measured in the embodiment of the present invention;

[0064] Figure 6b Segmentation result diagram after intelligent recognition of austenite grains in the embodiment of the present invention. Specific embodiments

[0065] The following will specifically describe the preferred embodiments of the present invention with reference to the accompanying drawings. The accompanying drawings form a part of this application and are used together with the embodiments of the present invention to explain the principles of the present invention, rather than 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, as Figure 1 shown, including the following steps:

[0067] Step S1: Perform image preprocessing on the to-be-detected austenite metallographic structure image to obtain a preprocessed image containing austenite 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 point within the austenite grains;

[0069] Step S3: Perform local extreme value detection on the distance transformation map to obtain a set of local maximum points;

[0070] Step S4: Construct a Delaunay triangulation map based on the set of local maximum points, and iteratively merge the local maximum points on the Delaunay triangulation map based on the distance transformation values to obtain a set of marked points;

[0071] Step S5: Based on the set of marked points, obtain an initial segmentation result of austenite grains;

[0072] Step S6: Check and adjust the initial segmentation result of austenite grains to obtain a final segmentation result.

[0073] Through the above method, by performing distance transformation on the preprocessed image, the distance transformation values of each pixel point within the austenite grains are obtained. Based on the distance transformation values, a set of local maximum points is obtained, and combined with the Delaunay triangulation map, a unique marked point within each grain is obtained. Based on all the marked points for recognition and segmentation, the recognition accuracy of austenite grains can be significantly improved, and the phenomena of over-segmentation and incomplete segmentation in grain recognition can be effectively reduced.

[0074] It should be noted that austenite metallographic structure has unique microstructural characteristics, usually presenting as an orderly and uniform arrangement of equiaxed polygonal grains. These polygonal grains are closely joined to each other, forming a complex and regular microstructure network. Austenite grains widely appear in various medium and high carbon steel systems. When an appropriate heat treatment process is applied, a phase transformation will occur within this type of steel, thereby forming austenite grains.

[0075] Specifically, in step S1, an image of the austenite metallographic structure to be detected is obtained through equipment such as a metallographic microscope, as Figure 3 shown. Since the noise source will introduce low-contrast pixel points, and these noise points will reduce the clarity of the grain boundary details, preprocessing is thus carried out for noise reduction. The specific steps of the preprocessing include:

[0076] S11. Perform grayscale processing on the metallographic image to be detected to obtain a grayscale image;

[0077] Exemplarily, as Figure 4a shown, it is a partial view of the austenite metallographic structure to be detected. Using the 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, and the three component pixel values are weighted and averaged with different weights to obtain the final grayscale image, expressed as:

[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 the grayscale image; R(i,j), G(i,j), and B(i,j) are the pixel values of the red, green, and blue components respectively. As Figure 4b shown, a grayscale image (grayscale conversion image) of the austenite metallograph containing only grayscale information is obtained.

[0080] S12. Perform threshold segmentation on the grayscale image of the metallographic image based on the maximum inter-class variance method. Since the pixels of the austenite metallographic image can be divided into two parts: austenite grains (foreground) and grain boundaries (background). Therefore, the maximum inter-class variance method is used to calculate the optimal threshold that can maximize the discrimination between the two types of pixels, and then these two types of pixels are distinguished to obtain a binary image.

[0081] S13. Perform noise reduction processing on the binary image based on the graph structure to obtain the preprocessed image; specifically including:

[0082] S131. Extract the skeleton part of the grain structure from the binary image, and convert the obtained skeletonization result into a graph structure, as Figure 4c shown.

[0083] Exemplarily, the pixels of 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 converted into a graph structure composed of nodes and edges. Based on the theory of vertex degrees in the graph structure, the edges with a degree of 1 are used as hanging branches, and the hanging branches include hanging short branches and hanging long branches.

[0084] S132. Based on the graph structure, iteratively remove the hanging short branches with lengths less than the threshold until the hanging short branches on the grain boundary (grain boundary) in the graph structure are completely removed, and the convergence stops the loop.

[0085] Exemplarily, in order to avoid subsequent missed segmentation of the processed image during denoising, try to retain the hanging long branches using a preset removal threshold. By screening all edges with lengths greater than 10 pixels to set the threshold, the threshold is the average length of all edges with side lengths greater than 10 pixels.

[0086] S133. Based on the hanging long branches and other grain boundary parts retained after iteration, obtain the preprocessed image after denoising, as Figure 4d shown.

[0087] Specifically, in step S2, perform a distance transformation operation on the preprocessed image I binary (x, y), calculate the distance from any pixel position (x, y) in the foreground region (within the austenite grain) to the nearest pixel position (x', y') in the background region, and obtain a distance transformation map containing the distance transformation values of each pixel point within the austenite grain.

[0088] Exemplarily, using the Euclidean distance transformation, accurately calculate the nearest Euclidean distance from each foreground pixel to the background pixel, and obtain the distance transformation map of the preprocessed image, as Figure 5a shown, expressed 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 the preprocessed image, there will be multiple situations of similar extreme points, including that due to the existence of some extreme point regions with continuous shapes, multiple adjacent pixel points may have the same or very close maximum distance values after discretization; after performing distance transformation on symmetric geometric shapes, due to the existence of a flat highest value region in the center of the shape, this flat region covers multiple adjacent pixel points, and each point can be regarded as a local extreme; in practical applications, image noise and edge irregularities will also cause multiple approximately identical local maxima to be generated during distance transformation.

[0092] Specifically, in step S3, to solve the problem that multiple similar or duplicate extreme points may appear in one austenite grain, based on the equiaxed grain characteristics of the austenite grain, the unique local extreme point of each austenite grain is determined by geometric methods. By performing local extreme detection on the preprocessed image, a set of local maximum points is obtained.

[0093] Exemplarily, the 8-neighborhood is used to perform edge detection on the distance transformation map D(x, y) to screen for local maxima. The 8-neighborhood refers to the 8 adjacent pixels around the selected pixel, including pixels in the horizontal, vertical, and diagonal directions. The set of local maximum points P is obtained based on the following formula ext :

[0094]

[0095] where N(x, y) represents the neighborhood around the pixel point (x, y), and D(x a , y b ) is the distance transformation value of each pixel in the neighborhood.

[0096] Specifically, in step S4, through computational geometric methods, a Delaunay triangulation is constructed for the local maximum points in the extreme point set, which specifically includes:

[0097] S411. Calculate the rectangular bounding box of the set of local maximum points P ext . Combine the four vertices of the bounding box with the set of local maximum points P ext to form a point set P ext ', and make the bounding box enclose all points in the set of local maximum points P ext . Divide the bounding box into two super triangles to form an initial triangulation;

[0098] S412. In the initial triangulation, sequentially insert the other points in the point set P ext ' except the vertices of the bounding box. Whenever a new point is inserted as a vertex, the point is connected to the three vertices of the triangle containing it, and the original triangle is split into 2 - 3 new triangles. The multiple new triangles formed by the split constitute an intermediate triangulation;

[0099] S413. Perform an empty circumcircle detection on each triangle in the intermediate triangulation, and optimize it by swapping the diagonals to ensure that a Delaunay triangulation graph is obtained from the formed triangular mesh, as shown in Figure 5b .

[0100] To obtain a unique marker point in each austenite grain (marker point), an initial local maximum list is constructed based on all local maximum points, the distance transformation values corresponding to each point, and the Delaunay triangulation graph; the local maximum list includes three items, namely all local maximum points, the distance transformation values corresponding to each local maximum point, and the Delaunay triangulation graph where each local maximum point is located.

[0101] Based on the list, iterative merging of local maximum points is performed to obtain a set of marker points. The specific steps include:

[0102] S421. Calculate the distance between the local maximum points at both ends of each edge in the Delaunay triangulation graph;

[0103] S422. Sequentially traverse each edge in the Delaunay triangulation graph, and perform a merging judgment on the two local maximum points of each edge. If the distance between the two local maximum points is less than the corresponding threshold, then merge these two local maximum values;

[0104] Exemplarily, 50% of the average value of the distance transformation values of two local maximum points is set as the corresponding threshold.

[0105] S423. Update the local maximum list, and loop the above steps until each point in the local maximum list does not meet the merging condition.

[0106] Through the above process, a unique marker point is obtained in each austenite grain. The merged set of local maximum points constitutes the set of marker points, and each merged local maximum point is the marker point, as Figure 5c shown.

[0107] Specifically, in step S5, based on the set of marker points, the initial segmentation result of austenite grains is obtained using the watershed segmentation method. Specifically, it includes:

[0108] Take the negative value of the distance transformation graph to obtain a gradient image;

[0109] Use the gradient image and the set of marker points merged after triangulation processing as the segmentation basis, and input them into the watershed algorithm. Among them, each marker point is a local minimum point of the watershed segmentation method. Each local minimum value in the picture will have an influence area, and the boundaries of these influence areas are the dividing lines between austenite grains, thereby obtaining the initial segmentation result of austenite grains.

[0110] Specifically, in step S6, based on the common characteristics of austenite grains: approximately convex shape and approximately equiaxed shape, the initial segmentation result image of the segmented austenite grains is inspected and adjusted using convexity and aspect ratio indicators to obtain the final segmentation output result. AsFigure 2 As shown, the specific steps include:

[0111] S61. For all adjacent austenite grains S in the initial segmentation result 1 and S 2 perform region merging to obtain multiple merged regions S 12 , and S 12 = S 1 ∪ S 2 ;

[0112] S62. Based on the convexity (convexity(S 12 )) and aspect ratio (aspect ratio(S 12 )) of any merged region, perform merging condition judgment and merge adjacent regions that meet the conditions;

[0113] Exemplarily, assume that the grain shape is a two-dimensional planar region S with an area of A(S), and the convex hull of this grain shape is CH(S), that is, the smallest convex set containing S. The convexity definition is expressed as:

[0114]

[0115] If A(CH(S)) ≥ A(S), it means that the grain shape is concave. According to the characteristic that the theoretical austenite grain morphology is approximately convex, the value range of convexity is from 0 to 1, and the closer the value is to 1, the more convex the shape tends to be.

[0116] At the same time, for the grain shape S, find its minimum 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 equiaxed crystal.

[0117] Therefore, by detecting and adjusting the initial segmentation result through two geometric characteristics of convexity and aspect ratio, to solve the diversity of materials and grains themselves, as well as the over-segmentation or under-segmentation problems caused by factors such as excessive boundary blur and abnormal missing due to corrosion during the preparation of metallographic specimens. The specific merging conditions are as follows:

[0118] 1) Compare the convexity of the merged region S 12 with the convexity of S 1 and S 2 : If it satisfies convexity(S 12 ) - min{convexity(S 1 ), convexity(S 2 )} ≥ a, where a is the convexity merging threshold;

[0119] Exemplarily, take a = 0.2 to prove that the convexity of the merged region has a significant improvement;

[0120] 2) Judgment of the aspect ratio of the merged region S 12 If the aspect ratio of S 12 is closer to 1 and satisfies |aspect ratio(S 12 ) - 1| < min{|aspect ratio(S 1 ) - 1|, |aspect ratio(S 2 ) - 1|} and

[0121] 1 ≤ aspect ratio(S 12 ) ≤ b, where b is the merging threshold of the aspect ratio.

[0122] Exemplarily, to conform to the properties of austenite grains in actual metallographic images, take b = 1.25, that is, if aspect ratio(S 12 ) falls within the range of 1 to 1.25, it indicates that the merged shape is closer to an equiaxed crystal shape.

[0123] If both the above convexity improvement condition and aspect ratio proximity condition are satisfied, it can be determined that S 1 and S 2 are probably over-segmented regions of the same overall grain. Merge S 1 with S 2 into a new complete austenite grain region or output a suggestion to merge S 1 with S 2 into a new complete austenite grain region.

[0124] S63. Detection of individual austenite grains segmented: For each individual austenite grain region S, if its convexity convexity(S) is less than the threshold, such as satisfying convexity(S) < 0.75, and there is no adjacent austenite grain that satisfies the merging condition, then this grain is very likely not to be completely segmented, determine that this austenite grain is abnormal, and output a prompt that the segmentation of this austenite grain is incomplete. Segment the metallographic image through the above intelligent recognition method, as shown in Figure 6a and 6b .

[0125] Compared with the prior art, an intelligent recognition method for austenite grains in metallographic images provided by this embodiment can automatically and accurately identify and segment austenite grains in metallographic pictures by fully considering the morphological characteristics of austenite grains. Through a verification mechanism based on the geometric properties of grains, the phenomena of over-segmentation and incomplete segmentation are effectively avoided, and early warning prompts are given for special cases to help analysts quickly locate and handle abnormal situations. Finally, the efficient and accurate recognition of austenite grains is achieved, which can significantly improve the efficiency and accuracy of metallographic analysis and meet the requirements of automatic analysis of metallographic images in industrial production.

[0126] Those skilled in the art can understand that all or part of the processes for implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a magnetic disk, an optical disk, a read-only memory, or a random access memory, etc.

[0127] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.

Claims

1. An intelligent identification method for austenite grains in metallographic images, characterized in that: The steps include: Performing image preprocessing on the austenite metallographic structure image to be detected to obtain a preprocessed image including austenite grains and grain boundaries; Performing distance transformation on the preprocessed image to obtain a distance transformation map including distance transformation values ​​of each pixel point in the austenite grain; Performing local extreme value detection on the distance transformation graph to obtain a local maximum value point set; Constructing a Delaunay triangulation graph based on the local maximum point set, and iteratively merging the local maximum points on the Delaunay triangulation graph based on the distance transformation value to obtain a marked point set; Based on the set of marking points, an initial segmentation result of austenite grains is obtained; The initial segmentation result of the austenite grains is inspected and adjusted to obtain a final segmentation result.

2. The intelligent identification method for austenite grains in metallographic images according to claim 1, characterized in that: Based on all local maximum points, the distance transformation values ​​corresponding to each point and the Delaunay triangulation graph, an initial local maximum list is obtained; Iteratively merging local maximum points based on the local maximum list includes: Calculate the distance between the local maximum points at both ends of each edge in the Delaunay triangulation graph; Sequentially traverse each edge in the Delaunay triangulation graph, and perform a merge judgment on the two local maximum points of each edge. If the distance between the two local maximum points is less than the corresponding threshold, the two local maximum points are merged; wherein the corresponding threshold is determined based on the average value of the distance transformation values ​​of the two local maximum points; Update the local maximum list and the Delaunay triangulation graph, and repeat the above steps until all points in the local maximum list do not meet the merging condition; wherein the merged local maximum point set constitutes a marked point set, and each local maximum point is a marked point.

3. The intelligent identification method for austenite grains in metallographic images according to claim 1 or 2, characterized in that: Obtaining the distance transformation graph includes: Calculating the distances from all pixel points in the austenite grains in the preprocessed image to the nearest grain boundary pixel points, and obtaining the distance transformation value corresponding to each pixel point; Based on the distance transformation values ​​of all pixels, the distance transformation map is obtained.

4. The intelligent identification method for austenite grains in metallographic images according to claim 3 is characterized in that: The distance transform graph is edge detected using the 8-neighborhood to obtain the local maximum point set containing all local maximum points, which is expressed as: Among them, P ext is the local maximum point set; N(x,y) is the neighborhood around the pixel point (x,y); D(x a ,y b ) is the distance transformation value of each pixel in the neighborhood; D(x,y) is the distance transformation map.

5. The intelligent identification method for austenite grains in metallographic images according to claim 2, characterized in that: Constructing the Delaunay triangulation graph includes: Calculate a rectangular bounding box of the local maximum point set, where the bounding box encloses all points in the local maximum point set, divide the bounding box into two super triangles, and obtain an initial triangulation; In the initial triangulation, sequentially insert the other points in the local maximum point set except the extreme point on the bounding box, connect any other point with the three vertices of the triangle containing it, split it into new triangles, and the multiple new triangles after splitting constitute the intermediate triangulation; All triangles in the intermediate triangulation are optimized in turn by using the method of empty circumscribed circle detection and exchanging diagonals to obtain a Delaunay triangulation graph.

6. The intelligent identification method for austenite grains in metallographic images according to claim 1, characterized in that: The initial segmentation result of the austenite grains is inspected and adjusted using the convexity and the aspect ratio, including: All two adjacent austenite grains S1 and S2 in the segmentation result are region-merged to obtain multiple merged regions S 12 ; Based on the convexity of any merged region (S 12 ) and aspect ratio (S 12 ) to judge the merging conditions and merge the adjacent grains that meet the conditions; For each individual austenite grain region S, if its convexity (S) is less than the threshold and there is no adjacent austenite grain that meets the merging conditions, the grain is abnormal and an incomplete grain segmentation prompt is output.

7. The intelligent identification method for austenite grains in metallographic images according to claim 6, characterized in that: The merger conditions include: convexity(S 12 )-min{convexity(S1),convexity(S2)}≥a; |aspect ratio(S 12 ) - 1| < min{|aspect ratio(S1) - 1|, |aspect ratio(S2) - 1|}, and 1 ≤ aspect ratio(S 12 ) ≤ b; Among them, convexity(S1) and convexity(S2) represent the convexity of austenite grains S1 and S2 respectively; aspect ratio(S1) and aspect ratio(S2) represent the aspect ratios of austenite grains S1 and S2 respectively; a and b are the combined thresholds of convexity and aspect ratio respectively.

8. The intelligent identification method for austenite grains in metallographic images according to claim 6, characterized in that: The convexity is calculated based on the following formula: Among them, convexity(S) represents the convexity of the two-dimensional plane region S where the grain shape is; A(S) is the area of ​​the two-dimensional plane region S where the grain shape is; CH(S) is the minimum convex set containing S.

9. A method for intelligently identifying austenite grains in metallographic images according to any one of claims 1 to 8, characterized in that: Obtaining the preprocessed image includes: Grayscale processing is performed on the metallographic image to be inspected to obtain a grayscale image; Performing threshold segmentation on the grayscale image using the maximum inter-class variance method to obtain a binary image containing austenite grains and grain boundaries; Performing denoising on the binary image based on the graph structure, iteratively removing short hanging branches on the grain boundary in the graph structure of the binary image whose length is less than a threshold; wherein the edge with a degree of 1 is regarded as a hanging branch, and the hanging branch includes a long hanging branch and a short hanging branch; The preprocessed image is obtained based on the long hanging branches and other grain boundary parts retained after iteration.

10. The intelligent identification method for austenite grains in metallographic images according to claim 1, characterized in that: Based on the marked point set, the initial segmentation result of austenite grains is obtained by using the watershed segmentation method.

Citation Information

Patent Citations

  • Method for segmenting adhesion cells in image

    CN102013102A

  • Method of small dim target detection under complicated background

    CN104103080A

  • Marked watershed segmentation-based steel grain boundary automatic extraction method

    CN106599793A

  • Composite material CT image segmentation method based on improved watershed algorithm

    CN111738256A

  • Method for quantifying form of mineral particles in rock

    CN112819809A