A method for automatically evaluating the average grain size of metal materials using the interception method

By combining deep learning and traditional image processing technology, the cut-off method is used to automatically evaluate the grain size of metal materials, which solves the problems of large errors and long time-consuming caused by manual operations in the existing technology, and achieves efficient and accurate grain size evaluation.

CN120355714BActive Publication Date: 2025-09-05GUOHE GENERAL (QINGDAO) TEST & EVALUATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510845876.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-09-05
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

In the prior art, the grain size assessment of metal materials relies on manual operations, and there are problems such as large human error, long time and limited accuracy, which is difficult to meet modern needs.

Method used

The point cut-off method is combined with deep learning and traditional image processing technology, and the grain boundaries are automatically identified by mask extraction, Hough line detection and UNet deep learning algorithm, and the scale value is extracted in combination with the KNN classifier, and the grain size is calculated by the point cut-off method.

Benefits of technology

It significantly improves the accuracy and consistency of grain size assessment, reduces human errors, improves assessment efficiency, and reduces operating costs and computing resource dependence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355714B_ABST
    Figure CN120355714B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for automatically assessing the average grain size of metal materials using the intercept method, which relates to the field of metallographic image analysis of metal materials. The method comprises the following steps: selecting a recognition model based on the material being tested; inputting an optical microscope image (pic) into a system equipped with the recognition model; extracting scale information from the input image (pic) using mask extraction and Hough line detection: first, extracting the scale area using a mask, then extracting the scale length using a Hough line detection algorithm, and finally extracting the scale value using a KNN classifier; identifying grain boundary pixels in the input image using the selected recognition model; classifying each pixel in the input optical microscope image (pic) using a UNet to determine whether it is a grain boundary pixel; and finally optimizing the image. The optimized grain boundary image is then graded using the intercept method, the number of intercepts per unit length is counted, and the grain size G is calculated. The present invention significantly improves the accuracy and consistency of grain size assessment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of metallographic image analysis of metal materials, in particular to a method for automatically evaluating the average grain size of metal materials by adopting an interception method. Background Art

[0002] Grain size is a key parameter that measures the size and distribution of grains within metal materials, significantly impacting the material's mechanical properties, processing capabilities, and service performance. In the microstructure of metal materials, a grain is a unit of crystalline structure formed by a large number of atoms arranged according to a specific pattern, with grain boundaries existing between different grains. The size, shape, and distribution of grains directly determine the material's mechanical properties, such as strength, hardness, plasticity, toughness, and fatigue resistance.

[0003] Currently, grain size assessment relies primarily on two methods: microscopic observation and image processing system-assisted methods. Microscopic observation is a traditional manual inspection method that uses a metallographic microscope to observe the sample surface and manually analyze the grain morphology and size. In recent years, the application of deep learning technology in image recognition has made significant progress, especially the advantages of convolutional neural networks (CNNs) in image recognition. Traditional grain size assessment relies on operator experience and is easily affected by human factors. It also suffers from prominent issues such as time-consuming measurement processes and limited accuracy, making it difficult to meet current needs. A new automatic grain size assessment system for metal materials is urgently needed to improve the accuracy, efficiency, and adaptability of grain size assessment. Summary of the Invention

[0004] The object of the present invention is to provide a method for automatically evaluating the average grain size of a metal material using an intercept method, so as to solve the problems raised in the above background technology.

[0005] To solve the above technical problems, the present invention provides the following technical solution: a method for automatically evaluating the average grain size of a metal material using an intercept method, comprising the following steps:

[0006] Select the identification model according to the material being tested;

[0007] Input the optical microscope image pic into the system with the recognition model;

[0008] Use mask extraction and Hough line detection to extract ruler information from the input image pic: first use the mask to extract the ruler area, then use the Hough line detection algorithm to extract the ruler length, and finally use the KNN classifier to extract the ruler value;

[0009] The selected recognition model is used to identify grain boundary pixels in the input image: UNet is used to classify each pixel of the input optical microscope image pic to determine whether it is a grain boundary pixel. Finally, optimization is performed. The optimization process is as follows: First, the connected domain analysis method is used to remove the area within the grain with an area less than 75 pixels for the grain boundary foreground pixels; then the grain boundary image pixels are flipped, and the connected domain analysis is performed on the grain foreground pixels. Each grain is extracted separately, and a 7×7 structuring element is used to perform a morphological closing operation to eliminate the fracture boundary inside the grain; finally, each processed connected domain is reconstructed in situ to obtain a clear grain boundary image;

