A method and system for intelligent denoising of forging images under high-temperature conditions
By separating the thermal distortion flow field in forging images using the RANSAC algorithm and the global optimization algorithm, inverting the distortion-free latent image and performing guided filtering, the geometric distortion and texture fidelity problems of forging images under high temperature conditions are solved, and efficient denoising and detail restoration of high temperature forging images are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-03-13
AI Technical Summary
In high-temperature environments, the non-rigid distortion of forging images caused by heat waves makes it impossible for existing optical flow methods to effectively separate rigid body motion and heat wave distortion, thus affecting image clarity and the accuracy of subsequent processing.
The RANSAC algorithm is used to separate the thermal wave distortion flow field. Combined with the global optimization algorithm, the distortion-free potential image is inverted from the video sequence. This image is then used as a guide for filtering to achieve high-fidelity restoration of the surface texture of the forging.
It effectively removes geometric distortions caused by heat waves while preserving the original texture details of the forging surface, improving image clarity and fidelity.
Smart Images

Figure CN121190350B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to an intelligent denoising method and system for forging images under high-temperature environments. Background Technology
[0002] In modern industrial manufacturing, especially in metal forging processes, online dimensional measurement and surface defect detection of forgings under high-temperature conditions using machine vision systems are crucial for achieving automation and intelligence. However, high-temperature forgings continuously heat the surrounding air, causing uneven dynamic changes in air density and refractive index, resulting in heat waves. When a camera captures an image of a forging, light passing through this unstable air medium undergoes random distortion and refraction, ultimately producing time-varying, non-rigid geometric distortions on the imaging plane, manifesting as localized image jitter, blurring, and distortion.
[0003] To address structured noise caused by heat waves, existing technologies typically employ multi-frame information-based processing methods, such as optical flow to estimate inter-frame pixel motion for image alignment and correction. Optical flow, as a mature motion estimation algorithm, can calculate a motion vector for each pixel in an image. However, in the specific scenario of high-temperature forging, traditional optical flow aims to estimate the overall pixel motion. The calculated motion field is a mixture of the rigid motion of the forging and the non-rigid distortion of the heat wave, failing to effectively separate these two distinct motion properties. Directly using this mixed motion field for image correction often leads to model mismatch, not only failing to completely eliminate heat wave distortion but also potentially introducing new blur or artifacts, severely impacting image clarity and the accuracy of subsequent processing. Summary of the Invention
[0004] To address the aforementioned technical problem of poor noise reduction performance in forging images under high-temperature environments, the present invention provides solutions in the following aspects.
[0005] In a first aspect, the present invention provides an intelligent denoising method for forging images under high-temperature conditions, comprising:
[0006] Acquire a forging motion video containing the target frame; and construct a target window by combining the target frame with several adjacent video frames; perform motion compensation on the video frames within the target window to obtain a target-aligned video frame sequence; acquire the total residual motion field of any two consecutive frames in the target-aligned video frame sequence; use the RANSAC algorithm to fit a parameterized model to describe and remove residual rigid body motion in the total residual motion field to obtain the thermal wave distortion flow field; acquire the thermal wave distortion flow field of all consecutive frames in the target-aligned video frame sequence to construct a time-varying distortion flow field sequence; based on the time-varying distortion... The flow field sequence and the target-aligned video frame sequence are used to obtain a unique distortion-free latent image through global optimization. The global optimization aims to find an image that minimizes the sum of differences between itself and the corresponding aligned video frame after being positively distorted by each distorted flow field, while maximizing its own smoothness. The distortion-free latent image is used as a guide image to perform guided filtering on the target frames in the target-aligned video frame sequence to obtain denoised target frames. The guided filtering uses the similarity of neighboring image patches in the guide image as weights to perform a weighted average of the gray values of corresponding neighboring pixels in the target frame.
[0007] This invention first aligns the forging by constructing a target window for motion compensation, then uses the RANSAC algorithm to accurately separate the thermal wave distortion flow field from the residual motion, and then uses a global optimization algorithm to robustly invert a unique, geometrically distortion-free potential image from the entire video sequence. Finally, this distortion-free image is used as a guide to filter the target frame. By combining motion separation, global scene reconstruction, and detail restoration, this invention can not only effectively remove the complex time-varying geometric distortion caused by the heat wave, but also perfectly preserve the original texture details of the forging surface while denoising, ensuring both denoising effect and image fidelity.
[0008] Preferably, the step of performing motion compensation on the video frames within the target window to obtain a target-aligned video frame sequence includes:
[0009] A dense optical flow estimation algorithm is used to calculate the motion vector field of each video frame in the target window (excluding the target frame) relative to the target frame; based on the motion vector field, image warping operation is performed on each video frame in the target window (excluding the target frame) to obtain a target-aligned video frame sequence.
[0010] Preferably, the step of fitting the parameterized model using the RANSAC algorithm includes: randomly selecting multiple feature point pairs in the total residual motion field; fitting the parameterized model based on the feature point pairs and calculating the number of interior points supporting the model; repeating the extraction and fitting process until a preset number of iterations or an interior point number threshold is reached; and selecting the parameterized model with the most interior points as the final parameterized model.
[0011] This invention employs the RANSAC algorithm, which, through random sampling and iterative verification, can robustly estimate the parameterized model followed by interior points dominated by residual rigid body motion from a large amount of exterior point data generated by thermal wave distortion. This allows the invention to separate two motions with different properties, improving the purity of the extracted thermal wave distortion flow field and preventing rigid body motion from being incorrectly classified as distortion, thereby preventing the introduction of structural fuzziness or ghosting in subsequent processing.
[0012] Preferably, obtaining the total residual sports field includes:
[0013] Obtain the dense optical flow field of any two consecutive video frames in the target aligned video frame sequence, and denote the video frame with the earlier time in the two consecutive video frames as the first video frame, and denote the dense optical flow field as the total residual motion field of the first video frame.
[0014] The decomposition expression for the total residual motion field is: ;
[0015] In the formula, This represents the total residual motion vector of the p-th pixel in the first video frame; This represents the motion vector contributed by the residual rigid body motion in the total residual motion vector of the p-th pixel in the first video frame; This represents the motion vector contributed by heat wave distortion in the total residual motion vector of the p-th pixel in the first video frame.
[0016] This invention decomposes the total residual motion field into two parts: residual rigid body motion and thermal wave distortion motion, providing a clear theoretical basis for subsequently using different models to handle these two types of motion separately. This approach is more accurate and effective than existing techniques that treat all non-global motion as random noise.
[0017] Preferably, the objective of the global optimization is to minimize an energy function, which satisfies the expression:
[0018] ;
[0019] in, This represents the distortion-free latent image to be solved; This represents the energy function value of the distortion-free latent image to be solved; This represents the set of video frames that indicate the target-aligned video frame sequence. This represents the heat wave distortion flow field in the i-th video frame of the target-aligned video frame sequence; This represents the i-th video frame in the target-aligned video frame sequence; Represents the image distortion function; Represents the L2 norm; Indicates the balance coefficient; This represents the regularization term.
[0020] This invention transforms the problem of finding distortion-free images into a mathematical problem with a clear optimization objective. It can utilize the temporal redundancy information of the entire video sequence to jointly constrain the solution process, thereby suppressing the error caused by inaccurate estimation of the distortion field in a single frame, and reproducing a potential image with the highest consistency and stability over the entire distortion process.
[0021] Preferably, the regularization term is the total variation of the distortion-free latent image to be solved.
[0022] Preferably, obtaining the denoised target frame includes:
[0023] Any pixel to be corrected in the target frame is denoted as pixel p. A spatiotemporal search neighborhood is set with pixel p as the center. Any pixel in the spatiotemporal search neighborhood is denoted as a neighboring pixel q. In the target distortion-free latent image, an image block centered on pixel p is obtained, and an image block centered on neighboring pixel q is obtained. ;
[0024] In the formula, This represents the corrected grayscale value of pixel p; This represents the spatiotemporal search neighborhood centered on pixel p; This represents the guiding weight that connects pixel p and its neighboring pixel q; This represents the grayscale value of the neighboring pixel q; Represents the L2 norm;
[0025] Correct all pixels in the target frame to be corrected to obtain the corrected target frame.
[0026] This invention uses the obtained distortion-free latent image as a structural guide to filter aligned video frames that retain all original details, achieving separate processing of geometric correction and detail restoration. It utilizes both the geometric accuracy of the latent image and the texture authenticity of the original observation frame, thereby achieving high-fidelity detail preservation while correcting distortion.
[0027] Preferably, the guiding weights of the connected pixel p and the neighboring pixel q satisfy the expression:
[0028] ;
[0029] In the formula, This represents the guiding weight that connects pixel p and its neighboring pixel q; This represents an image block centered at pixel p; This represents an image patch centered at a neighboring pixel q. Indicates the filter control parameters; Represents the L2 norm; This represents the natural exponential function.
[0030] Preferably, the number of video frames in the target window satisfies the condition that the time span of the target window includes at least one complete cycle of heat wave distortion.
[0031] Secondly, the present invention provides an intelligent denoising system for forging images in high-temperature environments, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the aforementioned intelligent denoising method for forging images in high-temperature environments is implemented.
[0032] By adopting the above technical solution, a computer program is generated from the above-mentioned intelligent denoising method for forging images in high-temperature environments and stored in a memory so that it can be loaded and executed by a processor. This allows for the creation of a terminal device based on the memory and processor, making it convenient to use.
[0033] The beneficial effects of this invention are as follows: This invention separates the thermal wave distortion flow field through the RANSAC algorithm; then, it uses a global optimization algorithm to invert the potential image without geometric distortion from the entire video sequence as an absolute reference; finally, it uses this potential image as a guide to filter the original image, thereby thoroughly correcting the time-varying geometric distortion while restoring the fine texture of the forging surface with high fidelity, thus solving the contradiction between distortion removal and detail preservation that existing technologies cannot simultaneously address. Attached Figure Description
[0034] Figure 1 This is a flowchart illustrating an intelligent denoising method for forging images in a high-temperature environment according to the present invention.
[0035] Figure 2 This is a schematic diagram illustrating the target frame;
[0036] Figure 3 This is a schematic diagram illustrating a potential image of the target without distortion;
[0037] Figure 4 This is a schematic diagram illustrating the corrected target frame. Detailed Implementation
[0038] This invention discloses an intelligent denoising method for forging images under high-temperature environments, referring to... Figure 1 This includes steps S1-S4:
[0039] S1: Acquire the video of the forging motion, take any video frame as the target frame to be processed, and form a target window together with the k left adjacent video frames; perform alignment processing on the target window based on the optical flow method to obtain the target aligned video frame sequence.
[0040] It is important to note that in the high-temperature forging industrial environment, the video sequences captured by the camera exhibit a superposition of two physical motions: the global rigid body motion of the forging itself due to the overall translation and rotation caused by the conveying device or robotic arm, and the non-rigid thermal wave distortion caused by the high-temperature forging heating the surrounding air, resulting in a non-uniform distribution of air density and refractive index in space and time, bending the light propagation path, and thus producing a local, non-linear distortion and swaying on the imaging plane. If these two motions are not decomposed, the non-rigid thermal wave distortion will act as a strong, structured interference, severely affecting the accurate estimation of the rigid body motion of the forging; similarly, the rigid body motion of the forging will be mistakenly identified as part of the thermal wave by subsequent distortion correction algorithms, leading to model mismatch and final image blurring.
[0041] It should be further explained that, considering that rigid body motion is a large-scale global motion and the dominant component in the entire mixed motion field, image registration techniques such as dense optical flow are mature tools designed to solve such global or segmented global motion compensation in the field of image processing, and can effectively align most of the motion. Therefore, this invention first establishes a stable reference coordinate system by combining optical flow method, and performs preliminary rigid body motion compensation on the forging video to roughly align all frames to the coordinate system of the target frame, thereby enabling the forging image denoising to be performed on a relatively static background, processing residual minor motion and thermal distortion.
[0042] Specifically, video of forging motion under high-temperature conditions is acquired using an industrial camera. Any video frame is used as the target frame to be processed, and the target frame, along with its leftmost k adjacent video frames, constitutes a target window. It should be noted that k is a preset value, adaptively determined based on the frequency of heat wave changes and the camera frame rate. The selection principle is to ensure that the processing window's time span is sufficient to capture at least one complete cycle of heat wave distortion. For example, if the main disturbance frequency of the heat wave is 10Hz and the camera frame rate is 100fps, then one cycle contains 10 frames, and k can be selected as 9, forming a target window with a total length of 10 frames. It should be noted that, as... Figure 2 This is a schematic diagram of the target frame.
[0043] Preferably, taking the target frame as a reference, rigid body motion compensation is performed on all video frames within the target window to obtain a target-aligned video frame sequence. This includes: employing a dense optical flow estimation algorithm to calculate the motion vector field of each video frame in the target window relative to the target frame, and performing image warping operations on each video frame in the target window based on the motion vector field to obtain the target-aligned video frame sequence. It should be noted that the dense optical flow estimation algorithm, such as the Gunnar Farneback algorithm, approximates the image using a quadratic polynomial in the neighborhood of each pixel and estimates the displacement field by solving for the changes in the polynomial coefficients. This allows for the calculation of a motion vector for each pixel in the image, thus forming a dense motion vector field.
[0044] It should be noted that the target-aligned video frame sequence compensates for large-scale, global rigid body motion. It is a sequence in which the forging appears to be stationary on a macroscopic scale, but it still contains local non-rigid distortion caused by heat waves, as well as weak residual rigid body motion caused by imperfect optical flow estimation or slight acceleration and deceleration of the forging.
[0045] At this point, the target-aligned video frame sequence has been obtained.
[0046] S2: Obtain the total residual motion field of any two consecutive video frames in the target aligned video frame sequence, and decompose the total residual motion field into a residual rigid body motion field and a thermal wave distortion flow field; solve the decomposition expression of the total residual motion field to obtain the thermal wave distortion flow field; obtain the thermal wave distortion flow field of all consecutive frames within the target window, and construct a time-varying distortion flow field sequence in chronological order.
[0047] It should be noted that the residual motion field of the target-aligned video frame sequence is still a complex hybrid motion field, containing weak residual rigid body motion caused by inaccurate optical flow estimation or slight acceleration / deceleration of the forging, as well as non-rigid distortion purely caused by heat waves. Directly using this hybrid motion field as a heat wave distortion model would incorrectly attribute the globally correlated residual rigid body motion to a locally stochastic heat wave model, leading to systematic biases in subsequent model inversion and ultimately introducing structural blur or ghosting in the corrected image.
[0048] It should be further explained that these two residual motions are inherently separable in their mathematical models. The residual rigid body motion remains globally dependent and can be accurately described using low-dimensional parametric models such as affine transformations; however, thermal wave distortion, as a turbulent phenomenon, has a high-dimensional, non-parametric motion field that does not follow any global model. This characteristic makes the matching points of the residual rigid body motion interior points, while the matching points of the thermal wave distortion appear as exterior points. Considering that the Random Sample Consensus (RANSAC) algorithm is a classic algorithm designed to robustly estimate the parametric model followed by interior points from data containing a large number of exterior points, this invention uses the RANSAC algorithm to robustly estimate and remove the parametric residual rigid body motion component from the total residual motion field, thereby extracting the non-parametric, purely thermal wave distortion flow field.
[0049] Specifically, the total residual motion field of any two consecutive video frames in the target aligned video frame sequence is obtained, and the total residual motion field is decomposed into a residual rigid body motion field and a thermal wave distortion flow field, including:
[0050] Obtain the dense optical flow field of any two consecutive video frames in the target aligned video frame sequence. The video frame that appears earlier in time is designated as the first video frame, and the dense optical flow field is designated as the total residual motion field of the first video frame. It should be noted that the total residual motion field is a vector field with the same size as the image, where each pixel position corresponds to a two-dimensional motion vector representing the displacement of that pixel between the two frames.
[0051] The decomposition expression of the total residual motion field is:
[0052] ;
[0053] In the formula, This represents the total residual motion vector of the p-th pixel in the first video frame; This represents the motion vector contributed by the residual rigid body motion in the total residual motion vector of the p-th pixel in the first video frame; This represents the motion vector contributed by heat wave distortion in the total residual motion vector of the p-th pixel in the first video frame.
[0054] It should be noted that the motion vector corresponding to the residual rigid body motion can be described by a global low-dimensional parametric model such as affine transformation, while thermal wave distortion is a local, non-parametric, high-dimensional field. Utilizing this structural difference, this invention first estimates the global parametric residual rigid body motion model, and then estimates the parametric model of the interior points from data points containing a large number of exterior points by matching sparse feature points.
[0055] Preferably, solving the decomposition expression of the total residual motion field to obtain the thermal wave distorted flow field includes:
[0056] In the two consecutive video frames, feature points are extracted and matched using an image registration algorithm to obtain several pairs of local feature points for the two consecutive video frames. It should be noted that image registration algorithms such as SIFT are existing technologies and will not be elaborated upon here.
[0057] Using the local feature point pairs as input, the RANSAC algorithm is used to obtain the global affine transformation matrix of the first video frame. It should be noted that the RANSAC algorithm iteratively and randomly selects a small number of feature point pairs to fit an affine transformation model and calculates the number of feature point pairs that the model can explain. The model that can explain the most feature point pairs is considered the best model for describing the residual rigid body motion, and the global affine transformation matrix is the matrix representation of this best model.
[0058] The global affine transformation matrix is applied to any pixel in the first video frame, and the affine coordinates of the pixel are calculated. The affine coordinates satisfy the expression:
[0059] ;
[0060] In the formula, , The coordinates of the first video frame are: The affine coordinates of the pixels; This represents the expansion of the global affine transformation matrix.
[0061] The motion vector caused by the residual rigid body motion is the difference between the old and new positions, and the residual rigid body motion field satisfies the expression:
[0062] ;
[0063] In the formula, This represents the motion vector contributed by the residual rigid body motion in the total residual motion vector of the p-th pixel in the first video frame; , This represents the affine coordinates and original coordinates of the p-th pixel in the first video frame.
[0064] The thermal wave distortion flow field is obtained by subtracting the estimated residual rigid body motion field from the total residual motion field.
[0065] Preferably, the thermal wave distortion flow field of all consecutive frames within the target window is acquired and arranged in chronological order to form a time-varying distortion flow field sequence. It should be noted that the time-varying distortion flow field sequence can accurately describe the dynamic evolution of the thermal wave.
[0066] Thus, the time-varying distortion flow field sequence was obtained.
[0067] S3: Combine the time-varying distortion flow field sequence with the target-aligned video frame sequence to construct an energy function. The distortion-free potential image to be solved when the energy function reaches its minimum value is denoted as the target distortion-free potential image.
[0068] It should be noted that the time-varying distorted flow field sequence is a mathematical approximation of the physical process of the heat wave, and its input is a sequence of target-aligned video frames. Due to the inherent limitations of the optical flow estimation algorithm, each independently calculated distorted flow field is an approximation of the actual physical distortion with estimation errors. Therefore, if only the distorted flow field at a single moment is selected and a simple inverse distortion operation is performed on the video frame, the estimation error of that single flow field will be completely and undiminished propagated to the final corrected image, resulting in unstable results and the presence of local artifacts.
[0069] It should be further explained that, considering that all video frames within the target window, though varying in form, share the same physical origin—a static forging—provide multiple sets of redundant information for solving for a unique, distortion-free true image. This invention does not rely on any single, unreliable inverse transformation, but rather constructs the problem as a global optimization model to seek a unique distortion-free latent image. This distortion-free latent image, after being forward-distorted by the distorted flow field corresponding to each time step with errors, should achieve an optimal match with the entire set of all actual observation frames. The global optimization model, through an energy function containing data fidelity and regularization terms, utilizes information from the entire sequence to jointly constrain the solution, thereby effectively averaging and suppressing the uncertainty in the estimation of a single distorted flow field, and retrieving the distortion-free latent image with the highest consistency and stability over the entire distortion process.
[0070] Specifically, an energy function is constructed, and an iterative optimization algorithm is used to find the distortion-free latent image that minimizes this energy function, including:
[0071] ;
[0072] In the formula, This represents the distortion-free latent image to be solved; This represents the energy function value of the distortion-free latent image to be solved; This represents the set of video frames that indicate the target-aligned video frame sequence. This represents the heat wave distortion flow field in the i-th video frame of the target-aligned video frame sequence; This represents the i-th video frame in the target-aligned video frame sequence; The image distortion function is represented by the vector field. For images Perform pixel position remapping; Represents the L2 norm; This represents the balancing coefficient, used to balance the weights of the data fidelity term and the regularization term. Preferably, Determined adaptively using the L-curve method; This represents a regularization term used to impose a smoothing prior on the solution space, ensuring the physical plausibility of the solution. For example, Let be the total variation of the distortion-free latent image to be solved.
[0073] It should be noted that, The specific operation is as follows: The distorted coordinates of any pixel are obtained by remapping the pixel's position based on the thermal distortion flow field. The specific method for obtaining this is to systematically test a series of candidate balance coefficient values and plot an L-curve of data fidelity cost versus smoothing prior cost. By automatically locating the corner of this curve, the optimal balance coefficient value representing the best balance point is found, thus avoiding manual parameter tuning. In distortion-free potential images During the optimization process, if the candidate image is filled with noise or artifacts, its local grayscale changes will be abnormally drastic, resulting in a significant increase in the total variation value, which in turn increases the total energy, causing the candidate image to be lost and reducing the probability of it being the optimal solution. Conversely, if the candidate image has a piecewise smooth characteristic, the total variation value is smaller, and the total energy is more likely to meet the minimization condition.
[0074] In the formula, The undistorted latent image to be solved is positively distorted by the thermal wave distortion flow field to obtain a simulated video frame, and the difference between the simulated video frame and the real video frame is used to obtain the residual image; This represents the sum of squares of all pixel gray values in the residual image, reflecting the degree of fit of the candidate image to the i-th video frame of the target aligned video frame sequence. The smaller this value, the better the simulated video frame of the undistorted potential image to be solved matches the real video frame. Indicates will The sum of the fit of all video frames in the video frame sequence aligned with the target represents the total data fidelity term; the smaller this value, the better the fit. The more uniformly it can interpret the distortion results of all video frames; This means that the smoothness of the candidate image is constrained by the total variation, preventing the model from overfitting the noise and distorted flow field estimation errors in the observed data, and ultimately ensuring the smoothness of the solved image. The structure is stable and conforms to the physical properties of forgings.
[0075] Preferably, an iterative optimization algorithm is used to... Solve the problem to obtain the solution. Minimize the best solution The optimal solution is the desired distortion-free latent image of the target. It should be noted that the iterative optimization algorithm, such as gradient descent or L-BFGS, is existing technology and will not be elaborated upon here. Figure 3 A schematic diagram of the potential image for the target without distortion.
[0076] At this point, a distortion-free potential image of the target has been obtained.
[0077] S4: Perform spatiotemporal nonlocal mean filtering on any pixel to be corrected in the target frame to obtain the corrected grayscale value of the pixel to be corrected; correct all pixels to be corrected in the target frame to obtain the corrected target frame.
[0078] It should be noted that the process of acquiring the distortion-free latent image of the target, in order to ensure the stability and physical rationality of the solution, inevitably leads to a reduction in the fine texture of the forging surface, such as microcracks and oxide scale boundaries, due to its inherent smoothing property, which effectively suppresses macroscopic noise such as geometric distortion. However, the target-aligned video frame sequence completely preserves these original and realistic texture details. Therefore, this invention, while maintaining the correct geometric structure of the distortion-free latent image of the target, losslessly restores the high-frequency details in the original observation sequence.
[0079] It should be further explained that directly applying any form of filtering or weighted averaging to the target-aligned video frame sequence is not feasible because the time-varying geometric distortion inherent in the target-aligned video frame sequence itself severely contaminates the structural similarity measurement between pixels, making it impossible to accurately determine which pixels belong to the same structure, thus failing to generate effective filtering weights. To solve this problem, the similarity measurement and pixel value sampling processes are separated and executed in different data domains. Since the target distortion-free latent image has eliminated geometric distortion, it can serve as a distortion-free and absolutely reliable structural reference system. Calculating the similarity between image patches in this reference system can generate a set of high-fidelity guiding weights that are unaffected by geometric distortion and truly reflect the inherent structure of the object's surface. Therefore, this invention proposes a guided filtering mechanism: using the target distortion-free latent image to calculate guiding weights, and applying this set of high-fidelity weights to perform a weighted average on the target-aligned video frame sequence that retains all original details, thereby accurately recovering true high-frequency details on the correct geometric structure.
[0080] Specifically, for any pixel to be corrected in the target frame, spatiotemporal nonlocal mean filtering is performed to obtain the corrected grayscale value of the pixel to be corrected, including:
[0081] Any pixel to be corrected in the target frame is denoted as pixel p. A spatiotemporal search neighborhood is defined centered on pixel p, and any pixel within the spatiotemporal search neighborhood is denoted as a neighboring pixel q. In the target distortion-free latent image, an image patch centered on pixel p and an image patch centered on neighboring pixel q are obtained. It should be noted that the spatiotemporal search neighborhood is defined as a three-dimensional pixel set, including spatial and temporal dimensions. Preferably, the spatial dimension is centered on pixel p. A rectangular window, with the time dimension including the target frame. Frame, exemplary The image patch set is centered on pixel p. Pixel region, for example, .
[0082] The corrected grayscale value of any pixel to be corrected in the target frame satisfies the expression:
[0083] ;
[0084] ;
[0085] In the formula, This represents the corrected grayscale value of pixel p; This represents the spatiotemporal search neighborhood centered on pixel p; This represents the guiding weight that connects pixel p and its neighboring pixel q; This represents the grayscale value of the neighboring pixel q; This represents an image block centered at pixel p; This represents an image patch centered at a neighboring pixel q. Indicates the filter control parameters; Represents the natural exponential function; This represents the L2 norm.
[0086] It should be noted that the filter control parameters determine the decay rate of the guiding weights; preferably, The standard deviation of the image noise is determined adaptively based on the image noise level. For example, the standard deviation of the image noise is first estimated. ,Will Set as .
[0087] In the formula, This represents the contribution of a neighboring pixel q to pixel p. The original gray value of the neighboring pixel q is multiplied by the guiding weight, indicating that the more similar the pixels are in structure, the greater the contribution weight. This means that the contribution values of all neighboring pixels are normalized and weighted to obtain the corrected gray value of pixel p. This represents the similarity distance between two image patches; the smaller the value, the more similar the structures of the two image patches are. This indicates that the similarity distance is normalized by dividing by . This makes the weight calculation insensitive to the overall brightness range of the image, thus enhancing the robustness of the algorithm.
[0088] Preferably, all pixels to be corrected in the target frame are corrected to obtain the corrected target frame. It should be noted that, as... Figure 4 This is a schematic diagram of the corrected target frame.
[0089] At this point, the corrected image was obtained, and intelligent denoising of the forging image was completed.
[0090] This invention also discloses an intelligent denoising system for forging images in high-temperature environments, comprising a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement an intelligent denoising method for forging images in high-temperature environments according to the present invention.
[0091] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0092] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A forging image intelligent denoising method for high temperature environment, characterized in that, The method comprises the following steps: acquiring a video of a forging movement containing a target frame; constructing a target window by taking the target frame and a plurality of adjacent left video frames; performing motion compensation on the video frames in the target window to obtain a target-aligned video frame sequence; acquiring a total residual motion field of any two continuous frames in the target-aligned video frame sequence; using a RANSAC algorithm to fit a parameterized model to describe and eliminate the residual rigid body motion in the total residual motion field, and obtaining a thermal wave distortion flow field; acquiring the thermal wave distortion flow field of all continuous frames in the target-aligned video frame sequence to construct a time-varying distortion flow field sequence; based on the time-varying distortion flow field sequence and the target-aligned video frame sequence, solving a unique distortion-free latent image through global optimization; the global optimization aims to minimize an energy function, and the energy function satisfies the expression: ; is the distortion-free latent image to be solved; is the energy function value of the distortion-free latent image to be solved; is a set of video frames of a target aligned video frame sequence; is the heat wave distortion flow field of the i-th video frame of the target aligned video frame sequence; is the i-th video frame of the target aligned video frame sequence; is the image warping function; is the L2 norm; is the balance coefficient; is the regularization term; the global optimization aims to find an image, which, after being forward distorted by each distortion flow field, has the minimum sum of differences with the corresponding aligned video frame, and has the maximum smoothness itself; using the distortion-free latent image as a guide image, performing guided filtering on the target frame in the target-aligned video frame sequence to obtain a denoised target frame, comprising: taking any pixel to be corrected of the target frame as a pixel p, setting a spatiotemporal search neighborhood centered on the pixel p, and taking any pixel point of the spatiotemporal search neighborhood as a neighborhood pixel q; In the target distortion-free latent image, an image block centered at pixel p is obtained, and an image block centered at a neighborhood pixel q is obtained; ; is a corrected gray value of pixel p; is a spatio-temporal search neighborhood set with pixel p as the center; is a guide weight connecting pixel p and neighborhood pixel q; is a gray value of neighborhood pixel q; all the pixels to be corrected in the target frame are corrected to obtain a corrected target frame; the guided filtering uses the similarity of the neighborhood image blocks in the guide image as the weight to perform a weighted average on the gray values of the corresponding neighborhood pixels in the target frame.
2. The method for intelligent denoising of forging images in a high-temperature environment according to claim 1, characterized in that, the motion compensation on the video frames in the target window to obtain the target-aligned video frame sequence comprises: using a dense optical flow estimation algorithm to calculate the motion vector field of each video frame in the target window except the target frame relative to the target frame; performing image distortion operation on each video frame in the target window except the target frame based on the motion vector field to obtain the target-aligned video frame sequence.
3. The method for intelligent denoising of forging images in high-temperature environments according to claim 1, characterized in that, the use of the RANSAC algorithm to fit the parameterized model comprises: randomly extracting a plurality of feature point pairs in the total residual motion field; fitting a parameterized model based on the feature point pairs and calculating the number of inliers supporting the model; repeating the extraction and fitting process until a preset iteration number or an inlier number threshold is reached; selecting the parameterized model with the most inliers as the final parameterized model.
4. The method for intelligent denoising of forging images in a high-temperature environment according to claim 1, characterized in that, the acquisition of the total residual motion field comprises: acquiring a dense optical flow field of any two continuous video frames in the target-aligned video frame sequence, taking the video frame in time earlier as a first video frame, and taking the dense optical flow field as the total residual motion field of the first video frame; The decomposition expression of the total residual motion field is: ; wherein represents the total residual motion vector of the pth pixel point of the first video frame; represents the motion vector of the pth pixel point of the first video frame contributed by the residual rigid body motion in the total residual motion vector; represents the motion vector of the pth pixel point of the first video frame contributed by the thermal distortion in the total residual motion vector.
5. The method for intelligent denoising of forging images in high-temperature environments according to claim 1, characterized in that, the regularization term is the total variation of the distortion-free latent image to be solved.
6. The method for intelligent denoising of forging images in high-temperature environments according to claim 1, characterized in that, the guide weight connecting the pixel p and the neighborhood pixel q satisfies the expression: ; wherein, denotes a steering weight connecting the pixel p and the neighboring pixel q; denotes an image patch centered at the pixel p; denotes an image patch centered at the neighboring pixel q; denotes a filter control parameter; denotes the L2 norm; denotes the natural exponential function.
7. The method for intelligent denoising of forging images in high-temperature environments according to claim 1, characterized in that, the number of video frames in the target window satisfies the condition: the time span of the target window contains at least one complete change period of the thermal wave distortion.
8. A forged piece image intelligent denoising system for high-temperature environments, characterized by, The method comprises the following steps: a processor and a memory, the memory storing computer program instructions which, when executed by the processor, implement a forging image intelligent denoising method in a high-temperature environment according to any one of claims 1-7.
Citation Information
Patent Citations
Intelligent jitter identification and compensation method and system for endoscopic surgery image
CN120075619A
Thermal recording system and method
US4596993A