A real-time image segmentation method for directional solidification dendrite growth morphology

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 the clear separation and accurate identification of dendrite boundaries are achieved.

CN120672787BActive Publication Date: 2025-10-24BAOJI PEAK MATERIAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511188078.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-25
Publication Date
2025-10-24
Estimated Expiration
2045-08-25

AI Technical Summary

Technical Problem

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."

Method used

By introducing prior knowledge of the structure based on the physical mechanism of directional solidification, the energy function of the GrabCut algorithm is reconstructed through the distribution characteristics of the local gradient direction and the periodic response intensity. By utilizing the regularity of the periodic equidistant arrangement of the dendrite trunks in the lateral direction, a reconstructed energy function integrating metallurgical mechanism is constructed, which significantly improves the ability to distinguish densely arranged dendrite structures with consistent texture.

Benefits of technology

It effectively solves the problem of 'grain boundary adhesion', achieves clear separation and independent identification of dendrite boundaries, and improves the ability to resolve dense dendrite structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120672787B_ABST
    Figure CN120672787B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of image segmentation, and particularly relates to a real-time image segmentation method for directional solidification dendrite growth morphology, which comprises the following steps: in a real-time image, calculating the periodic response intensity at a pixel point according to the modulus 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, determining the periodic term according to the periodic response intensity at all pixel points, reconstructing the energy function of the GrabCut algorithm based on the periodic term, minimizing the reconstructed energy function to realize the optimal segmentation of the real-time image, and obtaining the segmentation result of the real-time image. The present application significantly improves the resolution capability for the densely arranged and texture consistent dendrite structure, and solves the fundamental problem of "grain boundary adhesion".
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image segmentation. More particularly, the present application relates to a real-time image segmentation method for directional solidification dendrite growth morphology. BACKGROUND

[0002] Directional solidification technology is the core process for preparing high-performance metal components, and the key lies in controlling the ordered crystallization growth of metal melt along a specific direction under strong temperature gradient to form columnar crystal or single crystal structure.

[0003] To realize real-time monitoring and quality control of the solidification process, an observation method based on machine vision is proposed: interface evolution images are collected by an industrial camera, and image segmentation algorithms are used to identify grain boundary positions, and then key process parameters such as growth rate, orientation consistency, and dendrite spacing are extracted.

[0004] Among numerous image segmentation techniques, GrabCut algorithm is tried to be applied in the extraction task of dendrites due to its advantages of no deep learning training and low computational resource requirement.

[0005] GrabCut algorithm is based on GraphCuts framework, which models the color distribution of foreground (grain area) and background (melt or other areas) by Gaussian Mixture Model (GMM), and constructs the adjacency graph between pixels to minimize the energy function for optimal segmentation.

[0006] However, in practical application, it is found that GrabCut algorithm has serious defects when dealing with images of parallel growth of dendrites in directional solidification process: since adjacent dendrites are composed of the same alloy material, their surface reflection characteristics, gray intensity and texture features are highly similar, which leads to the fact that GrabCut can not effectively distinguish the independent growth of dendrite trunks when it only relies on local pixel color similarity and spatial proximity for segmentation, and multiple dendrites are mistakenly merged into a single region, resulting in the phenomenon of "grain boundary adhesion". SUMMARY

