Intelligent image detection method for electron beam melting scanning

By setting a static area within the camera's field of view and constructing additive and multiplicative brightness compensation models, pixel-level corrections are performed on electron beam melting scanning images. This solves the problem of image feature drift caused by window contamination and sensor aging, and improves the accuracy and robustness of molten pool state detection.

CN120997209BActive Publication Date: 2026-01-23BAOJI BAOTAI EQUIP TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511511110.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-01-23
Estimated Expiration
2045-10-22

AI Technical Summary

Technical Problem

In existing electron beam melting scanning control, there is a problem of misjudging the state of the molten pool due to the inability to adapt to image feature drift caused by window contamination, raw material differences, and sensor aging during continuous melting.

Method used

Multiple static regions are set up within the camera's field of view. By collecting and filtering the original grayscale mean and standard deviation sequences, additive and multiplicative brightness compensation models are constructed. An interpolation method is used to construct a compensation field and perform pixel-level correction on the image to ensure that the intelligent detection model receives stable image input.

Benefits of technology

It achieves pixel-level correction of spatiotemporally non-uniform image degradation, improves the accuracy and robustness of molten pool state detection, and solves the problem of misjudgment caused by image quality degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997209B_ABST
    Figure CN120997209B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image data processing, and more particularly to an intelligent image detection method for electron beam melting scanning, which comprises the following steps: presetting multiple static regions as reference baselines in the field of view of a camera, acquiring and processing the gray mean value and standard deviation sequence of the static regions by dynamic weighted filtering through continuous image acquisition to represent time-varying working condition drift. Based on the drift, a contrast gain model integrating range and detail recovery and a brightness bias model integrating additive and multiplicative compensation are constructed, and an interpolation method is used to generate a compensation field covering the whole image to perform pixel-level adaptive correction on the original image. The present application can eliminate the influence of image degradation, provide stable and standardized image input for subsequent intelligent detection models, and improve the robustness and accuracy of molten pool state monitoring.
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 data processing, and in particular to an intelligent image detection method for electron beam melting scanning. BACKGROUND

[0002] Electron beam melting is a core process for preparing advanced materials such as high-purity titanium and titanium alloys, refractory metals, etc. This process melts raw materials by high-energy electron beam bombardment, and the accuracy of electron beam scanning control plays a decisive role in the quality of the final ingot.

[0003] Currently, the scanning control of the electron beam usually adopts digital technology, generates a scanning trajectory through a core processor, and uses a sensor to perform closed-loop feedback on the current of the deflection coil to ensure the motion accuracy of the electron beam. However, this approach has limitations in realizing intelligent management of the melting process. This approach usually relies on analysis of the molten pool image, extracts features such as the geometric shape of the molten pool and the pseudo-temperature field based on gray value, and compares them with preset process parameter thresholds to determine the molten pool state. These key process parameter thresholds are usually fixed values set by offline calibration or manual experience under ideal initial working conditions.

[0004] However, in long-term continuous melting production, various factors can cause the actual working conditions to deviate from the ideal working conditions: for example, metal vapor condensation on the inner wall of the observation window causes window pollution, which makes the overall image darker and the contrast lower; small differences in composition or morphology of different batches of raw materials can cause different optical radiation characteristics under the same energy input; the performance of the camera sensor itself also decays over time. These factors collectively cause the image feature drift phenomenon, making the originally fixed parameter threshold no longer applicable, and thus causing the system to misjudge the molten pool state. SUMMARY

[0005] To solve the above technical problems of image feature drift caused by window pollution, raw material differences, and sensor aging in continuous melting process, which leads to misjudgment of the molten pool state in the electron beam melting scanning control, the present application provides an intelligent image detection method for electron beam melting scanning, which comprises the following steps:

[0006] Multiple static regions are preset within the camera field of view of the electron beam melting furnace. Original images of the melting process are acquired at a preset sampling frequency, obtaining the original gray-scale mean sequence and original gray-scale standard deviation sequence of each static region over time. The original gray-scale mean sequence and original gray-scale standard deviation sequence are filtered to obtain smoothed gray-scale mean and smoothed standard deviation. The range restoration factor and detail restoration factor of the static regions are weighted and summed to obtain the contrast gain. The range restoration factor is related to the gray-scale distribution of the static regions, and the detail restoration factor is positively correlated with the smoothed standard deviation of the static regions. The brightness bias is obtained by weighted fusion of additive and multiplicative brightness compensation models. The weighting coefficients of the weighted fusion have an exponentially decreasing relationship with the deviation between the smoothed gray-scale mean and the initial gray-scale mean of the static regions. Based on the contrast gain and brightness bias of each static region, an interpolation method is used to construct a compensation field for the original image. The compensation field is applied to perform gray-scale correction on the original image to obtain a corrected image. The corrected image is input into a preset intelligent detection model to identify and segment the molten pool region, and the feature parameters of the molten pool are calculated based on the molten pool region.

