Intelligent image detection method for electron beam melting scanning

By setting a static region within the camera's field of view and constructing additive and multiplicative brightness compensation models, the problem of misjudgment of the molten pool state caused by image drift in electron beam melting scanning was solved, and high-precision molten pool state detection was achieved.

CN120997209AActive Publication Date: 2025-11-21BAOJI BAOTAI EQUIP TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511511110.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2025-11-21
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 acquiring 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 and standardized image input.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120997209A_ABST
    Figure CN120997209A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image data processing, in particular to an intelligent image detection method for electron beam melting scanning, which comprises the following steps of: presetting a plurality of static areas in a view field of a camera as a reference standard, and continuously acquiring images to obtain a plurality of static areas; and obtaining and processing a gray average value and a standard deviation sequence of the static region by adopting dynamic weighted filtering so as to represent time-varying working condition drift. And based on the drift, constructing a contrast gain model integrating range and detail recovery and a brightness bias model fusing additive and multiplicative compensation, generating a compensation field covering the whole image by adopting an interpolation method, and carrying out pixel-level adaptive correction on the original image. According to the method, the influence of image degradation can be eliminated, stable and standardized image input is provided for a subsequent intelligent detection model, and the robustness and accuracy of molten pool state monitoring are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data processing technology, and in particular to an intelligent image detection method for electron beam melting scanning. Background Technology

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

[0003] Currently, electron beam scanning control typically employs digital technology. A core processor generates the scanning trajectory, and sensors provide closed-loop feedback on the current of the deflection coils to ensure the electron beam's motion accuracy. However, this approach has limitations in achieving intelligent management of the melting process. It usually relies on analyzing molten pool images, extracting features such as the molten pool's geometry and a pseudo-temperature field based on grayscale values, and comparing these features with preset process parameter thresholds to determine the molten pool's state. These key process parameter thresholds are typically fixed values ​​set offline or manually under ideal initial conditions.

[0004] However, during long-term continuous smelting production, various factors can cause deviations between actual and ideal operating conditions: for example, condensation of metal vapor on the inner wall of the observation window causes window contamination, resulting in a darker overall image and reduced contrast; slight differences in composition or morphology between different batches of raw materials lead to variations in their optical radiation characteristics under the same energy input; and the performance of the camera sensor itself degrades over time. These factors collectively cause image feature drift, rendering previously fixed parameter thresholds inapplicable and leading to misjudgments of the molten pool state by the system. Summary of the Invention

[0005] To address the technical problem in electron beam melting scanning control where the inability to adapt to image feature drift caused by window contamination, raw material differences, and sensor aging during continuous melting leads to misjudgment of the molten pool state, this invention provides an intelligent image detection method for electron beam melting scanning. This method includes the following steps: 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.

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

[0007] Preferably, 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 any given time. It is the first The average gray level of a static region at the initial time; It is the natural exponential function; It is the absolute value symbol.

[0008] This invention implements a smooth switching mechanism for brightness compensation models, which enables the weights of the additive and multiplicative compensation models to be automatically adjusted according to the magnitude of the mean deviation. When the deviation is small, additive noise is processed first, while when the deviation is large, multiplicative degradation is compensated in particular. This makes it more accurate than a fixed or simple linear fusion strategy in matching brightness drift at different stages and of different types, thus improving the adaptability and accuracy of brightness correction.

[0009] Preferably, the brightness bias satisfies 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 any given time. It is the first The average gray level of a static region at the initial time; It is the first The static region Contrast gain at any given time.

[0010] This invention integrates a purely additive compensation model with a multiplicative compensation model that considers the effect of contrast gain. This method can more accurately compensate for complex brightness degradation, ensure the coordinated work of brightness correction and contrast correction, and avoid interference between the two stages after one stage is corrected, thereby obtaining a more accurate brightness bias value with clearer physical meaning.

[0011] Preferably, 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.

[0012] This invention defines the effective dynamic range by using the difference between the 95th and 5th percentiles. Compared with the traditional method based on the maximum and minimum values, this method can effectively resist the interference of individual overexposed or underexposed noise pixels, ensuring a more accurate and stable judgment of the macroscopic contrast compression degree of the image, thereby making the range recovery more reliable and avoiding excessive stretching or artifacts caused by noise.

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

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