[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, is the weighted gradient response intensity in direction , the value range of direction is ; is the circular neighborhood of pixel point , the pixel point is the pixel point in the circular neighborhood of pixel point ; is the gradient vector at pixel point , represents the vector length; is the Gaussian kernel function, and the standard deviation , belongs to the angle domain Gaussian kernel, which is used to suppress the jitter caused by noise and smooth the angle distribution; is the direction angle of the gradient vector of pixel point .

[0012] Preferably, the local gradient direction distribution feature based on the pixel point extracts the local dominant direction vector of the pixel point, comprising: obtaining the direction with the maximum weighted gradient response intensity from the local gradient direction distribution feature of the pixel point as the local main peak direction of the pixel point , then the local dominant direction vector of the pixel point is .

[0013] The application extracts the structural feature capable of representing the arrangement trend of the dendrite trunk by analyzing the statistical distribution of the gradient direction in the local area of the real-time image, which is used as the basis for subsequent construction of the direction prior, more finely describes the dendrite arrangement rule, and is used for guiding the direction of segmentation.

[0014] Preferably, the theoretical dendrite spacing is calculated according to the Kurz-Fisher empirical formula by using the solidification rate and the temperature gradient, and the theoretical dendrite spacing is converted into the equivalent dendrite spacing in the image space through the spatial resolution, comprising: ; wherein, is the equivalent dendrite spacing in the image space; is the solidification rate; is the temperature gradient; is the spatial resolution of the imaging system of the camera; and are material constants; indicates the theoretical dendrite spacing.

[0015] The application is based on the feature that under the condition of steady-state directional solidification, the primary dendrite trunks are arranged equidistantly along the pulling direction, the theoretical dendrite spacing is calculated through the Kurz-Fisher empirical formula, and a strong structural prior is provided for the image.

[0016] ​Preferably, the distance from the pixel point to the nearest grain along the perpendicular direction of the local dominant direction vector of the pixel point, and the modulus operation result of the equivalent dendrite spacing in the image space, are used to calculate the periodic response intensity at the pixel point, including: ; wherein, is the periodic response intensity at the pixel point; is a natural exponential function; is a control response peak width, ; is the distance from the pixel point to the nearest grain along the perpendicular direction of the local dominant direction vector of the pixel point; is the local dominant direction vector of the pixel point, is the perpendicular direction of the local dominant direction vector; represents a modulus operation; is the equivalent dendrite spacing in the image space.

[0017] The present application utilizes the periodicity of dendrite spacing to construct a prior probability map of an "ideal grain boundary position", combines the segmentation model with the physical law, guides the segmentation algorithm to preferentially identify the grain boundary at the position conforming to the periodicity, and can effectively suppress false segmentation.

[0018] Preferably, the grain refers to the pixel point with a segmentation label of 1 in the optimal segmentation label set of the previous frame of real-time image.

[0019] Preferably, the determination of the periodic term according to the periodic response intensity at all pixel points includes: ; wherein, is the pixel segmentation label set of the real-time image, for the pixel point belonging to the foreground, the segmentation label is 1, and for the pixel point belonging to the background, the segmentation label is 0; is the periodic term; is a set composed of all pixel points in the real-time image; the pixel point is the pixel point in the set ; is the segmentation label of the pixel point ; is the periodic response intensity at the pixel point .

[0020] The present application utilizes the periodic arrangement rule of dendrite growth to construct a structure prior term that can be used to constrain the energy function, and introduces the energy function of the GrabCut algorithm, significantly improves the resolution capability of the densely arranged and texture consistent dendrite structure, and solves the fundamental problem of "grain boundary adhesion".

[0021] ​​​​Preferably, the energy function of the reconstructed GrabCut algorithm based on the periodic term comprises: ; wherein, is a data term; is a smooth term; is a periodic term; is a segmentation label set of a real-time image; , are control coefficients of the smooth term and the periodic term, respectively.

[0022] The present application has the following beneficial effects:

[0023] The present application breaks through the limitation of the traditional GrabCut algorithm which only relies on local color and spatial proximity, introduces the structural prior knowledge based on the directional solidification physical mechanism, i.e. the dendrite trunk is periodically and equidistantly arranged in the transverse direction, constructs the reconstructed energy function by introducing the local direction field and the periodic response strength, and significantly improves the resolution capability of the dendrite structure with dense arrangement and consistent texture, thereby solving the fundamental problem of "grain boundary adhesion". BRIEF DESCRIPTION OF DRAWINGS

[0024] Figure 1 is a flow chart schematically showing a real-time image segmentation method for dendrite growth morphology of a directional solidification furnace in the present application;

[0025] Figure 2 is a flow chart schematically showing step S2;

[0026] Figure 3 is a flow chart schematically showing step S3;

[0027] Figure 4 is a schematic view schematically showing a real-time image;

[0028] Figure 5 is a schematic view schematically showing the segmentation result obtained by segmenting the real-time image of Figure 4 by the traditional GrabCut algorithm;

[0029] Figure 6 is a schematic view schematically showing the segmentation result obtained by segmenting the real-time image of Figure 4 by the GrabCut algorithm of the present application. DETAILED DESCRIPTION

[0030] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0031] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0032] The embodiment of the present application discloses a real-time image segmentation method for directional solidification furnace dendrite growth morphology, referring to Figure 1 , comprising steps S1 to S4:

[0033] S1, collecting real-time images of the metal melt solidification process.

[0034] Specifically, at the observation window of the vacuum directional solidification furnace, a high-temperature-resistant CCD camera is installed, and real-time images of the metal melt solidification process are collected through the camera , is time.

[0035] It should be noted that in 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 directly collected real-time images have problems such as serious self-luminous, dynamic brightness change and boundary blur. Therefore, image preprocessing is the premise of realizing subsequent accurate segmentation.