[0010] The intercept method is used to grade the optimized grain boundary image, and the number of intercepts per unit length is counted to calculate the grain size G.

[0011] Preferably, the selectable identification models include a non-twinned model, a twinned model and a comprehensive model;

[0012] The dataset for training the recognition model contains images of industrial pure iron, stainless steel, high-temperature alloys, and aluminum alloy materials or tissue types. The grain boundary areas in the images are manually labeled, and then the masks of the grain boundary annotations are extracted and converted into binary images. The training images and the binary label images correspond one-to-one to form a dataset.

[0013] Preferably, the UNet deep learning algorithm is used for training the recognition model, and the VGG16 backbone network is selected as the encoder of the UNet;

[0014] During model training, the encoder parameters are frozen in the first 20 epochs of training, and only the decoder parameters are updated. The encoder parameters are unfrozen in the remaining epochs.

[0015] Preferably, the steps of ruler extraction are as follows:

[0016] A straight line in image space can be represented in polar coordinate form:

[0017] ;

[0018] Where x represents the horizontal coordinate of the edge point, y represents the vertical coordinate of the edge point; θ is the angle between the straight line and the horizontal axis; ρ is the shortest distance from the straight line to the origin of the coordinate system;

[0019] First, the cropped scale image area is grayed, the image I(x,y) is smoothed using Gaussian filtering, and the edge point set is extracted using Canny edge detection; then the horizontal and vertical gradients G are calculated using the Sobel operator. x , G y ; And the gradient amplitude G and direction α are obtained, and the calculation formula is as follows:

[0020] ;

[0021] ;

[0022] ;

[0023] Perform a directional scan on the gradient image and retain only the local maximum points as potential edges: set the gradient amplitude upper limit threshold G high , retain strong edges above this value; set the gradient amplitude lower limit threshold G low , connect weak edges to complete the extraction of edge points;

[0024] For each edge point, the corresponding polar coordinate ρ is calculated in the parameter space, and the corresponding (ρ, θ) position is voted in the accumulator, and the voting is considered valid; the maximum length of the straight line under detection is retained as the pixel length of the ruler, so that the pixels can be mapped to the actual physical size later.

[0025] Preferably, a KNN classifier is used to extract the scale value. The training method of the KNN classifier is to extract the image scale area mask, obtain the number of connected domains in the area, select the first connected domain from left to right horizontally, calculate its aspect ratio, pixel density, and upper and lower area ratio, and form a four-dimensional feature vector with the total number of connected domains to input into the KNN classifier training;

[0026] The actual physical size of each pixel is obtained by dividing the scale value obtained by the KNN classifier by the pixel length of the scale.

[0027] Preferably, the steps of interception method rating are as follows: draw intercept lines and count the number of intercept points, calculate the number of intercept lines per unit length, and calculate the average grain size according to the standard.

[0028] Preferably, the method of drawing the transversal line is as follows:

[0029] Draw a cross-section on the grain boundary image,

[0030] The intercept lines of the line intercept method include four lines: a vertical line segment located on the left side of the image, with its midpoint aligned with the midpoint of the image; a horizontal line segment located on the bottom side of the image, with its midpoint aligned with the midpoint of the image; and two perpendicular lines with the center of the input image as their midpoint.

[0031] The circular intercept method uses the center of the image as the circle point and selects different radii to draw three concentric circle sections.

[0032] Preferably, when the above-drawn cut line intersects with the grain boundary pixel, the point is counted as the cut point, and then a template image with the same size as the input image and pixel values ​​of 0 is created, the cut point is reconstructed on the template image, and counted to obtain N iThe average grain size G can be calculated by combining the actual physical size L / M value of the cut line.

[0033] Preferably, the calculation formula of the average grain size G is as follows:

[0034] ;

[0035] ;

[0036] N L Represents the number of cuts per unit length, M represents the magnification used for observation, L represents the cut length, N i It represents the number of intercept points under a known intercept length L, and G is the average grain size grade.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] The present invention's automated average grain size rating system for metal materials significantly improves the accuracy and consistency of grain size assessment by combining deep learning with traditional image processing techniques. Compared to traditional manual microscopic observation methods, it reduces human error and makes assessment results more reliable. The system's fully automated workflow not only significantly improves assessment efficiency but also simplifies operations and reduces labor costs. Compared to existing technologies, this invention reduces energy consumption and hardware costs while optimizing algorithms and reducing reliance on computing resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is the grain boundary recognition result of the 4-level grain size image of the present invention;