[0007] This invention uses static regions with invariant physical properties within the camera's field of view as anchor points to track and quantify the operational drift of the imaging system in real time. It also constructs a refined affine transformation model incorporating range and detail restoration, as well as additive and multiplicative compensation. By extending the local compensation parameters into a compensation field covering the entire image through interpolation, pixel-level correction of spatiotemporally inhomogeneous image degradation is achieved. This ensures that regardless of operational drift, the subsequent intelligent detection model always receives stable and standardized image input, thus solving the problem of misjudgment of the molten pool state caused by image quality degradation and improving the robustness and accuracy of the entire intelligent detection system.

[0008] Preferably, the weighting coefficients of the weighted fusion satisfy the following relationship:

[0009] ;

[0010] in, It is the first The static region Weighting coefficients at each time point; It is a preset adjustment coefficient; It is the first The static region The smoothed grayscale mean at time step. It is the first The average gray level of a static region at the initial moment; It is the natural exponential function; It is the absolute value symbol.

[0011] The application realizes a smooth switching mechanism for the brightness compensation model, so that the weights of the additive compensation model and the multiplicative compensation model can be automatically adjusted according to the size of the mean deviation, the additive noise is preferentially processed when the deviation is small, and the multiplicative degradation is mainly compensated when the deviation is large, so that the brightness drift in different stages and different types can be more accurately matched than the fixed or simple linear fusion strategy, and the adaptability and accuracy of the brightness correction are improved.

[0012] Preferably, the brightness offset satisfies the relationship:

[0013] ;

[0014] Among them, is the brightness offset of the first static area at the moment; is the weight coefficient of the first static area at the moment; is the smooth gray mean of the first static area at the moment, is the gray mean of the first static area at the initial moment; is the contrast gain of the first static area at the moment.

[0015] The application fuses the pure additive compensation model and the multiplicative compensation model considering the influence of the contrast gain, the method can more accurately compensate the complex brightness degradation, ensures the collaborative work of the brightness correction and the contrast correction two links, avoids the interference on the other link after the correction of one link, so that a more accurate and more explicit physical meaning brightness offset value is obtained.

[0016] Preferably, the range recovery factor satisfies the relationship:

[0017] ;

[0018] Among them, is the range recovery factor of the first static area at the moment; , are the 95th and 5th percentiles of the pixel gray value distribution of the first static area at the initial moment, respectively; , are the 95th and 5th percentiles of the pixel gray value distribution of the first static area at the moment, respectively. ​​​​​​​​​​​​​​

[0019] The present application defines the effective dynamic range by using the difference between the 95th and 5th percentiles, which can effectively resist the interference of single overexposed or overdark noise pixels compared with the traditional maximum-minimum-based method, ensures that the judgment of the compression degree of the image macro-contrast is more accurate and stable, thereby making the range recovery more reliable and avoiding excessive stretching or artifacts caused by noise.

[0020] Preferably, the detail recovery factor is calculated by the ratio of the initial standard deviation of the static area to the smoothed standard deviation.

[0021] Preferably, the filtering comprises: for any data point in the original gray mean sequence, calculating the standard deviation, skewness and kurtosis as noise fingerprints within a preset length neighborhood; determining the reliability score of the data point based on the noise fingerprints; generating an improved smoothing coefficient according to the reliability score; processing the original gray mean sequence by using an exponential moving average filter based on the improved smoothing coefficient to obtain the smoothed gray mean value of the data point.

[0022] The present application can evaluate the reliability of each data point in real time by constructing a multi-dimensional noise fingerprint composed of standard deviation, skewness and kurtosis, and dynamically adjust the filtering coefficient based on the reliability, so that the method can achieve the optimal smoothing effect when facing different types and intensities of high-frequency interference, thereby more accurately extracting the real trend of working condition drift than the fixed coefficient filter.

[0023] Preferably, the generating of the improved smoothing coefficient according to the reliability score comprises: multiplying the reliability scores of the three dimensions of standard deviation, skewness and kurtosis to obtain the improved smoothing coefficient.

[0024] Preferably, the compensation field of the original image is constructed based on the contrast gain and brightness bias of each static area by using an interpolation method, comprising: generating a contrast gain field based on the positions and contrast gains of the static areas by using an interpolation method; generating a brightness bias field based on the positions and brightness biases of the static areas by using an interpolation method, and the contrast gain field and the brightness bias field jointly constitute the compensation field of the original image.

[0025] Preferably, the interpolation method is a radial basis function interpolation method.

[0026] Preferably, the static area is selected from the edge of the cold bed or the surface of the fixed structural part of the electron beam melting furnace.

[0027] The application has the beneficial effects that: the application sets a static area with unchanged physical characteristics as an anchor point in the camera field of view, tracks and quantifies the working condition drift of the imaging system in real time, and constructs a refined affine transformation model containing range recovery and detail recovery, additive and multiplicative compensation; the local compensation parameter is expanded to a compensation field covering the whole image through an interpolation method, and pixel-level correction of the spatio-temporal non-uniform image degradation is realized. The application accurately extracts the spatio-temporal non-uniform image degradation trend caused by window pollution, sensor aging and the like, and uses a refined compensation model of contrast and brightness in combination with radial basis function interpolation to perform pixel-level real-time correction on the image, thereby providing stable and standardized image input for a subsequent intelligent detection model, solving the misjudgment problem of the vision detection system under extreme working conditions, and improving the accuracy and robustness of the automatic process monitoring. BRIEF DESCRIPTION OF DRAWINGS