[0036] Therefore, the real-time image is preprocessed as follows:

[0037] (1) The real-time image is denoised by median filtering.

[0038] It should be noted that in a high-temperature environment, the CCD sensor is easily affected by electromagnetic interference, thermal electron noise and particle splashing, etc., resulting in "pepper and salt noise" or local abnormal bright spots in the image. Such noise will interfere with subsequent gradient calculation and edge detection.

[0039] Therefore, the real-time image is denoised by median filtering, only because when there are individual extreme values (such as splashing metal reflection points) in the window, the median can effectively exclude their influence, and compared with mean filtering, median filtering will not blur the key edge structure such as grain boundary, which is conducive to subsequent gradient extraction. In addition, in the directional solidification scene, the grain boundary scale is usually greater than 3 pixel points in length, therefore, when denoising the real-time image, the window in the median filtering is 3x3 in size, which can meet the denoising requirement without losing details.

[0040] Among them, the median filtering as a nonlinear denoising means belongs to the known technology, which will not be described here.

[0041] (2) Based on the radiation correction of Planck's law, the denoised real-time image is normalized to obtain the processed real-time image.

[0042] 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.

[0043] 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.

[0044] 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.

[0045] S2. Based on the local gradient direction distribution characteristics of the pixel point, the local dominant direction vector of the pixel point is extracted.

[0046] 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.

[0047] 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.

[0048] See the flowchart of step S2 Figure 2 , including steps S201 to S202, specifically:

[0049] S201. Obtain local gradient direction distribution characteristics of the pixel points based on the statistical results of the gradient vectors of the pixel points.

[0050] 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.

[0051] 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.

[0052] 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.

[0053] The calculation formula for the weighted gradient response intensity in each direction is:

[0054] ;

[0055] 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;

[0056] Wherein, since the trunk boundary of the dendrite appears as a continuous stripe structure in the real-time image, the normal direction thereof is the gradient direction; by counting the dominant gradient direction in the neighborhood, the overall arrangement trend of the region can be estimated: (1) when there are clear parallel stripe structures (such as multiple dendrite trunks) in the neighborhood, the gradient directions of most pixel points are concentrated around a certain angle, a significant peak value appears in the local gradient direction distribution characteristics of the pixel points, the response intensity is high, and the peak value position is the dominant edge direction of the region; (2) when the neighborhood is a molten pool or a random texture region, the gradient direction distribution is uniform, the local gradient direction distribution characteristics of the pixel points are close to flat, and there is no obvious main peak, indicating that the region lacks ordered structure; (3) when there is strong noise or local defects, a small number of abnormal directions are still small after being weighted by the gradient amplitude, at this time the Gaussian kernel plays a smoothing role to avoid individual noise points dominating the result; therefore, the peak value position of the local gradient direction distribution characteristics of the pixel points directly represents the dominant direction of the region.

[0057] S202, based on the local gradient direction distribution characteristics of the pixel point, a local dominant direction vector of the pixel point is extracted.

[0058] It should be noted that in the directional solidification process, columnar crystals grow in the form of dendrites, the trunk thereof extends in the opposite direction of the heat flow, and in the cross section, the trunks are approximately parallel arranged; although the global growth direction can be determined by the device structure, in the actual image, due to the perspective distortion, local disturbance or branching, a single global direction is insufficient to accurately describe the structure orientation of the complex region; therefore, by constructing a spatially variable local dominant direction field, the arrangement rule of the dendrites is described more finely.

[0059] Specifically, from the local gradient direction distribution characteristics of the pixel point, the direction with the maximum weighted gradient response intensity is obtained as the local main peak direction of the pixel point , the local dominant direction vector of the pixel point is ; the local dominant direction vector represents the local growth direction of the dendrites in the neighborhood of the pixel point.

[0060] Wherein, if , that is, the gradient is vertical, then , which indicates that the dendrites are horizontally arranged, and the growth direction is to the left; as changes, is dynamically adjusted to adapt to the local bending or branching structure; the direction will be used for subsequent construction of anisotropic adjacency weights, and the sensitivity of the segmentation to the local structure is improved.

[0061] It should be noted that unlike the fixed global direction, the embodiment automatically extracts a spatially variable direction field from the structure of the image itself, realizing the transition from “rigid priori” to “flexible perception”.

[0062] S3, according to the distance from the pixel point to the nearest grain along the perpendicular direction of the local dominant direction vector of the pixel point, and the modulus operation result of the equivalent dendrite spacing in the image space, the periodic response intensity at the pixel point is calculated.