[0040] Figure 2 This is the grain boundary recognition result of the 5-level grain size image of the present invention;

[0041] Figure 3 This is the grain boundary recognition result of the 6-level grain size image of the present invention;

[0042] Figure 4 This is the grain boundary recognition result of the 7-level grain size image of the present invention. DETAILED DESCRIPTION

[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0044] This example provides an automatic average grain size rating system for metal materials, involving technologies such as Hough line detection, mask extraction, morphological processing, and convolutional neural networks. It can be applied to grain boundary identification and average grain size rating in optical microscope images of metal materials, which is of great significance for subsequent research on material properties.

[0045] This embodiment first passes Figure 1 The UI shown uploads an image to be rated (pic) with a width of w and a height of h. Mask extraction and Hough line detection are then used to extract scale information from the image. A convolutional neural network is then used to identify grain boundary pixels in the input metallographic image. Finally, the image is graded for average grain size based on the recognition results. The following steps are involved:

[0046] (1) Select identification model and rating method;

[0047] (2) Input the optical microscope image pic into the system for model input and grain boundary recognition;

[0048] Use mask extraction and Hough line detection to extract scale information from the input image pic;

[0049] (3) Using the UNet network to identify the grain boundary pixels of the input image, and using traditional image processing technology to optimize the network grain boundary recognition results;

[0050] (4) The optimized grain boundary image is graded using the intercept method, the number of intercepts per unit length is counted, and the grain size G is calculated.

[0051] Specifically, there are three types of model choices in step (1), including a non-twinned model, a twinned model, and a comprehensive model; the three models are obtained after training with different data sets, and the model can be selected for recognition based on the twin boundary situation in the actual detection image.

[0052] For model training, we first establish a data set, which contains images of 17 different materials or tissue types, including industrial pure iron, stainless steel, high-temperature alloys, and aluminum alloys, to ensure that the system can adapt to different types of metal materials.

[0053] The grain boundary areas in the collected metallographic images are manually annotated, and then the mask of the grain boundary annotation is extracted and converted into a binary image. The training images and the binary label images correspond one-to-one to form a data set for training this model.

[0054] This embodiment adopts the UNet deep learning model. UNet is a classic semantic segmentation network with good boundary recognition and structural feature extraction capabilities. Its structure consists of a symmetrical encoder and decoder, which extracts the semantic features of the image by downsampling layer by layer, and restores the spatial resolution of the image in combination with upsampling layer by layer. The jump connection mechanism in the model can fuse the shallow detail information in the encoder with the high-level semantic information in the decoder, effectively improving the segmentation accuracy, especially for images with clear boundaries but complex structures. For the problems of variable grain boundary structure and large contrast differences in metal materials, UNet can achieve relatively stable training effects and excellent segmentation performance on limited labeled data. In addition, the VGG16 backbone network is selected as the encoder of UNet. Its network structure is similar to the original UNet encoder and is relatively simple, with high computational efficiency, which is convenient for deployment and application in industrial scenarios. Based on the above advantages, UNet was selected as the core model for grain boundary recognition in this system, providing an accurate structural basis for subsequent grain size analysis.

[0055] During model training, this example employs transfer learning. The encoder parameters are frozen for the first 20 epochs of training, and only the decoder parameters are updated. The encoder parameters are then unfrozen for the remaining epochs. Compared to training the network from scratch, introducing a pre-trained VGG16 dataset accelerates model convergence, improves training stability, and achieves better segmentation results under limited data conditions. In particular, in grain boundary recognition, the deep features of VGG16 help identify faint or blurred grain boundary lines, improving the ability of traditional UNets to identify unclear or broken grains in complex backgrounds.

[0056] There are two rating methods: the straight line intercept method and the circular intercept method. You can upload the image to be rated only after selecting the intercept method.

[0057] Specifically, in step (2), multiple optical microscope images pic can be input simultaneously, and the system supports batch image recognition and rating.

[0058] Specifically, the mask extraction and Hough line detection in step (3) are first located in the scale area of ​​the input image. The default scale area of ​​this system is the lower right corner of the image. The length and width of the cropped area are 0.2w and 0.2h, respectively. The recognizable scale values ​​include 10×, 20×, 50×, 100×, and 200×.