[0015] This invention constructs a multi-dimensional noise fingerprint consisting of standard deviation, skewness, and kurtosis, which can evaluate the reliability of each data point in real time. Based on this reliability, the filter coefficients are dynamically adjusted, so that the method can achieve the best smoothing effect when facing high-frequency interference of different types and intensities. Thus, it can extract the true trend of operating condition drift more accurately than a filter with fixed coefficients.

[0016] Preferably, generating the improved smoothing coefficient based on the reliability score includes multiplying the reliability scores of the three dimensions of standard deviation, skewness, and kurtosis to obtain the improved smoothing coefficient.

[0017] Preferably, the step of constructing the compensation field of the original image based on the contrast gain and brightness bias of each static region using an interpolation method includes: generating a contrast gain field based on the position and contrast gain of each static region using an interpolation method; and generating a brightness bias field based on the position and brightness bias of each static region using an interpolation method, wherein the contrast gain field and the brightness bias field together constitute the compensation field of the original image.

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

[0019] Preferably, 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.

[0020] The beneficial effects of this invention are as follows: By setting a static region with invariant physical properties as an anchor point within the camera's field of view, this invention tracks and quantifies the operational drift of the imaging system in real time, and constructs a refined affine transformation model that includes range restoration and detail restoration, additive and multiplicative compensation. Through interpolation, the local compensation parameters are extended to a compensation field covering the entire image, achieving pixel-level correction of spatiotemporally non-uniform image degradation. This invention accurately extracts the spatiotemporally non-uniform image degradation trend caused by window contamination, sensor aging, etc., and utilizes a refined compensation model for contrast and brightness, combined with radial basis function interpolation, to perform pixel-level real-time image correction. This provides stable and standardized image input for subsequent intelligent detection models, solves the misjudgment problem of visual detection systems under extreme conditions, and improves the accuracy and robustness of automated process monitoring. Attached Figure Description

[0021] Figure 1 A flowchart of an intelligent image detection method for electron beam melting scanning provided in an embodiment of the present invention. Detailed Implementation

[0022] This invention provides an intelligent image detection method for electron beam melting scanning, such as... Figure 1 As shown, the method includes steps S100-S500: Step S100: Preset multiple static areas within the camera field of view of the electron beam melting furnace; acquire original images of the melting process at a preset sampling frequency, and obtain the original gray-scale mean sequence and original gray-scale standard deviation sequence of each static area over time.

[0023] In complex smelting environments, changes in camera-captured images typically stem from two core factors: alterations in the physical state of the molten pool, such as temperature fluctuations; and degradation of the imaging system, such as the observation window being blackened by metal vapor. Failure to distinguish between these two factors can easily lead to misjudgments. For example, a darkened molten pool image caused by a darkened observation window might be mistakenly interpreted as an excessively low molten pool temperature, resulting in incorrect power compensation. Furthermore, contamination of the observation window exhibits spatial non-uniformity, with varying degrees of brightness attenuation and contrast compression at different locations. Therefore, this invention requires selecting multiple stable regions unaffected by molten pool thermal radiation. Any changes exhibited in these regions in the image can be directly attributed to imaging system degradation, providing a benchmark for distinguishing between molten pool changes and imaging degradation. These regions need to be distributed as evenly as possible, such as at the vertices and midpoints of a 3x3 grid, covering the perimeter and center of the field of view, ensuring a comprehensive reflection of the overall imaging degradation state.

[0024] Specifically, within the camera's field of view, select areas unaffected by the molten pool's thermal radiation, such as the edge of the cooling bed or the surface of fixed structural components, and set up... For the distribution design of static regions, which are small, non-overlapping static regions, during the initialization phase, 5 to 9 regions are set within the non-thermal affected area of ​​the field of view.

[0025] In one feasible implementation, the static region size is preferably... If the size is too small (e.g., 200×200 pixels), its statistical characteristics are easily affected by random noise from individual pixels, leading to decreased stability. If the size is too large, the inherent inhomogeneity of the cooling bed surface may introduce additional statistical bias. Therefore, choosing an appropriate size is a prerequisite for ensuring its reliability as a benchmark.