[0063] It should be noted that under the condition of steady-state directional solidification, the primary dendrite trunks are equidistantly arranged 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 boundaries should appear at positions every distance; combining the segmentation model with this physical law can effectively suppress false segmentation; therefore, the embodiment further excavates the periodic arrangement rule of dendrite growth, and constructs a structural prior item that can be used for energy function constraint.

[0064] The flowchart of step S3 refers to Figure 3 , including steps S301 to S302, specifically:

[0065] S301, calculate the equivalent dendrite spacing in the image space.

[0066] First, in the directional solidification process, the metal melt is cooled and solidified from one end, and the crystal is grown in a specific direction by establishing a one-way heat flow (usually along the pulling direction), so that under ideal steady-state conditions, the solidification rate is equal to the pulling rate, which is mm / s; according to the temperature gradient extracted based on the temperature field , which is K / mm.

[0067] Among them, according to the temperature gradient extracted based on the temperature field, it includes: extracting the average temperature profile along the total direction of crystal growth, i.e. the pulling direction, and calculating the axial temperature gradient based on the average temperature profile; the extraction of the temperature gradient is a routine means for those skilled in the art, which will not be repeated here.

[0068] Further, using the solidification rate and the temperature gradient , the theoretical dendrite spacing is calculated according to the Kurz-Fisher empirical formula, and is converted into the equivalent dendrite spacing in the image space through the spatial resolution, and the specific calculation formula is:

[0069] ;

[0070] Among them, is the equivalent dendrite spacing in the image space; is the solidification rate; is the temperature gradient; is the spatial resolution of the imaging system of the camera, which is pixel / 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.

[0071] 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.

[0072] 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.

[0073] 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.

[0074] 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:

[0075] ;

[0076] 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.

[0077] 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.

[0078] 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 periodic response at Approaching 1.

[0079] In addition, the periodic response intensity The larger the value is, the more the pixel location conforms to the periodic arrangement of the dendrite. 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.

[0080] 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.

[0081] It should be noted that this embodiment reconstructs the energy function based on the traditional GrabCut framework.

[0082] Specifically, the periodic term is determined according to the periodic response intensity at each pixel point; then the periodic term The calculation formula is:

[0083] ;

[0084] Where, is a set of segmentation labels for pixels in real-time image, for a pixel belonging to foreground, its segmentation label is 1, for a pixel belonging to background, its segmentation label is 0; is a periodic term; is a set of all pixels in real-time image; pixel is a set of pixel ; is a segmentation label of pixel , if pixel belongs to background, then ; if pixel belongs to foreground, then ; is a periodic response intensity at pixel .

[0085] wherein, when pixel belongs to background, i.e. , but the periodic response intensity at pixel is higher, then the punishment is larger, so as to guide the segmentation result to be consistent with the periodic arrangement rule of dendrite.

[0086] Further, based on the periodic term, the energy function of GrabCut algorithm is reconstructed; then the calculation formula of the reconstructed energy function is:

[0087] ;

[0088] wherein, is a data term; is a smooth term; is a periodic term; is a set of segmentation labels for pixels in real-time image, for a pixel belonging to foreground, its segmentation label is 1, for a pixel belonging to background, its segmentation label is 0; wherein, the foreground represents the grain region, and the background represents the melt or other region.

[0089] wherein, , are control coefficients of smooth term and periodic term respectively: represents the spatial smoothness intensity, encourages the segmentation labels of adjacent pixels to be consistent, unless there is a strong boundary, if is too small, will lead to the fragmentation of segmentation result, noise sensitive, if is too large, will be over-smoothed, and thus lead to the loss of details and the blur of grain boundary, therefore, the value range of is [5, 10], and the present application sets to 8; represents the periodic constraint intensity, forces the segmentation result to be consistent with the equidistant arrangement rule of dendrite, 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.

[0090] 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.

[0091] 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".

[0092] 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.

[0093] 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 6The middle dendrite boundaries are clearly separated, the profiles of each main stem are independent and complete, the segmentation result is more consistent with the actual solidification structure morphology, effectively overcomes the problem of grain boundary adhesion, and further improves the recognition ability of dense dendritic structure.

Claims

