Method for identifying ferrite pearlite metallographic structure of steel
By preprocessing and feature extraction of steel metallographic images, ferrite grain distribution images including pearlite are determined, which solves the problem of inaccurate identification in the prior art, achieves higher accuracy recognition results, and meets the needs of quantitative analysis of microstructures.
Patent Information
- Application Number
- CN202510578082.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-05-07
AI Technical Summary
The prior art is difficult to accurately identify the metallographic structure of ferrite and pearlite in steel. It is mainly due to the influence of its morphology, brightness and texture characteristics due to factors such as sample preparation, corrosion type and corrosion time, resulting in inaccurate identification results of automated or semi-automated analysis tools.
By pre-processing the metallographic image to be detected, a metallographic binary image was obtained; the boundary between the pearlite region and the ferrite grains was extracted, and the pixel values of pixels at the same position were combined to determine the ferrite grain distribution image including the pearlite; the image was recognized to obtain the recognition results.
It improves the identification accuracy of ferrite and pearlite metallographic structures in steel, corrects the pseudo-boundary caused by ferrite grain adhesion or corrosion, enhances the analytical ability of complex structures, provides higher accuracy data references, and meets the needs of quantitative analysis of microstructures.
Smart Images

Figure CN120088493A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, specifically to the field of image processing technology, and more specifically to a method for identifying the ferrite-pearlite metallographic structure of steel. Background Art
[0002] With the rapid development of computer vision and image processing technologies, some automated or semi-automated metallographic structure analysis tools have emerged. These tools usually use digital image processing algorithms to process metallographic micrographs and extract features, so as to achieve automatic identification and analysis of the structure.
[0003] In the process of implementing the inventive concept, at least the following problems exist in the related art: The performance of ferrite and pearlite in micrographs is affected by factors such as specimen preparation, type of etchant, and etching time, and their morphological, brightness, and texture features may vary greatly. It is difficult for automated or semi-automated metallographic structure analysis tools to output accurate identification results based on simple gray-scale thresholds or texture analysis. Summary of the Invention
[0004] In view of the above problems, the present invention provides a method for identifying the ferrite-pearlite metallographic structure of steel.
[0005] According to a first aspect of the present invention, there is provided a method for identifying the ferrite-pearlite metallographic structure of steel, including: performing image preprocessing on a metallographic image to be detected to obtain a binary metallographic image; extracting the pearlite region in the binary metallographic image to obtain a pearlite region image; extracting the boundaries of ferrite grains in the binary metallographic image to obtain a grain boundary structure image; determining a ferrite grain distribution image including pearlite according to the pixel values of each pixel point with the same position in the pearlite region image and the grain boundary structure image; and performing identification on the ferrite grain distribution image to obtain an identification result.
[0006] According to an embodiment of the present invention, performing image preprocessing on a metallographic image to be detected to obtain a binary metallographic image includes: performing gray-scale processing on the metallographic image to be detected to obtain a gray-scale metallographic image; converting the gray-scale metallographic image into an initial binary metallographic image; and performing noise reduction processing on the initial binary metallographic image to obtain a binary metallographic image.
[0007] According to an embodiment of the present invention, converting the gray-scale metallographic image into an initial binary metallographic image includes: traversing each gray-scale threshold within the gray-scale range corresponding to the gray-scale metallographic image, and calculating the between-class variance of the pearlite region and the ferrite region under each gray-scale threshold; using the gray-scale threshold with the maximum between-class variance as the segmentation point, and dividing each pixel point of the gray-scale metallographic image according to the segmentation point to obtain an initial binary metallographic image.
[0008] According to an embodiment of the present invention, extracting the pearlite region in a metallographic binary image to obtain a pearlite region image includes: performing a morphological transformation on the metallographic binary image to remove the boundaries of ferrite grains in the metallographic binary image, obtaining an initial pearlite region image; performing feature enhancement on the pearlite region in the initial pearlite region image to obtain the pearlite region image.
[0009] According to an embodiment of the present invention, performing a morphological transformation on the metallographic binary image to remove the boundaries of ferrite grains in the metallographic binary image and obtain an initial pearlite region image includes: performing an erosion operation on the foreground elements in the metallographic binary image using a first structural element to obtain a morphological erosion image, where the foreground elements include the cementite region of the pearlite region and the boundaries of ferrite grains; performing a dilation operation on the pearlite region in the morphological erosion image using the first structural element to expand the pearlite region in the morphological erosion image and connect the gaps between the pearlite regions in the morphological erosion image, obtaining the initial pearlite region image.
[0010] According to an embodiment of the present invention, performing feature enhancement on the pearlite region in the initial pearlite region image to obtain a pearlite region image includes: in the initial pearlite region image, respectively determining the distance values between each pixel point in the pearlite region and the ferrite region; using the distance values as the gray values of each pixel point in the pearlite region to obtain a pearlite gray image; performing binarization processing on the pearlite gray image to obtain a binarized image; performing a dilation operation on the pearlite region in the binarized image using a second structural element to obtain the pearlite region image.
[0011] According to an embodiment of the present invention, extracting the boundaries of ferrite grains in a metallographic binary image to obtain a grain boundary structure image includes: performing a skeletonization process on the metallographic binary image to extract the grain boundary skeleton structure of ferrite grains, obtaining an initial grain boundary structure image; removing the noise in the initial grain boundary structure image to obtain the grain boundary structure image.
[0012] According to an embodiment of the present invention, removing the noise in the initial grain boundary structure image to obtain a grain boundary structure image includes: converting the grain boundary skeleton structure in the initial grain boundary structure image into a topological graph, where the topological graph includes multiple nodes and edges connecting each node; removing the hanging nodes and hanging edges in the topological graph according to the degrees of each node in the topological graph to obtain a new topological graph; determining the grain boundary structure image according to the new topological graph.
[0013] According to an embodiment of the present invention, the recognition result includes the steel grade; recognizing the ferrite grain distribution image to obtain a recognition result includes: determining the respective area ratios of the pearlite region and the ferrite region according to the pixel values of each pixel point in the ferrite grain distribution image; using the area ratios as the content ratio of pearlite and ferrite in the steel to determine the steel grade.
[0014] According to an embodiment of the present invention, the recognition result further includes the yield strength of the steel; recognizing the ferrite grain distribution image to obtain the recognition result, further including: determining the grain size of the ferrite grains according to the ferrite grain distribution image; and determining the yield strength of the steel according to the grain size.
[0015] According to an embodiment of the present invention, the metallographic image to be detected is preprocessed to obtain a binary metallographic image. For the obtained binary metallographic image, the pearlite region and the boundaries of the ferrite grains are respectively extracted therefrom. Then, according to the pixel values of the respective pixel points with the same positions in the pearlite region image and the grain boundary structure image, the ferrite grain distribution image including pearlite is determined, reducing the probability of misjudgment of the cementite lamellae caused by using a single threshold segmentation method or morphological method to process pearlite. By using the pixel values of the respective pixel points with the same positions in the pearlite region image and the grain boundary structure image to determine the ferrite grain distribution image including pearlite, the dual characteristics of the pearlite region and the ferrite grain boundaries are fused, which can correct the pseudo-boundaries caused by ferrite grain adhesion or corrosion, enhance the analysis ability for complex structures such as sub-grain boundaries and twin boundaries, restore the attribution relationship of the ferrite lamellae separated by the cementite lamellae, provide a higher-precision data reference for the quantitative analysis of the microstructure, and thus improve the accuracy of the recognition result. Brief Description of the Drawings
[0016] Through the following description of the embodiments of the present invention with reference to the drawings, the above content and other objects, features and advantages of the present invention will become clearer. In the drawings:
[0017] Figure 1 A diagram showing an application scenario of a method for recognizing the ferrite-pearlite metallographic structure of steel according to an embodiment of the present invention is shown.
[0018] Figure 2 A flowchart showing a method for recognizing the ferrite-pearlite metallographic structure of steel according to an embodiment of the present invention is shown.
[0019] Figure 3 A schematic diagram showing a metallographic image to be detected according to an embodiment of the present invention is shown.
[0020] Figure 4 A partial schematic diagram showing a metallographic image to be detected according to an embodiment of the present invention is shown.
[0021] Figure 5 A partial schematic diagram showing a binary metallographic image according to an embodiment of the present invention is shown.
[0022] Figure 6 A partial schematic diagram showing a pearlite region image according to an embodiment of the present invention is shown.
[0023] Figure 7Shows a partial schematic diagram of the grain boundary structure image according to an embodiment of the present invention.
[0024] Figure 8 Shows a partial schematic diagram of the ferrite grain distribution image according to an embodiment of the present invention.
[0025] Figure 9 Shows a block diagram of an electronic device suitable for implementing a method for identifying the ferrite-pearlite metallographic structure of steel according to an embodiment of the present invention. Detailed implementation manners
[0026] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In the following detailed description, for the sake of explanation, many specific details are set forth in order to provide a comprehensive understanding of the embodiments of the present invention. However, it is obvious that one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.
[0027] The terms used herein are merely for describing specific embodiments and are not intended to limit the present invention. The terms "including", "comprising", etc. used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0028] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0029] In the case of using expressions such as "at least one of A, B, and C, etc.", generally, it should be interpreted according to the meaning commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include, but is not limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0030] In the production and application processes of steel materials, the analysis of metallographic structure is of great significance for evaluating the mechanical properties, processing properties, and service life of materials. Especially for low-carbon and medium-carbon steels (such as 20 steel, 45 steel, etc.) with ferrite and pearlite as the main structures, their microstructural characteristics will directly affect the strength, plasticity, and toughness of the materials. Traditional metallographic structure analysis methods mainly rely on manual inspection, that is, professional personnel observe metallographic structure specimens under a microscope, manually identify and evaluate the proportion of ferrite and pearlite, the distribution of ferrite lamellae and cementite lamellae inside the pearlite, and the grain size of ferrite. However, this method has many deficiencies. First of all, manual analysis is limited by the experience and judgment of the operator, and the results may vary from person to person, with strong subjectivity, making it difficult to ensure the objectivity and consistency of the analysis results; secondly, the manual measurement and statistical processes are time-consuming and inefficient, and it is difficult to meet the need for rapid analysis of a large number of samples; finally, under complex structures or microstructures, it is difficult for humans to accurately distinguish adjacent structures, affecting the accuracy of the analysis results.
[0031] With the rapid development of computer vision and image processing technologies, some automated or semi-automated metallographic structure analysis tools have begun to appear. These tools usually use digital image processing algorithms to preprocess, segment, and extract features from metallographic micrographs, so as to achieve automatic recognition and analysis of the structure. For example, first perform preprocessing operations such as adjusting the contrast and brightness of the metallographic micrograph; then segment the preprocessed image to reduce the amount of data processed by the tool each time; finally, use a machine learning model to recognize the segmented image to obtain the corresponding recognition result.
[0032] However, the related technologies still have certain limitations. The performance of ferrite and pearlite in micrographs is affected by factors such as specimen preparation, type of etchant, and etching time, and their morphological, brightness, and texture characteristics may vary greatly, resulting in the image processing methods in the above-mentioned metallographic structure recognition tools often relying on simple gray-scale thresholds or texture analysis, and the accuracy of recognition is limited when recognizing metallographic images.
[0033] In the related technologies, the number of training samples of the machine learning model is increased to improve the accuracy of the recognition result. However, in practical applications, the methods of the related technologies take a long time and have little effect. For this reason, the embodiments of the present invention provide a method for recognizing the ferrite-pearlite metallographic structure of steel. The metallographic image to be detected is preprocessed to obtain a metallographic binary image; the pearlite region in the metallographic binary image is extracted to obtain a pearlite region image; the boundaries of ferrite grains in the metallographic binary image are extracted to obtain a grain boundary structure image; according to the pixel values of each pixel point with the same position in the pearlite region image and the grain boundary structure image, a ferrite grain distribution image including pearlite is determined; the ferrite grain distribution image is recognized to obtain a recognition result.
[0034] Figure 1 The figure shows an application scenario diagram of a method for identifying the ferrite-pearlite metallographic structure of steel according to an embodiment of the present invention.
[0035] As Figure 1 shown, the application scenario according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0036] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send data, information, etc. Various communication client applications, such as instant messaging tools, email clients, etc. (only as examples), may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
[0037] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices with a display screen, including but not limited to smartphones, tablets, laptop portable computers, and desktop computers, etc.
[0038] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides identification function support for the to-be-detected metallographic images sent by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process data such as received user requests, and feedback the processing results (such as identification results obtained according to user requests, etc.) to the terminal device.
[0039] It should be noted that the method for identifying the ferrite-pearlite metallographic structure of steel provided by the embodiments of the present invention can generally be executed by the server 105. The method for identifying the ferrite-pearlite metallographic structure of steel provided by the embodiments of the present invention can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0040] It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in
[0041] The following will be based on Figure 1 the described scenario, and will describe in detail the method for identifying the ferrite-pearlite metallographic structure of the steel in the invention embodiment through Figures 2 to 8 the following.
[0042] Figure 2 Fig. shows a flowchart of the method for identifying the ferrite-pearlite metallographic structure of the steel according to an embodiment of the present invention.
[0043] As Figure 2 shown, the method for identifying the ferrite-pearlite metallographic structure of the steel in this embodiment includes operation S210 to operation S250.
[0044] In operation S210, image preprocessing is performed on the metallographic image to be detected to obtain a binary metallographic image.
[0045] In operation S220, the pearlite region in the binary metallographic image is extracted to obtain a pearlite region image.
[0046] In operation S230, the boundaries of the ferrite grains in the binary metallographic image are extracted to obtain a grain boundary structure image.
[0047] In operation S240, according to the pixel values of the respective pixel points with the same positions in the pearlite region image and the grain boundary structure image, a ferrite grain distribution image including pearlite is determined.
[0048] In operation S250, the ferrite grain distribution image is identified to obtain an identification result.
[0049] According to an embodiment of the present invention, the metallographic image to be detected is a metallographic image obtained through standard sample preparation and microscope imaging processes, collected by a high-resolution optical microscope, and the image resolution can be 2560 × 1920 pixels. In the metallographic image to be detected, the microstructural characteristics of the steel present a typical ferrite-pearlite duplex structure. Among them, the ferrite grains are mainly distributed in the image as regions that are close to white and approximately convex, and the grains are clearly segmented by black (or dark) grain boundaries; the pearlite region is embedded in the ferrite matrix in a laminated sheet-like structure of black and white (or dark and light) alternating layers, showing a characteristic morphology of intertwined black layers (or dark layers) and white layers (or light layers). Among them, the black layers (or dark layers) in the pearlite region are cementite layers, and the white layers (or light layers) in the pearlite region are ferrite layers. Image preprocessing is performed on the metallographic image to be detected. For example, the noise in the metallographic image to be detected is removed, and the pixel values of the image to be detected are deformed to obtain a binary metallographic image.
[0050] According to the embodiments of the present invention, under different steel grades and different processing conditions, the widths, distribution densities, and contrasts of the individual lamellae in the pearlite region will exhibit certain slight differences, but their overall morphology still maintains high stability, providing the basic conditions for unified analysis and comparison. Based on the different characteristics presented by the boundaries between pearlite and ferrite grains microscopically, corresponding extraction methods are designed respectively, so as to extract the boundaries of the pearlite region and ferrite grains from the metallographic binary image respectively, thereby obtaining pearlite region images and grain boundary structure images with extremely high accuracy.
[0051] According to the embodiments of the present invention, when the pearlite region in the pearlite region image and the boundaries of ferrite grains in the grain boundary structure image are represented by pixel value "1", a logical OR operation is performed on the pixel values of the corresponding pixel points in the pearlite region image and the grain boundary structure image to obtain a ferrite grain distribution image including pearlite.
[0052] For example, if the pixel value of a pixel point in the pearlite region image or the grain boundary structure image at position is 1, then the pixel value of the pixel point at this position in the ferrite grain distribution image is also 1, indicating that this position belongs to the boundary of the pearlite region or ferrite grains. Determining the ferrite grain distribution image including pearlite according to the pixel values of the corresponding pixel points in the pearlite region image and the grain boundary structure image not only retains the structure of the complete grain boundary but also contains the distribution information of the pearlite region.
[0053] According to the embodiments of the present invention, when the pearlite region in the pearlite region image and the boundaries of ferrite grains in the grain boundary structure image are represented by pixel value "0", a logical AND operation is performed on the pixel values of the corresponding pixel points in the pearlite region image and the grain boundary structure image to obtain a ferrite grain distribution image including pearlite.
[0054] According to the embodiments of the present invention, the characteristics presented by the boundaries between the pearlite region and ferrite grains in the ferrite grain distribution image are identified to obtain an identification result, so as to determine a plurality of parameters for characterizing the properties of the steel.
[0055] According to an embodiment of the present invention, the metallographic image to be detected is preprocessed to obtain a metallographic binary image. For the obtained metallographic binary image, the pearlite region and the boundaries of ferrite grains are respectively extracted therefrom. Then, according to the pixel values of each pixel point with the same position in the pearlite region image and the grain boundary structure image, the ferrite grain distribution image including pearlite is determined. Since the pearlite region and the boundaries of ferrite grains are extracted separately, the probability of misjudgment of cementite lamellae caused by using a single threshold segmentation method or morphological method to process pearlite on the same picture to obtain the ferrite grain distribution image is reduced. By the pixel values of each pixel point with the same position in the pearlite region image and the grain boundary structure image, the ferrite grain distribution image including pearlite is determined, which integrates the dual characteristics of the pearlite region and the ferrite grain boundary, can correct the pseudo-boundaries caused by ferrite grain adhesion or corrosion, enhances the analytical ability for complex structures such as sub-grain boundaries and twin boundaries, restores the attribution relationship of ferrite lamellae separated by cementite lamellae, provides a higher-precision data reference for quantitative analysis of microstructures, and thus improves the accuracy of the recognition result.
[0056] Figure 3 FIG. shows a schematic diagram of the metallographic image to be detected according to an embodiment of the present invention.
[0057] As Figure 3 shown, 1 cm in the figure corresponds to 20 μm in reality. Ferrite grains are mainly distributed in the image as regions close to white and approximately convex in shape; the pearlite region is embedded in the ferrite matrix in a laminated sheet-like structure with alternating black sheets (or dark sheets) and white sheets (or light sheets). Among them, the laminated sheet-like structure of some pearlite regions is more obvious, and for some pearlite regions, at a lower image magnification, the characteristics of the laminated sheet-like structure cannot be directly observed by the naked eye.
[0058] Figure 4 FIG. shows a partial schematic diagram of the metallographic image to be detected according to an embodiment of the present invention.
[0059] As Figure 4 shown, ferrite grains are mainly distributed in the image as regions close to white and approximately convex in shape, and the grains are clearly segmented by black (or dark) grain boundaries; the pearlite structure is embedded in the ferrite matrix in a laminated sheet-like structure with alternating black sheets (or dark sheets) and white (or light sheets), showing a characteristic morphology of intertwined black sheets (or dark sheets) and white sheets (or light sheets). In pearlite, the black sheets (or dark sheets) are cementite lamellae, and the white sheets (or light sheets) are ferrite lamellae.
[0060] According to an embodiment of the present invention, image preprocessing is performed on the metallographic image to be detected to obtain a metallographic binary image, including: performing grayscale processing on the metallographic image to be detected to obtain a metallographic grayscale image; converting the metallographic grayscale image into an initial metallographic binary image; and performing noise reduction processing on the initial metallographic binary image to obtain the metallographic binary image.
[0061] According to an embodiment of the present invention, grayscale processing is performed on the metallographic image to be detected, and the values of each pixel point in the three color channels (RGB) of the image are converted into grayscale values, so as to obtain a metallographic grayscale image with only pixel grayscale information. By performing grayscale processing on the metallographic image to be detected to convert it into a metallographic grayscale image, the light and dark contrast in the metallographic image to be detected is retained. At the same time, the computational complexity is reduced by reducing the data complexity, making subsequent processing more efficient.
[0062] According to an embodiment of the present invention, there are various methods for converting a metallographic grayscale image into an initial metallographic binary image. For example, a fixed threshold method, an average value threshold method, a bimodal method, and the like.
[0063] Taking the example of using the fixed threshold method to convert a metallographic grayscale image into an initial metallographic binary image, a threshold for threshold segmentation of the metallographic grayscale image is set. According to the magnitude relationship between the grayscale values of each pixel point on the metallographic grayscale image and the threshold, each pixel point of the metallographic grayscale image is divided, so as to divide each pixel point of the metallographic grayscale image into two categories, one category is used to represent the boundaries of ferrite grains and the pearlite region, and the other category is used to represent ferrite, thereby obtaining the initial metallographic binary image.
[0064] For example, in a metallographic grayscale image with a range of 0 (black) to 255 (white), 150 can be set as the threshold for threshold segmentation of the metallographic grayscale image. The pixel points with grayscale values greater than 150 are determined to be white and used to represent ferrite; the pixel points with grayscale values less than or equal to 150 are determined to be white and used to represent the boundaries of ferrite grains and the pearlite region.
[0065] According to an embodiment of the present invention, for low-contrast pixel points introduced by a noise source, these noise points will affect the clarity of the grain boundaries of ferrite in details. By performing noise reduction processing on the initial metallographic binary image, a metallographic binary image can be obtained.
[0066] According to an embodiment of the present invention, for the metallographic binary image perform denoising processing, where x is the abscissa of the pixel point and y is the ordinate of the pixel point, mark the connected regions , where represents the index of each connected region, calculate the area of the connected region and preset an area threshold Any area less than of the connected region will be regarded as noise and removed, resulting in an image with clearer grain boundary details.
[0067] According to an embodiment of the present invention, the color metallographic image to be detected is converted into a metallographic grayscale image, and further the metallographic grayscale image is converted into an initial metallographic binary image to purify the information in the image by dimensionality reduction and feature focusing. Specifically, grayscale conversion first isolates noise sources such as uneven illumination and color interference, compresses the three-dimensional RGB image space into a one-dimensional image space, greatly reduces data redundancy, and at the same time weakens the noise complexity brought by multi-channel superposition. Converting the metallographic grayscale image into an initial metallographic binary image can separate the "ferrite" from the "boundary of ferrite grains and pearlite regions" in the image, simplify the image into a binary logic of black and white, thereby filtering out the fine noise that is difficult to define in the gray transition region, while retaining the overall coherence and structural integrity of the pearlite region, reducing information loss, and providing an initial metallographic binary image with more robust noise resistance performance for subsequent processing. By improving the robustness and accuracy of the initial metallographic binary image, the difficulty of subsequent noise reduction processing is reduced, and the accuracy of the metallographic binary image obtained after noise reduction is improved.
[0068] Figure 5 Fig. shows a partial schematic diagram of the metallographic binary image according to an embodiment of the present invention.
[0069] As Figure 5 shown, the pearlite region presents a lamellar structure in which ferrite lamellae (white) and cementite lamellae (black) are alternately distributed, showing a characteristic morphology of intertwined black and white lamellae in the figure. The metallographic binary image retains the fine lamellar structure characteristics in the pearlite region, that is, the pearlite region is a structure in which ferrite lamellae and cementite lamellae are alternately distributed.
[0070] According to an embodiment of the present invention, converting the metallographic grayscale image into an initial metallographic binary image includes: traversing each gray threshold within the gray range corresponding to the metallographic grayscale image, and calculating the between-class variance of the pearlite region and the ferrite region under each gray threshold; taking the gray threshold with the largest between-class variance as the segmentation point, and dividing each pixel point of the metallographic grayscale image according to the segmentation point to obtain the initial metallographic binary image.
[0071] According to an embodiment of the present invention, threshold segmentation is performed on the grayscale image of the metallograph based on the maximum between-class variance method. The gray value of each pixel in the metallographic grayscale image is used as the gray range of the metallographic grayscale image, and each gray threshold is traversed within this gray range to determine the between-class variance of the pearlite region and the ferrite region under each gray threshold. The ferrite region may include multiple ferrite grains.
[0072] According to an embodiment of the present invention, the grayscale threshold with the largest between-class variance is selected as the segmentation point to divide the image into a pearlite region and a ferrite region, thereby effectively separating the pearlite region and the ferrite region in the metallographic grayscale image and obtaining an initial binary image.
[0073] According to an embodiment of the present invention, the between-class variance reflects the degree of difference in grayscale distribution between the two regions of pearlite and ferrite after segmentation. When the difference between the two means is larger and the pixel distribution within each class is more concentrated, the between-class variance is larger. In the metallographic grayscale image, the grayscale distributions of pearlite and ferrite grains are significantly different: ferrite usually shows a relatively high grayscale distribution with a smaller grayscale range due to its single-phase structure, while pearlite has a broader overall grayscale distribution due to its alternating layered structure. By traversing all possible grayscale thresholds to calculate the between-class variance, the finally selected extreme point can be exactly located at the optimal statistical separation position of the two grayscale distributions, which not only maximally amplifies the contrast between single-phase ferrite grains and the two-phase pearlite region but also reduces the grayscale interference caused by the discrete distribution of cementite lamellae within the pearlite. Compared with the traditional fixed-threshold method, this method for obtaining the initial metallographic binary image reasonably utilizes the difference in grayscale distribution between the pearlite region and the ferrite region in the metallographic grayscale image, reduces the influence of uneven illumination or corrosion differences on the division of ferrite and pearlite, and can obtain a more accurate binary segmentation result in a complex metallographic structure, that is, obtain a more accurate initial metallographic binary image.
[0074] According to an embodiment of the present invention, the pearlite region in the metallographic binary image is extracted to obtain a pearlite region image, including: performing a morphological transformation on the metallographic binary image to remove the boundaries of ferrite grains in the metallographic binary image to obtain an initial pearlite region image; and enhancing the features of the pearlite region in the initial pearlite region image to obtain a pearlite region image.
[0075] According to an embodiment of the present invention, through morphological transformations such as erosion and dilation, the boundaries of ferrite grains in the metallographic binary image are removed to obtain an initial pearlite region image, where the boundaries of ferrite grains can appear as relatively narrow black structures in the metallographic binary image.
[0076] According to an embodiment of the present invention, to further improve the accuracy of the pearlite region in an image, feature enhancement is performed on the pearlite region in the initial pearlite region image. Specifically, the grain boundary noise or lamellar structure breakage remaining due to morphological transformation in the initial pearlite region image is eliminated, and the continuity of the pearlite microstructure is strengthened to obtain a more accurate pearlite region image. According to an embodiment of the present invention, by removing the boundaries of ferrite grains in the metallographic binary image, an initial pearlite region image is obtained. Feature enhancement is performed on the pearlite region in the initial pearlite region image to obtain a pearlite region image, effectively ensuring the accurate determination and retention of fine lamellar structures in the microstructure, and providing an accurate data basis for subsequent tissue quantitative analysis and performance prediction.
[0077] According to an embodiment of the present invention, morphological transformation is performed on the metallographic binary image to remove the boundaries of ferrite grains in the metallographic binary image and obtain an initial pearlite region image, including: performing an erosion operation on the foreground elements in the metallographic binary image using a first structural element to obtain a morphological erosion image, where the foreground elements include the cementite region in the pearlite region and the boundaries of ferrite grains; performing a dilation operation on the pearlite region in the morphological erosion image using the first structural element to expand the pearlite region in the morphological erosion image and connect the gaps between the pearlite regions in the morphological erosion image to obtain an initial pearlite region image.
[0078] According to an embodiment of the present invention, the cementite region is the region where multiple cementite lamellae are located. The first structural element can be a circular structure, and the radius of the first structural element is set according to the boundary width of the ferrite grains. In the case where the grain boundary presents as a narrow structure that is slender and has a maximum width not exceeding 10 pixels, a first structural element with a radius of 8 pixels can be used to perform morphological transformation to effectively remove narrow features with a width less than 2 8 = 16 pixels and clear the boundaries of ferrite grains.
[0079] According to an embodiment of the present invention, for the metallographic binary image perform an erosion operation, and the first structural element is translated at a certain position to obtain a corresponding region , and when the first structural element is completely contained in the metallographic binary image , it can be expressed as . After the translation of the first structural element is completed, a morphological erosion image is obtained.
[0080] According to an embodiment of the present invention, after the erosion operation is completed, the pearlite region will be reduced. An expansion operation is performed on the morphological erosion image. The expansion operation applies a first structural element to the pixels connected to the pearlite region in the morphological erosion image, that is, the first structural element is translated to a certain position and then the intersection with the morphological erosion image is obtained, resulting in the result after expansion at the position After the first structure is translated, the initial pearlite region image is obtained. The pearlite region in the morphological erosion image is expanded, and the gaps between the pearlite regions in the morphological erosion image are connected, making the microstructure in the initial pearlite region more coherent.
[0081] According to an embodiment of the present invention, performing an erosion operation on the metallographic binary image first and then an expansion operation can remove noise and small-area interference while retaining the main structural features of the pearlite region, which helps to improve the accuracy of metallographic structure recognition and avoid information loss caused by overprocessing.
[0082] According to an embodiment of the present invention, feature enhancement is performed on the pearlite region in the initial pearlite region image to obtain a pearlite region image, including: in the initial pearlite region image, the distance values between each pixel point in the pearlite region and the ferrite region are respectively determined; the distance values are used as the gray values of each pixel point in the pearlite region to obtain a pearlite gray image; the pearlite gray image is binarized to obtain a binary image; a second structural element is used to perform an expansion operation on the pearlite region in the binary image to obtain a pearlite region image.
[0083] According to an embodiment of the present invention, distance transformation is performed on each pixel point in the pearlite region of the initial pearlite region image. By calculating the shortest distance between the pixel points in the pearlite region and the ferrite region, the distance values of each pixel point in each pearlite region are obtained.
[0084] According to an embodiment of the present invention, when the pixel value of the pearlite region in the initial pearlite region image is 1 and the pixel value of the ferrite region is 0, the pixel point in the pearlite region is calculated and the pixel point in the ferrite region The Euclidean distance between them, where the Euclidean distance can be expressed by the following formula (1):
[0085] (1);
[0086] where is the Euclidean distance between pixel point and pixel point ; is the abscissa of pixel point ; is the ordinate of the pixel point ; is the abscissa of the pixel point ; is the ordinate of the pixel point ;
[0087] According to an embodiment of the present invention, the set of pixel points in the ferrite region is , and the minimum Euclidean distance between the set and the pixel point is used as the distance value, where the distance value can be represented by the following formula (2):
[0088] (2);
[0089] wherein, represents the distance value; represents that the pixel point belongs to the set .
[0090] According to an embodiment of the present invention, the distance value of each pixel point is used as the gray value to obtain a pearlite gray image. In the case where the distance from the pixel point in a certain pearlite region to the pixel point in the ferrite region exceeds the truncation threshold, the distance value of the pixel is set to the truncation threshold, wherein the truncation threshold can be set to be the same as the radius of the second structural element, and the truncation threshold can be set to 12 pixels to reduce the calculation amount and reduce the noise sensitivity of the pearlite gray image.
[0091] According to an embodiment of the present invention, according to the pixel values of each pixel point in the pearlite gray image, the pearlite gray image is converted into a binary image with a clear shape contour. For example, the pearlite gray image can be threshold-segmented by the maximum inter-class variance method, and the pixel values of the pixel points on the pearlite gray image are adjusted to 0 or 1 to obtain a binary image.
[0092] According to an embodiment of the present invention, in the process of binaryzation, the truncation threshold method can be used to convert the pearlite gray image into a binary image according to the pixel values of each pixel point in the pearlite gray image. For example, in the case where the pixel value of a certain pixel point is greater than a certain preset threshold, its pixel value is adjusted to 1, and in the case where the pixel value of a certain pixel point is greater than a certain preset threshold, its pixel value is adjusted to 0.
[0093] According to an embodiment of the present invention, the pearlite region in the binary image is subjected to a dilation processing operation by using a second structural element, wherein the second structural element can be a circular structure; since the pearlite lamellar thickness is about 0.1 to 1 micron, the radius of the second structural element can be 12 pixels. The second structural element The center moves among each pixel of the binary image. If any element of the second structural element overlaps with the element of the pearlite region in the binary image, then the pixel value of the pixel at this coordinate position in the pearlite region image is 1 or 0, representing the pearlite region in the pearlite region image. The dilation operation expands the edge of the pearlite region.
[0094] According to an embodiment of the present invention, when 12 pixels correspond to an actual physical scale of about 1 micron, assuming that the thickness of the lamellae in the pearlite region image does not exceed 2 microns, the lamellar structure in the pearlite region image can be recognized as pearlite lamellae, effectively ensuring the accurate determination and retention of the fine lamellar structure in the microstructure, and providing more accurate basic data for subsequent quantitative analysis of the metallographic structure and performance prediction. According to an embodiment of the present invention, by calculating the distance value between each pixel point in the pearlite region and the ferrite region, the boundary information of the pearlite region can be highlighted, and this processing can clearly reflect the boundary characteristics of the pearlite region. Taking the distance value as the gray value of each pixel point in the pearlite region, a pearlite gray image is obtained, where the level of the gray value reflects the distance relationship between the pixel point and the ferrite region. The pearlite gray image can intuitively display the distribution and morphology of the pearlite region, facilitating subsequent processing and analysis. Performing binary processing on the pearlite gray image can convert the gray image into a binary image, thereby clearly distinguishing the pearlite region and the background region, removing unnecessary details and noise. Using the second structural element to perform a dilation operation on the pearlite region in the binary image can expand the pearlite region and fill the gaps between the cementite lamellae, enhance the connectivity of the pearlite region, reduce the probability of situations such as regional fracture caused by binary processing, and at the same time restore some regions lost due to distance transformation and binary processing. Through distance transformation, binary processing, and dilation operations, the integrity and continuity of the pearlite region can be improved, which helps to more accurately analyze the morphology and distribution of the pearlite region.
[0095] Figure 6 shows a partial schematic diagram of the pearlite region image according to an embodiment of the present invention.
[0096] As Figure 6 shown, the pearlite region originally presented a structure with alternating ferrite lamellae and cementite lamellae. After feature enhancement, each pixel point in the pearlite region is converted into the same pixel value.
[0097] According to an embodiment of the present invention, the boundaries of ferrite grains in a metallographic binary image are extracted to obtain a grain boundary structure image, including: performing a skeletonization process on the metallographic binary image to extract the grain boundary skeleton structure of ferrite grains, obtaining an initial grain boundary structure image; removing noise in the initial grain boundary structure image to obtain the grain boundary structure image.
[0098] According to an embodiment of the present invention, during the skeletonization process, the grain boundary skeleton structure of ferrite grains can be extracted by using a thinning algorithm. This method removes edge pixels in the image through multiple iterations, making the grain boundary structure of the image gradually appear. The thinning algorithm can preserve the connectivity and structural features of the grain boundaries, while reducing redundant edge parts, obtaining a simplified boundary of ferrite grains, thereby obtaining the initial grain boundary structure image.
[0099] According to an embodiment of the present invention, different conditions are alternately applied during the iteration process to delete boundary pixels that meet the conditions; it is necessary to ensure that only pixels that meet specific conditions are deleted in each iteration to prevent the disconnection of the grain boundary structure. Alternately deleting boundary points at different positions can make the skeleton in the middle as much as possible, ensuring that the connectivity of the image is not damaged and maintaining the basic shape and structure of the image.
[0100] According to an embodiment of the present invention, in the initial grain boundary structure image, the boundaries of ferrite grains appear as connected edges. In addition, there are often some noises on the boundaries of ferrite grains, which appear as edges similar to burrs in the graph structure of the boundaries of ferrite grains. By removing the edges that do not belong to the grain boundary skeleton structure in the initial grain boundary structure image, the noise in the initial grain boundary structure image is removed to obtain the grain boundary structure image.
[0101] According to an embodiment of the present invention, skeletonization thins the boundaries of ferrite grains to single-pixel-width lines, simplifies the complex grain boundary structure. The simplified grain boundary structure is easier to analyze and process, providing a clear basis for subsequent recognition. While skeletonization simplifies the grain boundary structure, it preserves the topological structure and connectivity of ferrite grains. Preserving the topological structure helps to accurately analyze the distribution and shape of ferrite grains. Removing the noise in the skeletonized image and retaining the main grain boundary skeleton structure, the denoised grain boundary structure image is more pure, reducing the interference of noise on subsequent analysis and improving the accuracy of the distribution and shape of ferrite grains in the grain boundary structure image.
[0102] Figure 7 A partial schematic diagram of a grain boundary structure image according to an embodiment of the present invention is shown.
[0103] As Figure 7 shown, the grain boundary structure image is the grain boundary skeleton structure of ferrite grains without considering the influence of pearlite, wherein the grain boundary skeleton structure is a single pixel with a pixel value of 0.
[0104] According to an embodiment of the present invention, removing noise from an initial grain boundary structure image to obtain a grain boundary structure image includes: converting the grain boundary skeleton structure in the initial grain boundary structure image into a topological graph, where the topological graph includes a plurality of nodes and edges connecting each node; removing hanging nodes and hanging edges in the topological graph according to the degrees of each node in the topological graph to obtain a new topological graph; and determining the grain boundary structure image according to the new topological graph.
[0105] According to an embodiment of the present invention, in the grain boundary skeleton structure image, detecting the intersection points of the lines formed by the boundaries of ferrite grains, and these intersection points serve as the nodes of the topological graph. Detecting the endpoints of the lines in the initial grain boundary structure image, and these endpoints also serve as the nodes of the topological graph. Each node is represented as an independent point in the topological graph, usually including its coordinate information in the initial grain boundary structure image.
[0106] According to an embodiment of the present invention, in the grain boundary skeleton structure, extracting the line segments formed by the boundaries of ferrite grains connecting two nodes, and taking these line segments as the edges of the topological graph. Combining the extracted nodes and edges into a graph structure to obtain the topological graph.
[0107] According to an embodiment of the present invention, in the process of converting the grain boundary skeleton structure in the initial grain boundary structure image into a topological graph, the nodes of the topological graph can be determined according to the pixel values of the pixel points in the eight directions of each pixel point.
[0108] For example, when the pixel point a belongs to the grain boundary skeleton structure and the pixel value of the pixel point a is 1, judging the pixel values of the pixel points adjacent to the pixel point a in the eight directions of up, down, left, right, upper left, upper right, lower left, and lower right. If among the eight directions, the pixel value of one of the pixel points adjacent to the pixel point a is the same as the pixel value of the pixel point a, then the pixel point a is an endpoint and also a node; if among the eight directions, the pixel values of three or more adjacent pixel points are the same as the pixel value of the pixel point a, then the pixel point a is an intersection point and also a node.
[0109] According to an embodiment of the present invention, a hanging node is a node with a degree of 1 in the topological graph; a hanging edge is an edge connected to a hanging node in the topological graph. Removing the hanging nodes and hanging edges in the topological graph according to the degrees of each node in the topological graph to obtain a new topological graph. It is possible to traverse each edge. For each edge, determine whether the edge is a hanging edge according to the degrees of the two nodes connecting the edge. Specifically, when the degree of one of the nodes is 1, determine the edge as a hanging edge to obtain a set including each hanging edge. Delete the edges in the set in the topological graph.
[0110] According to an embodiment of the present invention, in the topological graph after deleting the edges, traverse each node, determine all the nodes with a degree of 0, and delete the nodes with a degree of 0. Obtain a new topological graph.
[0111] According to an embodiment of the present invention, a grain boundary structure image is determined based on nodes and edges in a new topological graph. For example, based on the coordinate information of the nodes in the topological graph and the relationship between the edges and the nodes, the structures to be retained in the initial grain boundary structure image are determined, and a grain boundary structure image is obtained.
[0112] According to an embodiment of the present invention, the initial grain boundary structure image is transformed into a topological graph that can be quantitatively calculated. By removing the hanging nodes and hanging edges in the topological graph, a new topological graph is obtained to determine the grain boundary structure image, simplifying the complexity of the grain boundary skeleton structure and improving the processing efficiency.
[0113] According to an embodiment of the present invention, the recognition result includes the steel grade; the ferrite grain distribution image is recognized to obtain the recognition result, including: according to the pixel values of each pixel point in the ferrite grain distribution image, the respective area ratios of the pearlite region and the ferrite region are determined; the area ratios are used as the content ratio of pearlite and ferrite in the steel, and the steel grade is determined.
[0114] According to an embodiment of the present invention, the pixel value of the pixel point in the pearlite region , and the pixel value of the pixel point in the ferrite region . In the case where, that is, the pixel value of the pixel point in the pearlite region is represented by "1", and the pixel value of the pixel point in the ferrite region is represented by "0", the total number of pixels in the pearlite region , the total number of pixels of the ferrite grains . It can be calculated that the proportion of the pearlite region is , that is, the area ratio of the pearlite region is ; the proportion of the ferrite grains is , that is, the area ratio of the ferrite region is . Among them, is a variable representation of the coordinates of the pixel point and does not indicate a specific pixel point.
[0115] According to an embodiment of the present invention, the steel grade is the type of steel, and the classification of the steel grade is mainly based on its carbon content. Steel grades are usually divided into low-carbon steel (carbon content less than 0.25 ), medium-carbon steel (carbon content 0.25 to 0.60 ), and high-carbon steel (carbon content higher than 0.60 ). In the microstructure of the steel, the pearlite region is formed by the alternating arrangement of ferrite lamellae and cementite lamellae, and the average carbon content of the pearlite region is about 0.77 . Ferrite contains almost no carbon. By analyzing the content ratio of pearlite and ferrite, the carbon content of the steel is inferred, thereby determining the steel grade to which it belongs.
[0116] According to an embodiment of the present invention, through image processing technology, the area ratios of pearlite and ferrite can be quickly calculated, avoiding the time-consuming processes of traditional chemical analysis or metallographic analysis. Combining computer vision and image processing algorithms can achieve automated analysis and reduce human errors.
[0117] According to an embodiment of the present invention, the recognition result further includes the yield strength of the steel; recognizing the ferrite grain distribution image to obtain the recognition result, further including: determining the grain size of the ferrite grains according to the ferrite grain distribution image; and determining the yield strength of the steel according to the grain size.
[0118] According to an embodiment of the present invention, the mechanical properties of steel are closely related to its microstructure. An increase in the pearlite content generally increases the strength and hardness of the steel, but may reduce its plasticity and toughness. In addition, the size of ferrite grains also has a significant impact on the properties of steel. According to the Hall-Petch relationship, the yield strength of the material The relationship with the average diameter d of ferrite grains can be expressed by the following formula (3):
[0119] (3);
[0120] where is the lattice friction resistance generated when moving a single dislocation, and are constants. This formula shows that the smaller the size of ferrite grains, the higher the yield strength of the material. The strength of steel can be improved by refining ferrite grains.
[0121] By providing the content ratio of pearlite and ferrite and the size of ferrite grains, materials science researchers and engineers can quantitatively evaluate and predict the properties of steel. This has important guiding significance for the design, manufacturing, and application of steel.
[0122] Figure 8 FIG. shows a partial schematic diagram of a ferrite grain distribution image according to an embodiment of the present invention.
[0123] As Figure 8 shown, the pearlite region in the pearlite region image and the boundaries of ferrite grains in the grain boundary structure image are represented by the pixel value "0". Perform a logical AND operation on the pixel values of each pixel point with the same position in the pearlite region image and the grain boundary structure image. For example, if the pixel value of a pixel point in the pearlite region map or the grain boundary structure map is 0, then the pixel value of the pixel point at that position in the ferrite grain distribution image is also 0, indicating that the position belongs to the pearlite region or the boundary of ferrite grains. Traverse each pixel point to obtain a ferrite grain distribution image including pearlite.
[0124] Figure 9 A block diagram of an electronic device suitable for implementing a method for identifying the ferrite-pearlite metallographic structure of steel according to an embodiment of the present invention is shown.
[0125] As Figure 9 shown, the electronic device according to an embodiment of the present invention includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage section 908 into a random access memory (RAM) 903. The processor 901 can include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application-specific integrated circuit (ASIC)), etc. The processor 901 can also include on-board memory for caching purposes. The processor 901 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.
[0126] In the RAM 903, various programs and data required for the operation of the electronic device are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method flow according to an embodiment of the present invention by executing the program in the ROM 902 and / or the RAM 903. It should be noted that the program can also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 can also perform various operations of the method flow according to an embodiment of the present invention by executing the program stored in one or more memories.
[0127] According to an embodiment of the present invention, the electronic device can further include an input / output (I / O) interface 905, and the input / output (I / O) interface 905 is also connected to the bus 904. The electronic device can further include one or more of the following components connected to the input / output (I / O) interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the input / output (I / O) interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read from it can be installed into the storage section 908 as needed.
[0128] The present invention also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present invention is implemented.
[0129] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include the above-described ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903.
[0130] An embodiment of the present invention further includes a computer program product, which includes a computer program that contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the method for identifying the ferrite-pearlite metallographic structure of steel provided by the embodiments of the present invention.
[0131] When the computer program is executed by the processor 901, the above functions defined in the system / apparatus of the embodiments of the present invention are executed. According to an embodiment of the present invention, the above-described systems, apparatuses, modules, units, etc. may be implemented by computer program modules.
[0132] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and be downloaded and installed through the communication part 909, and / or be installed from the removable medium 911. The program code included in the computer program may be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0133] In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, the above functions defined in the system of the embodiments of the present invention are executed. According to the embodiments of the present invention, the systems, devices, apparatuses, modules, units, etc. described above can be implemented by computer program modules.
[0134] According to the embodiments of the present invention, the program code for executing the computer program provided by the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The programming languages include but are not limited to, such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0136] Those skilled in the art can understand that the features described in the various embodiments of the present invention can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present invention.
[0137] The embodiments of the present invention have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments have been described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present invention, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present invention.
Claims
1. A method for identifying the ferrite pearlite metallographic structure of steel, characterized in that: The method comprises: Perform image preprocessing on the metallographic image to be inspected to obtain a metallographic binary image; Extracting the pearlite region in the metallographic binary image to obtain a pearlite region image; Extracting the boundaries of ferrite grains in the metallographic binary image to obtain a grain boundary structure image; Determine a ferrite grain distribution image including pearlite according to the pixel values of each pixel point at the same position in the pearlite region image and the grain boundary structure image; The ferrite grain distribution image is identified to obtain an identification result.
2. The method according to claim 1, characterized in that The method of performing image preprocessing on the metallographic image to be detected to obtain a metallographic binary image comprises: Performing grayscale processing on the metallographic image to be detected to obtain a metallographic grayscale image; Converting the metallographic grayscale image into an initial metallographic binary image; The initial metallographic binary image is subjected to noise reduction processing to obtain the metallographic binary image.
3. The method according to claim 2, characterized in that The step of converting the metallographic grayscale image into an initial metallographic binary image comprises: Traversing each grayscale threshold within the grayscale range corresponding to the metallographic grayscale image, and calculating the inter-class variance of the pearlite region and the ferrite region under each grayscale threshold; The grayscale threshold with the largest inter-class variance is used as a segmentation point, and each pixel point of the metallographic grayscale image is divided according to the segmentation point to obtain the initial metallographic binary image.
4. The method according to claim 1, characterized in that: The step of extracting the pearlite region in the metallographic binary image to obtain the pearlite region image comprises: Performing morphological transformation on the binary metallographic image to remove the boundaries of ferrite grains in the binary metallographic image to obtain an initial pearlite region image; The pearlite region in the initial pearlite region image is feature enhanced to obtain a pearlite region image.
5. The method according to claim 4, characterized in that The step of performing morphological transformation on the binary metallographic image to remove the boundaries of ferrite grains in the binary metallographic image to obtain an initial pearlite region image includes: Using the first structural element to perform an erosion operation on the foreground element in the metallographic binary image to obtain a morphological erosion image, wherein the foreground element includes a cementite region of a pearlite region and a boundary of the ferrite grain; The first structure element is used to perform a dilation operation on the pearlite region in the morphological erosion image to expand the pearlite region in the morphological erosion image and connect the gaps between the pearlite regions in the morphological erosion image to obtain the initial pearlite region image.
6. The method according to claim 4, characterized in that The step of enhancing the features of the pearlite region in the initial pearlite region image to obtain the pearlite region image comprises: In the initial pearlite region image, respectively determine the distance value between each pixel point in the pearlite region and the ferrite region; use the distance value as the grayscale value of each pixel point in the pearlite region to obtain a pearlite grayscale image; Binarizing the pearlite grayscale image to obtain a binary image; The pearlite region in the binary image is expanded by using the second structure element to obtain the pearlite region image.
7. The method according to claim 1, characterized in that The step of extracting the boundaries of ferrite grains in the metallographic binary image to obtain a grain boundary structure image includes: Performing skeleton processing on the metallographic binary image to extract the grain boundary skeleton structure of the ferrite grains and obtain an initial grain boundary structure image; The noise in the initial grain boundary structure image is removed to obtain the grain boundary structure image.
8. The method according to claim 7, characterized in that The removing noise from the initial grain boundary structure image to obtain the grain boundary structure image comprises: Converting the grain boundary skeleton structure in the initial grain boundary structure image into a topological graph, wherein the topological graph includes a plurality of nodes and edges connecting the nodes; According to the degree of each of the nodes in the topological graph, removing the hanging nodes and the hanging edges in the topological graph to obtain a new topological graph; The grain boundary structure image is determined according to the new topological map.
9. The method according to any one of claims 1 to 8, characterized in that: The identification result includes steel type; The identifying of the ferrite grain distribution image to obtain an identification result includes: Determining the area proportions of the pearlite region and the ferrite region according to the pixel value of each pixel point in the ferrite grain distribution image; The area ratio is used as the content ratio of pearlite to ferrite in the steel to determine the steel grade.
10. The method according to any one of claims 1 to 8, characterized in that: The identification result also includes the yield strength of the steel; The identifying the ferrite grain distribution image to obtain an identification result further includes: Determining the grain size of ferrite grains according to the ferrite grain distribution image; The yield strength of the steel material is determined according to the grain size.
Citation Information
Patent Citations
Image recognition method and device for ferrite in chromium alloy steel
CN112906639A
Metallographic grain boundary extraction and communication method based on deep learning
CN113506240A
Metallographic structure grain boundary extraction method based on pixel relation
CN114782473A
Application of Seg-Net model-based extraction method in extraction of steel microstructure characteristics
CN118298191A
High-precision detection method and device for stains in near-optical region of contact lens casting mold
CN119827516A
Cited By
Boride identification method, system and related device
CN121170265A