[0026] Next, grayscale sequence acquisition and calculation are performed: an observation window is installed on the vacuum chamber of the electron beam melting furnace, and image acquisition equipment is deployed to continuously acquire images of the melting process at a preset sampling frequency, such as 10Hz. For each image frame at each sampling time, the grayscale sequence is calculated. Two statistical characteristics of all pixels within a static region are: first, the average gray level, which reflects the overall brightness level of the static region; and second, the standard deviation of gray level, which reflects the texture detail or gray level dispersion within the static region.

[0027] For any static region, at continuous sampling times, the calculated average gray value constitutes a discrete time series, which is denoted as the original gray value mean series; similarly, the calculated gray value standard deviation also constitutes a discrete time series, which is denoted as the original gray value standard deviation series.

[0028] Thus, the original gray-level mean sequence and the original gray-level standard deviation sequence of the static region at each sampling time were obtained.

[0029] Step S200: Filter the original gray-level mean sequence and the original gray-level standard deviation sequence to obtain the smoothed gray-level mean and smoothed standard deviation.

[0030] It should be noted that the original gray-level mean sequence and the original gray-level standard deviation sequence not only contain the slowly accumulating main trend of operating condition drift caused by factors such as observation window contamination, but also include high-frequency, instantaneous jitter caused by circuit noise, random plasma flicker, etc. Therefore, 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 then dynamically allocate filtering weights according to the matching degree between each data point in the current sequence and these fingerprints, this invention uses this method to smooth the original sequence.

[0031] Before filtering, it is necessary to understand the overall fluctuation of noise in the sequence. Only by clearly identifying the fluctuation amplitude, source form, and presence of extreme outliers can we ensure that the weight allocation during dynamic weighted filtering is more targeted and avoid filtering deviations due to insufficient judgment of noise characteristics. Therefore, considering that standard deviation can reflect the dispersion of gray-level mean within the neighborhood but cannot distinguish the source and form of noise, such as symmetrical random circuit noise and asymmetrical plasma scintillation unidirectional brightness spikes, and considering that skewness can measure the asymmetry of signal data distribution, this invention introduces skewness to identify unidirectional impulse noise caused by plasma scintillation and assist in targeted filtering adjustments. To cope with the interference of occasional high-intensity noise pulses, kurtosis is introduced to measure the sharpness of the data distribution. When the kurtosis is much higher than the standard normal distribution, it indicates the existence of extreme outliers. During filtering, these data points are given lower confidence to avoid contaminating long-term drift trend estimates.

[0032] Specifically, firstly, taking the original gray-level mean sequence of any static region as the analysis object, and focusing on the current time in the sequence... Construct a system with the current time as the endpoint and a length of [missing information]. The subsequent noise feature analysis and reliability calculation are all based on the sequence data within this neighborhood. The value of is related to the sampling frequency and noise characteristics. It is optional; when the sampling frequency is 10Hz, The optimal value is 10-30.

[0033] Secondly, the standard deviation, skewness, and kurtosis at the current moment are calculated separately, and these three features are fused to form a noise fingerprint that can assess the noise state from three dimensions: fluctuation amplitude, asymmetry, and extremes, providing a decision basis for subsequent dynamic weighted filtering. The calculation methods for these three feature values ​​are existing technologies and will not be elaborated here.

[0034] Then, a nonlinear mapping function is constructed to transform these three statistical features into a range within... The reliability score is determined by the eigenvalue representing noise, with a higher eigenvalue corresponding to a lower reliability score. Preferably, an inverse proportional function structure is used for mapping, with the specific relationship as follows: ; ; ; in, 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; 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.

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

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

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

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

[0039] Based on the above logic, the improved smoothing coefficient satisfies the following relationship: ; 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 basic 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.

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

[0041] Finally, the original gray-level mean sequence was filtered using an exponential moving average filter with the improved smoothing coefficient to obtain the smoothed gray-level mean at each sampling time. The exponential moving average filter is existing technology; this invention only improves how to obtain the smoothing coefficient, which will not be elaborated upon here.

[0042] Using the same method, the original grayscale standard deviation sequence was also filtered to obtain the smoothed standard deviation at each sampling time. .

