Identification method of ferrite and pearlite metallographic structure of steel
By preprocessing and extracting features from metallographic images and identifying the distribution of ferrite and pearlite, the problem of inaccurate identification in existing tools is solved, achieving higher-precision microstructure analysis.
Patent Information
- Application Number
- CN202510578082.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-05-07
AI Technical Summary
Existing automated or semi-automated metallographic analysis tools have difficulty accurately identifying the morphology, brightness and texture characteristics of ferrite and pearlite. Factors such as sample preparation, corrosive agent type and corrosion time can lead to inaccurate identification results.
By performing image preprocessing on the metallographic image to be inspected, a metallographic binary image is obtained; the boundaries of the pearlite region and the ferrite grains are extracted, and the pixel values of the pixels at the same position in the pearlite region image and the grain boundary structure image are used to determine the ferrite grain distribution image, which is then identified in combination with a machine learning model.
It improves the accuracy of ferrite and pearlite identification, reduces the probability of misidentification of cementite lamellae, enhances the ability to analyze complex structures, and provides more accurate microstructure analysis data.
Smart Images

Figure CN120088493B_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 begun to emerge. These tools generally use digital image processing algorithms to process and extract features from metallographic micrographs, thereby achieving automatic identification and analysis of structures.
[0003] In the process of realizing the concept of the present invention, there are at least the following problems in the related art: the performance of ferrite and pearlite in microscopic images is affected by factors such as sample preparation, corrosive agent type and corrosion time, and their morphology, brightness and texture characteristics may vary greatly. It is difficult for automated or semi-automated metallographic structure analysis tools to output accurate identification results based on simple grayscale threshold or texture analysis. Summary of the Invention
[0004] In view of the above problems, the present invention provides a method for identifying the ferrite and pearlite metallographic structures of steel.
[0005] According to a first aspect of the present invention, a method for identifying the ferrite-pearlite metallographic structure of steel is provided, comprising: performing image preprocessing on a metallographic image to be detected to obtain a metallographic binary image; extracting a 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; determining a ferrite grain distribution image including pearlite based on the pixel values of each pixel point at the same position in the pearlite region image and the grain boundary structure image; and identifying the ferrite grain distribution image to obtain an identification result.
[0006] 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: grayscale processing is performed on the metallographic image to be detected to obtain a metallographic grayscale image; the metallographic grayscale image is converted into an initial metallographic binary image; and noise reduction is performed on the initial metallographic binary image to obtain a metallographic binary image.
[0007] According to an embodiment of the present invention, a metallographic grayscale image is converted into an initial metallographic binary image, including: 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; taking the grayscale threshold with the largest inter-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.
[0008] 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 performing feature enhancement on the pearlite region in the initial pearlite region image to obtain a pearlite region image.
[0009] According to an embodiment of the present invention, a morphological transformation is performed on a metallographic binary image to remove the boundaries of ferrite grains in the metallographic binary image to obtain an initial pearlite region image, including: using a first structuring element to perform an erosion operation on foreground elements in the metallographic binary image to obtain a morphological erosion image, wherein the foreground elements include cementite regions in the pearlite region and the boundaries of ferrite grains; using the first structuring element to perform an expansion 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.
[0010] According to an embodiment of the present invention, the features of the pearlite region in the initial pearlite region image are enhanced to obtain a pearlite region image, including: 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 grayscale values of each pixel point in the pearlite region to obtain a pearlite grayscale image; binarizing the pearlite grayscale image to obtain a binary image; and using a second structuring element to perform an expansion operation on the pearlite region in the binary image to obtain a pearlite region image.
[0011] 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: skeletonizing the metallographic binary image to extract the grain boundary skeleton structure of the ferrite grains to obtain an initial grain boundary structure image; and removing noise in the initial grain boundary structure image to obtain a grain boundary structure image.
[0012] According to an embodiment of the present invention, noise in an initial grain boundary structure image is removed to obtain a grain boundary structure image, including: converting the grain boundary skeleton structure in the initial grain boundary structure image into a topological graph, wherein the topological graph includes multiple nodes and edges connecting each node; removing hanging nodes and hanging edges in the topological graph according to the degree 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.
[0013] According to an embodiment of the present invention, the recognition result includes the steel type; the ferrite grain distribution image is recognized to obtain the recognition result, including: determining the area ratio of the pearlite area and the ferrite area according to the pixel value of each pixel point in the ferrite grain distribution image; using the area ratio as the content ratio of pearlite to ferrite in the steel to determine the steel type.
[0014] According to an embodiment of the present invention, the recognition result also includes the yield strength of the steel; the ferrite grain distribution image is recognized to obtain the recognition result, which also includes: determining the grain size of the ferrite grains based on the ferrite grain distribution image; and determining the yield strength of the steel based on the grain size.
[0015] According to an embodiment of the present invention, a metallographic image to be inspected is preprocessed to obtain a metallographic binary image. From the obtained metallographic binary image, the boundaries of the pearlite region and the ferrite grains are extracted respectively. Then, based on the pixel values of each pixel at the same position in the pearlite region image and the grain boundary structure image, a ferrite grain distribution image including pearlite is determined. This reduces the probability of misidentification of cementite lamellae caused by using a single threshold segmentation method or morphological method to process pearlite. The ferrite grain distribution image including pearlite is determined based on the pixel values of each pixel at the same position in the pearlite region image and the grain boundary structure image. This integrates the dual features of the pearlite region and the ferrite grain boundaries, corrects pseudo-boundaries caused by ferrite grain adhesion or corrosion, enhances the ability to analyze complex structures such as subgrain boundaries and twin boundaries, and restores the attribution relationship of ferrite lamellae separated by cementite lamellae, providing a more accurate data reference for quantitative analysis of microstructures, thereby improving the accuracy of recognition results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above contents and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:
[0017] Figure 1 A diagram showing an application scenario of the method for identifying the ferrite-pearlite metallographic structure of steel according to an embodiment of the present invention is shown.
[0018] Figure 2 A flow chart of a method for identifying the ferrite-pearlite metallographic structure of steel according to an embodiment of the present invention is shown.
[0019] Figure 3 A schematic diagram of a metallographic image to be detected according to an embodiment of the present invention is shown.
[0020] Figure 4 A partial schematic diagram of a metallographic image to be detected according to an embodiment of the present invention is shown.
[0021] Figure 5 A partial schematic diagram of a metallographic binary image according to an embodiment of the present invention is shown.
[0022] Figure 6 A partial schematic diagram of an image of a pearlite region according to an embodiment of the present invention is shown.
[0023] Figure 7A partial schematic diagram of a grain boundary structure image according to an embodiment of the present invention is shown.
[0024] Figure 8 FIG. 4 is a partial schematic diagram showing a ferrite grain distribution image according to an embodiment of the present invention.
[0025] Figure 9 A block diagram of an electronic device suitable for implementing a method for identifying ferrite-pearlite metallographic structures of steel according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[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 exemplary only and are not intended to limit the scope of the present invention. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of embodiments of the present invention. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concept of the present invention.
[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present invention. The terms "comprise", "include", etc. used herein indicate the presence of the 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] When expressions such as "at least one of A, B, and C, etc." are used, they should generally be interpreted in accordance with 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 A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0030] In the production and application of steel, metallographic analysis is crucial for assessing the mechanical properties, processing performance, and service life of materials. This is particularly true for low- and medium-carbon steels (such as 20 steel and 45 steel), whose microstructural characteristics are primarily composed of ferrite and pearlite. These microstructural characteristics directly impact the material's strength, ductility, and toughness. Traditional metallographic analysis methods rely primarily on manual inspection, where professionals observe metallographic specimens under a microscope to manually identify and assess the ferrite-pearlite ratio, the distribution of ferrite and cementite lamellae within the pearlite, and the ferrite grain size. However, this method has several drawbacks. First, manual analysis is limited by the operator's experience and judgment, resulting in individual variability and subjectivity, making it difficult to guarantee objectivity and consistency. Second, manual measurement and statistical analysis processes are time-consuming and inefficient, making them inefficient for rapid analysis of large numbers of samples. Finally, in complex microstructures or structures, manual analysis can be difficult to accurately distinguish between adjacent structures, impacting the accuracy of the analysis results.
[0031] With the rapid development of computer vision and image processing technologies, a number of automated or semi-automated metallographic structure analysis tools have begun to emerge. These tools typically utilize digital image processing algorithms to preprocess, segment, and extract features from metallographic micrographs, enabling automated identification and analysis of structures. For example, preprocessing operations such as adjusting the contrast and brightness of the metallographic micrographs are first performed. The preprocessed images are then segmented to reduce the amount of data processed by the tool each time. Finally, machine learning models are used to identify the segmented images and generate the corresponding recognition results.
[0032] However, the relevant technology still has certain limitations. The appearance of ferrite and pearlite in microscopic images is affected by factors such as sample preparation, corrosive agent type and corrosion time. Their morphology, brightness and texture characteristics may vary greatly. As a result, the image processing methods in the above-mentioned metallographic structure identification tools often rely on simple grayscale thresholds or texture analysis, which limits the accuracy of recognition when identifying metallographic images.
[0033] In the related art, the number of training samples of the machine learning model is increased to improve the accuracy of the recognition results. However, in actual application, the methods of the related art are time-consuming and have little effect. To this end, an embodiment of the present invention provides a method for identifying the ferrite-pearlite metallographic structure of steel, which comprises performing image preprocessing on the metallographic image to be detected 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 the ferrite grains in the metallographic binary image to obtain a grain boundary structure image; determining the ferrite grain distribution image including pearlite based on the pixel values of each pixel point at the same position in the pearlite region image and the grain boundary structure image; and recognizing the ferrite grain distribution image to obtain a recognition result.
[0034] Figure 1 A diagram showing an application scenario of the method for identifying the ferrite-pearlite metallographic structure of steel according to an embodiment of the present invention is shown.
[0035] like Figure 1 As 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 as a medium for providing a communication link 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 or wireless communication links or optical fiber cables, etc.
[0036] A user may use a first terminal device 101, a second terminal device 102, or a third terminal device 103 to interact with a server 105 via a network 104 to receive or send data, information, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, or the third terminal device 103, such as instant messaging tools, email clients, etc. (for example only).
[0037] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices with display screens, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0038] The server 105 may be a server that provides various services, such as a background management server (for example only) that provides recognition support for metallographic images to be inspected 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 received data such as user requests, and feed back processing results (e.g., recognition results obtained based on user requests) to the terminal devices.
[0039] It should be noted that the method for identifying the ferrite-pearlite metallographic structure of steel provided in the embodiment of the present invention can generally be executed by the server 105. The method for identifying the ferrite-pearlite metallographic structure of steel provided in the embodiment of the present invention can also be executed by a server or server cluster that is different from the server 105 and can communicate 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 number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0041] The following will be based on Figure 1 The scene described by Figures 2 to 8 The method for identifying the ferrite and pearlite metallographic structures of steel according to the embodiment of the present invention is described in detail.
[0042] Figure 2 A flow chart of a method for identifying the ferrite-pearlite metallographic structure of steel according to an embodiment of the present invention is shown.
[0043] like Figure 2 As shown, the method for identifying the ferrite-pearlite metallographic structure of steel in this embodiment includes operations S210 to S250.
[0044] In operation S210 , image preprocessing is performed on the metallographic image to be inspected to obtain a metallographic binary image.
[0045] In operation S220 , the pearlite region in the metallographic binary image is extracted to obtain a pearlite region image.
[0046] In operation S230 , boundaries of ferrite grains in the metallographic binary image are extracted to obtain a grain boundary structure image.
[0047] In operation S240 , a ferrite grain distribution image including pearlite is determined based on pixel values of respective pixel points at the same position in the pearlite region image and the grain boundary structure image.
[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 by a standard sample preparation and microscope imaging process, and is collected by a high-resolution optical microscope. The image resolution can be 2560 1920 pixels. The microstructural characteristics of the steel in the metallographic image to be inspected exhibit a typical ferrite-pearlite dual-phase structure. Ferrite grains are primarily distributed in nearly white, convex regions within the image, with grains clearly separated by black (or dark) grain boundaries. The pearlite region, on the other hand, consists of a laminated structure of alternating black and white (or dark and light) layers embedded within the ferrite matrix, exhibiting a characteristic morphology characterized by an interweaving distribution of black (or dark) and white (or light) layers. The black (or dark) layers in the pearlite region are cementite layers, while the white (or light) layers in the pearlite region are ferrite layers. Preprocessing of the metallographic image to be inspected involves, for example, removing noise from the image and performing pixel deformation on the image to obtain a binary metallographic image.
[0050] According to the embodiments of the present invention, the width, distribution density, and contrast of individual lamellae in the pearlite region may show slight variations under different steel grades and processing conditions, but their overall morphology remains highly stable, providing the foundation for unified analysis and comparison. Based on the distinct microscopic characteristics of the boundaries between pearlite and ferrite grains, corresponding extraction methods are designed to extract the boundaries of the pearlite region and ferrite grains from the binary metallographic image, respectively, thereby obtaining highly accurate images of the pearlite region and grain boundary structure.
[0051] According to an embodiment of the present invention, when the pearlite region in the pearlite region image and the boundary of the ferrite grain in the grain boundary structure image are represented by the pixel value "1", a logical OR operation is performed on the pixel values of each pixel point at the same position in the pearlite region image and the grain boundary structure image to obtain a ferrite grain distribution image including pearlite.
[0052] For example, if at location If a pixel value of 1 is set in the pearlite region image or grain boundary structure image, then the pixel value of that location in the ferrite grain distribution image is also set to 1, indicating that the location belongs to the pearlite region or the ferrite grain boundary. Based on the pixel values of each pixel at the same location in the pearlite region image and the grain boundary structure image, the ferrite grain distribution image including pearlite is determined. This not only preserves the complete grain boundary structure but also includes the distribution information of the pearlite region.
[0053] According to an embodiment of the present invention, when the pearlite region in the pearlite region image and the boundary of the ferrite grain in the grain boundary structure image are represented by the pixel value "0", a logical AND operation is performed on the pixel values of each pixel point at the same position in the pearlite region image and the grain boundary structure image to obtain a ferrite grain distribution image including pearlite.
[0054] According to an embodiment of the present invention, recognition is performed based on features presented by the boundaries of the pearlite region and the ferrite grains in the ferrite grain distribution image to obtain recognition results, thereby determining 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 inspected is preprocessed to obtain a binary metallographic image. From the binary metallographic image, the boundaries of the pearlite region and the ferrite grains are extracted. Then, based on the pixel values of the identically positioned pixels in the pearlite region image and the grain boundary structure image, a ferrite grain distribution image, including pearlite, is determined. Because the boundaries of the pearlite region and ferrite grains are extracted separately, the probability of misidentification of cementite lamellae, which would otherwise occur if a single threshold segmentation method or morphological method were used to process the pearlite in the same image to obtain a ferrite grain distribution image, is reduced. The ferrite grain distribution image including pearlite is determined by the pixel values of each pixel point at the same position in the pearlite region image and the grain boundary structure image. The dual characteristics of the pearlite region and the ferrite grain boundary are integrated, which can correct the pseudo-boundaries caused by the adhesion or corrosion of ferrite grains, enhance the analysis ability of complex structures such as subgrain boundaries and twin boundaries, and restore the ownership relationship of ferrite lamellae separated by cementite lamellae, providing a more accurate data reference for the quantitative analysis of the microstructure, thereby improving the accuracy of the identification results.
[0056] Figure 3 A schematic diagram of a metallographic image to be detected according to an embodiment of the present invention is shown.
[0057] like Figure 3 As shown in the figure, 1 cm is equivalent to 20 μm in reality. The ferrite grains are mainly distributed in the image as a nearly white and approximately convex area; the pearlite area is embedded in the ferrite matrix with a laminated lamellar structure consisting of alternating black lamellars (or dark lamellars) and white lamellars (or light lamellars). Among them, the laminated lamellar structure of some pearlite areas is more obvious, and the laminated lamellar structure of some pearlite areas cannot be directly observed by the naked eye at a lower image magnification.
[0058] Figure 4 A partial schematic diagram of a metallographic image to be detected according to an embodiment of the present invention is shown.
[0059] like Figure 4 As shown in the image, ferrite grains are primarily distributed in nearly white, convex regions, with grains clearly separated by black (or dark) grain boundaries. Pearlite, on the other hand, consists of a laminated structure of black (or dark) and white (or light) lamellae embedded in the ferrite matrix, exhibiting a characteristic morphology of interweaving black (or dark) and white (or light) lamellae. In pearlite, the black (or dark) lamellae are cementite lamellae, while the white (or light) lamellae 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: grayscale processing is performed on the metallographic image to be detected to obtain a metallographic grayscale image; the metallographic grayscale image is converted into an initial metallographic binary image; and noise reduction is performed on the initial metallographic binary image to obtain a metallographic binary image.
[0061] According to an embodiment of the present invention, the metallographic image to be inspected is grayscaled, converting the values of each pixel in the three color channels (RGB) into grayscale values, thereby obtaining a metallographic grayscale image containing only pixel grayscale information. Grayscaling preserves the contrast between light and dark in the metallographic image. This also reduces computational complexity by reducing data complexity, making subsequent processing more efficient.
[0062] According to an embodiment of the present invention, there are multiple methods for converting a metallographic grayscale image into an initial metallographic binary image, such as a fixed threshold method, an average value threshold method, a bimodal method, and the like.
[0063] Taking the use of a fixed threshold method to convert a metallographic grayscale image into an initial metallographic binary image as an example, a threshold for threshold segmentation of the metallographic grayscale image is set, and each pixel of the metallographic grayscale image is divided according to the relationship between the grayscale value of each pixel on the metallographic grayscale image and the threshold, so as to divide each pixel of the metallographic grayscale image into two categories, one for representing the boundary of ferrite grains and pearlite area, and the other for representing ferrite, thereby obtaining an initial metallographic binary image.
[0064] For example, in a metallographic grayscale image ranging from 0 (black) to 255 (white), 150 can be set as the threshold for threshold segmentation of the metallographic grayscale image. Pixels with grayscale values greater than 150 are determined to be white to represent ferrite; pixels with grayscale values less than or equal to 150 are determined to be white to represent the boundaries of ferrite grains and pearlite regions.
[0065] According to an embodiment of the present invention, for low-contrast pixels introduced by noise sources, these noise points will affect the clarity of details of ferrite grain boundaries. 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, the metallographic binary image Perform denoising, where x is the horizontal coordinate of the pixel point, y is the vertical coordinate of the pixel point, and mark the connected area ,in Represents the index of each connected area and calculates the connected area Area , preset area threshold , any area Less than Connected area This will be considered as noise removal, resulting in an image with clearer grain boundary details.
[0067] According to an embodiment of the present invention, a color metallographic image to be inspected is converted into a metallographic grayscale image, and the metallographic grayscale image is further converted into an initial metallographic binary image to purify the information in the image through 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, significantly reduces data redundancy, and at the same time weakens the noise complexity caused by multi-channel superposition. Converting the metallographic grayscale image into an initial metallographic binary image can separate the "ferrite" from the "ferrite grain boundary and pearlite region" in the image, simplifying the image into a binary logic of either black or white, thereby filtering out subtle noise that is difficult to define in the grayscale 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 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 A partial schematic diagram of a metallographic binary image according to an embodiment of the present invention is shown.
[0069] like Figure 5 As shown in the figure, the pearlite region presents a lamellar structure with alternating distribution of ferrite lamellae (white) and cementite lamellae (black), which is manifested in the characteristic morphology of interlaced distribution of black and white lamellae. The metallographic binary image retains the fine lamellar structural characteristics in the pearlite region, that is, the pearlite region is a structure with alternating distribution of ferrite lamellae and cementite lamellae.
[0070] According to an embodiment of the present invention, a metallographic grayscale image is converted into an initial metallographic binary image, including: 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; taking the grayscale threshold with the largest inter-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 a metallographic grayscale image based on the maximum inter-class variance method. The grayscale value of each pixel in the metallographic grayscale image is used as the grayscale range of the metallographic grayscale image. Various grayscale thresholds are traversed within this grayscale range to determine the inter-class variance of the pearlite region and the ferrite region at each grayscale threshold. The ferrite region may include multiple ferrite grains.
[0072] According to an embodiment of the present invention, the grayscale threshold with the largest inter-class variance is selected as the segmentation point to divide the image into pearlite region and ferrite region, thereby effectively separating the pearlite region and the ferrite region in the metallographic grayscale image to obtain an initial binary image.
[0073] According to an embodiment of the present invention, the inter-class variance is used to reflect the degree of difference in the grayscale distribution between the two regions of pearlite and ferrite after segmentation. When the difference between the two means is greater and the pixel distribution in each class is more concentrated, the inter-class variance is greater. In the metallographic grayscale image, there is a significant difference in the grayscale distribution of pearlite and ferrite grains: ferrite usually presents a high grayscale distribution with a smaller grayscale range due to its single-phase structure, while pearlite has a wider overall grayscale distribution due to its alternating layered structure. By traversing all possible grayscale thresholds to calculate the inter-class variance, the extreme point finally selected can be located at the optimal position for statistical separation of the two types of grayscale distributions, which not only maximizes the contrast between the single-phase ferrite grains and the two-phase pearlite region, but also reduces the grayscale interference caused by the discrete distribution of cementite lamellae inside the pearlite. Compared with the traditional fixed threshold method, this method of obtaining the initial metallographic binary image rationally utilizes the difference in grayscale distribution between the pearlite area and the ferrite area in the metallographic grayscale image, reduces the influence of uneven illumination or corrosion difference on the division of ferrite and pearlite, and can obtain more accurate binary segmentation results in complex metallographic structures, 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 performing feature enhancement on the pearlite region in the initial pearlite region image to obtain a pearlite region image.
[0075] According to an embodiment of the present invention, the boundaries of ferrite grains in the metallographic binary image are removed through morphological transformations such as erosion and expansion to obtain an initial pearlite region image, wherein the boundaries of ferrite grains can appear as a relatively narrow black structure in the metallographic binary image.
[0076] According to an embodiment of the present invention, to further improve the accuracy of the pearlite region in the image, the pearlite region in the initial pearlite region image is feature enhanced. Specifically, the grain boundary noise or lamellar structure fractures remaining in the initial pearlite region image due to morphological transformation are eliminated, and the continuity of the pearlite micromorphology is enhanced to obtain a more accurate pearlite region image. According to an embodiment of the present invention, the initial pearlite region image is obtained by removing the boundaries of ferrite grains in the metallographic binary image, and the pearlite region in the initial pearlite region image is feature enhanced to obtain the pearlite region image. This effectively ensures the accurate determination and retention of the fine lamellar structure in the microstructure, providing an accurate data foundation for subsequent quantitative tissue analysis and performance prediction.
[0077] According to an embodiment of the present invention, a morphological transformation is performed on a metallographic binary image to remove the boundaries of ferrite grains in the metallographic binary image to obtain an initial pearlite region image, including: using a first structuring element to perform an erosion operation on foreground elements in the metallographic binary image to obtain a morphological erosion image, wherein the foreground elements include cementite regions in the pearlite region and the boundaries of ferrite grains; using the first structuring element to perform an expansion 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.
[0078] According to an embodiment of the present invention, the cementite region is a region where multiple cementite lamellae are located. The first structural element may 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 is a narrow structure with a maximum width of no more than 10 pixels, a first structural element with a radius of 8 pixels may be used to perform morphological transformation, effectively removing the grain boundary with a width less than 2 pixels. 8 = 16 pixel long and narrow features, clearing the boundaries of ferrite grains.
[0079] According to an embodiment of the present invention, the metallographic binary image Perform erosion operation, first structuring element In a certain location Translation to get the corresponding area , in the first structural element Completely contained in the metallographic binary image In the case of , it can be expressed as After the first structural element is translated, the 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. The dilation operation is performed on the morphological erosion image. The dilation operation applies the first structuring element to the pixels in the morphological erosion image that are connected to the pearlite region, that is, the first structuring element is obtained. Move to a certain position Then the intersection with the morphological erosion image is obtained to obtain the position The result of the expansion is that 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, an erosion operation is first performed on the metallographic binary image, and then a dilation operation is performed. This can remove noise and small area interference while retaining the main structural features of the pearlite area, helping to improve the accuracy of metallographic structure identification and avoid information loss due to excessive processing.
[0082] According to an embodiment of the present invention, the features of the pearlite region in the initial pearlite region image are enhanced to obtain a pearlite region image, including: 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 grayscale values of each pixel point in the pearlite region to obtain a pearlite grayscale image; binarizing the pearlite grayscale image to obtain a binary image; and using a second structuring element 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 of the pearlite region in the initial pearlite region image, and the distance value of each pixel point of the pearlite region is obtained by calculating the shortest distance between the pixel point of the pearlite region and the ferrite region.
[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 value of the pearlite region is calculated. Pixels in the ferrite area The Euclidean distance between them can be expressed by the following formula (1):
[0085] (1);
[0086] in, Pixel With pixels The Euclidean distance between Pixel The horizontal axis, Pixel The vertical coordinate of Pixel The horizontal axis, Pixel The vertical coordinate of .
[0087] According to an embodiment of the present invention, the set of pixel points in the ferrite region is , will be collected Center and pixel The minimum value of the Euclidean distance is taken as the distance value, where the distance value can be expressed by the following formula (2):
[0088] (2);
[0089] in, Indicates the distance value; Represents pixel points Belong to the set .
[0090] According to an embodiment of the present invention, the distance value of each pixel is used as the grayscale value to obtain a pearlite grayscale image. If the distance between a pixel in the pearlite region and a pixel in the ferrite region exceeds a cutoff threshold, the distance value of the pixel is set as the cutoff threshold. The cutoff threshold can be set to the same as the radius of the second structuring element, and the cutoff threshold can be set to 12 pixels to reduce the computational complexity and reduce the noise sensitivity of the pearlite grayscale image.
[0091] According to an embodiment of the present invention, the pearlite grayscale image is converted into a binary image with clear shape contours based on the pixel values of each pixel in the pearlite grayscale image. For example, the pearlite grayscale image can be threshold segmented using the maximum inter-class variance method, and the pixel values of the pixels in the pearlite grayscale image can be adjusted to 0 or 1 to obtain a binary image.
[0092] According to an embodiment of the present invention, during the binarization process, a truncation threshold method can be used to convert the pearlite grayscale image into a binary image based on the pixel value of each pixel in the pearlite grayscale image. For example, if the pixel value of a pixel is greater than a preset threshold, the pixel value of the pixel is adjusted to 1; if the pixel value of a pixel is greater than a preset threshold, the pixel value of the pixel is adjusted to 0.
[0093] According to an embodiment of the present invention, a second structuring element is used to perform an expansion operation on the pearlite region in the binary image, wherein the second structuring element may be a circular structure; since the thickness of the pearlite lamellae is about 0.1 to 1 micron, the radius of the second structuring element may be 12 pixels. The center of the binary image moves at each pixel point. If the second structural element If any element of overlaps with the pearlite region element in the binary image, the pearlite region image at that coordinate position The pixel value of the pixel is 1 or 0 to represent 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 approximately 1 micron, assuming that the thickness of the lamella in the pearlite region image does not exceed 2 microns, the lamella structure in the pearlite region image can be identified as pearlite lamellae, effectively ensuring the accurate determination and retention of the fine lamella structure in the microstructure, and providing more accurate basic data for subsequent quantitative analysis and performance prediction of metallographic structures. 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. This processing can clearly reflect the boundary characteristics of the pearlite region. The distance value is used as the grayscale value of each pixel point in the pearlite region to obtain a pearlite grayscale image, where the high and low grayscale values reflect the distance relationship between the pixel point and the ferrite region. The pearlite grayscale image can intuitively display the distribution and morphology of the pearlite region, facilitating subsequent processing and analysis. Binarization of the pearlite grayscale image converts the grayscale image into a binary image, thereby clearly distinguishing the pearlite region from the background region and removing unnecessary details and noise. Using the second structuring element to dilate the pearlite region in the binary image expands the pearlite region and fills the gaps between cementite lamellae, enhancing the connectivity of the pearlite region and reducing the probability of regional fractures caused by the binarization process. It also restores some regions lost due to the distance transformation and binarization process. The distance transformation, binarization, and dilation operations improve the integrity and continuity of the pearlite region, facilitating a more accurate analysis of the morphology and distribution of the pearlite region.
[0095] Figure 6 A partial schematic diagram of an image of a pearlite region according to an embodiment of the present invention is shown.
[0096] like Figure 6 As shown in the figure, the pearlite region originally presented a structure in which ferrite lamellae and cementite lamellae were alternately distributed. After feature enhancement, each pixel point in the pearlite region was converted to 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: skeletonizing the metallographic binary image to extract the grain boundary skeleton structure of the ferrite grains to obtain an initial grain boundary structure image; and removing noise in the initial grain boundary structure image to obtain a grain boundary structure image.
[0098] According to an embodiment of the present invention, during the skeletonization process, a thinning algorithm can be used to extract the grain boundary skeleton structure of the ferrite grains. This method removes edge pixels from the image through multiple iterations, gradually revealing the grain boundary structure of the image. The thinning algorithm preserves the connectivity and structural characteristics of the grain boundaries while reducing redundant edge portions, resulting in a simplified ferrite grain boundary, thereby obtaining an 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 qualified boundary pixels. It is necessary to ensure that only pixels that meet the specific conditions are deleted in each iteration to prevent the grain boundary structure from being disconnected. Alternating the deletion of boundary points at different locations can help keep the skeleton in the center as much as possible, ensuring that the image's connectivity is not disrupted and preserving the image's basic shape and structure.
[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. Furthermore, there is often some noise on the boundaries of ferrite grains, which appears as burr-like edges in the ferrite grain boundary image. By removing 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 a grain boundary structure image.
[0101] According to an embodiment of the present invention, skeletonization refines the boundaries of ferrite grains to lines with a single pixel width, simplifying the complex grain boundary structure. The simplified grain boundary structure is easier to analyze and process, providing a clear basis for subsequent identification. While simplifying the grain boundary structure, skeletonization retains the topological structure and connectivity of the ferrite grains. Preserving the topological structure helps to accurately analyze the distribution and shape of ferrite grains. The noise in the skeletonized image is removed, and the main grain boundary skeleton structure is retained. The denoised grain boundary structure image is purer, 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] like Figure 7 As shown, the grain boundary structure image is the grain boundary skeleton structure of the 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, noise in an initial grain boundary structure image is removed to obtain a grain boundary structure image, including: converting the grain boundary skeleton structure in the initial grain boundary structure image into a topological graph, wherein the topological graph includes multiple nodes and edges connecting each node; removing hanging nodes and hanging edges in the topological graph according to the degree 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, the intersections of lines forming the boundaries of ferrite grains are detected in the grain boundary skeleton structure image, and these intersections serve as nodes in the topological map. The endpoints of lines in the initial grain boundary structure image are detected, and these endpoints also serve as nodes in the topological map. Each node is represented as an independent point in the topological map, typically 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, line segments connecting two nodes formed by the boundaries of ferrite grains are extracted and used as edges of a topological graph. The extracted nodes and edges are combined into a graph structure to obtain a 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 map, the nodes of the topological map can be determined according to the pixel values of the pixel points in eight directions.
[0108] For example, when pixel point a belongs to the grain boundary skeleton structure and the pixel value of pixel point a is 1, the pixel values of the pixel points adjacent to pixel point a in the eight directions of up, down, left, right, upper left, upper right, lower left, and lower right are judged. If, in the eight directions, the pixel value of the pixel points adjacent to pixel point a is the same as the pixel value of pixel point a, then pixel point a is an endpoint and also a node; if, in the eight directions, the pixel values of three or more adjacent pixel points are the same as the pixel value of pixel point a, then pixel point a is an intersection and also a node.
[0109] According to an embodiment of the present invention, a dangling node is a node with a degree of 1 in a topological graph; a dangling edge is an edge in the topological graph that is connected to a dangling node. Based on the degrees of each node in the topological graph, dangling nodes and dangling edges in the topological graph are removed to obtain a new topological graph. This can be done by traversing each edge and, for each edge, determining whether it is a dangling edge based on the degrees of the two nodes connecting the edge. Specifically, if the degree of one of the nodes is 1, the edge is determined to be a dangling edge, thereby obtaining a set including all dangling edges. Edges in the set are then deleted from the topological graph.
[0110] According to an embodiment of the present invention, in a topological graph with edges deleted, each node is traversed to determine all nodes with a degree of 0, and the nodes with a degree of 0 are deleted to obtain a new topological graph.
[0111] According to an embodiment of the present invention, a grain boundary structure image is determined based on the nodes and edges in the 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 structure that needs to be retained in the initial grain boundary structure image is determined to obtain the grain boundary structure image.
[0112] According to an embodiment of the present invention, the initial grain boundary structure image is converted into a topological map that can be quantitatively calculated. By removing the hanging nodes and hanging edges in the topological map, a new topological map is obtained to determine the grain boundary structure image, which simplifies the complexity of the grain boundary skeleton structure and improves processing efficiency.
[0113] According to an embodiment of the present invention, the recognition result includes the steel type; the ferrite grain distribution image is recognized to obtain the recognition result, including: determining the area ratio of the pearlite area and the ferrite area according to the pixel value of each pixel point in the ferrite grain distribution image; using the area ratio as the content ratio of pearlite to ferrite in the steel to determine the steel type.
[0114] According to an embodiment of the present invention, the pixel value of the pixel point in the pearlite region is , and the pixel value of the pixel point in the ferrite area In the case of , 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 is , the total number of pixels of ferrite grains The proportion of pearlite area can be calculated as , that is, the area ratio of pearlite region is ; The proportion of ferrite grains is , that is, the area ratio of the ferrite region is .in, It is a variable representation of the coordinates of a pixel point and does not indicate a specific pixel point.
[0115] According to the embodiment of the present invention, steel grade is the type of steel. The classification of steel grades is mainly based on their carbon content. Steel grades are generally 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 above 0.60 In the microstructure of steel, the pearlite region is formed by alternating ferrite and cementite lamellae. The average carbon content of the pearlite region is about 0.77 Ferrite contains almost no carbon. By analyzing the ratio of pearlite to ferrite, the carbon content of the steel can be inferred, and thus the steel grade to which it belongs can be determined.
[0116] According to embodiments of the present invention, image processing technology can quickly calculate the area ratio of pearlite and ferrite, avoiding the time-consuming process of traditional chemical analysis or metallographic analysis. Combining computer vision and image processing algorithms can achieve automated analysis and reduce human error.
[0117] According to an embodiment of the present invention, the recognition result also includes the yield strength of the steel; the ferrite grain distribution image is recognized to obtain the recognition result, which also includes: determining the grain size of the ferrite grains based on the ferrite grain distribution image; and determining the yield strength of the steel based on the grain size.
[0118] According to the embodiments 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 the ferrite grains also has a significant impact on the properties of the steel. According to the Hall-Petch relationship, the yield strength of the material is The relationship between d and the average diameter of ferrite grains can be expressed by the following formula (3):
[0119] (3);
[0120] in, is the lattice friction resistance generated when moving a single dislocation, and is a constant. This formula shows that the smaller the ferrite grain size, the higher the yield strength of the material. The strength of steel can be increased by refining the ferrite grain size.
[0121] By providing the pearlite-to-ferrite ratio and ferrite grain size, materials science researchers and engineers can quantitatively evaluate and predict the properties of steel, which has important guiding significance for the design, manufacturing, and application of steel.
[0122] Figure 8 FIG. 4 is a partial schematic diagram showing a ferrite grain distribution image according to an embodiment of the present invention.
[0123] like Figure 8 As shown, the pearlite region in the pearlite region image and the boundary of the ferrite grain in the grain boundary structure image are represented by the pixel value "0". A logical AND operation is performed on the pixel values of each pixel point at 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 image or the grain boundary structure image is 0, the pixel value of the pixel point at this position in the ferrite grain distribution image is also 0, indicating that the position belongs to the pearlite region or the boundary of the ferrite grain. By traversing each pixel point, a ferrite grain distribution image including pearlite is obtained.
[0124] Figure 9 A block diagram of an electronic device suitable for implementing a method for identifying ferrite-pearlite metallographic structures of steel according to an embodiment of the present invention is shown.
[0125] like Figure 9 As shown, an electronic device according to an embodiment of the present invention includes a processor 901, which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 902 or programs loaded from a storage unit 908 into a random access memory (RAM) 903. Processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or related chipsets and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. Processor 901 may also include onboard memory for caching purposes. Processor 901 may 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] The RAM 903 stores various programs and data required for the operation of the electronic device. The processor 901, ROM 902, and RAM 903 are connected to each other via a bus 904. The processor 901 executes the programs in the ROM 902 and / or RAM 903 to perform the various operations of the method flow according to the embodiment of the present invention. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and RAM 903. The processor 901 may also execute the various operations of the method flow according to the embodiment of the present invention by executing the programs stored in one or more memories.
[0127] According to an embodiment of the present invention, the electronic device may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device may further include one or more of the following components connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 908 including a hard disk; and a communication section 909 including a network interface card such as a LAN card or a modem. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. Removable media 911, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 910 as needed, so that computer programs read from the removable media can be installed in 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 and not incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present invention.
[0129] According to an embodiment of the present invention, a computer-readable storage medium may be a non-volatile computer-readable storage medium, and may include, for example, but not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above, and / or one or more memories other than ROM 902 and RAM 903.
[0130] Embodiments of the present invention also include a computer program product comprising a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code causes the computer system to implement the method for identifying the ferrite-pearlite microstructure of steel provided in an embodiment of the present invention.
[0131] The computer program executes the above functions defined in the system / device of the embodiment of the present invention when executed by the processor 901. According to the embodiment of the present invention, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0132] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0133] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909 and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-described functions defined in the system of the embodiment of the present invention are performed. According to the embodiment of the present invention, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0134] According to an embodiment of the present invention, the program code for executing the computer program provided by the embodiment of the present invention can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C" 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 can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0135] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a 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 box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0136] It will be understood by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or coupled in various ways, even if such combinations or couplings are not explicitly described in the present invention. In particular, the features described in the various embodiments of the present invention may be combined and / or coupled in various ways without departing from the spirit and teachings of the present invention. All such combinations and / or couplings fall within the scope of the present invention.
[0137] The above describes embodiments of the present invention. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be advantageously used in combination. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A method for identifying the ferrite and pearlite microstructures 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 binary metallographic 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; Determining a ferrite grain distribution image including pearlite according to pixel values of respective pixel points at the same position in the pearlite region image and the grain boundary structure image; Identifying the ferrite grain distribution image to obtain an identification result; The step of extracting the pearlite region from 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; Performing feature enhancement on the pearlite region in the initial pearlite region image to obtain a pearlite region image; 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 determining the distance value between each pixel point in the pearlite region and the ferrite region; using the distance value as the grayscale value of each pixel point in the pearlite region to obtain a pearlite grayscale image; performing binarization processing on the pearlite grayscale image to obtain a binarized image; A second structuring element is used to perform an expansion operation on the pearlite region in the binary image to obtain the pearlite region image.
2. The method according to claim 1, characterized in that The image preprocessing of the metallographic image to be detected to obtain a metallographic binary image includes: grayscale processing is performed 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 converting of 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, wherein The performing 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 includes: Performing an erosion operation on foreground elements in the metallographic binary image using a first structural element to obtain a morphological erosion image, wherein the foreground elements include a cementite region in a pearlite region and a boundary of the ferrite grains; The first structuring 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.
5. 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; Noise in the initial grain boundary structure image is removed to obtain the grain boundary structure image.
6. The method according to claim 5, characterized in that The removing of noise from the initial grain boundary structure image to obtain the grain boundary structure image includes: 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 node in the topological graph, removing dangling nodes and dangling edges in the topological graph to obtain a new topological graph; The grain boundary structure image is determined according to the new topological map.
7. The method according to any one of claims 1 to 6, characterized in that The identification result includes steel type; The identifying the ferrite grain distribution image to obtain an identification result includes: Determining the respective 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.
8. The method according to any one of claims 1 to 6, 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 is determined according to the grain size.
Citation Information
Patent Citations
Metallographic structure grain boundary extraction method based on pixel relation
CN114782473A