Real-time image segmentation method for dendritic crystal growth form of directional solidification furnace
By introducing structural prior knowledge of the physical mechanism of directional solidification into the GrabCut algorithm and reconstructing the energy function using the local gradient direction and periodic response intensity, the problem of "grain boundary adhesion" in dendrite segmentation of the traditional GrabCut algorithm is solved, and accurate segmentation of the dendrite structure is achieved.
Patent Information
- Application Number
- CN202511188078.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-08-25
AI Technical Summary
When processing images of parallel dendrite growth during directional solidification, the traditional GrabCut algorithm cannot effectively distinguish the independently growing dendrite trunks, resulting in multiple dendrites being mistakenly merged into a single area, resulting in the phenomenon of "grain boundary adhesion."
By introducing structural prior knowledge based on the physical mechanism of directional solidification, the energy function of the GrabCut algorithm is reconstructed through the local gradient direction distribution characteristics and periodic response intensity. By utilizing the law that the dendrite trunks are arranged periodically and equidistantly in the horizontal direction, a reconstructed energy function that integrates metallurgical mechanisms is constructed, which significantly improves the resolution of densely arranged and textured dendrite structures.
It effectively solves the problem of 'grain boundary adhesion', achieves clear segmentation of densely arranged dendrite structures with consistent texture, and improves the accuracy and reliability of the segmentation results.
Smart Images