[0028] Figure 1 A flowchart of an intelligent image detection method for electron beam melting scanning is provided for the embodiments of the application. DETAILED DESCRIPTION

[0029] The embodiments of the application provide an intelligent image detection method for electron beam melting scanning, as shown in the figure, which comprises steps S100-S500: Figure 1

[0030] Step S100, a plurality of static areas are preset in the camera field of view of the electron beam melting furnace; original images of the melting process are collected at a preset sampling frequency, and original gray mean value sequences and original gray standard deviation sequences of the static areas changing with time are obtained.

[0031] In a complex melting environment, the image changes captured by the camera are usually caused by two core factors: one is the change of the physical state of the molten pool, such as temperature rise and fall; the other is the degradation of the imaging system, such as the darkening of the observation window due to metal vapor. If the two cannot be distinguished, it is easy to cause misjudgment, for example, the darkening of the observation window causes the molten pool image to be dim, which is misjudged as the molten pool temperature being too low and the power compensation being wrong. At the same time, the observation window pollution presents spatial non-uniformity, and the brightness attenuation and contrast compression degree at different positions are different. Therefore, the application needs to select a plurality of stable areas not affected by the heat radiation of the molten pool, and any change in these areas in the image can be directly attributed to the degradation of the imaging system, thereby providing a basis for distinguishing the change of the molten pool and the degradation of the imaging system. These areas need to be distributed as evenly as possible, such as being distributed at the vertices and edge midpoints of the nine-square grid, covering the four corners and the central area of the field of view, to ensure that the global imaging degradation state can be reflected.

[0032] Specifically, the areas not affected by the heat radiation of the molten pool, such as the edge of the cooling bed and the surface of the fixed structural part, are selected in the camera field of view, and the static areas are set as ​5 to 9 non-overlapping small static areas, the distribution of static areas is designed in the initialization stage, 5 to 9 areas are set in the non-thermal influence area of the field of view.

[0033] In a feasible implementation, the static area size is preferably If the size is too small, the statistical characteristics are easily disturbed by random noise of a single pixel, leading to a decrease in stability; if the size is too large, additional statistical deviation may be introduced due to unevenness of the cold bed surface itself, so that selection of a moderate size is a prerequisite for ensuring reliability as a reference.

[0034] Next, the gray sequence acquisition and calculation are performed: an observation window is installed on the vacuum chamber of the electron beam melting furnace, and an image acquisition device is deployed to continuously acquire images of the melting process at a preset sampling frequency, such as 10 Hz. For each image frame at a sampling time, two statistical characteristics of all pixel points in the static area are calculated, one is the gray average value, which reflects the overall brightness level of the static area; and the other is the gray standard deviation, which reflects the texture details or gray dispersion degree within the static area.

[0035] For any static area, the calculated gray average value at continuous sampling times constitutes a discrete time sequence, which is denoted as an original gray average value sequence; similarly, the calculated gray standard deviation also constitutes a discrete time sequence, which is denoted as an original gray standard deviation sequence.

[0036] At this point, the original gray average value sequence and the original gray standard deviation sequence of the static area at each sampling time are obtained.

[0037] Step S200, filter the original gray average value sequence and the original gray standard deviation sequence respectively to obtain a smoothed gray average value and a smoothed standard deviation.

[0038] It should be noted that the original gray average value sequence and the original gray standard deviation sequence not only contain a slowly accumulated main trend of working condition drift caused by factors such as observation window pollution, but also contain high-frequency and instantaneous jitter caused by circuit noise, plasma random flicker, etc., so that the original sequence needs to be filtered. Considering that the dynamic weighted filtering method based on multi-feature noise fingerprints can extract noise fingerprints of different interferences such as circuit noise and plasma flicker by analyzing historical data, and dynamically allocate filtering weights according to the matching degree of each data point in the current sequence and these fingerprints, the original sequence is smoothed by using the method.

[0039] ​Before filtering, the overall fluctuation degree of noise in the sequence needs to be grasped. Only when the fluctuation amplitude, source form and whether there is an extreme abnormal value of the noise are clear, the weight distribution can be more targeted when dynamically weighted filtering, and the deviation of filtering effect caused by insufficient judgment of noise characteristics can be avoided. Therefore, considering that the standard deviation can reflect the dispersion degree of the gray mean value in the neighborhood, but cannot distinguish the noise source and form, such as symmetric random circuit noise and asymmetric plasma flicker unidirectional brightness peak. Considering that the skewness can measure the asymmetry of signal data distribution, the skewness is introduced to identify the unidirectional impact noise caused by plasma flicker and assist targeted filtering adjustment; in order to deal with the interference of occasional high-intensity noise pulse, the kurtosis is introduced to measure the sharpness of data distribution. When the kurtosis is much higher than the standard normal distribution, it means that there is an extreme outlier, and the data point is given lower reliability when filtering to avoid pollution of long-term drift trend estimation.

[0040] Specifically, first, taking the original gray mean value sequence of any static area as the analysis object, the current time in the sequence is calculated , a neighborhood with the current time as the end point and the length of is constructed, and subsequent noise feature analysis and reliability calculation are carried out based on the sequence data in the neighborhood, The value of is related to the sampling frequency and noise characteristics. When the sampling frequency is 10Hz, can be preferably 10-30.