[0043] Thus, the smoothed grayscale mean and smoothed standard deviation of each static region at each sampling time were obtained.

[0044] Step S300: The contrast gain is obtained by weighted summation of the range restoration factor and detail restoration factor of the static area; the brightness bias is obtained by weighted fusion of the results of the additive and multiplicative brightness compensation models.

[0045] It should be noted that the real-time changes in the smoothed grayscale mean and smoothed standard deviation characterize the visual degradation that occurs in the image during the melting process: deviations in the smoothed mean reflect the overall brightness shift of the image, while a decrease in the smoothed standard deviation reflects a loss of image contrast. Without correction, this feature drift caused by factors such as contamination of the observation window can lead to misjudgments in subsequent melt pool state analysis algorithms due to inconsistent input data distribution. Considering that this type of degradation exhibits a composite characteristic of overall brightness shift plus linear contrast scaling in local areas, it can be modeled using an affine transformation with linear scaling and translation capabilities. The scaling factor can correspond to standard deviation recovery to adjust contrast, and the translation factor can correspond to mean compensation to correct brightness, while maintaining the relative distribution of pixel grayscale, perfectly matching the physical characteristics of the degradation.

[0046] From the perspective of image degradation patterns, factors such as observation window contamination and optical attenuation do not change the relative positional relationship between pixels, nor do they produce nonlinear grayscale distortion. This further illustrates the rationality of using linear affine transformation for correction: contrast gain corresponds to the scaling factor of the affine transformation, which is used to restore contrast; brightness bias corresponds to the translation factor of the affine transformation, which is used to correct brightness. Together, they constitute a complete image degradation compensation mechanism.

[0047] Regarding contrast gain, it should be noted that the calculation of contrast gain needs to address both dynamic range compression and detail blurring as contrast losses, thus requiring a three-step construction process.

[0048] First, a range restoration factor is calculated to address dynamic range compression. To compensate for the contrast loss caused by the compression of the image's dynamic range, a range restoration factor needs to be constructed to stretch the currently compressed dynamic range back to its initial size.

[0049] Based on the above logic, the range restoration 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.

[0050] In this formula, the numerator and denominator represent the effective dynamic range at the initial and current times, respectively. This effective dynamic range is defined by the difference between the 95th and 5th percentiles of the grayscale distribution, avoiding interference from individual noisy pixels in the dynamic range determination and making the calculation results more robust. When the dynamic range of an image at a given time is compressed due to degradation, the denominator becomes smaller. A value greater than 1, multiplied by this factor, will stretch the current dynamic range to its initial size; if the dynamic range is not compressed, such as in the initial stage, It does not produce additional stretching, thus avoiding overcompensation.

[0051] It should be added that, , The acquisition method is as follows: acquire five to ten frames of images before the start of smelting, when the observation window is clean and the imaging system is not degraded. For each frame, extract the first frame. The gray values ​​of all pixels within a static region are used to form a gray-level distribution set. Then, the 95th percentile and 5th percentile of the gray-level distribution set are calculated respectively. Finally, the average of the 95th percentiles from multiple frames is taken as the gray-level distribution set. The average of the 5th percentile values ​​from multiple frames is taken as the mean. Furthermore, to prevent the denominator from being 0, when... At that time, it can be Set to a preset strong gain factor, such as 5, which is designed to force an enhancement to an almost completely degraded image; or set... ,in This is the preset maximum gain coefficient, and its value can range from 3 to 10.

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

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

[0054] Based on the above logic, the detail recovery factor satisfies the following relation: ; 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.

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

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

[0057] Based on the above logic, the contrast gain satisfies the following relationship: ; in, It is the first The static region Contrast gain at any given time; It is the first The static region Time range recovery factor; It is the first The static region Detail restoration factor of time; It is the first The static region The weighting coefficient at time step, ranging from 0 to 1, is used to weigh the contributions of the two recovery strategies.

[0058] In this relation, when When the value is close to 1, it indicates that the contrast loss is mainly due to dynamic range compression, while the contrast gain is more biased towards dynamic range compression. Prioritize stretching the overall dynamic range; when When the value is close to 0, it indicates that the contrast loss is mainly due to detail blurring, and the contrast gain is more biased towards... Prioritize restoring texture details; when When both recovery strategies contribute equally, they are suitable for scenarios with a balanced degree of degradation.

