A molten pool boundary recognition method and system based on image processing
By constructing a boundary degree evaluation model of grayscale extrema and information entropy and multi-scale morphological corrosion, combined with an optimized transmittance model, the problem of inaccurate identification of the molten pool boundary in high-temperature liquid titanium smelting by the traditional dark channel defogging algorithm is solved, and the clear positioning of the molten pool boundary and the precise control of the EB furnace automation are realized.
Patent Information
- Application Number
- CN202511881179.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-15
- Publication Date
- 2026-03-20
- Estimated Expiration
- 2045-12-15
AI Technical Summary
Traditional dark channel defogging algorithms suffer from blurred gradient features in the image of the molten pool boundary due to metal vapor obscuring the molten pool during high-temperature liquid titanium smelting, which reduces the accuracy of molten pool boundary identification and affects the safety and precision of EB furnace automated control.
A melt pool boundary recognition method based on image processing is adopted. By constructing a boundary degree evaluation model based on gray-level extreme values and information entropy, and combining it with a multi-scale morphological erosion and optimized transmittance model, the melt pool boundary is accurately identified. The edge is extracted using the Canny edge detection operator to achieve clear localization of the melt pool boundary.
It improves the accuracy and robustness of molten pool boundary identification, ensures the safety and precision of EB furnace automated control, avoids false boundary offsets, and provides accurate basis for smelting parameter control.
Smart Images