[0059] The scale length is extracted using the Hough line detection algorithm. The recognition principle is as follows:

[0060] A straight line in image space can be represented in polar coordinate form:

[0061] ;

[0062] Where x represents the horizontal coordinate of the edge point, y represents the vertical coordinate of the edge point; θ is the angle between the straight line and the horizontal axis; ρ is the shortest distance from the straight line to the origin of the coordinate system.

[0063] First, the cropped scale image area is grayed, the image I(x,y) is smoothed using Gaussian filtering, and the edge point set is extracted using Canny edge detection; then the horizontal and vertical gradients G are calculated using the Sobel operator. x , G y ; And the gradient amplitude G and direction α are obtained, and the calculation formula is as follows:

[0064] ;

[0065] ;

[0066] ;

[0067] Perform a directional scan on the gradient image and retain only the local maximum points as potential edges; set the gradient amplitude upper limit threshold G high =150, retain strong edges above this value; set the lower limit threshold of the gradient amplitude G low = 50, connecting weak edges to complete edge point extraction. For each edge point, the corresponding polar coordinate ρ is calculated in parameter space, and the corresponding (ρ, θ) position is voted for in the accumulator. Only lines that receive more than 50 votes and are longer than 20 pixels are considered valid. Among the detected lines, the maximum length is retained as the pixel length of the ruler to facilitate subsequent mapping of pixels to actual physical dimensions.

[0068] To extract scale values, a method combining morphological features with a KNN classifier was designed. This method is applicable to commonly used scales used in metallographic inspection, including 10μm, 20μm, 50μm, 100μm, and 200μm. First, the scale region mask of the image is extracted to determine the number of connected domains in the region. The first connected domain from left to right is selected horizontally, and its aspect ratio, pixel density, and top-to-bottom area ratio are calculated. This, along with the total number of connected domains, forms a four-dimensional feature vector that is input into the KNN classifier. This method achieves good accuracy and robustness with only a small sample size. The scale value obtained by the classifier is divided by the scale's pixel length to obtain the actual physical size per pixel.

[0069] Specifically, step (4) uses the semantic segmentation network UNet to identify grain boundaries in the entire metallographic image. This is a pixel-level segmentation network consisting of an encoder and a decoder. The symmetrical encoder-decoder structure of UNet better promotes the fusion of shallow semantic information and deep semantic information. The encoder gradually extracts high-level features of the image while gradually reducing the spatial size of the image through downsampling. The decoder gradually restores the spatial resolution of the image and restores the image size to the same as the input image. At the same time, the decoder also uses jump connections to retain the low-level features extracted by the encoder and enhance the image segmentation accuracy. This, to a certain extent, solves the interference of fuzzy boundaries and twins on grain boundary recognition.

[0070] After receiving the image to be rated, the grain boundary segmentation model classifies each pixel in the image to determine whether it is a grain boundary pixel. The input image undergoes four downsampling steps during the encoder phase to reduce the spatial resolution and extract feature information. Each downsampling step is preceded by two convolution operations. During the decoder phase, the feature map is upsampled four times to restore the image's original spatial resolution. Each upsampling step is preceded by two convolution operations, and the feature maps of the corresponding encoder dimensions are fused to complete the pixel classification. The resulting image from the neural network is then optimized for grain boundaries. Specifically, connected domain analysis is first used to remove grain boundary foreground pixels with an area less than 75 pixels from the interior of the grain. Next, the grain boundary image pixels are flipped, and connected domain analysis is performed on the grain foreground pixels. Each grain is extracted individually, and morphological closing is performed using a 7×7 structuring element to eliminate internal fracture boundaries. Finally, each processed connected domain is reconstructed in situ to obtain a clear grain boundary image. The optimized grain boundary image serves as input to the rating result analysis module.

[0071] Specifically, in step 5), the average grain size is calculated according to the number of intercepts per unit length according to the formula defined in GB / T 6394-2017. The formula is:

[0072] ;

[0073] ;

[0074] N L Represents the number of cuts per unit length, M represents the magnification used for observation, L represents the cut length, N i It represents the number of intercept points under a known intercept length L, and G is the average grain size grade.