[0059] It should be noted that the weighting coefficient is the core adjustment parameter for contrast gain. This invention provides an adaptive calculation method that uses a normalized formula to adaptively calculate the gain when the degradation mode changes dynamically. The core logic is to automatically assign weights based on the relative severity of the two types of loss. The weight coefficients satisfy the following relationship: ; in, It is the first The static region Weighting coefficients at each time point; It is the first The static region Time range recovery factor; It is the first The static region Detail restoration factor of time; It is a preset microvalue used to prevent the denominator from being 0. It can be set to 0.001, and the implementer can set it according to the needs. It is a standard normalization function used to quantize calculation results to... Interval.

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

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

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

[0063] ; 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 any given time. It is the first The average gray level of a static region at the initial time; It is the natural exponential function; It is the absolute value symbol.

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

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

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

[0067] 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: ; 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 any given time. It is the first The average gray level of a static region at the initial time; It is the first The static region Contrast gain at any given time.

[0068] 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... When the value is close to 0, the mean deviation is large, indicating a predominantly multiplicative effect, and the formula is mainly dominated by the second part. This achieves adaptive compensation for both additive and multiplicative brightness degradation modes. Furthermore, to avoid excessive brightness bias affecting the image grayscale distribution, a setting can be made... The range of values ​​is The specific adjustment can be made according to the image grayscale value range, such as 0-255.

[0069] Thus, the contrast gain used to restore contrast and the luminance bias used to correct luminance were obtained for each static region at each time point.

[0070] Step S400: 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 grayscale correction on the original image to obtain the corrected image.

[0071] It should be noted that image degradation effects such as window contamination exhibit a continuous and smooth spatial variation. The degree of brightness attenuation and contrast compression in different areas gradually changes with location, without abrupt boundary differences. If the image is simply divided into several large blocks and the same compensation value is applied, this spatial gradation will be ignored, leading to deviations: some areas will still show signs of degradation due to insufficient compensation, while other areas will experience grayscale distortion due to overcompensation, making accurate correction of the entire image impossible. Therefore, it is necessary to... The compensation parameters for a discrete static region are expanded into a continuous compensation map covering all pixels of the entire image, matching compensation parameters that conform to the degradation law for each pixel. Radial basis function interpolation (RBF) has excellent smooth interpolation capabilities and can construct a continuously transitioning compensation field in the entire image domain based on discrete compensation parameters, accurately adapting to the spatial distribution characteristics of degradation effects. Based on this, the present invention uses radial basis function interpolation to achieve the above expansion.

[0072] Specifically, the contrast gain and luminance bias of each static region at each time step are first constructed into a contrast gain sequence and a luminance bias sequence. Then, RBF interpolation is performed on the two sequences separately to generate a sequence covering each pixel of the image. The contrast gain field and the luminance bias field.

[0073] Taking the construction of the contrast gain field as an example, its RBF interpolation function is as follows: ; in, It is any pixel in the image No. Contrast gain at any given time; It is any pixel in the image ; It is the first The center pixel of a static region; It represents the total number of static regions in the image; These are the weighting coefficients of the RBF basis functions used to construct the contrast gain field; It is the modulus symbol; It is a radial basis function, a function that depends only on distance, such as the Gaussian function; It is a pixel. To the The center pixel of a static region The Euclidean distance.

[0074] It should be added that, It is unknown and needs to be obtained by solving a system of linear equations. In order to solve for the weighting coefficients, we will... Known compensation values Substituting this into the interpolation model constitutes a The system of linear equations is used to uniquely determine all weighting coefficients. The specific solution method is existing technology and will not be elaborated here. Once the weighting coefficients are determined, the RBF interpolation function becomes a continuous function defined across the entire image domain. Substituting any pixel coordinates allows for the calculation of its contrast gain. Similarly, the luminance bias field can be constructed using the same method.

[0075] The contrast gain field and the luminance bias field together constitute the dense compensation field, which provides parameter support for pixel-level affine correction. As previously stated, image degradation can be modeled as a linear affine transformation of luminance offset plus contrast scaling. Therefore, correction needs to be achieved through inverse affine transformation. The contrast gain in the dense compensation field corresponds to the multiplicative factor of the inverse transformation, which is used to restore contrast, while the luminance bias corresponds to the additive factor of the inverse transformation, which is used to correct luminance. Together, they constitute the correction parameters for each pixel.