Figure CN121304714B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image data processing, and in particular to a molten pool boundary identification method and system based on image processing. BACKGROUND
[0002] With the increasing demand for high-end titanium and titanium alloy materials in the fields of aerospace, ocean engineering, etc., the electron beam cold hearth melting (EB) furnace has become the core equipment for titanium material melting due to its excellent purification capability. In the EB furnace melting process, accurately monitoring the boundary position of the molten pool, especially the liquid level and boundary shape of the overflow port, is crucial for controlling the melting rate and preventing overflow defects.
[0003] Currently, industrial cameras are mainly used to monitor the molten pool in the furnace in real time. However, in a vacuum environment, high-temperature liquid titanium has extremely high saturated vapor pressure, and a large amount of metal vapor is continuously generated during the melting process. The metal vapor forms a layer of fog-like shielding layer in the image, resulting in blurred image gradient features of the molten pool boundary position.
[0004] The traditional dark channel dehazing (DCP) algorithm relies on local windows to determine the dark channel value when processing gradient feature blurred images. When the window covers the highlight boundary area of the molten pool, the window often contains both the highlight molten pool area and the darker background area. At this time, the traditional DCP algorithm will forcibly select the minimum value of the background area in the window as the dark channel value, causing the boundary pixel points belonging to the molten pool area to borrow the background value, resulting in an overestimated transmission rate. Using the overestimated transmission rate for restoration will cause false displacement of the edge position, reducing the accuracy of the identified molten pool boundary, and thus affecting the safety and precision of the EB furnace automatic control. SUMMARY
[0005] To solve the problem of overestimated transmission rate at the boundary caused by the shielding of metal vapor generated during the melting process, which reduces the accuracy of the identified molten pool boundary and thus affects the safety and precision of the electron beam cold hearth furnace automatic control, the present application provides a molten pool boundary identification method and system based on image processing.
[0006] In the first aspect, the present application provides a molten pool boundary identification method based on image processing, which adopts the following technical scheme:
[0007] A molten pool boundary recognition method based on image processing includes: acquiring a molten pool image in an electron beam cold hearth furnace and performing grayscale processing to obtain a molten pool grayscale image; setting a window for each pixel in the molten pool grayscale image, and determining the boundary degree of each pixel to characterize the possibility of the pixel being located in the molten pool boundary region based on the maximum and minimum grayscale values of all pixels within the window and the information entropy of the grayscale values of all pixels within the window; performing morphological erosion on the molten pool grayscale image using multi-scale structuring elements, and determining the optimized boundary degree of each pixel based on the sum of grayscale value differences between adjacent scales after morphological erosion, combined with the boundary degree; obtaining the initial dark channel value of each pixel, and using the product of the initial dark channel value and the optimized boundary degree as the corrected dark channel value of each pixel; calculating the optimized transmittance of each pixel based on the corrected dark channel value, and performing dehazing restoration on the molten pool grayscale image in combination with atmospheric light values to obtain a restored image; and using an edge detection operator to extract edges from the restored image to obtain the molten pool boundary.
[0008] This invention constructs a boundary degree evaluation model by analyzing the grayscale extreme values and information entropy within the pixel window. This model can effectively identify the molten pool boundary region, providing a reliable boundary feature basis for subsequent dark channel correction. By analyzing the grayscale differences between adjacent scales through multi-scale morphological erosion analysis and combining the boundary degree with the optimized boundary degree, it achieves precise enhancement of boundary features and effectively solves the misjudgment problem of the traditional DCP algorithm in bright boundary regions. By multiplying the initial dark channel value with the optimized boundary degree, it realizes intelligent correction of the dark channel, ensuring that pixels in the boundary region use more appropriate dark channel values and avoiding the incorrect borrowing of background values. Based on the corrected dark channel value, it calculates the optimized transmittance and performs dehazing restoration, improving the quality of the molten pool image and effectively solving the boundary blurring problem caused by metal vapor atomization. This provides an accurate boundary recognition basis for the automated control of the EB furnace.
[0009] Furthermore, the boundary degree satisfies:
[0010] In the formula, For the first The boundary level of each pixel and The first The maximum and minimum grayscale values among all pixels within a window of 1 pixel. For the first The information entropy of the grayscale values of all pixels within a window of 1 pixel. It is the maximum-minimum normalization function.
[0011] This invention achieves a comprehensive evaluation of boundary conditions by constructing a product term that includes the gray-level extreme value difference and information entropy. The gray-level extreme value difference reflects local contrast characteristics, while information entropy reflects the complexity of gray-level distribution. By combining gray-level extreme values and information entropy, boundary regions and uniform regions can be effectively distinguished, providing a reliable boundary feature basis for dark channel correction.
[0012] Furthermore, the optimization boundary degree satisfies:
[0013] In the formula, For the first The degree of optimization boundary for each pixel For the first The boundary level of each pixel The set number of morphological scales. For the first The pixel is used in the first The grayscale values of the molten pool grayscale image after morphological erosion by structuring elements of each scale. For the first The pixel is used in the first The grayscale values of the molten pool grayscale image after morphological erosion by structuring elements of each scale, when hour, The first grayscale image of the molten pool The grayscale value of each pixel This is an adjustment factor used to adjust the range of values for the optimization boundary degree. For the minimum normalization function, It is the absolute value symbol.
[0014] This invention uses multi-scale morphological erosion analysis to sum the differences in gray values between adjacent scales, combined with the original boundary degree, to achieve a comprehensive evaluation of optimized boundary degree. This effectively captures the feature changes of the boundary at different scales, improving the accuracy and robustness of boundary recognition.
[0015] Furthermore, the structural element is a circular structural element.
[0016] Furthermore, the optimized transmittance satisfies:
[0017] In the formula, For the first Optimized transmittance per pixel For defogging level factor, For the first Corrected dark channel values for each pixel Atmospheric light value, This is a hyperparameter.
[0018] This invention achieves precise control over the degree of dehazing by constructing an optimized transmittance model that includes the ratio of the corrected dark channel value to the atmospheric light value, providing a reliable transmittance estimate for image restoration.
[0019] Furthermore, the grayscale values of each pixel in the restored image satisfy:
[0020] In the formula, To restore the first image The grayscale value of each pixel The first grayscale image of the molten pool The grayscale value of each pixel Atmospheric light value, For the first Optimized transmittance per pixel The minimum transmittance threshold is set. It is a function for maximizing the value.
[0021] This invention achieves effective restoration of fogged images by constructing an image restoration formula based on optimized transmittance. The introduction of a minimum transmittance threshold avoids restoration anomalies caused by excessively low transmittance, ensuring the numerical stability and visual quality of the restored image and improving the clarity of the molten pool boundary region.
[0022] Furthermore, the step of using an edge detection operator to extract edges from the restored image to obtain the melt pool boundary includes: applying the Canny edge detection operator to the restored image; performing morphological connection and closure operations on the detected edge lines to extract the contour of the largest connected region as the finally identified melt pool boundary.
[0023] Furthermore, the Canny edge detection operator includes a high threshold and a low threshold, wherein the high threshold is set to 0.8 times the maximum gradient value of the restored image, and the low threshold is set to 0.4 times the high threshold.
[0024] Furthermore, after obtaining the molten pool boundary, the method further includes: transmitting the coordinates of the molten pool boundary to the electron beam cold hearth furnace control system for real-time adjustment of the scanning power and frequency of the electron beam to control the melting process.
[0025] Secondly, the present invention provides a melt pool boundary recognition system based on image processing, which adopts the following technical solution:
[0026] A melt pool boundary recognition system based on image processing includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned melt pool boundary recognition method based on image processing is implemented.
[0027] By adopting the technical scheme, the image processing-based molten pool boundary recognition method is generated into a computer program and stored in a memory to be loaded and executed by a processor, so that a terminal device is manufactured according to the memory and the processor, and use is facilitated.
[0028] The present application has the following technical effects:
[0029] (1) In view of the defects of the traditional DCP algorithm that the local window simultaneously covers the highlight area and the background dark area of the molten pool, and the minimum value of the background is selected as the dark channel value, the present application improves the dark channel calculation mechanism, accurately distinguishes the pixel features of the highlight boundary area and the background area of the molten pool, avoids the false borrowing of the background value by the molten pool boundary pixel points, and thus accurately estimates the transmittance, solves the problem of false edge shift after image restoration caused by the high transmittance of the traditional DCP algorithm, and lays a data foundation for accurate recognition of the molten pool boundary.
[0030] (2) Through the optimized defogging processing and boundary enhancement strategy, the fog-shaped shielding layer formed by the metal vapor is effectively penetrated, the original blurred gradient features of the molten pool boundary are restored, the gray difference between the molten pool and the background is improved, especially the liquid level and the boundary form of the overflow port can be clearly presented, the boundary blurring or shift caused by improper defogging of the traditional algorithm is avoided, and the accuracy of the molten pool boundary positioning is improved, which provides a reliable visual basis for parameter regulation of the subsequent smelting process.
[0031] (3) The accurate molten pool boundary recognition result can provide real-time and accurate molten pool state data for the automatic control of the EB furnace, so that the control system can accurately adjust the smelting rate and timely avoid the overflow defects caused by boundary recognition errors, solve the problem of the traditional DCP algorithm that the boundary positioning is not accurate, which affects the safety and accuracy of the EB furnace control, and provide key technical support for stable smelting of high-end titanium and titanium alloy materials. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 is a method flowchart in the image processing-based molten pool boundary recognition method of the embodiment of the present application.
[0033] Figure 2 is an image pixel gray scale distribution comparison schematic diagram in the image processing-based molten pool boundary recognition method of the embodiment of the present application. DETAILED DESCRIPTION
[0034] 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 part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0035] This invention discloses a melt pool boundary recognition method based on image processing, referring to... Figure 1 This includes steps S001-S006:
[0036] S001: Acquire images of the molten pool inside the electron beam cold hearth furnace and perform grayscale processing to obtain a grayscale image of the molten pool.
[0037] Specifically, an industrial camera is used to acquire real-time images of the molten pool inside the EB furnace, and the acquired molten pool images are processed into grayscale to obtain a single-channel grayscale image of the molten pool, in order to reduce the amount of computation and focus on the brightness gradient features.
[0038] S002: Determine the boundary degree of each pixel to characterize the possibility that the pixel is located in the boundary region of the melt pool.
[0039] It should be noted that this step aims to analyze the local grayscale features of the image to obtain the boundary degree of each pixel, which serves as the basis for determining whether a pixel is located at the boundary of the molten pool. In the molten pool image of an EB furnace, the boundary region usually exhibits more complex and drastic texture changes. Therefore, the more drastic and complex the grayscale changes of a pixel within its window, the greater the likelihood that the pixel is located in the molten pool boundary region, and the greater the boundary degree.
[0040] Define a window for each pixel within the molten pool grayscale image; for example, the window size is [size missing]. Based on the maximum and minimum gray values of all pixels within the window of each pixel, and the information entropy of the gray values of all pixels within the window, the boundary degree of each pixel is determined to characterize the possibility that the pixel is located in the boundary region of the molten pool.
[0041] Specifically, the boundary degree satisfies:
[0042] ;
[0043] In the formula, For the first The boundary level of each pixel and The first The maximum and minimum grayscale values among all pixels within a window of 1 pixel. For the first The information entropy of the grayscale values of all pixels within a window of 1 pixel. It is the maximum-minimum normalization function.
[0044] in, The larger the value, the more likely it is to be the first. The more complex the grayscale values of the pixels within the window of the nth pixel, the more complex the grayscale values of the nth pixel. The greater the probability that a pixel is located in the boundary region of the molten pool, the greater its boundary degree will be; The larger the value, the more likely it is to be the first. The greater the difference in grayscale values among all pixels within a window of a given pixel, the more significant the difference in the grayscale values of the pixels in the window. The more drastic the grayscale values of pixels within a pixel window, the more it indicates the intensity of the grayscale. The more complex the grayscale values of pixels within a pixel window, the greater the reliability. The greater the probability that a pixel is located in the boundary region of the molten pool, the greater its boundary degree will be.
[0045] S003: Determine the optimization boundary level for each pixel.
[0046] It should be noted that if a pixel located at the molten pool boundary is disturbed by steam, pixels within that pixel's window may not exhibit a high grayscale range or grayscale entropy value, resulting in a lower boundary degree for that pixel. This reduces the accuracy of subsequent optimization of the pixel's dark channel value and transmittance. Since molten pool boundary regions generally exhibit drastic step changes, when performing morphological erosion operations on the image using structuring elements of different sizes, if the molten pool boundary region is involved, the erosion operation will lead to significant grayscale differences between different scales as the scale of the structuring element increases. Therefore, the greater the difference in a pixel's appearance under multi-scale erosion, the greater the likelihood that the pixel is located in the molten pool boundary region, and its optimization boundary degree should be greater. Therefore, this step introduces multi-scale morphological analysis to obtain the optimization boundary degree for each pixel.
[0047] Morphological erosion of the molten pool grayscale image is performed using multi-scale structuring elements. The optimized boundary degree of each pixel is determined based on the sum of the grayscale value differences between adjacent scales after morphological erosion, combined with the boundary degree.
[0048] Specifically, the structural element is a circular structural element.
[0049] Specifically, the optimization boundary degree satisfies:
[0050] ;
[0051] In the formula, For the first The degree of optimization boundary for each pixel For the first The boundary level of each pixel The set number of morphological scales. For the first The pixel is used in the first a gray value of the molten pool gray image after morphological erosion using the structural element of the first scale, is the first is the first is the first , is a gray value of the first is a gray value of the first is an adjustment factor for adjusting the value range of the optimization boundary degree, and an exemplary , is adjusted to the interval , is a max-min normalization function, is an absolute value symbol.
[0052] wherein accumulates the gray level jump amplitude under different scale erosion operations, and the greater the value, the greater the possibility that the first pixel point is in the molten pool boundary region, and the greater the optimization boundary degree.
[0053] The implementer can set the number of scales and the radius of the structural element according to the specific implementation, for example, ; the structural elements are respectively circular structural elements with a radius of 3, 5, and 7.
[0054] S004: Determine the corrected dark channel value of each pixel point.
[0055] It should be noted that the corrected dark channel value of each pixel point is calculated in combination with the optimization boundary degree of each pixel point and the initial dark channel value of each pixel point; when calculating the corrected dark channel value of each pixel point, the greater the optimization boundary degree of a pixel point, the greater the degree of interference of the pixel point in the calculation of the initial dark channel value by the background region pixel points in the window, and the greater the magnitude of the low initial dark channel value, and the greater the corrected dark channel value; the smaller the optimization boundary degree of a pixel point, the more accurate the calculation of the initial dark channel value, and the closer the initial dark channel value and the corrected dark channel value.
[0056] Specifically, the corrected dark channel value satisfies:
[0057] ;
[0058] In the formula, is the corrected dark channel value of the first pixel point, is the initial dark channel value of the first pixel point, For the first The optimization boundary of each pixel.
[0059] in, The larger it is, the more likely it is to be the first The greater the interference from background pixels within the same window when calculating the initial dark channel value for a pixel, the lower its initial dark channel value will be, and therefore its corrected dark channel value should be.
[0060] S005: Based on the corrected dark channel value, the optimized transmittance of each pixel is calculated, and the grayscale image of the molten pool is dehazed and restored by combining the atmospheric light value to obtain the restored image.
[0061] It should be noted that after obtaining the corrected dark channel value for each pixel, the transmittance can be inferred from the prior physical model of the dark channel. After calculating the optimized transmittance, combined with the local atmospheric light value estimated from the image, the vapor scattering component in the grayscale image of the molten pool can be subtracted to restore the true radiative brightness of the object surface, thereby making the edge of the molten pool clear and sharp.
[0062] Specifically, the optimized transmittance satisfies:
[0063] ;
[0064] In the formula, For the first Optimized transmittance per pixel For defogging level factor, For the first Corrected dark channel values for each pixel For example, the atmospheric light value is the average grayscale value of the top 0.1% of the brightest pixels in the image. For example, hyperparameters. This is used to prevent situations where, in extreme cases, such as when the captured image is completely black or there is no light signal due to equipment failure, the denominator becomes 0, rendering the formula meaningless.
[0065] Specifically, the grayscale values of each pixel in the restored image satisfy the following:
[0066] ;
[0067] In the formula, To restore the first image The grayscale value of each pixel The first grayscale image of the molten pool The grayscale value of each pixel Atmospheric light value, For the first Optimized transmittance of each pixel point, is a set minimum transmittance threshold, is a maximum function.
[0068] As Figure 2 shown, from the pixel gray scale distribution, it can be seen that the restored image can effectively reduce the pixel gray scale of the image affected by the metal vapor and make the pixel gray scale distribution more concentrated in the low gray scale interval, reduce the redundant pixels in the high gray scale area, and enhance the gray scale contrast between the molten pool area and the background, so that the edge details of the molten pool are more easily distinguished.
[0069] S006: using an edge detection operator to perform edge extraction on the restored image to obtain a molten pool boundary.
[0070] Specifically, the using an edge detection operator to perform edge extraction on the restored image to obtain a molten pool boundary comprises:
[0071] applying a Canny edge detection operator to the restored image;
[0072] performing morphological connection and closing operations on the detected edge lines to extract the contour of the maximum connected domain as the finally recognized molten pool boundary.
[0073] Specifically, the Canny edge detection operator comprises a high threshold value and a low threshold value, wherein the high threshold value is set to 0.8 times the maximum gradient value of the restored image, and the low threshold value is set to 0.4 times the high threshold value.
[0074] Specifically, after obtaining the molten pool boundary, further comprising:
[0075] transmitting the coordinates of the molten pool boundary to an electron beam cold hearth furnace control system for real-time adjustment of the scanning power and frequency of the electron beam to control the smelting process.
[0076] The embodiment of the present application also discloses a molten pool boundary recognition system based on image processing, comprising a processor and a memory, and the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a molten pool boundary recognition method based on image processing according to the present application is realized.
[0077] The above system also comprises a communication bus and a communication interface and other components familiar to those skilled in the art, and the settings and functions thereof are known in the art, so they will not be described here.
[0078] The above are the preferred embodiments of the present application, which do not limit the protection scope of the present application, therefore: any equivalent changes made on the structure, shape and principle of the present application should be covered within the protection scope of the present application.
Claims
1. A method for identifying melt pool boundaries based on image processing, characterized in that, include: Images of the molten pool inside the electron beam cold hearth furnace are acquired and then converted to grayscale to obtain a grayscale image of the molten pool. A window is set for each pixel in the grayscale image of the molten pool. Based on the maximum and minimum grayscale values of all pixels in the window of each pixel, and the information entropy of the grayscale values of all pixels in the window, the boundary degree of each pixel is determined to characterize the possibility that the pixel is located in the boundary region of the molten pool. Morphological erosion of the molten pool grayscale image is performed using multi-scale structuring elements. The optimized boundary degree of each pixel is determined based on the sum of the grayscale value differences between adjacent scales after morphological erosion, combined with the boundary degree. Obtain the initial dark channel value of each pixel, and use the product of the initial dark channel value and the optimization boundary degree as the corrected dark channel value of each pixel; Based on the corrected dark channel value, the optimized transmittance of each pixel is calculated, and the grayscale image of the molten pool is dehazed and restored by combining the atmospheric light value to obtain the restored image. Edge detection operators are used to extract edges from the restored image to obtain the molten pool boundary.
2. The melt pool boundary recognition method based on image processing according to claim 1, characterized in that, The boundary degree satisfies: ; In the formula, For the first The boundary level of each pixel and The first The maximum and minimum grayscale values among all pixels within a window of 1 pixel. For the first The information entropy of the grayscale values of all pixels within a window of 1 pixel. It is the maximum-minimum normalization function.
3. The melt pool boundary recognition method based on image processing according to claim 1, characterized in that, The optimization boundary degree satisfies: ; In the formula, For the first The degree of optimization boundary for each pixel For the first The boundary level of each pixel The set number of morphological scales. For the first The pixel is used in the first The grayscale values of the molten pool grayscale image after morphological erosion by structuring elements of each scale. For the first The pixel is used in the first The grayscale values of the molten pool grayscale image after morphological erosion by structuring elements of each scale, when hour, The first grayscale image of the molten pool The grayscale value of each pixel This is an adjustment factor used to adjust the range of values for the optimization boundary degree. For the minimum normalization function, It is the absolute value symbol.
4. A melt pool boundary recognition method based on image processing according to claim 1 or 3, characterized in that, The structural element is a circular structural element.
5. The melt pool boundary recognition method based on image processing according to claim 1, characterized in that, The optimized transmittance satisfies: ; In the formula, For the first Optimized transmittance per pixel For defogging level factor, For the first Corrected dark channel values for each pixel Atmospheric light value, This is a hyperparameter.
6. The melt pool boundary recognition method based on image processing according to claim 1, characterized in that, The grayscale values of each pixel in the restored image satisfy the following: ; In the formula, To restore the first image The grayscale value of each pixel The first grayscale image of the molten pool The grayscale value of each pixel Atmospheric light value, For the first Optimized transmittance per pixel The minimum transmittance threshold is set. It is a function for maximizing the value.
7. The melt pool boundary recognition method based on image processing according to claim 1, characterized in that, The step of using an edge detection operator to extract edges from the restored image to obtain the melt pool boundary includes: The Canny edge detection operator is applied to the restored image; Morphological connection and closure operations are performed on the detected edge lines to extract the contour of the largest connected region, which is used as the final identified melt pool boundary.
8. The image processing-based melt pool boundary recognition method according to claim 7, characterized in that, The Canny edge detection operator includes a high threshold and a low threshold, wherein the high threshold is set to 0.8 times the maximum gradient value of the restored image, and the low threshold is set to 0.4 times the high threshold.
9. The melt pool boundary recognition method based on image processing according to claim 1, characterized in that, After obtaining the molten pool boundary, the following is also included: The coordinates of the molten pool boundary are transmitted to the electron beam cold hearth furnace control system to adjust the scanning power and frequency of the electron beam in real time to control the melting process.
10. A melt pool boundary recognition system based on image processing, characterized in that, include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement a melt pool boundary recognition method based on image processing according to any one of claims 1-9.
Citation Information
Patent Citations
Aerial image defogging method based on boundary constraint and color correction
CN113313702A
Single Image Haze Removal Using Dark Channel Priors
US20110188775A1