[0075] First, draw a line on the grain boundary image according to the line intercept method selected in step 1). The line intercept method includes four lines: a vertical line segment on the left side of the image, with the midpoint of the line segment flush with the midpoint of the image, and a length of , to the left ; A horizontal line segment located at the bottom of the image, with the midpoint of the line segment flush with the midpoint of the image, and a length of , from the lower side ; Two straight lines with the center of the input image as the midpoint and perpendicular to each other (with angles of 45° and 135° to the horizontal direction) with a length of ; The circular intercept method uses the image center as the dot and draws three concentric circle intersections with radii of 0.12h, 0.27h, and 0.42h. When the intersection intersects with the grain boundary pixel, the point is counted as the intercept. Then, a template image with the same size as the input image and pixel values ​​of 0 is created. The intercept points are reconstructed on the template image and counted to obtain N. i The average grain size G can be calculated by combining the actual physical size L / M value of the cut line.

[0076] This embodiment of the present invention utilizes UNet to construct an image segmentation model. First, a rating image is imported through a Python tkinter-based UI interface. Mask extraction and Hough line detection are then used to extract scale information from the image. A convolutional neural network is then used to identify grain boundary pixels within the input metallographic image. Finally, the image is graded for average grain size based on the identified results. Compared to traditional image segmentation algorithms, the convolutional neural network employed in this invention can automatically extract grain boundary features from the image to be rated, significantly reducing the time required for manual grain boundary identification. This invention can automatically measure the average grain size of metal materials with high computational efficiency and accuracy, providing objective and accurate data for metal microstructural analysis. This approach has broad application prospects in the field of metal material analysis based on optical microscope images.

[0077] The effects of the embodiments of the present invention are verified by the following experiments:

[0078] In order to verify the accuracy of the optical microscopic image rating of the present invention, the grain size images of the brand GH4169 with manual evaluation levels of 4-7 were selected as test data, with 3 images for each level, totaling 12 images. The original grain boundary images and the optimized grain boundary images of the two groups of test images are shown in Figure 2. Figure 3 ,from Figure 3 It can be seen that the model can better identify the grain boundary area in the metallographic image, and to a certain extent solve the problem of twin and fuzzy boundary interference identification. After morphological post-processing operations, the broken boundaries in the image are removed and a clear grain boundary image is obtained.

[0079] After image segmentation and optimization, grains can be graded. Intercepts are drawn according to preset values ​​on the grain boundary identification result image. The total length of the intercepts and the number of intersections between the intercepts and the grain boundaries are counted to obtain the number of intercepts per unit length. Finally, the grain size is calculated using a formula. The grain size grading system's rating results for the test image are compared with manual measurement results. Manual measurement uses the straight line intercept method to grade the test image data.

[0080] Table 1

[0081]

[0082] As can be seen from Table 1, there are a total of 12 images in the measurement data, and the errors between the system measurement results and the manual measurement are both within the range of ±0.5, indicating that the system measurement results are accurate and reliable. The measurement speed of the embodiment of the present invention is much higher than that of manual measurement, further verifying the advantages of the embodiment of the present invention.

[0083] Therefore, the present invention uses a convolutional neural network to construct a grain boundary segmentation model and combines morphological operations to optimize the segmentation results. It can realize end-to-end automatic measurement of the average grain size of metal materials, and has high computational efficiency and accuracy. It provides objective and accurate data for the material science analysis of metal materials, lays the foundation for subsequent research on the relationship between experimental conditions of metal materials and material properties, and has broad application prospects in the field of metal material analysis based on optical microscope images.