[0076] The specific correction process includes traversing the current time step. Each pixel in the acquired raw image Find the corresponding one from the dense compensated field and Substitute the values ​​into the affine correction model to adjust the grayscale values. This model satisfies the following relationship: ; in: These are the corrected pixels. No. The grayscale value at any given moment; Represents the pixels in the original image No. The grayscale value at any given moment; pixels in an image No. Contrast gain at any given time; pixels in an image No. Brightness offset at any given moment.

[0077] In this relation, the first term Used to restore localized contrast loss caused by viewing window contamination or sensor aging, when The value is greater than At that time, with the local grayscale mean as the center, the dynamic range of the pixel is stretched, thereby effectively enhancing the local contrast of the pixel's neighborhood. (Second item) It is mainly responsible for compensating for brightness drift caused by fluctuations in electron beam power or changes in ambient light. When the value is positive, the pixel brightness is increased; when the value is negative, it is suppressed.

[0078] By applying a unique compensation value to each pixel of the entire image, pixel-level adaptive correction of spatial heterogeneity is finally achieved. The corrected image is output with stable features, high clarity, and effectively eliminates the effects of operating condition drift and instantaneous noise, providing a reliable data foundation for subsequent high-precision quantitative analysis of the molten pool state.

[0079] This completes the grayscale correction of the original image, resulting in the corrected image.

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

[0081] It should be noted that the corrected image has eliminated image degradation caused by factors such as observation window contamination, electron beam power fluctuations, and sensor aging. It possesses advantages such as clear molten pool features, stable grayscale distribution, and low noise interference, making it a reliable data foundation for subsequent molten pool monitoring. Considering that intelligent detection models such as the YOLO series, as deep learning networks suitable for industrial scenarios, can quickly and accurately extract key information from the molten pool, avoiding the subjective inefficiency of manual analysis and meeting the needs of real-time monitoring and accurate judgment of the smelting process, this step uses them to extract molten pool features.

[0082] Specifically, the corrected image is input into a pre-trained intelligent detection model. The specific training process of the model is existing technology and will not be elaborated upon here. This intelligent detection model outputs structured molten pool features that can be directly used for process analysis, including three core types of data: geometric features: boundary contour coordinates and actual area, reflecting whether the molten pool shape meets process standards; positional features: horizontal and vertical deviations relative to the electron beam scanning center, providing a basis for judging electron beam focusing offset and adjusting parameters; and state features: detecting unmelted blocks, overheated spots, etc., through grayscale distribution analysis, directly related to smelting stability and ingot quality.

[0083] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A smart image detection method for electron beam melting scanning, characterized in that, Including the following steps: Multiple static areas are preset within the camera field of view of the electron beam melting furnace; The original images of the smelting process are acquired at a preset sampling frequency to obtain the original gray-scale mean sequence and the original gray-scale 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 to obtain the smoothed gray-level mean and smoothed standard deviation; The contrast gain is obtained by weighted summation of the range restoration factor and the detail restoration factor of the static region; the range restoration factor is related to the gray-level 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; the weight coefficients of the weighted fusion have an exponential decay relationship with the deviation between the smoothed gray-level mean and the initial gray-level mean of the static region. 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 different times; It is a preset adjustment coefficient; It is the first The static region The smoothed grayscale mean at any given time. It is the first The average gray level of a static region at the initial time; 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 brightness bias satisfies 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 different times; It is the first The static region The smoothed grayscale mean at any given time. It is the first The average gray level of a static region at the initial time; It is the first The static region Contrast gain at any given time.

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

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

6. The intelligent image detection method for electron beam melting scanning according to claim 1, characterized in that, The filtering includes: 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-scale mean sequence is processed using an exponential moving average filter based on the improved smoothing coefficient to obtain the smoothed gray-scale mean of the data points.

7. The intelligent image detection method for electron beam melting scanning according to claim 6, 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.

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

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

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

  • Household camera imaging quality detection method and system

    CN120568043A