[0041] Secondly, the standard deviation, skewness and kurtosis of the current time are calculated respectively, and the three characteristics are fused to form a noise fingerprint which can evaluate the noise state from the three dimensions of fluctuation amplitude, asymmetry and extremeness, and provide decision basis for subsequent dynamic weighted filtering. The calculation methods of the three characteristic values are prior art, which will not be described here.

[0042] Then, a nonlinear mapping function is constructed to convert the three statistical characteristics into reliability scores in the range of , and the greater the characteristic value of the noise, the lower the corresponding reliability score. Preferably, an inverse proportional function structure is used for mapping, and the specific relationship is as follows:

[0043] ;

[0044] ;

[0045] ;

[0046] Wherein, is the standard deviation reliability score of the th static area at the th time; is the skewness reliability score of the The static region in the first The skewness reliability score at any given time; It is the first The static region in the first Kurtosis reliability score at any given time; It is the first The static region in the first The standard deviation within the neighborhood of time; It is the first The static region in the first The skewness within the neighborhood at a given time; It is the first The static region in the first The kurtosis value within the neighborhood of a given time; , , These are the sensitivity adjustment coefficients for each feature, used to adjust the degree of influence of each noise feature on the reliability score; It is the kurtosis value of the standard normal distribution, usually 3; It is a maximum value function.

[0047] In this set of relations, In this context, when the actual kurtosis exceeds the kurtosis value of the standard normal distribution, it indicates that there are more extreme values ​​in the data than in the normal distribution. In this case, [further analysis is needed]. Quantifying the degree of extremity The operation ensures that a penalty is only applied when the distribution is sharper than a normal distribution. This set of relationships transforms statistical characteristic values ​​into reliability scores. For example, when the signal fluctuation amplitude When the denominator increases, As it increases linearly, the reliability score decreases. The non-linear decrease, approaching 0, reflects the unreliability of the data due to drastic fluctuations. The other two formulas work similarly, mapping the enhancement of noise characteristics to a decrease in reliability.

[0048] It should be added that, , , These are the sensitivity adjustment coefficients for each feature. These coefficients are preset values, and their specific values ​​can be determined through a systematic offline calibration process to optimally distinguish between normal signal fluctuations and abnormal noise interference. As a preferred implementation method, their values ​​range from 0.1 to 1; implementers can also set them according to their needs.

[0049] It should be noted that the exponential moving average (EMA) filter is a signal smoothing technique that achieves a basic balance between noise suppression and trend tracking by leveraging the characteristics of high weighting for recent data and exponential decay for older data. This aligns with the present invention's requirement to separate the main trend of operating condition drift from instantaneous jitter in the original grayscale sequence. Therefore, the present invention uses this technique. However, considering the limitations of the fixed smoothing coefficient of EMA—that data is easily contaminated when subjected to strong noise interference and may lag behind the true trend when the data is reliable—the present invention makes improvements to it.

[0050] Specifically, to achieve dynamic filtering, the reliability scores of the three dimensions of standard deviation, skewness, and kurtosis are used to dynamically adjust the smoothing coefficient. Considering that the failure of a single dimension of multi-source noise in smelting can affect the availability of data, this invention adopts the method of multiplying the reliability scores of the three dimensions to construct an adjustment mechanism, ensuring that single-dimensional noise is not weakened by the high reliability of other dimensions.

[0051] Based on the above logic, the improved smoothing coefficient satisfies the following relationship:

[0052] ;

[0053] in, It is the first The static region in the first The improved smoothing coefficient at any given time; It is the first The static region in the first The base smoothing coefficient at time step is The constants between these two values ​​determine the basic filtering strength; It is the first The static region in the first Reliability score based on the standard deviation at any given time; It is the first The static region in the first The skewness reliability score at any given time; It is the first The static region in the first Kurtosis reliability score at any given time.

[0054] In this formula, the smoothing coefficient is dynamically linked to the real-time reliability of the data through the product of the three-dimensional reliability scores: when the data is reliable, the product is close to 1. Approximating the baseline smoothing coefficient, the current measurement is weighted more heavily to reduce trend lag; when the data is unreliable, the product approaches 0. This significantly reduces the weight of the current measurement value to avoid noise contamination. Using this adaptive smoothing coefficient for exponential moving average filtering yields a more accurate smoothed grayscale mean, preserving the trend-tracking ability of the EMA while dynamically suppressing multi-source noise.

[0055] Finally, the original gray mean value sequence is filtered by using the improved smoothing coefficient to obtain the smoothed gray mean value at each sampling time The exponential moving average filter is prior art, and the present application only improves how to obtain the smoothing coefficient, and thus will not be described in detail.

[0056] The original gray standard deviation sequence is also filtered by using the same method to obtain the smoothed standard deviation at each sampling time 。

[0057] Thus, the smoothed gray mean value and the smoothed standard deviation at each sampling time of each static region are obtained.

[0058] Step S300, the range recovery factor and the detail recovery factor of the static region are weighted and summed to obtain a contrast gain; the results of the weighted fusion of the additive and multiplicative brightness compensation models are obtained to obtain a brightness bias.