Figure CN120672787A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image segmentation technology, and more particularly to a real-time image segmentation method for dendrite growth morphology in a directional solidification furnace. Background Art
[0002] Directional solidification technology is the core process for preparing high-performance metal components. The key lies in controlling the orderly crystallization growth of the metal melt along a specific direction under a strong temperature gradient to form columnar crystals or single crystal structures.
[0003] In order to achieve real-time monitoring and quality control of the solidification process, an observation method based on machine vision is proposed: the interface evolution image is collected by an industrial camera, and the grain boundary position is identified using an image segmentation algorithm, and then key process parameters such as growth rate, orientation consistency, and dendrite spacing are extracted.
[0004] Among many image segmentation technologies, the GrabCut algorithm has been tried to be applied to the dendrite extraction task because of its advantages such as no need for deep learning training and low computing resource requirements.
[0005] The GrabCut algorithm is based on the GraphCuts framework. It uses the Gaussian mixture model (GMM) to model the color distribution of the foreground (grain area) and background (melt or other areas), constructs an adjacency graph between pixels, and minimizes the energy function to achieve optimal segmentation.
[0006] However, in actual applications, it was found that the GrabCut algorithm has serious defects when processing images of parallel growth of dendrites during directional solidification: because adjacent dendrites are composed of the same alloy material, their surface reflection characteristics, grayscale intensity and texture features are highly similar. As a result, when GrabCut relies only on local pixel color similarity and spatial proximity for segmentation, it cannot effectively distinguish the independently growing dendrite trunks, and multiple dendrites are mistakenly merged into a single area, resulting in the "grain boundary adhesion" phenomenon. Summary of the Invention
[0007] In order to solve the technical problem that the above-mentioned traditional GrabCut algorithm causes the mismerging of multiple dendrite areas due to relying only on local color and spatial information, the present invention provides a real-time image segmentation method for the dendrite growth morphology of a directional solidification furnace, comprising: collecting real-time images of the solidification process of a metal melt; for any pixel point in the real-time image: obtaining the local gradient direction distribution characteristics of the pixel point based on the statistical results of the gradient vector in the circular neighborhood of the pixel point; extracting the local dominant direction vector of the pixel point based on the local gradient direction distribution characteristics of the pixel point; using the solidification rate and temperature gradient, calculating the theoretical dendrite spacing according to the Kurz-Fisher empirical formula, and converting the theoretical dendrite spacing into the equivalent dendrite spacing in the image space through the spatial resolution; calculating the periodic response intensity at the pixel point based on the distance from the pixel point to the nearest grain along the vertical direction of its local dominant direction vector and the modulo operation result of the equivalent dendrite spacing in the image space; determining the periodic term based on the periodic response intensities at all pixel points; reconstructing the energy function of the GrabCut algorithm based on the periodic term; achieving optimal segmentation of the real-time image by minimizing the reconstructed energy function, and obtaining the segmentation result of the real-time image.
[0008] This invention breaks through the limitation of the traditional GrabCut algorithm that only relies on local color and spatial proximity, and introduces structural prior knowledge based on the physical mechanism of directional solidification, that is, the dendrite trunks are arranged periodically and equidistantly in the transverse direction. By introducing local directional fields and periodic response intensity, a reconstruction energy function integrating metallurgical mechanisms is constructed, which significantly improves the resolution of densely arranged and textured dendrite structures, and solves the fundamental problem of "grain boundary adhesion".
[0009] Preferably, it is characterized in that the preprocessing of the real-time image includes: denoising the real-time image using median filtering; synchronously acquiring the temperature field of the solidification front of the metal melt using an optical pyrometer installed at the same viewing angle, wherein the temperature field includes the surface temperature of each pixel position in the real-time image; and performing normalization processing on the denoised real-time image in combination with the temperature field based on radiation correction of Planck's law to obtain a processed real-time image.
[0010] Preferably, the method of obtaining the local gradient direction distribution characteristics of the pixel point based on the statistical results of the gradient vector in the circular neighborhood of the pixel point includes: for each pixel point, within its radius =15 circular neighborhood The weighted gradient response strength in each direction is counted; the weighted gradient response strength in all directions is used to form the local gradient direction distribution characteristics of each pixel.
[0011] Preferably, the calculation formula for the weighted gradient response strength in each direction is: Where, For the direction The weighted gradient response strength on the direction The value range is ; Pixel The circular neighborhood of the pixel Pixel The circular neighborhood of Pixels in ; Pixel The gradient vector at Represents the vector modulus; is a Gaussian kernel function with a standard deviation of , It belongs to the angle domain Gaussian kernel, which is used to suppress the jitter caused by noise and smooth the angle distribution; Pixel The direction angle of the gradient vector.
[0012] Preferably, the extracting of the local dominant direction vector of the pixel point based on the local gradient direction distribution characteristics of the pixel point includes: obtaining the direction with the maximum weighted gradient response intensity from the local gradient direction distribution characteristics of the pixel point as the local main peak direction of the pixel point , then the local dominant direction vector of the pixel point .
[0013] The present invention analyzes the statistical distribution of gradient directions in local areas of real-time images to extract structural features that can characterize the arrangement trend of dendrite trunks. This serves as the basis for subsequent construction of direction priors, more finely depicting the dendrite arrangement rules to guide the direction of segmentation.
[0014] Preferably, the method of calculating the theoretical dendrite spacing using the solidification rate and the temperature gradient according to the Kurz-Fisher empirical formula, and converting the theoretical dendrite spacing into an equivalent dendrite spacing in the image space by using the spatial resolution, comprises: ;in, is the equivalent dendrite spacing in image space; is the solidification rate; is the temperature gradient; is the spatial resolution of the camera's imaging system; and is the material constant; represents the theoretical dendrite spacing.
[0015] Based on the characteristic that "under steady-state directional solidification conditions, the main trunks of primary dendrites are equidistantly arranged along the pulling direction", the present invention calculates the theoretical dendrite spacing through the Kurz-Fisher empirical formula, providing a strong structural prior for the image.
[0016] Preferably, the calculation of the periodic response intensity at the pixel point according to the modulo operation result of the distance from the pixel point to the nearest grain along the vertical direction of the local dominant direction vector of the pixel point and the equivalent dendrite spacing in the image space includes: Where, Pixel The intensity of the periodic response at ; is the natural exponential function; To control the response peak width, ; Pixel along The distance from the nearest grain in the vertical direction; is the local dominant direction vector of the pixel point, is the local dominant direction vector The vertical direction; Represents the modulo operation; is the equivalent dendrite spacing in image space.
[0017] The present invention utilizes the periodic law of dendrite spacing to construct a prior probability map of "ideal grain boundary position", combines the segmentation model with the physical law, and guides the segmentation algorithm to preferentially identify grain boundaries at positions that conform to the periodic law, which can effectively suppress missegmentation.
[0018] Preferably, the grain refers to a pixel point with a segmentation label of 1 in the optimal segmentation label set of the previous frame of real-time image.
[0019] Preferably, determining the periodic term according to the periodic response intensity at all pixel points includes: Where, is the pixel segmentation label set of the real-time image. For the pixels belonging to the foreground, the segmentation label is 1, and for the pixels belonging to the background, the segmentation label is 0; is a periodic term; It is a set of all pixels in the real-time image; pixel For collection Pixels in ; Pixel The segmentation label of Pixel The intensity of the periodic response at .
[0020] The present invention utilizes the periodic arrangement law of dendrite growth to construct a structural prior term that can be used to constrain the energy function, and introduces it into the energy function of the GrabCut algorithm, significantly improving the resolution ability of densely arranged and textured dendrite structures, and solving the fundamental problem of "grain boundary adhesion".
[0021] Preferably, reconstructing the energy function of the GrabCut algorithm based on the periodic term includes: Where, is a data item; is the smoothing term; is a periodic term; is the segmentation label set of the real-time image; 、 are the control coefficients of the smoothing term and the periodic term respectively.
[0022] The beneficial effects of the present invention are: This invention breaks through the limitation of the traditional GrabCut algorithm that only relies on local color and spatial proximity, and introduces structural prior knowledge based on the physical mechanism of directional solidification, that is, the dendrite trunks are arranged periodically and equidistantly in the transverse direction. By introducing local directional fields and periodic response intensity, a reconstruction energy function integrating metallurgical mechanisms is constructed, which significantly improves the resolution of densely arranged and textured dendrite structures, and solves the fundamental problem of "grain boundary adhesion". BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a flow chart schematically illustrating a real-time image segmentation method for dendrite growth morphology in a directional solidification furnace according to the present invention; Figure 2 is a flowchart schematically illustrating step S2; Figure 3 is a flowchart schematically illustrating step S3; Figure 4 is a schematic diagram schematically showing a real-time image; Figure 5 This is a schematic diagram showing the traditional GrabCut algorithm Figure 4 The real-time image is segmented and the schematic diagram of the segmentation result is obtained; Figure 6 The GrabCut algorithm of the present invention is schematically shown. Figure 4 Schematic diagram of the segmentation results obtained by segmenting the real-time image. DETAILED DESCRIPTION
[0024] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0025] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0026] The embodiment of the present invention discloses a real-time image segmentation method for the dendrite growth morphology of a directional solidification furnace, referring to Figure 1 , including steps S1 to S4: S1. Collect real-time images of the metal melt solidification process.
[0027] Specifically, a high-temperature resistant CCD camera is installed at the observation window of the vacuum directional solidification furnace to collect real-time images of the metal melt solidification process. , For time.
[0028] It should be noted that during the directional solidification process, the metal melt and the solidification front are in an extreme imaging environment of high temperature, high radiation, and low contrast. The real-time images directly collected have serious problems such as self-luminescence, dynamic brightness changes, and blurred boundaries. Therefore, image preprocessing is a prerequisite for achieving subsequent accurate segmentation.
[0029] Therefore, the real-time image is preprocessed as follows: (1) Use median filtering to denoise the real-time image.
[0030] It should be noted that in high-temperature environments, CCD sensors are susceptible to electromagnetic interference, thermal electron noise, and particle splash, resulting in "salt and pepper noise" or abnormal local bright spots in the image. This noise can interfere with subsequent gradient calculation and edge detection.
[0031] Therefore, median filtering is used to denoise real-time images simply because when there are individual extreme values in the window (such as splashing metal reflective points), the median can effectively eliminate their influence, and compared with the mean filter, the median filter will not blur key edge structures such as grain boundaries, which is conducive to subsequent gradient extraction; in addition, in the directional solidification scenario, the grain boundary scale is usually larger than the length of 3 pixels. Therefore, when denoising real-time images, the window size of the median filter is 3×3, which can meet the denoising requirements without losing details.
[0032] Among them, median filtering, as a nonlinear denoising method, is a well-known technology and will not be described in detail here.
[0033] (2) Based on the radiation correction of Planck's law, the denoised real-time image is normalized in combination with the temperature field to obtain the processed real-time image.
[0034] It should be noted that because metals emit strong thermal radiation at high temperatures, especially in the visible and near-infrared bands, image brightness no longer reflects surface topography or reflective properties, but is instead primarily determined by temperature. This causes different areas of the same material to exhibit different grayscale levels due to temperature differences, undermining the color consistency assumption relied upon by the GrabCut algorithm. Therefore, a radiometric correction method is required, combined with synchronous temperature measurement data, to physically normalize the brightness of real-time images.
[0035] Specifically, an optical pyrometer installed at the same viewing angle is used to synchronously obtain the temperature field of the solidification front of the metal melt. The temperature field includes the surface temperature of each pixel in the real-time image. Based on the radiation correction of Planck's law, the denoised real-time image is normalized in combination with the temperature field to eliminate the non-uniformity of self-luminescence.
[0036] After normalization, the grayscale differences in the image reflect more of the surface microstructure (such as grain boundary fluctuations and oxide films) rather than the temperature distribution, restoring the statistical stability of the color and meeting the premise of Gaussian modeling in the GrabCut algorithm.
[0037] S2. Based on the local gradient direction distribution characteristics of the pixel point, the local dominant direction vector of the pixel point is extracted.
[0038] It should be noted that during the directional solidification process, the columnar crystals formed by the solidification of the metal melt usually grow in the form of dendrites, whose trunks extend in the opposite direction of the heat flow and present an approximately parallel strip-like structure in the cross section; these strips appear as edge textures with consistent direction and regular spacing in the images captured by high-temperature industrial cameras. Therefore, the grayscale values of adjacent dendrites are highly similar, and their spatial arrangement directions are highly consistent. This feature constitutes the physical basis for identifying grain boundaries.
[0039] To this end, this embodiment analyzes the statistical distribution of gradient directions in local areas of real-time images to extract structural features that can characterize the arrangement trend of dendrite trunks, which serve as the basis for subsequent construction of direction priors to guide the direction of segmentation.
[0040] See the flowchart of step S2 Figure 2 , including steps S201 to S202, specifically: S201. Obtain local gradient direction distribution characteristics of the pixel points based on the statistical results of the gradient vectors of the pixel points.
[0041] First, use the Sobel operator or Prewitt operator to calculate the real-time image of each pixel in the Direction and Directional gradient component and , and form the gradient vector of each pixel ; then the gradient amplitude of the pixel point ; The gradient amplitudes of all pixel points are combined into a gradient amplitude map.
[0042] It should be noted that grain boundaries usually appear as sudden changes in light intensity caused by local surface morphology or phase changes, and are reflected as areas with significantly enhanced gradients in real-time images.
[0043] Furthermore, for each pixel point, within its radius =15pixel circular neighborhood The weighted gradient response strength in each direction is counted; the weighted gradient response strength in all directions is used to form the local gradient direction distribution characteristics of each pixel.
[0044] The calculation formula for the weighted gradient response intensity in each direction is: ; Where, For the direction The weighted gradient response strength on the direction The value range is ; Pixel The circular neighborhood of the pixel Pixel The circular neighborhood of Pixels in ; Pixel The gradient vector at represents the vector modulus, Represents pixel points The gradient amplitude of , which reflects the edge significance; is a Gaussian kernel function with a standard deviation of , It belongs to the angle domain Gaussian kernel, which is used to suppress the jitter caused by noise and smooth the angle distribution; Pixel The direction angle of the gradient vector; Among them, since the boundary of the dendrite trunk appears as a continuous stripe structure in the real-time image, its normal direction is the gradient direction; by counting the dominant gradient directions in the neighborhood, the overall arrangement trend of the area can be estimated: (1) When there is a clear parallel stripe structure in the neighborhood (such as multiple dendrite trunks), the gradient directions of most pixels are concentrated near a certain angle, and a significant peak appears in the local gradient direction distribution characteristics of the pixel points, with high response intensity, and the peak position is the dominant edge direction of the area; (2) When the neighborhood is a melt pool or a random texture area, the gradient direction is evenly distributed, and the local gradient direction distribution characteristics of the pixel points are close to flat, with no obvious main peak, indicating that the area lacks an ordered structure; (3) When there is strong noise or local defects, a few abnormal directions still account for a small proportion after being weighted by the gradient amplitude. At this time, the Gaussian kernel plays a smoothing role to avoid individual noise points dominating the results; therefore, the peak position of the local gradient direction distribution characteristics of the pixel points directly represents the dominant direction of the area.
[0045] S202 , extracting the local dominant direction vector of the pixel point based on the local gradient direction distribution characteristics of the pixel point.
[0046] It should be noted that during the directional solidification process, columnar crystals grow in the form of dendrites, with their trunks extending in the opposite direction of the heat flow and arranged approximately parallel in cross section. Although the global growth direction can be determined by the device structure, in actual images, due to perspective distortion, local perturbations or branching effects, a single global direction is not sufficient to accurately describe the structural orientation of complex areas. Therefore, a spatially variable local dominant direction field is constructed to more finely characterize the dendrite arrangement pattern.
[0047] Specifically, from the local gradient direction distribution characteristics of the pixel point, the direction with the largest weighted gradient response intensity is obtained as the local main peak direction of the pixel point. , then the local dominant direction vector of the pixel point ; The local dominant direction vector represents the local growth direction of the dendrite in the neighborhood of the pixel.
[0048] Among them, if , that is, the gradient is vertical, then , indicating that the dendrites are arranged horizontally and grow to the left; change, Dynamically adjust to adapt to local curved or bifurcated structures; this direction will be used to subsequently construct anisotropic adjacency weights to improve the segmentation's sensitivity to local structures.
[0049] It should be noted that, unlike a fixed global direction, this embodiment automatically extracts a spatially variable direction field through the image's own structure, achieving a transition from "rigid prior" to "flexible perception".
[0050] S3. Calculate the periodic response intensity at the pixel point based on the distance from the pixel point to the nearest grain along the perpendicular direction of its local dominant direction vector and the modulo operation result of the equivalent dendrite spacing in the image space.
[0051] It should be noted that under steady-state directional solidification conditions, the primary dendrite trunks are arranged equidistantly along the pulling direction, and the theoretical dendrite spacing is Determined by the solidification kinetics parameters (Kurz-Fisher relationship); this physical law provides a strong structural prior for the image: the real grain boundary should appear every The distance position; combining the segmentation model with the physical law can effectively suppress mis-segmentation; therefore, this embodiment further explores the periodic arrangement law of dendrite growth and constructs a structural prior term that can be used for energy function constraint.
[0052] See the flowchart of step S3 Figure 3 , including steps S301 to S302, specifically: S301: Calculate the equivalent dendrite spacing in the image space.
[0053] First, during the directional solidification process, the metal melt starts to cool and solidify from one end, and the crystal grows in an orderly manner along a specific direction by establishing a unidirectional heat flow (usually along the pulling direction). Therefore, under ideal steady-state conditions, the solidification rate is Equal to the pulling rate, in mm / s; based on the temperature field to extract the temperature gradient , unit is K / mm.
[0054] Among them, the temperature gradient is extracted based on the temperature field, including: extracting the average temperature profile along the general direction of crystal growth, i.e., the pulling direction, and calculating the axial temperature gradient based on the average temperature profile; extracting the temperature gradient is a conventional method used by those skilled in the art and will not be described in detail here.
[0055] Furthermore, the solidification rate With temperature gradient The theoretical dendrite spacing is calculated according to the Kurz-Fisher empirical formula and converted into the equivalent dendrite spacing in the image space through spatial resolution. The specific calculation formula is: ; in, is the equivalent dendrite spacing in image space; is the solidification rate; is the temperature gradient; is the spatial resolution of the camera's imaging system, in pixels / mm; and is the material constant; Represents the theoretical dendrite spacing, expressed by spatial resolution , the theoretical dendrite spacing Convert to image space units, namely pixels.
[0056] Among them, the material constant and It is an empirical parameter that describes the relationship between the spacing between dendrite trunks and solidification conditions. It is obtained through experimental calibration or literature search. For example, when the material is a nickel-based alloy, =1.5, =0.5, when the material is titanium alloy, =1.5, =0.45.
[0057] S302 , calculating the periodic response intensity at the pixel point based on a modulo operation result of the distance from the pixel point to the nearest grain along the vertical direction of its local dominant direction vector and the equivalent dendrite spacing in the image space.
[0058] It should be noted that during steady-state directional solidification, the primary phase grows in the form of dendrites, whose trunks extend in the opposite direction of the heat flow and are arranged in parallel with equal spacing on the cross section perpendicular to the growth direction. This periodic structure is determined by the thermal-solute coupling instability during the solidification process and is highly predictable. However, in high-temperature images, due to self-luminescence, uniform reflection, blurred boundaries and other reasons, the grayscale of adjacent dendrites is highly similar. Traditional GrabCut cannot distinguish them and often misjudges multiple dendrites as a whole. To this end, this embodiment uses the periodic law of dendrite spacing to construct a priori probability map of the "ideal grain boundary position" to guide the segmentation algorithm to preferentially identify grain boundaries at positions that conform to the periodic law.
[0059] Specifically, the periodic response intensity at the pixel point is calculated based on the distance from the pixel point to the nearest grain along the perpendicular direction of its local dominant direction vector and the modulo operation result of the equivalent dendrite spacing in the image space. The specific calculation formula for the periodic response intensity at the pixel point is: ; Where, Pixel The intensity of the periodic response at ; is the natural exponential function; To control the response peak width, ; Pixel along The distance from the nearest grain in the vertical direction; is the local dominant direction vector of the pixel point, is the local dominant direction vector The vertical direction; Represents the modulo operation; is the equivalent dendrite spacing in image space.
[0060] Among them, the grain refers to the pixel with a segmentation label of 1 in the optimal segmentation label set of the previous frame of real-time image; in the optimal segmentation label set of the previous frame of real-time image, the pixel with a segmentation label of 1 belongs to the foreground, and the pixel with a segmentation label of 0 belongs to the background; and the foreground represents the grain area, and the background represents the melt or other areas. Therefore, the intersection of the pixel belonging to the background and the pixel belonging to the foreground represents the grain boundary in the segmentation result of the previous frame of real-time image.
[0061] in, Represents pixel points The degree of deviation from the ideal period position is close to 0 or When , it indicates the pixel Located exactly at the next expected grain boundary; when the value is close to When , it indicates the pixel Located in the middle of the two grain boundaries, it should not be a grain boundary; through the Gaussian function, when Approaching 0 or hour, Approaching 0, the corresponding pixel The intensity of the periodic response at Approaching 1.
[0062] In addition, the periodic response intensity The larger the value is, the more the pixel location conforms to the dendrite periodic arrangement law; it serves as a regular term in the energy function constructed subsequently to encourage the segmentation results to fall into the periodic high response area.
[0063] S4. Determine the periodic term based on the periodic response intensity at all pixel points; reconstruct the energy function of the GrabCut algorithm based on the periodic term; achieve optimal segmentation of the real-time image by minimizing the reconstructed energy function, and obtain the segmentation result of the real-time image.
[0064] It should be noted that this embodiment reconstructs the energy function based on the traditional GrabCut framework.
[0065] Specifically, the periodic term is determined according to the periodic response intensity at each pixel point; then the periodic term The calculation formula is: ; Where, is the pixel segmentation label set of the real-time image. For the pixels belonging to the foreground, the segmentation label is 1, and for the pixels belonging to the background, the segmentation label is 0; is a periodic term; It is a set of all pixels in the real-time image; pixel For collection Pixels in ; Pixel The segmentation label of the pixel belongs to the background, then ; If the pixel is foreground, then ; Pixel The intensity of the periodic response at .
[0066] Among them, when the pixel belongs to the background, that is, , but the pixels The intensity of the periodic response at The higher it is, the greater the penalty is, thus guiding the segmentation results to conform to the periodic arrangement of dendrites.
[0067] Furthermore, based on the periodic term, the energy function of the GrabCut algorithm is reconstructed; the calculation formula of the reconstructed energy function is: ; Where, is a data item; is the smoothing term; is a periodic term; is the segmentation label set of the real-time image. For pixels belonging to the foreground, the segmentation label is 1, and for pixels belonging to the background, the segmentation label is 0. The foreground represents the grain area, and the background represents the melt or other areas.
[0068] in, 、 are the control coefficients of the smoothing term and the periodic term respectively: Represents the strength of spatial smoothing, encouraging the segmentation labels of adjacent pixels to be consistent unless there is a strong boundary. If it is too small, the segmentation results will be fragmented and sensitive to noise. Too large will result in over-smoothing, which will lead to loss of details and blurred grain boundaries. The value range of is [5,10]. Set to 8; Represents the periodic constraint strength, forcing the segmentation result to conform to the dendrite equidistant arrangement rule. If If it is too small, adhesion cannot be suppressed, resulting in invalid cycle prior. If it is too large, it will suppress the real structural variation (such as branching, perturbation) and produce pseudo grain boundaries. The value range of is [0.5,3]. Set to 1.5.
[0069] Among them, the data items It is a grayscale likelihood model based on the Gaussian mixture model, reflecting the probability of a pixel belonging to the foreground or background; the smoothing term Used to introduce spatial continuity prior, that is, adjacent pixels are more likely to belong to the same category, to encourage adjacent pixels to have similar labels, and to prevent the segmentation results from having "spots" or jagged edges; data item and smoothing term These are all well-known terms in the energy function of the traditional GrabCut algorithm and will not be described in detail here.
[0070] It should be noted that this step breaks through the limitations of the traditional GrabCut algorithm that only relies on local color and spatial proximity, and introduces structural prior knowledge based on the physical mechanism of directional solidification, that is, the dendrite trunks are periodically and equidistantly arranged in the horizontal direction. By converting this law into a computable mathematical model and introducing it into the energy function of the GrabCut algorithm, the resolution ability of densely arranged and textured dendrite structures is significantly improved, solving the fundamental problem of "grain boundary adhesion".
[0071] Furthermore, by minimizing the reconstructed energy function, optimal segmentation of the real-time image is achieved, and a segmentation result of the real-time image is obtained. The segmentation result includes an optimal segmentation label set for the real-time image, wherein pixels with a segmentation label of 1 belong to the foreground, and pixels with a segmentation label of 0 belong to the background; and the foreground represents the grain area, and the background represents the melt or other areas.
[0072] For example, for Figure 4 The real-time image shown is processed by the traditional GrabCut algorithm. Figure 4 The real-time image is segmented and the segmentation results are as follows Figure 5 As shown in Figure 2, the traditional GrabCut algorithm, when it relies only on local pixel color similarity and spatial proximity for segmentation, cannot effectively distinguish the independently growing dendrite trunks and mistakenly merges multiple dendrites into a single region, resulting in Figure 5 The "grain boundary adhesion" phenomenon occurs in the process; the GrabCut algorithm after reconstructing the energy function of the present invention is used to Figure 4 The real-time image is segmented and the segmentation results are as follows Figure 6 As shown, Figure 6 The boundaries of the dendrites are clearly separated, the contours of each trunk are independent and complete, and the segmentation results are more consistent with the actual solidification structure morphology, effectively overcoming the problem of grain boundary adhesion, thereby improving the ability to recognize dense dendrite structures.
Claims
1. A real-time image segmentation method for dendrite growth morphology in a directional solidification furnace, characterized in that: include: Collect real-time images of the metal melt solidification process; for any pixel in the real-time image: According to the statistical results of the gradient vector in the circular neighborhood of the pixel point, the local gradient direction distribution characteristics of the pixel point are obtained; based on the local gradient direction distribution characteristics of the pixel point, the local dominant direction vector of the pixel point is extracted; The theoretical dendrite spacing is calculated based on the Kurz-Fisher empirical formula using the solidification rate and temperature gradient, and the theoretical dendrite spacing is converted into the equivalent dendrite spacing in the image space through spatial resolution. The periodic response intensity at the pixel point is calculated based on the distance from the pixel point to the nearest grain along the perpendicular direction of its local dominant direction vector and the modulo operation result of the equivalent dendrite spacing in the image space; Determine the periodic term based on the periodic response intensity at all pixel points; Reconstruct the energy function of GrabCut algorithm based on periodic terms; By minimizing the reconstructed energy function, the optimal segmentation of the real-time image is achieved and the segmentation result of the real-time image is obtained.
2. The real-time image segmentation method for the dendrite growth morphology in a directional solidification furnace according to claim 1, characterized in that: The real-time image preprocessing includes: Use median filtering to denoise the real-time image; Using an optical pyrometer installed at the same viewing angle, the temperature field of the solidification front of the metal melt is synchronously acquired. The temperature field includes the surface temperature of each pixel in the real-time image. Based on the radiation correction of Planck's law, the denoised real-time image is normalized in combination with the temperature field to obtain a processed real-time image.
3. The real-time image segmentation method for the dendrite growth morphology in a directional solidification furnace according to claim 1, characterized in that: The method of obtaining the local gradient direction distribution characteristics of the pixel point based on the statistical results of the gradient vector in the circular neighborhood of the pixel point includes: For each pixel, within its radius =15 circular neighborhood The weighted gradient response strength in each direction is counted; the weighted gradient response strength in all directions is used to form the local gradient direction distribution characteristics of each pixel.
4. The real-time image segmentation method for the dendrite growth morphology in a directional solidification furnace according to claim 3, characterized in that: The calculation formula for the weighted gradient response intensity in each direction is: ; Where, For the direction The weighted gradient response strength on the direction The value range is ; Pixel The circular neighborhood of the pixel Pixel The circular neighborhood of Pixels in ; Pixel The gradient vector at , Represents the vector modulus; is a Gaussian kernel function with a standard deviation of , It belongs to the angle domain Gaussian kernel, which is used to suppress the jitter caused by noise and smooth the angle distribution; Pixel The direction angle of the gradient vector.
5. The real-time image segmentation method for dendrite growth morphology in a directional solidification furnace according to claim 1, characterized in that: The extracting of the local dominant direction vector of the pixel point based on the local gradient direction distribution characteristics of the pixel point includes: From the local gradient direction distribution characteristics of the pixel point, the direction with the largest weighted gradient response intensity is obtained as the local main peak direction of the pixel point , then the local dominant direction vector of the pixel point .
6. The real-time image segmentation method for dendrite growth morphology in a directional solidification furnace according to claim 1, characterized in that: The method of calculating the theoretical dendrite spacing using the solidification rate and temperature gradient according to the Kurz-Fisher empirical formula and converting the theoretical dendrite spacing into an equivalent dendrite spacing in the image space by using the spatial resolution includes: ; in, is the equivalent dendrite spacing in image space; is the solidification rate; is the temperature gradient; is the spatial resolution of the camera's imaging system; and is the material constant; represents the theoretical dendrite spacing.
7. The real-time image segmentation method for dendrite growth morphology in a directional solidification furnace according to claim 1, characterized in that: The periodic response intensity at the pixel point is calculated based on the modulo operation result of the distance from the pixel point to the nearest grain along the vertical direction of the local dominant direction vector and the equivalent dendrite spacing in the image space, including: ; Where, Pixel The intensity of the periodic response at ; is the natural exponential function; To control the response peak width, ; Pixel along The distance from the vertical direction to the nearest grain; is the local dominant direction vector of the pixel point, is the local dominant direction vector The vertical direction; Represents the modulo operation; is the equivalent dendrite spacing in image space.
8. The real-time image segmentation method for dendrite growth morphology in a directional solidification furnace according to claim 7, characterized in that: The grain refers to a pixel point with a segmentation label of 1 in the optimal segmentation label set of the previous frame of real-time image.
9. The real-time image segmentation method for dendrite growth morphology in a directional solidification furnace according to claim 1, characterized in that: The determining of the periodic term according to the periodic response intensity at all pixel points includes: ; Where, is the pixel segmentation label set of the real-time image. For the pixels belonging to the foreground, the segmentation label is 1, and for the pixels belonging to the background, the segmentation label is 0; is a periodic term; It is a set of all pixels in the real-time image; pixel For collection Pixels in ; Pixel The segmentation label of Pixel The intensity of the periodic response at .
10. The real-time image segmentation method for dendrite growth morphology in a directional solidification furnace according to claim 9, characterized in that: The energy function of the GrabCut algorithm is reconstructed based on the periodic term, including: ; Where, is a data item; is the smoothing term; is a periodic term; is the segmentation label set of the real-time image; 、 are the control coefficients of the smoothing term and the periodic term respectively.
Citation Information
Patent Citations
Method and system for measuring solidification structure based on dendritic crystal macroscopic inspection image
CN117132580A
Image and segmentation label generation model of tree structure data and application
WO2023221421A1