[0084] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A method for automatically evaluating the average grain size of a metal material using an intercept method, characterized in that: The steps include: Select the identification model according to the material being tested; Input the optical microscope image pic into the system with the recognition model; Mask extraction and Hough line detection are used to extract scale information from the input image pic: first, the scale area is extracted using the mask, then the scale length is extracted using the Hough line detection algorithm, and finally the scale value is extracted based on the morphological features of the scale value using the KNN classifier; The steps for extracting scale values ​​are as follows: A straight line in image space can be represented in polar coordinate form: ; Where x represents the horizontal coordinate of the edge point, y represents the vertical coordinate of the edge point; θ is the angle between the straight line and the horizontal axis; ρ is the shortest distance from the straight line to the origin of the coordinate system; First, the cropped scale image area is grayed, the image I(x,y) is smoothed using Gaussian filtering, and the edge point set is extracted using Canny edge detection; then the horizontal and vertical gradients G are calculated using the Sobel operator. x , G y ; And the gradient amplitude G and direction α are obtained, and the calculation formula is as follows: ; ; ; Perform a directional scan on the gradient image and retain only the local maximum points as potential edges: set the gradient amplitude upper limit threshold G high , retain strong edges above this value; set the gradient amplitude lower limit threshold G low , connect weak edges to complete the extraction of edge points; Calculate the corresponding polar coordinate ρ for each edge point in the parameter space, and vote for the corresponding (ρ, θ) position in the accumulator, which is considered valid by voting; retain the maximum length of the straight line under detection as the pixel length of the ruler, so that the pixels can be mapped to the actual physical size later. The selected recognition model is used to identify grain boundary pixels in the input image: UNet is used to classify each pixel of the input optical microscope image pic to determine whether it is a grain boundary pixel. Finally, optimization is performed. The optimization process is as follows: First, the connected domain analysis method is used to remove the area within the grain with an area less than 75 pixels for the grain boundary foreground pixels; then the grain boundary image pixels are flipped, and the connected domain analysis is performed on the grain foreground pixels. Each grain is extracted separately, and a 7×7 structuring element is used to perform a morphological closing operation to eliminate the fracture boundary inside the grain; finally, each processed connected domain is reconstructed in situ to obtain a clear grain boundary image; The intercept method is used to grade the optimized grain boundary image, and the number of intercepts per unit length is counted to calculate the grain size G.

2. The method for automatically evaluating the average grain size of a metal material using the intercept method according to claim 1, characterized in that: The selectable identification models include non-twin model, twin model and comprehensive model; The dataset for training the recognition model contains microscopic images of industrial pure iron, stainless steel, high-temperature alloys, and aluminum alloys. Each material also includes images of different types of microstructures. The grain boundary areas in the images are manually annotated, and then the masks of the grain boundary annotations are extracted and converted into binary images. The training images and the binary label images correspond one-to-one to form a dataset.

3. The method for automatically evaluating the average grain size of a metal material using the intercept method according to claim 2, characterized in that: The recognition model is trained using the UNet deep learning algorithm, and the VGG16 backbone network is selected as the encoder of UNet; During model training, the encoder parameters are frozen in the first 20 epochs of training, and only the decoder parameters are updated. The encoder parameters are unfrozen in the remaining epochs.

4. The method for automatically evaluating the average grain size of a metal material using the intercept method according to claim 1, wherein: A KNN classifier is used to extract the scale value. The training method of the KNN classifier is to extract the scale area mask of the image, obtain the number of connected domains in the area, select the first connected domain from left to right horizontally, calculate its aspect ratio, pixel density, and upper and lower area ratio, and form a four-dimensional feature vector with the total number of connected domains to input into the KNN classifier training; The scale value obtained by the KNN neighbor classifier is divided by the pixel length of the scale to obtain the actual physical size of each pixel.

5. The method for automatically evaluating the average grain size of a metal material using the intercept method according to claim 1, wherein: The steps of interception method rating are as follows: draw intercept lines and count the number of intercept points, calculate the number of intercept lines per unit length, and calculate the average grain size according to the standard.

6. The method for automatically evaluating the average grain size of a metal material using the intercept method according to claim 5, characterized in that: The method of drawing the transversal line is as follows: Draw a cross-section on the grain boundary image; The intercept lines of the line intercept method include four lines: a vertical line segment located on the left side of the image, with its midpoint aligned with the midpoint of the image; a horizontal line segment located on the bottom side of the image, with its midpoint aligned with the midpoint of the image; and two perpendicular lines with the center of the input image as their midpoint. The circular intercept method uses the center of the image as the circle point and selects different radii to draw three concentric circle sections.

7. The method for automatically evaluating the average grain size of a metal material using the intercept method according to claim 6, characterized in that: When the above-drawn cut line intersects with the grain boundary pixel, the point is counted as the cut point. Then, a template image with the same size as the input image and pixel values ​​of 0 is created. The cut points are reconstructed on the template image and counted to obtain N. i The average grain size G can be calculated by combining the actual physical size L / M value of the cut line.

8. The method for automatically evaluating the average grain size of a metal material using the intercept method according to claim 7, characterized in that: The calculation formula of average grain size G is as follows: ; ; N L Represents the number of cuts per unit length, M represents the magnification used for observation, L represents the cut length, N i It represents the number of intercept points under a known intercept length L, and G is the average grain size grade.

Citation Information

Patent Citations

  • Ferrite steel hardness identification method, device and equipment and storage medium

    CN118396918A

  • Austenite structure display and grain size rating method

    CN120142098A