[0059] It should be noted that the real-time changes of the smoothed gray mean value and the smoothed standard deviation represent the visual degradation of the image during the smelting process: the deviation of the smoothed mean value reflects the drift of the overall brightness of the image, and the reduction of the smoothed standard deviation reflects the loss of the contrast of the image. If not corrected, such feature drift caused by factors such as observation window pollution will lead to misjudgment of the subsequent molten pool state analysis algorithm due to inconsistent input data distribution. Considering that such degradation presents a composite characteristic of overall brightness shift plus linear scaling of contrast in local regions, an affine transformation with linear scaling and translation capabilities can be used for modeling, the scaling factor can correspond to the standard deviation recovery to adjust the contrast, the translation factor can correspond to the mean value compensation to correct the brightness, and the relative distribution of pixel gray can be maintained, which completely matches the physical characteristics of the degradation.

[0060] From the image degradation law, factors such as observation window pollution and optical attenuation will not change the relative position relationship between pixels, nor will they produce nonlinear gray distortion, which further illustrates the rationality of using linear affine transformation for correction: the contrast gain corresponds to the scaling factor of the affine transformation, which is used to restore the contrast; the brightness bias corresponds to the translation factor of the affine transformation, which is used to correct the brightness, and the two together constitute a complete image degradation compensation mechanism.

[0061] For the contrast gain, it should be noted that the calculation of the contrast gain needs to deal with both dynamic range compression and detail blur, so it needs to be constructed in three steps.

[0062] First, the range recovery factor is calculated to deal with dynamic range compression. In order to compensate for the loss of contrast caused by the compression of the image dynamic range, the range recovery factor is constructed to stretch the current compressed dynamic range back to the initial size.

[0063] According to the above logic, the range recovery factor satisfies the relationship:

[0064] ;

[0065] wherein, is the range recovery factor of the i-th static region at the t-th moment; , are the 95th and 5th percentiles of the pixel gray value distribution of the i-th static region at the initial moment, respectively; , are the 95th and 5th percentiles of the pixel gray value distribution of the i-th static region at the t-th moment, respectively. , ,

[0066] In the relationship, the numerator and the denominator respectively represent the effective dynamic range at the initial moment and the current moment, which is defined by using the difference between the 95th percentile and the 5th percentile of the gray value distribution, so as to avoid the interference of a single noise pixel on the dynamic range judgment, and make the calculation result more robust. When the image at the t-th moment is compressed in dynamic range due to degradation, the denominator becomes smaller, , which will be greater than 1, and multiplying the factor can stretch the current dynamic range to the initial size; if there is no compression of the dynamic range, such as in the initial stage, ,

[0067] It should be noted that, , The acquisition method of and is as follows: five to ten frames of images are obtained before smelting starts, when the observation window is clean and the imaging system is not degraded. For each frame of image, the gray values of all pixels in the i-th static region are extracted to form a gray value distribution set. Then, the 95th percentile and the 5th percentile of the gray value distribution set are calculated, respectively. Finally, the average value of the 95th percentiles corresponding to multiple frames of images is taken as ; and the average value of the 5th percentiles corresponding to multiple frames of images is taken as. In addition, in order to prevent the denominator from being 0, when , can be set as a preset strong gain coefficient, for example, 5, which aims to forcibly enhance the image that is almost completely degraded; or , wherein,

[0068] When​​​​​ When, set This is to avoid the denominator being too small, which could lead to numerical overflow.

[0069] Secondly, a detail restoration factor is calculated to address detail blur. To compensate for the contrast loss caused by the blurring of image texture details, a detail restoration factor needs to be constructed. The core logic is that detail blur is essentially the aggregation of pixel gray values ​​towards the mean, which manifests as a decrease in the smooth standard deviation. Therefore, restoration needs to reverse this process by using the ratio of the initial standard deviation to the current standard deviation.

[0070] Based on the above logic, the detail recovery factor satisfies the following relation:

[0071] ;

[0072] in, It is the first The static region Detail restoration factor of time; It is the first The standard deviation of a static region at the initial moment is specifically the average of the standard deviations of that region in the five to ten clean images before the start of melting. It is the first The static region in the first Smoothed standard deviation over time.

[0073] In this relation, when the first... When image details become blurred at a given moment, such as when contamination of the observation window causes textures to become lighter and pixel grayscale fluctuations to decrease, the resulting image may exhibit more subtle variations. Less than ,at this time A value greater than 1, multiplied by this factor, can enhance the relative difference in pixel grayscale and restore detail contrast; if the details are not blurred, that is... ,at this time Without altering the original details, avoid over-sharpening details to prevent noise amplification. When, set =5, to avoid the value overflowing due to the denominator being too small.

[0074] It should be noted that in real smelting scenarios, dynamic range compression and detail blurring occur simultaneously, but their dominance varies under different operating conditions. For example, dynamic range compression predominates when metal vapor is dense, while detail blurring predominates when there is slight contamination. Therefore, this invention employs a linear weighted average method to fuse two restoration factors to obtain the final contrast gain, achieving adaptive compensation for different degradation modes.

[0075] Based on the above logic, the contrast gain satisfies the following relationship:

[0076] ;

[0077] wherein, is the contrast gain of the first static region at the first time point; is the range recovery factor of the first static region at the first time point; is the detail recovery factor of the first static region at the first time point; is the weight coefficient of the first static region at the first time point, ranging from 0 to 1, used to weigh the contribution of the two recovery strategies. In the relationship, when approaches 1, it indicates that the contrast loss is mainly dynamic range compression, the contrast gain is more biased towards , and the overall dynamic range is preferentially stretched; when approaches 0, it indicates that the contrast loss is mainly detail blur, the contrast gain is more biased towards , and the texture details are preferentially recovered; when , the contributions of the two recovery strategies are equal, and it is suitable for scenes with balanced degradation.

[0078] It needs to be added that the weight coefficient is the core adjustment parameter of the contrast gain, and the present application provides an adaptive calculation method. When the degradation mode dynamically changes, the weight coefficient is adaptively calculated using the normalization formula , and the core logic is to automatically allocate weights according to the severity proportion of the two losses. The weight coefficient satisfies the relationship: wherein, is the weight coefficient of the first static region at the first time point;

[0079] is the range recovery factor of the first static region at the first time point; is the detail recovery factor of the first static region at the first time point; is a preset small value used to prevent the denominator from being 0, which can be set to 0.001, and the implementer can set it according to the requirements;

[0080] is a standard normalization function used to quantize the calculation result to the interval.

[0081]

[0082] ​​​​​​​​​​​​​​​This formula calculates the proportion of range loss in the total loss. If image degradation is mainly manifested as dynamic range compression, then... It will be much greater than , making The value is close to 1; conversely, if the main problem is blurred details, then It will be close to 0.

[0083] Thus, the contrast gain used to restore contrast was obtained.

[0084] Regarding luminance bias, it's important to note that to adaptively compensate for both additive and multiplicative luminance degradation, an index distinguishing between the two degradation modes must first be constructed. A significant deviation from the mean usually indicates that multiplicative degradation is dominant. Therefore, an exponential decay function needs to be constructed to map the normalized deviation of the mean to a range within... The weighting coefficients.

[0085] ;

[0086] in, It is the first The static region Weighting coefficients at each time point; It is an adjustment coefficient used to adjust for deviations from the mean. The extent of the impact; It is the first The static region The smoothed grayscale mean at time step. It is the first The average gray level of a static region at the initial moment; It is the natural exponential function; It is the absolute value symbol.

[0087] In this relation, the terms within the exponent It is the normalized absolute deviation of the mean. The greater the deviation of the current mean from the initial mean, that is, the more severe the overall darkening or brightening of the image, the larger the deviation value, resulting in a larger absolute value of the negative exponent. The closer it gets to 0; when the mean is constant, the deviation is 0. The value is 1, therefore, It can be viewed as a switch, with its value smoothly transitioning from 1 to 0.

[0088] It should be added that, It is an adjustment coefficient used to adjust for deviations from the mean. The extent of the impact The preferred value range is 3 to 15, but implementers can also set it according to their needs; a larger value is acceptable. Values ​​like 10 are more sensitive to deviations from the mean; even a slight deviation from the mean will quickly switch the compensation mode to multiplicative compensation. This is suitable for scenarios where the degradation is confirmed to be primarily due to a decrease in transmittance. Conversely, smaller values... A value of 3 indicates a higher tolerance for mean deviation, preferentially treating mean drift within a certain range as additive noise, thus enhancing the algorithm's robustness in complex noisy environments. Therefore, by adjusting the adjustment coefficient... With proper settings, the switching sensitivity of the compensation model can be optimized based on the specific hardware characteristics and process environment.

[0089] It should also be noted that, in order to prevent the denominator from being... A value of 0 can lead to a calculation error and can be handled specially, for example, when When the value is less than a preset minimum positive number, such as 0.1, it can be... The value is treated as 1 for calculation.

[0090] Then, based on these weighting coefficients, the final luminance bias is constructed, and a weighted fusion is performed on the two compensation models: pure additive degradation and pure multiplicative degradation. According to the above logic, the luminance bias satisfies the following relationship:

[0091] ;

[0092] in, It is the first The static region Brightness offset at any given moment; It is the first The static region Weighting coefficients at each time point; It is the first The static region The smoothed grayscale mean at time step. It is the first The average gray level of a static region at the initial moment; It is the first The static region Contrast gain at any given time.

[0093] In this relation, the first part... This is compensation for purely additive offsets such as uniform fog, with the goal of directly pulling the current mean back to the initial level. (Part Two) It is a compensation for pure multiplicative attenuation, in which This is the current mean after contrast gain stretching. This part calculates the difference between the stretched mean and the initial mean to compensate for the brightness decay caused by multiplicative degradation. When the value is close to 1, the mean deviation is small, and it is considered to be mainly additive, with the formula primarily dominated by the first part; when... Close to 0, at this time the mean deviation is large, it is considered that the multiplicative is dominant, the formula is mainly dominated by the second part. This achieves adaptive compensation for additive and multiplicative brightness degradation modes. In addition, in order to avoid the brightness bias from excessively affecting the image gray scale distribution, the value range of , which can be adjusted according to the image gray value interval such as 0-255.