1. A method for real-time image segmentation of directional solidification dendrite growth morphology, characterized in that, The application relates to a method for segmenting real-time images of metal melt solidification, comprising the following steps: collecting real-time images of metal melt solidification; for any pixel point in the real-time images: obtaining a local gradient direction distribution feature of the pixel point according to a statistical result of gradient vectors in a circular neighborhood of the pixel point; extracting a local dominant direction vector of the pixel point based on the local gradient direction distribution feature of the pixel point; calculating a theoretical dendrite spacing according to a Kurz-Fisher empirical formula based on a solidification rate and a temperature gradient, and converting the theoretical dendrite spacing into an equivalent dendrite spacing in an image space through spatial resolution; calculating a periodic response intensity at the pixel point according to a modulus operation result of a distance of the pixel point along a vertical direction of the local dominant direction vector of the pixel point to the nearest grain and the equivalent dendrite spacing in the image space; determining a periodic term according to the periodic response intensity at all pixel points; reconstructing an energy function of a GrabCut algorithm based on the periodic term; realizing optimal segmentation of the real-time images by minimizing the reconstructed energy function, and obtaining a segmentation result of the real-time images.

2. The real-time image segmentation method of directional solidification dendrite growth morphology according to claim 1, characterized in that, The preprocessing of the real-time images comprises the following steps: adopting median filtering to denoise the real-time images; synchronously collecting a temperature field of a solidification front of the metal melt by using an optical pyrometer installed at the same angle of view, wherein the temperature field contains a surface temperature of a position of each pixel point in the real-time images; carrying out normalization processing on the denoised real-time images based on radiation correction of Planck's law and the temperature field, and obtaining a processed real-time image.

3. The real-time image segmentation method of directional solidification dendrite growth morphology according to claim 1, characterized in that, The method for obtaining the local gradient direction distribution feature of the pixel point according to the statistical result of the gradient vectors in the circular neighborhood of the pixel point comprises the following steps: 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 of directional solidification dendrite growth morphology according to claim 3, characterized in that, the calculation formula of the weighted gradient response intensity in each direction is as follows: ; wherein is the weighted gradient response intensity in direction , the direction has a value range of ; is a circular neighborhood of pixel point , the pixel point is a pixel point in the circular neighborhood of pixel point ; is a gradient vector at pixel point , denotes the vector length; is a Gaussian kernel function, and the standard deviation , is an angular domain Gaussian kernel, used to suppress jitter caused by noise, smooth the angle distribution; is the direction angle of the gradient vector of pixel point .

5. The real-time image segmentation method of directional solidification dendrite growth morphology according to claim 1, characterized in that, The method for extracting the local dominant direction vector of the pixel point based on the local gradient direction distribution feature of the pixel point comprises the following steps: From the local gradient direction distribution characteristics of the pixel point, a direction with the maximum weighted gradient response intensity is obtained as the local main peak direction of the pixel point , the local dominant direction vector of the pixel point is .

6. The real-time image segmentation method of directional solidification dendrite growth morphology according to claim 1, characterized in that, The method for calculating the theoretical dendrite spacing according to the Kurz-Fisher empirical formula based on the solidification rate and the temperature gradient, and converting the theoretical dendrite spacing into the equivalent dendrite spacing in the image space through the spatial resolution comprises the following steps: ; wherein, is the equivalent dendrite arm spacing in the image space; is the solidification rate; is the temperature gradient; is the spatial resolution of the imaging system of the camera; and is a material constant; denotes the theoretical dendrite arm spacing.

7. The method of claim 1, wherein the method is a real-time image segmentation method for directional solidification dendrite growth morphology. The method for calculating the periodic response intensity at the pixel point according to the modulus operation result of the distance of the pixel point along the vertical direction of the local dominant direction vector of the pixel point to the nearest grain and the equivalent dendrite spacing in the image space comprises the following steps: ; 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.

8. The real-time image segmentation method of directional solidification dendrite growth morphology according to claim 7, characterized in that, The grain refers to a pixel point with a segmentation label of 1 in an optimal segmentation label set of a previous real-time image.

9. The real-time image segmentation method of directional solidification dendrite growth morphology according to claim 1, characterized in that, The method for determining the periodic term according to the periodic response intensity at all pixel points comprises the following steps: ; In the formula, is a set of segmentation labels of the pixel points of the real-time image, wherein the segmentation label of a pixel point belonging to the foreground is 1, and the segmentation label of a pixel point belonging to the background is 0; is a periodic term; is a set of all pixel points in the real-time image; the pixel point is a set of the pixel points in the set is a segmentation label of the pixel point ; and is a periodic response intensity at the pixel point .

10. The real-time image segmentation method of directional solidification dendrite growth morphology according to claim 9, characterized in that, The method for reconstructing the energy function of the GrabCut algorithm based on the periodic term comprises the following steps: ; wherein is a data term; is a smoothing term; is a periodic term; is a set of segmentation labels for real-time images; , are control coefficients for 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