Image processing method for metal structure image
The image processing method effectively removes whisker noise in metallographic images, enabling accurate crystal grain size evaluation by converting grain interiors and boundaries to distinct colors and applying pixel-based rules to eliminate noise.
Patent Information
- Application Number
- JP2023111101
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-06
- Publication Date
- 2025-01-20
AI Technical Summary
Conventional image processing methods fail to effectively remove whisker noise in metallographic images, leading to inaccurate evaluation of crystal grain size.
A method involving image processing steps such as grayscale conversion, smoothing, histogram flattening, binarization, and line thinning is employed to convert crystal grain interiors to one color and grain boundaries to another, with specific rules for converting center pixels based on surrounding pixel boundaries to remove whisker noise.
Accurately evaluates crystal grain size by reliably removing whisker noise, achieving results comparable to manual measurements.
Smart Images

Figure 2025008702000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing method for a metal structure image, and more particularly to an image processing method for removing whisker noise in a metal structure image. [Background technology]
[0002] The size of the crystal grains in the metal structure has a large effect on the mechanical properties of the metal, and the size of the crystal grains is evaluated by the line segment method or the like. In this case, a processed image is used in which a metal structure image, which is a micrograph of a cross section of the metal, is averaged or binarized, but there is a problem that accurate evaluation is hindered by noise generated in the processed image. Therefore, for example, Patent Document 1 proposes performing further image processing in which parts of the processed image where black pixels are continuously connected are determined to correspond to grain boundaries and left as they are, and parts where black pixels exist alone are determined to be isolated points inside the crystal grains and deleted. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent Publication 2015-210648 Summary of the Invention [Problem to be solved by the invention]
[0004] However, the noise includes so-called whisker noise (linear noise extending from the grain boundary into the grain) that is connected to the crystal grains. Since the above-mentioned conventional image processing method cannot remove such whisker noise, there is a problem that the crystal grain size cannot be accurately measured when evaluating the size of the crystal grain by the line segment method or the like.
[0005] Therefore, the present invention is intended to solve such problems, and has an object to provide an image processing method for metallographic structure images that can effectively remove whisker noise in metallographic structure images. [Means for solving the problem]
[0006] In order to achieve the above object, in the present invention, a thinning processed image is created in which the inside of the crystal grains of the metal structure is represented by one monochrome pixel and the grain boundary is represented by another monochrome pixel with a width of one pixel, and for each of the other monochrome pixels (P1, P4) in the thinning processed image, this is set as a center pixel, and in the direction going around the surrounding eight pixels adjacent to the center pixel, if there are two boundaries (B) between the other monochrome pixel and the one monochrome pixel, the center pixel is converted to the one monochrome pixel, and if there are more than two boundaries, the center pixel is left as the other monochrome pixel. By repeating such a process, it is possible to reliably remove whisker noise remaining in the thinning processed image. Then, the crystal grain size can be accurately evaluated based on the processed image from which the whisker noise has been removed.
[0007] Prior to creating the thinning processed image, it is preferable to grayscale the metal structure image, perform smoothing and histogram equalization on the grayscale processed image, and then perform binarization processing to divide each pixel of the processed image into the one monochrome pixel and the other monochrome pixel at a predetermined brightness threshold.
[0008] The reference characters in parentheses indicate, for reference, the correspondence with specific means described in the embodiments described later. Effect of the Invention
[0009] As described above, according to the image processing method for metallographic images of the present invention, whisker noise in metallographic images can be effectively removed, and the crystal grain size can be accurately evaluated based on this. [Brief description of the drawings]
[0010] [Figure 1] 1 is a flowchart showing a processing procedure in a computer. [Diagram 2] FIG. 1 is a diagram showing an example of a metal structure image. [Diagram 3]FIG. 13 is a diagram showing an example of a processed image in which whisker noise remains. [Figure 4] FIG. 13 is a partial enlarged view of a processed image after thinning processing in which whisker noise remains. [Diagram 5] FIG. 13 is a diagram showing a whisker noise portion enlarged to the pixel level. [Figure 6] FIG. 13 is an enlarged view of a whisker noise portion after pixel processing. [Figure 7] FIG. 1 is a diagram showing a grain boundary portion enlarged to a pixel level. [Figure 8] FIG. 13 is an enlarged view of a grain boundary portion after pixel processing. [Figure 9] FIG. 13 is a diagram showing an example of a processed image from which whisker noise has been removed. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] It should be noted that the embodiment described below is merely an example, and various design improvements made by those skilled in the art without departing from the gist of the present invention are also included in the scope of the present invention.
[0012] An example of an image processing procedure according to the present invention is shown in Figure 1. The procedure is implemented by a computer program.
[0013] First, a metallographic image is read (step 101). An example of a metallographic image of martensitic stainless steel is shown in Figure 2. Next, the metallographic image is converted into a grayscale image, for example, an 8-bit, 256-level black-and-white image (step 102), and the image is smoothed using a median filter or the like to smooth the luminance values of the processed image (step 103). Furthermore, in order to improve the contrast of the image, histogram equalization is performed, in which luminance is adjusted so that the pixel luminance value histogram is generally flat (step 104).
[0014] Next, a binarization process is performed to divide the pixels into black and white pixels at a certain brightness threshold (step 105), and the grain boundaries are converted to black pixels, while the insides of the grains are converted to white pixels. Then, isolated points where black pixels exist alone are removed (converted to white pixels) as they correspond to the insides of grains (step 106). An example of an image after the isolated points have been removed is shown in Figure 3.
[0015] At this stage, whisker noise still remains in the processed image. Therefore, in step 107, thinning processing is performed to thin the lines in the processed image so that only one pixel at the center of the line remains, and then whisker noise removal processing, the details of which will be described below, is performed (step 108).
[0016] FIG. 4 shows an enlarged view of a part of the processed image after thinning processing, and whisker noise is present in the X part in the image. That is, in this X part, whisker noise protrudes from a part of the grain boundary and extends like a whisker, and does not form part of the grain boundary. FIG. 5 shows the whisker noise in the X part enlarged to the pixel level, with the black pixel P1 at the tip of the whisker noise as the center pixel and the surrounding eight pixels adjacent to it. The computer detects how many boundaries B between black pixels and white pixels there are in the direction going around the center pixel (arrow in the figure). In FIG. 5, there are two boundaries B, so in this case, the center pixel P1 is converted to a white pixel as shown in FIG. 6.
[0017] On the other hand, in the case of a part of a grain boundary like part Y in Fig. 4, as shown in an enlarged view in Fig. 7, the black image P4 constituting the grain boundary is set as the center pixel, and among the surrounding eight pixels adjacent to it, there are four boundaries B between black pixels and white pixels in the direction going around the center pixel (indicated by the arrows in the figure), as shown in Fig. 8. Therefore, in this case, the center pixel P4 is left as a black pixel, as shown in Fig. 8.
[0018] Then, for all black pixels shown in Fig. 3, including pixels P2 and P3 in Fig. 5 and pixels P5, P6 and P7 in Fig. 7, these black pixels are set as center pixels, and for the eight surrounding pixels, if there are two boundaries between black pixels and white pixels, the center pixels are converted to white pixels, and if there are more than two, the center pixels are left as black pixels. By this process, the black pixels that make up the whisker noise are removed from the processed image shown in Fig. 3, and the final processed image shown in Fig. 9 is obtained in which only the black pixels that make up the grain boundaries remain.
[0019] Here, in the embodiment of Table 1, the arithmetic mean grain size in the horizontal [A] direction and the vertical [B] direction and the geometric mean grain size (√AB) were calculated in a computer by the line segment method for the processed image shown in FIG. 9 from which whisker noise has been removed. Note that the line segment method, as shown in FIG. 9, assigns "1" to each pixel located on each of the lines L1 to L6 of a vertical and horizontal lattice pattern drawn on the processing screen if the pixel is a black pixel, and assigns "0" to each pixel located on the lines L1 to L6 if the pixel is a white pixel, and measures the width (number of pixels) of the area of continuous "0" as a value equivalent to the size of the crystal grain on the lines L1 to L6. Note that the method is not limited to the line segment method, and a filling method or the like can also be used.
[0020] [Table 1]
[0021] The comparative examples in Table 1 are the processed images shown in Figure 3 before whisker noise is removed, and the arithmetic mean diameters in the horizontal [A] and vertical [B] directions and their geometric mean diameters (√AB) are calculated in a computer using the line segment method.
[0022] In addition, the "manual" process in Table 1 refers to the process in which an operator carefully avoided the whisker noise and calculated the arithmetic mean particle size in the horizontal [A] and vertical [B] directions using the line segment method for the image shown in Figure 3 above before the whisker noise was removed, and then calculated the geometric mean particle size (√AB).
[0023] As is clear from Table 1, by creating a processed image in which whisker noise has been removed using the method of the present invention, it is possible to obtain results by automatic processing using a computer that are almost the same as results obtained when an operator measures the average particle size manually.
[0024] The procedure of measuring the average grain size from the processed image from which whisker noise has been removed, such as the line segment method or the fill-in method, does not necessarily have to be performed automatically by a computer, and may be performed manually. In the above embodiment, a thinning processed image was created in which the inside of the crystal grains of the metal structure is represented by white pixels and the crystal grain boundaries are represented by black pixels with a width of one pixel, but these may be created with the colors reversed, and further, the image is not limited to black and white as long as it is a single color. [Explanation of symbols]
[0025] P1, P4...black pixels (center pixels), B...border.
Claims
1. A method for processing metal structure images, which creates a thinning processed image in which the interiors of crystal grains in the metal structure are represented by one monochrome pixel and the grain boundaries are represented by other monochrome pixels with a width of one pixel, and for each of the other monochrome pixels in the thinning processed image, the other monochrome pixel is set as a center pixel, and if there are two boundaries between the other monochrome pixel and the one monochrome pixel in a direction going around the center pixel and eight surrounding pixels adjacent to the center pixel, the center pixel is converted to the one monochrome pixel, and if there are more than two boundaries, the center pixel is left as the other monochrome pixel.
2. 2. The image processing method for a metal structure image according to claim 1, further comprising the steps of: prior to creating the thinning processed image, converting the metal structure image into a grayscale image; smoothing and histogram equalization are performed on the grayscale processed image; and then performing a binarization process in which each pixel of the processed image is divided into the one monochrome pixel and the other monochrome pixel at a predetermined brightness threshold.
Citation Information
Patent Citations
Image processing method and device for metallographic image, and image processing program
JP2015210648A