[0094] So far, the contrast gain used to restore the contrast and the brightness bias used to correct the brightness of each static area at each time are obtained.

[0095] Step S400, based on the contrast gain and the brightness bias of each static area, an interpolation method is used to construct a compensation field of the original image; the compensation field is applied to the original image for gray scale correction to obtain a corrected image.

[0096] It should be noted that the imaging degradation effects such as window pollution change continuously and smoothly in space, and the brightness attenuation and contrast compression degree of different areas gradually change with the position, without sudden difference boundaries. If the image is only divided into several large blocks and the same compensation value is applied, the deviation will be caused due to the neglect of the spatial gradual change characteristics: part of the area is not compensated enough and still has degradation traces, part of the area is over-compensated and causes gray scale distortion, and the whole image cannot be accurately corrected. Therefore, the compensation parameters of the discrete static area need to be expanded to a continuous compensation map covering all pixels of the whole image, and the compensation parameters conforming to the degradation law are matched for each pixel. Radial basis function interpolation (RBF) has excellent smooth interpolation capability, can construct a continuous transition compensation field in the whole image domain based on discrete compensation parameters, and accurately adapt to the spatial distribution characteristics of the degradation effect. Based on this, the present application uses radial basis function interpolation to realize the above expansion.

[0097] Specifically, the contrast gain and the brightness bias of each static area at each time are first constructed into a contrast gain sequence and a brightness bias sequence, and then RBF interpolation is performed on the two sequences to generate a contrast gain field and a brightness bias field covering each pixel of the image.

[0098] Taking the construction of the contrast gain field as an example, the RBF interpolation function form is:

[0099] ;

[0100] Wherein, is the contrast gain of any pixel point at the time; is any pixel point in the image; is the contrast gain of the ​the center pixel of the static region; is the total number of static regions in the image; is the weight coefficient of the RBF basis function used to construct the contrast gain field; is the modulus length symbol; is a radial basis function, which is a function only related to distance, such as a Gaussian function; is the pixel point is the Euclidean distance from the pixel point to the center pixel of the static region .

[0101] It needs to be pointed out that is unknown and needs to be obtained by solving a linear equation set, in order to solve the weight coefficient, we substitute the known compensation values into the interpolation model, which constitutes a linear equation set; by solving the equation set, all weight coefficients can be uniquely determined, and how to solve it is existing technology, which will not be described here. After determining the weight coefficient, the above RBF interpolation function becomes a continuous function defined in the full image domain, which can be substituted into any pixel coordinate to calculate its contrast gain. Similarly, the same method can be used to construct the brightness bias field.

[0102] The contrast gain field and the brightness bias field together constitute the dense compensation field, which provides parameter support for pixel-level affine correction. As mentioned earlier, imaging degradation can be modeled as a linear affine transformation of brightness shift plus contrast scaling, so correction needs to be achieved through affine inverse transformation, and the contrast gain in the dense compensation field corresponds to the multiplicative factor of the inverse transformation, which is used to restore the contrast, and the brightness bias corresponds to the additive factor of the inverse transformation, which is used to correct the brightness, and the two together constitute the correction parameters of each pixel.

[0103] The specific correction process includes traversing each pixel point in the original image collected at the current time , finding out the corresponding and from the dense compensation field; and substituting the affine correction model to complete the gray value adjustment. The model satisfies the relationship:

[0104] ;

[0105] Among them: is the gray value of the pixel point at the time after correction; indicates the gray value of the pixel point at the time in the original image; ​is a pixel point in the image the first contrast gain at the moment; is a pixel point in the image the first brightness offset at the moment.

[0106] In the relationship, the first term is used to restore the problem of local contrast reduction caused by observation window pollution or sensor aging, when the value of is greater than , the dynamic range of the pixel is stretched around the local gray mean value, thereby effectively enhancing the local contrast of the pixel neighborhood. The second term is mainly responsible for compensating for brightness drift caused by electron beam power fluctuations or environmental light changes, when is positive, the pixel brightness is improved; when it is negative, it is suppressed.

[0107] By applying a dedicated compensation value to each pixel in the entire image, spatially heterogeneous pixel-level adaptive correction is ultimately achieved, outputting a corrected image with stable features, high clarity, and effective elimination of working condition drift and instantaneous noise effects, providing a reliable data foundation for subsequent high-precision quantitative analysis of the molten pool state.

[0108] At this point, the gray scale correction of the original image is completed, and the corrected image is obtained.

[0109] Step S500, input the corrected image into a preset intelligent detection model to identify and segment the molten pool region, and calculate the feature parameters of the molten pool based on the molten pool region.

[0110] It should be noted that the corrected image has eliminated the image degradation problems caused by factors such as observation window pollution, electron beam power fluctuations, sensor aging, etc., and has the advantages of clear molten pool features, stable gray scale distribution, and small noise interference, and can be directly used as a reliable data foundation for subsequent molten pool monitoring. Considering that the intelligent detection model such as the YOLO series model is a deep learning network suitable for industrial scenarios, it can quickly and accurately extract key information of the molten pool, avoiding the subjective inefficiency of manual analysis, and adapting to the real-time monitoring and accurate judgment needs of the smelting process, therefore, this step extracts the molten pool features through it.

