A method for evaluating the uniformity of metal material structure
The use of image processing technology to automatically evaluate the microstructure uniformity of metallic materials solves the problems of high labor intensity and low efficiency in manual judgment, and achieves efficient and accurate evaluation of microstructure uniformity.
Patent Information
- Application Number
- CN202411516921.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-10-29
AI Technical Summary
In existing technologies, the determination of the uniformity of the microstructure of metallic materials relies on manual visual inspection, which results in high labor intensity, low efficiency, and difficulty in unifying the evaluation criteria, and lacks an effective automated evaluation method.
Image processing technology is used to acquire microscopic images of metallic materials, and then perform grayscale processing, binarization, filtering and noise reduction, morphological processing, hole filling, contour extraction and ellipse fitting to calculate the size and distribution uniformity of the dispersed phase, thereby achieving automated evaluation.
It enables the evaluation of the uniformity of the microstructure of metallic materials without relying on subjective human factors, improving the accuracy and efficiency of the evaluation and simplifying the calculation process.
Smart Images

Figure CN119027426B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for evaluating the structural uniformity of a metal material. Background Art
[0002] Image processing technology has been widely used in industry, healthcare, aerospace, military, etc. due to its good reproducibility and high processing accuracy. At present, digital image processing technology has been applied to the microstructure analysis of metal materials. Compared with traditional methods, the use of digital image processing technology can make modeling more accurate, faster and more convenient.
[0003] There are numerous dispersed phase particles in metal materials, such as bearing steel. Bearing steel is one of the special steels with the most stringent quality requirements in steel production. Its performance will greatly affect the performance of the workpiece, and it is often used to produce precision parts such as balls and bearing rings. During the annealing process of metal materials, the carbide structure will become uneven, which will seriously affect the mechanical properties and fatigue life of the bearings. Therefore, it is necessary to quantitatively analyze the uniformity of the second phase distribution of metal materials after heat treatment. At present, the judgment of the uniformity of the structure of spheroidized annealed metal materials mainly relies on manual visual inspection, manual inspection and other means. However, manual judgment is not only labor-intensive and inefficient, but also difficult to unify the evaluation standards. At present, there is a lack of evaluation of the uniformity of metal material structure.
[0004] Therefore, in view of the problem that human factors have a great influence on the process of judging the uniformity of metal material structure, it is very necessary to provide a method for evaluating the uniformity of metal material structure, which eliminates the influence of human subjective factors and ensures that the accuracy of the evaluation is only related to the image and image processing methods. Summary of the invention
[0005] In view of this, the present invention proposes a tissue uniformity evaluation method based on image processing, which acquires and preprocesses the original image of the metal material, and performs second phase contour fitting, automatic identification and calculation.
[0006] The present invention provides a method for evaluating the structural uniformity of a metal material, comprising the following steps:
[0007] Step 1: Get N Microscopic morphology of metal materials. N ≥1;
[0008] Step 2: grayscale the obtained metal material microscopic morphology image to obtain N A grayscale image;
[0009] Step 3, binarize each grayscale image and distinguish the matrix and dispersed phase with different colors;
[0010] Step 4: N The binary grayscale image is processed by Gaussian filtering to reduce noise. N The image after noise reduction;
[0011] Step 5: N The image after noise reduction is processed by morphological processing to obtain N A morphologically processed image;
[0012] Step 6: Fill the holes that still exist in the image after morphological processing to obtain N A hole filling diagram;
[0013] Step 7: N The dispersed phase in the hole filling image was extracted and ellipse fitted to obtain N Zhang fitted ellipse contour map;
[0014] Step 8: N The fitted ellipse profile is used as the data set to calculate the size uniformity;
[0015] Step 9: N The fitted ellipse contour map is used as the data set to calculate the distribution uniformity;
[0016] Step 10: Comprehensively consider size uniformity and distribution uniformity to evaluate tissue uniformity.
[0017] Based on the above technical solution, preferably, the step 1 of obtaining N The microscopic morphology image of the metal material is obtained by using a scanning electron microscope (SEM) and is obtained at the same magnification.
[0018] Preferably, the content of step 2 is: grayscale processing is performed using the rgb2gary function in MATLAB to convert the microscopic morphology image of the RGB image into a grayscale image.
[0019] Further preferably, the content of step 3 is: perform threshold segmentation on the grayscale image, set the grayscale threshold to T, and if the grayscale value of the pixel in the grayscale image is ≤ the grayscale threshold T, set the pixel to black; if the grayscale value of the pixel in the grayscale image is > the grayscale threshold T, set the pixel to white; let the black pixels be the matrix and the white pixels be the dispersed phase.
[0020] More preferably, the standard deviation of the Gaussian filter in step S4 is 1.5.
[0021] More preferably, the morphological processing described in step 5 includes an erosion operation, a dilation operation, an opening operation and a closing operation.
[0022] Preferably, the specific content of step 8 is:
[0023] Step 8.1, according to the ellipse contour diagram, output the fitting ellipse parameters in each ellipse contour diagram;
[0024] Step 8.2: Use the histogram to calculate the equivalent diameter distribution of the dispersed phase. The equivalent diameter is calculated as the average value of the major and minor axes of the fitted ellipse using the fitting function f(x) Fitting histogram, variables x is the fitting ellipse parameter corresponding to the horizontal axis of the histogram;
[0025] Step 8.3. Calculate the size uniformity of the dispersed phase , the calculation formula is as follows: , and is the dimensionless constant calculated from the fitting curve, , .
[0026] Further preferably, the specific content of step 9 is:
[0027] Step 9.1: Number the dispersed phases in the elliptical contour diagrams so that each elliptical contour diagram has k dispersed phase particles;
[0028] Step 9.2: Segment the ellipse contour into k A block diagram;
[0029] Step 9.3: Perform a quadratic fit on the dispersed phase in the block diagram to obtain k A block fitting graph;
[0030] Step 9.4: Perform data statistics on the dispersed phase in each block fitting diagram, including the number of dispersed phases n And the distance from each dispersed phase to the center of the block fitting diagram D i , ;
[0031] Step 9.5: Calculate the uniformity coefficient of the dispersed phase distribution , the calculation formula is as follows: , is the average distance from the different dispersed phases in each block fitting image to the center of the block image, ; Indicates distance D i The average value of It is the distance D i The standard deviation of Indicates distance Di the median; It is the distance The average value of It is the distance The standard deviation of .
[0032] Further preferably, the ellipse contour image is segmented into k The segmentation rules are as follows: (1) Obtain the fitting center of the dispersed phase based on the ellipse fitting data; (2) Splice the original ellipse contour map into a 3×3 mosaic map by copying; (3) Use the fitting center of the initial dispersed phase as the block center and 300 pixels as the block side length to divide the mosaic map into blocks and obtain k A block diagram.
[0033] Further preferably, the specific content of step 10 is: It is an indicator for judging the uniformity of the tissue. , and is the weight coefficient, .
[0034] The present invention provides a method for evaluating the uniformity of the structure of a metal material, which has the following beneficial effects compared with the prior art:
[0035] The present invention provides a method for evaluating the uniformity of image organization that is not dependent on the influence of human subjective factors. The accuracy of the evaluation is only related to the image processing process. When calculating the distribution uniformity, a block method is used to obtain the average distance between each discrete dispersed phase in the block image and the center of a selected particle, instead of the process of finding the neighboring particles of the dispersed phase particles, thereby simplifying the amount of calculation and the calculation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0037] Figure 1 A SEM image of a metal material obtained by a method for evaluating the structural uniformity of a metal material according to the present invention;
[0038] Figure 2 A schematic diagram of the image preprocessing process of step 2 to step 6 of a method for evaluating the structural uniformity of a metal material according to the present invention;
[0039] Figure 3A schematic diagram of a dimensional uniformity calculation process of a method for evaluating the structural uniformity of a metal material according to the present invention;
[0040] Figure 4 A schematic diagram of a distribution uniformity calculation process of a method for evaluating the uniformity of a metal material structure according to the present invention;
[0041] Figure 5 The present invention is a general flow chart of a method for evaluating the structural uniformity of a metal material. DETAILED DESCRIPTION
[0042] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. 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 creative work are within the scope of protection of the present invention.
[0043] The existing metal material uniformity evaluation mainly relies on manual visual inspection, manual testing and other means to achieve, but manual judgment is not only labor-intensive and inefficient, but also difficult to unify the evaluation criteria. In view of this, the present invention provides a metal material uniformity evaluation method, referring to Figure 5 , the present invention comprises the following steps:
[0044] Step 1: Get N Microscopic morphology of metal materials. N ≥ 1. The metal material in this embodiment is bearing steel.
[0045] Obtained as described in step 1 N The microscopic morphology of a metal material is obtained using a scanning electron microscope (SEM) and is obtained at the same magnification. For examples of microscopic morphology obtained by a scanning electron microscope (SEM), see the attached Figure 1 .
[0046] Step 2: grayscale the obtained metal material microscopic morphology image to obtain N Grayscale image.
[0047] Grayscale processing is performed using the rgb2gary function in MATLAB to convert the microscopic morphology of the RGB image into a grayscale image. The process of converting to a grayscale image is shown in the attached figure. Figure 2 (a) in the figure.
[0048] Step 3: Binarize each grayscale image and distinguish the matrix and dispersed phase with different colors.
[0049] Step 3 is as follows: threshold segmentation is performed on the grayscale image, and the grayscale threshold is set to T. If the grayscale value of the pixel in the grayscale image is ≤ the grayscale threshold T, the pixel is set to black; if the grayscale value of the pixel in the grayscale image is > the grayscale threshold T, the pixel is set to white; let the black pixels be the matrix and the white pixels be the dispersed phase. In this embodiment, the grayscale threshold is selected as 164. The image processed by step 3 is shown in the attached figure. Figure 2 (b) in the figure.
[0050] Step 4: N The binary grayscale image is processed by Gaussian filtering to reduce noise. N Image after noise reduction.
[0051] Specifically, the standard deviation of the Gaussian filter in step S4 is 1.5. The image after the Gaussian filter noise reduction process is as follows Figure 2 As shown in (c) in .
[0052] Step 5: N The image after noise reduction is processed by morphological processing to obtain N The image after morphological processing.
[0053] Morphological processing, including erosion, dilation, opening and closing operations.
[0054] For example, the erosion operation is implemented by the erode function provided by cv2, and its input parameters are the original matrix and the kernel. The dilation operation is implemented by the dilate function provided by cv2, which is common knowledge in the art.
[0055] The opening operation is used to eliminate small holes, smooth larger white areas and not significantly change the area of the white areas; the closing operation is to dilate and then erode the image, connect the blocks between adjacent white areas and flatten the boundaries of the connected areas to obtain a connected area without protrusions. For this embodiment, the erosion process is intended to remove the small connecting points or lines between isolated points and the target area, the dilation process is intended to fill the tiny holes in the feature area, the opening operation is intended to eliminate the brighter areas under the dark background, and the closing operation is intended to eliminate the darker areas under the bright background. The image after morphological processing is shown in Figure 2 (d) in.
[0056] Step 6: Fill the holes that still exist in the image after morphological processing to obtain N A hole filling diagram.
[0057] This step is used to fill holes in the morphologically processed image, eliminating large holes that cannot be processed by morphological processing, and obtaining a hole-filled image. Figure 2 (e) in.
[0058] Step 7:N The dispersed phase in the hole filling image was extracted and ellipse fitted to obtain N The process of contour extraction and ellipse fitting is shown in the attached Figure 3 (a) and Figure 3 (b) in the figure.
[0059] Step 8: N The fitted ellipse contour image is used as the data set to calculate the size uniformity.
[0060] The specific contents of step 8 are:
[0061] Step 8.1: Output the fitting ellipse parameters in each ellipse contour map according to the ellipse contour map.
[0062] Step 8.2, reference Figure 3 (c) in the figure uses a histogram to calculate the equivalent diameter distribution of the dispersed phase. The equivalent diameter is calculated as the average value of the major and minor axes of the fitted ellipse using the fitting function f(x) Fitting histogram, in this embodiment, the fitting function f(x) Choose a lognormal distribution function to fit the histogram: ,in is the coefficient; and The variables are x The mean and standard deviation of the logarithm of the variable x is the fitting ellipse parameter corresponding to the horizontal axis of the histogram; in this embodiment =1; is 0.18; It is 0.7655.
[0063] Step 8.3. Calculate the size uniformity of the dispersed phase , the calculation formula is as follows: , and is the dimensionless constant calculated from the fitting curve, , In this embodiment, is 0.619, is 0.807, and the size uniformity of the dispersed phase It is 0.713.
[0064] Step 9: N The fitted ellipse contour map is used as the data set to calculate the distribution uniformity.
[0065] The specific contents of step 9 are:
[0066] Step 9.1: Number the dispersed phases in the elliptical contour diagrams so that each elliptical contour diagram has k dispersed phase particles.
[0067] Step 9.2: Segment the ellipse contour into k The segmentation rules are as follows: (1) obtain the fitting center of the dispersed phase based on the ellipse fitting data; (2) splice the original ellipse contour map into a 3×3 spliced map by copying; (3) divide the spliced map into blocks with the fitting center of the initial dispersed phase as the block center and 300 pixels as the block side length to obtain k It should be noted that the selection of the block length during image segmentation is adaptive, and generally the content of the dispersed phase particles inside is equivalent to the overall content. The 3×3 mosaic is selected to avoid the dispersed phase at the boundary having no boundary content in a certain direction; the same size of the block is selected to ensure that the data of the block is not affected by the block size, and the size of the block needs to be consistent.
[0068] The contents of the block map and spliced map are obtained as follows:
[0069] A. Establish a rectangular coordinate system for the initial ellipse contour image with unit pixel as unit distance, and obtain the fitting center (x, y) of the dispersed phase and the side lengths a and b of the pixel points of the initial image according to the ellipse fitting data;
[0070] B. Since the second phase, i.e., the dispersed phase, in metal materials is generally considered to be periodically distributed, the original elliptical contour image is spliced into a 3×3 spliced image by means of replication;
[0071] C. Place the mosaic image in a coordinate system, also use unit pixel points as unit distance, establish a rectangular coordinate system for the mosaic image, and determine the position of the fitting center of the initial dispersed phase in the mosaic image (a+x, b+y). This process can restore the contour of the dispersed phase.
[0072] D. Use the fitting center of the initial dispersed phase in the XOY coordinate system as the block center and 300 pixels as the block side length to divide the blocks in the elliptical contour map and obtain k block images.
[0073] Step 9.3: Perform a quadratic fit on the dispersed phase in the block diagram to obtain k Block fitting diagram. Figure 4 These correspond to the ellipse contour segmentation and quadratic fitting steps in step 9.2 and step 9.3 respectively.
[0074] Step 9.4: Perform data statistics on the dispersed phase in each block fitting diagram, including the number of dispersed phases n And the distance from each dispersed phase to the center of the block fitting diagram D i , .
[0075] Step 9.5: Calculate the uniformity coefficient of the dispersed phase distribution , the calculation formula is as follows: , is the average distance from the different dispersed phases in each block fitting image to the center of the block image, ; Indicates distance D i The average value of It is the distance D i The standard deviation of Indicates distance D i the median; It is the distance The average value of It is the distance In one embodiment, the dispersed phase distribution uniformity coefficient It is 0.902.
[0076] Step 10: Comprehensively consider size uniformity and distribution uniformity to evaluate tissue uniformity.
[0077] The specific content is: It is an indicator for judging the uniformity of the tissue. , and is the weight coefficient, .
[0078] In general, let the weight coefficients and is 0.5, then the tissue uniformity evaluation index It is 0.8075.
[0079] It should be noted that the tissue uniformity evaluation index of the present invention is The calculation formula is not limited to the size uniformity factor and the distribution uniformity factor, but can also be other factors related to uniformity.
[0080] It should be noted that the processing object of the present invention is not limited to the selected metal materials, but can be all types of metal materials as long as the second phase and the matrix can be distinguished.
[0081] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for evaluating the uniformity of a metal material structure, characterized in that: The steps include: Step 1: Get N Microscopic morphology of metal materials. N ≥1; Step 2: grayscale the obtained metal material microscopic morphology image to obtain N A grayscale image; Step 3, binarize each grayscale image and distinguish the matrix and dispersed phase with different colors; Step 4: N The binary grayscale image is processed by Gaussian filtering to reduce noise. N The image after noise reduction; Step 5: N The image after noise reduction is processed by morphological processing to obtain N A morphologically processed image; Step 6: Fill the holes that still exist in the image after morphological processing to obtain N A hole filling diagram; Step 7: N The dispersed phase in the hole filling image was extracted and ellipse fitted to obtain N Zhang fitted ellipse contour map; Step 8: N The fitted ellipse profile is used as the data set to calculate the size uniformity; Step 9: N The fitted ellipse contour map is used as the data set to calculate the distribution uniformity; Step 10: Comprehensively consider size uniformity and distribution uniformity to evaluate tissue uniformity.
2. A method for evaluating the uniformity of a metal material structure according to claim 1, characterized in that: Obtained as described in step 1 N The microscopic morphology image of the metal material is obtained by using a scanning electron microscope (SEM) and is obtained at the same magnification.
3. A method for evaluating the structural uniformity of a metal material according to claim 2, characterized in that: The content of step 2 is: grayscale processing is performed using the rgb2gary function in MATLAB to convert the microscopic morphology image of the RGB image into a grayscale image.
4. A method for evaluating the uniformity of a metal material structure according to claim 3, characterized in that: The content of step 3 is: threshold segmentation is performed on the grayscale image, the grayscale threshold is set to T, and if the grayscale value of the pixel in the grayscale image is ≤ the grayscale threshold T, the pixel is set to black; if the grayscale value of the pixel in the grayscale image is > the grayscale threshold T, the pixel is set to white; Let the black pixels be the matrix and the white pixels be the dispersed phase.
5. A method for evaluating the uniformity of a metal material structure according to claim 4, characterized in that: The standard deviation of the Gaussian filter in step S4 is 1.
5.
6. A method for evaluating the uniformity of a metal material structure according to claim 4, characterized in that: The morphological processing described in step 5 includes an erosion operation, a dilation operation, an opening operation, and a closing operation.
7. A method for evaluating the structural uniformity of a metal material according to claim 2, characterized in that: The specific contents of step 8 are: Step 8.1, according to the ellipse contour diagram, output the fitting ellipse parameters in each ellipse contour diagram; Step 8.2: Use the histogram to calculate the equivalent diameter distribution of the dispersed phase. The equivalent diameter is calculated as the average value of the major and minor axes of the fitted ellipse using the fitting function f(x) Fit the histogram, variable x is the fitting ellipse parameter corresponding to the horizontal axis of the histogram; Step 8.
3. Calculate the size uniformity of the dispersed phase , the calculation formula is as follows: , and is the dimensionless constant calculated from the fitting curve, , .
8. A method for evaluating the structural uniformity of a metal material according to claim 7, characterized in that: The specific contents of step 9 are: Step 9.1: Number the dispersed phases in the elliptical contour diagrams so that each elliptical contour diagram has k dispersed phase particles; Step 9.2: Segment the ellipse contour into k A block diagram; Step 9.3: Perform a quadratic fit on the dispersed phase in the block diagram to obtain k A block fitting graph; Step 9.4: Perform data statistics on the dispersed phase in each block fitting diagram, including the number of dispersed phases n And the distance from each dispersed phase to the center of the block fitting diagram D i , ; Step 9.5: Calculate the uniformity coefficient of the dispersed phase distribution , the calculation formula is as follows: , is the center distance of different dispersed phases in each block fitting diagram, ; Indicates distance D i The average value of It is the distance D i The standard deviation of Indicates distance D i the median; It is the distance The average value of It is the distance The standard deviation of .
9. A method for evaluating the structural uniformity of a metal material according to claim 8, characterized in that: Step 9.2 describes the process of segmenting the ellipse contour into k The segmentation rules are as follows: (1) Obtain the fitting center of the dispersed phase based on the ellipse fitting data; (2) Splice the original ellipse contour map into a 3×3 mosaic map by copying; (3) Use the fitting center of the initial dispersed phase as the block center and 300 pixels as the block side length to divide the mosaic map into blocks and obtain k A block diagram.
10. The method for evaluating the structural uniformity of a metal material according to claim 8, characterized in that: The specific content of step 10 is: It is an indicator for judging the uniformity of the tissue. , and is the weight coefficient, .
Citation Information
Patent Citations
Method for improving homogeneity of steel structure and equipment thereof
CN101885133A
Aluminum-made vertical heat sink device with high temperature distribution uniformity
CN103008041A