[0111] Specifically, the corrected image is input into the intelligent detection model which is trained in advance. The specific training process of the model is not described in detail because it belongs to the prior art. The intelligent detection model outputs structured molten pool features that can be directly used for process analysis, including three types of core data: geometric features: boundary contour coordinates, actual area, reflecting whether the molten pool shape meets the process standard; position features: horizontal and vertical deviations relative to the center of the electron beam scanning, providing a basis for judging the electron beam focusing deviation and adjusting the parameters; state features: detecting unmelted blocks, overheated spots, etc. through gray scale distribution analysis, directly relating to the smelting stability and the ingot quality.

[0112] The above are preferred embodiments of the present application, which do not limit the protection scope of the present application. Any equivalent changes made according to the structure, shape, and principle of the present application should be covered within the protection scope of the present application.

Claims

1. A smart image detection method for electron beam melting scanning, characterized in that, Including the following steps: Multiple static regions are preset within the camera field of view of the electron beam melting furnace. These static regions are areas unaffected by the thermal radiation from the molten pool. Original images of the melting process are acquired at a preset sampling frequency to obtain the original grayscale mean sequence and the original grayscale standard deviation sequence of each static region over time. The original gray-level mean sequence and the original gray-level standard deviation sequence are filtered respectively to obtain smoothed gray-level mean and smoothed standard deviation, including: For any data point in the original gray-scale mean sequence, the standard deviation, skewness, and kurtosis are calculated as noise fingerprints within a neighborhood of a preset length. Based on the noise fingerprint, the reliability score of the data point is determined; An improved smoothing coefficient is generated based on the reliability score; The original gray-level mean sequence is processed by an exponential moving average filter based on the improved smoothing coefficient to obtain the smoothed gray-level mean of the data points. The original grayscale standard deviation sequence was filtered using the same method to obtain the smoothed standard deviation at each sampling time. The contrast gain is obtained by weighted summation of the range restoration factor and detail restoration factor of the static region; the range restoration factor is related to the grayscale distribution of the static region, and the detail restoration factor is positively correlated with the smoothing standard deviation of the static region; the brightness bias is obtained by weighted fusion of the results of additive and multiplicative brightness compensation models, satisfying the following relationship: ; in, It is the first The static region Brightness offset at any given moment; It is the first The static region Weighting coefficients at each time point; It is the first The static region The smoothed grayscale mean at time step. It is the first The average gray level of a static region at the initial moment; It is the first The static region The contrast gain at any given time; the weighting coefficients of the weighted fusion exhibit an exponentially decreasing relationship with the deviation between the mean smoothed grayscale value of the static region and the mean initial grayscale value; Based on the contrast gain and brightness bias of each static region, an interpolation method is used to construct a compensation field for the original image; the compensation field is then applied to perform grayscale correction on the original image to obtain the corrected image. The corrected image is input into a preset intelligent detection model to identify and segment the molten pool region, and the feature parameters of the molten pool are calculated based on the molten pool region.

2. The intelligent image detection method for electron beam melting scanning according to claim 1, characterized in that, The weighting coefficients of the weighted fusion satisfy the following relationship: ; in, It is the first The static region Weighting coefficients at each time point; It is a preset adjustment coefficient; It is the first The static region The smoothed grayscale mean at time step. It is the first The average gray level of a static region at the initial moment; It is the natural exponential function; It is the absolute value symbol.

3. The intelligent image detection method for electron beam melting scanning according to claim 1, characterized in that, The range recovery factor satisfies the following relationship: ; in, It is the first The static region Time range recovery factor; , They are the first The 95th and 5th percentiles of the pixel grayscale value distribution of a static region at the initial time; , They are the first The static region in the first The 95th and 5th percentiles of the pixel grayscale value distribution at time t.

4. The intelligent image detection method for electron beam melting scanning according to claim 1, characterized in that, The detail recovery factor is calculated by the ratio of the initial standard deviation to the smoothed standard deviation of the static region.

5. The intelligent image detection method for electron beam melting scanning according to claim 1, characterized in that, The step of generating the improved smoothing coefficient based on the reliability score includes: The improved smoothing coefficient is obtained by multiplying the reliability scores of the three dimensions of standard deviation, skewness, and kurtosis.

6. The intelligent image detection method for electron beam melting scanning according to claim 1, characterized in that, The method of constructing a compensation field for the original image using interpolation based on the contrast gain and brightness bias of each static region includes: An interpolation method is used to generate a contrast gain field based on the position and contrast gain of each static region; An interpolation method is used to generate a brightness bias field based on the position and brightness bias of each static region. The contrast gain field and the brightness bias field together constitute the compensation field of the original image.

7. The intelligent image detection method for electron beam melting scanning according to claim 1 or 6, characterized in that, The interpolation method is the radial basis function interpolation method.

8. The intelligent image detection method for electron beam melting scanning according to claim 1, characterized in that, The static area is selected from the edge of the cooling bed of the electron beam melting furnace or the surface of a fixed structural component.

Citation Information

Patent Citations

  • Visual inspection method of electron beam welding pool shape parameter

    CN102519387A