Space-time domain and frequency domain combined video noise reduction method, device and equipment and storage medium
Through the joint method of spatio-temporal and frequency domains, and using deep features of frequency domain, optical flow and spatial domain, it solves the problem of processing multiple noise models in existing infrared videos and achieves efficient video noise reduction effect.
Patent Information
- Application Number
- CN202410786259.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-10-18
AI Technical Summary
Existing infrared denoising algorithms are limited to the image level, cannot effectively utilize the similarity between video frames, and cannot comprehensively handle multiple noise models such as stripe noise and pot lid noise, resulting in poor performance.
A video noise reduction method that combines spatio-temporal and frequency domains is used to obtain the propagation characteristics of the video through frequency domain noise reduction, optical flow and spatial domain deep features, and the frequency domain, spatial domain and propagation features are integrated to achieve efficient noise reduction.
It achieves efficient separation and removal of various types of noise and improves the performance and accuracy of video noise reduction, especially the joint noise reduction effect in the spatiotemporal and frequency domain is more significant.
Smart Images

Figure CN118803167A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a space-frequency domain-joint video denoising method, device, equipment and storage medium. Background Art
[0002] Existing infrared denoising algorithms are limited to the image level and cannot utilize the similarities between video frames. They do not have optimal performance in the era of video observation.
[0003] Existing infrared denoising algorithms either focus on stripe noise or pot cover noise, and rarely pay attention to comprehensive noise models.
[0004] Existing RGB video denoising usually only focuses on spatiotemporal information, but the frequency domain has important information features and noise features, which can achieve signal-noise separation well. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a video denoising method, apparatus, device and storage medium that jointly performs time, space and frequency domain denoising. The technical solution of the embodiments of the present application, based on the frequency domain denoising of the video, obtains the propagation characteristics of the video in the time domain through the front and back optical flows and the deep features of the spatial domain, and then realizes efficient denoising jointly performed time, space and frequency domain according to the frequency domain characteristics, deep features of the spatial domain and the propagation characteristics in the time domain of the video.
[0006] In a first aspect, an embodiment of the present application provides a video denoising method that combines time, space and frequency domains, comprising: performing frequency domain denoising on images of each frame of a first video to obtain frequency domain features of each frame of the first video after denoising; extracting forward and backward optical flows of each frame of the first video from the frequency domain features of each frame after denoising; obtaining spatial deep features of each frame of the first video from the images; obtaining propagation features propagated to each frame in the first video based on the spatial deep features and the forward and backward optical flows, the propagation features propagated to one frame include features propagated from spatial deep features of a set number of frames before and after the frame in the first video to the frame; and fusing the frequency domain features, the propagation features and the spatial deep features to obtain a denoised image of each frame of the first video.
[0007] Therefore, based on the frequency domain denoising of the video, the propagation characteristics of the video in the time domain are obtained through the front and back optical flows and the deep spatial features. Then, based on the frequency domain characteristics, deep spatial features and propagation characteristics in the time domain of the video, efficient denoising is achieved in the joint time, space and frequency domains.
[0008] In a possible implementation manner of the first aspect, the method further includes: obtaining a first video by removing stripe noise from an original video acquired from an imaging device.
[0009] From the above, by removing the stripe noise, the subsequent space-time frequency joint noise reduction effect is better.
[0010] In a possible implementation of the first aspect, before frequency domain noise reduction is performed on the images of each frame of the first video, the second frame to the (1+the set number)th frame of the first video are copied in reverse order before the first frame, and the second-to-last frame to the (1+the set number)th frame to the last frame of the first video are copied in reverse order after the first-to-last frame.
[0011] From the above, by extending it in the time dimension, there is no need to consider the boundary problem in the time domain.
[0012] In a possible implementation of the first aspect, obtaining the spatial deep features of each frame of the first video from the image specifically includes: obtaining the spatial deep features of the frame of the first video from the image of each frame of the first video through at least one convolutional network and one residual network.
[0013] From the above, the spatial deep features of each frame image are quickly and accurately obtained through the residual network.
[0014] In a possible implementation manner of the first aspect, the propagated features propagated to one frame include features of the frame propagated from spatial deep features of two frames before and after the frame in the first video.
[0015] From the above, the second-order propagation features, that is, the spatial domain deep features of the two frames before and after a frame, are propagated to the features of the frame to quickly and accurately obtain the propagation features in the time domain.
[0016] In a possible implementation of the first aspect, the features of the spatial deep features of the i-1th frame of the first video that are forward propagated to the i-th frame are obtained, where i is any number greater than 1, including: according to the optical flow from the i-1th frame to the i-th frame of the first video, the spatial deep features of the i-1th frame and the i-th frame of the first video, the offset parameters and mask parameters of the first deformable convolution of the i-th frame of the first video are obtained; the spatial deep features of the i-1th frame of the first video are processed by the first deformable convolution to obtain the first-order forward propagation features propagated to the i-th frame in the first video, and the first-order forward propagation features are the features of the spatial deep features of the i-1th frame of the first video that are forward propagated to the i-th frame.
[0017] From the above, the offset parameters and mask parameters of the first deformable convolution are obtained through the forward optical flow from the i-1th frame to the i-th frame and the spatial deep features of the i-1th frame and the i-th frame, and then the spatial deep features of the i-1th frame are processed by the first deformable convolution, so as to adaptively obtain the first-order forward propagation features propagated to the i-th frame with a large field of view.
[0018] In a possible implementation of the first aspect, the features of the spatial deep features of the j-2th frame of the first video that are forward propagated to the j-th frame are obtained, where j is any number greater than 2, including: according to the optical flow from the j-1th frame to the j-th frame of the first video, the first-order forward propagation features propagated to the j-1th frame in the first video, and the spatial deep features of the j-th frame, the offset parameters and mask parameters of the second deformable convolution of the first-order forward propagation features propagated to the j-1th frame in the first video are obtained; the first-order forward propagation features propagated to the j-1th frame are processed by the second deformable convolution to obtain the second-order forward propagation features of the first video propagated to the j-th frame, and the second-order forward propagation features are the features of the spatial deep features of the j-2th frame of the first video that are forward propagated to the j-th frame.
[0019] From the above, the offset parameters and mask parameters of the second deformable convolution are obtained through the forward optical flow from the j-1th frame to the j-th frame, the first-order forward propagation features propagated to the j-1th frame, and the spatial deep features of the j-th frame. Then, the first-order forward propagation features propagated to the j-1th frame are processed by the second deformable convolution, so as to adaptively obtain the second-order forward propagation features propagated to the j-th frame with a large field of view.
[0020] In a possible implementation of the first aspect, obtaining features of spatial deep features of the i+1th frame of the first video back-propagated to the i-th frame, where i is any number greater than 1, includes: obtaining offset parameters and mask parameters of a third deformable convolution of the i-th frame of the first video according to the optical flow from the i+1th frame to the i-th frame of the first video, and the spatial deep features of the i+1th frame and the i-th frame of the first video; processing the spatial deep features of the i+1th frame through the third deformable convolution to obtain first-order back-propagation features of the first video propagated to the j-th frame, wherein the first-order back-propagation features are features of the spatial deep features of the i+1th frame of the first video back-propagated to the i-th frame.
[0021] From the above, the offset parameters and mask parameters of the third deformable convolution are obtained through the reverse optical flow from the i+1th frame to the i-th frame and the spatial deep features of the i+1th frame and the i-th frame, and then the spatial deep features of the i+1th frame are processed by the third deformable convolution, so as to adaptively obtain the first-order back-propagation features propagated to the i-th frame with a large field of view.
[0022] In a possible implementation of the first aspect, the features of the spatial deep features of the j+2th frame of the first video back-propagated to the jth frame are obtained, where j is any number greater than 2, including: according to the optical flow from the j+1th frame to the jth frame of the first video, the first-order back-propagation features propagated to the j+1th frame in the first video, and the spatial deep features of the jth frame, the offset parameters and mask parameters of the fourth deformable convolution of the first-order back-propagation features propagated to the j+1th frame in the first video are obtained; the first-order back-propagation features propagated to the j+1th frame are processed by the fourth deformable convolution to obtain the second-order back-propagation features of the first video propagated to the jth frame, and the second-order back-propagation features are the features of the spatial deep features of the j+2th frame of the first video back-propagated to the jth frame.
[0023] From the above, the offset parameters and mask parameters of the fourth deformable convolution are obtained through the reverse optical flow from the j+1th frame to the jth frame, the first-order back-propagation features propagated to the j+1th frame, and the spatial deep features of the jth frame. Then, the first-order back-propagation features propagated to the j+1th frame are processed by the fourth deformable convolution, so as to adaptively obtain the second-order back-propagation features propagated to the jth frame with a large field of view.
[0024] In a possible implementation of the first aspect, the fusion of the frequency domain features, the propagation features and the spatial deep features to obtain the denoised image of each frame of the first video specifically includes: channel stacking of the spatial deep features of the current frame of the first video and the propagation features transmitted from the first video to the current frame, and processing the stacking results through a residual network to obtain the fused propagation features of the current frame of the first video; obtaining the fused spatial features of the current frame of the first video based on the spatial deep features and the fused propagation features of the current frame of the first video; stacking the fused spatial features and frequency domain features of the current frame of the first video at the channel layer, and processing the stacking through a single layer of convolution to obtain the denoised image of the current frame of the first video.
[0025] From the above, by fusing frequency domain features, propagation features and spatial domain deep features, noise reduction based on the joint time, space and frequency domains is achieved for each frame of the first video.
[0026] In a possible implementation of the first aspect, when downsampling is performed when obtaining the forward and backward optical flow features and the spatial deep features, the fused spatial features are also upsampled before stacking the fused spatial features and frequency domain features of the current frame of the first video at the channel layer.
[0027] From the above, downsampling is performed when obtaining the forward and backward optical flow features and the spatial deep features, and upsampling is performed after obtaining the fused spatial features, thereby reducing the amount of calculation.
[0028] In a possible implementation manner of the first aspect, the stripe noise of the original video is removed to obtain the first video, specifically comprising: aggregating pixel values of the original video according to the first dimension, removing the second dimension, and obtaining a first spatiotemporal image, where the space of the first spatiotemporal image is time*first dimension, the first dimension is any one of the height dimension and the width dimension in the image of the original video, and the other dimension is the second dimension; obtaining a first noisy spatiotemporal image from the first spatiotemporal image by convolution, the first noisy spatiotemporal image is an image of the first stripe noise in the space, and the first stripe noise is the stripe noise of the original video in the first dimension; expanding the second dimension of the first noisy spatiotemporal image to obtain a first noisy video, the first noisy video is a video of the first stripe noise; and obtaining a first video according to the difference between the original video and the first noisy video, the first video being the first video with the first stripe noise removed.
[0029] From the above, when the original video is an infrared video, the noise feature extraction is realized through the convolution kernel according to the characteristics of the infrared stripe noise, and finally the video-level spatiotemporal stripe noise removal is completed efficiently and accurately.
[0030] In a possible implementation of the first aspect, the obtaining of the denoised frequency domain features of each frame of the first video specifically includes: extracting the frequency domain array of each frame image of the first video through a first convolutional network, wherein each element of the convolution kernel of the first convolutional network is the product of a non-negative number and a frequency domain conversion value, and the non-negative number and the frequency domain conversion value are obtained through training; processing the frequency domain array through a plurality of cascaded second convolutional networks to obtain the denoised frequency domain features of each frame image of the first video.
[0031] Based on the above, the deep learning network architecture is used to adaptively extract frequency domain features for each frame of the video, cascade frequency domain noise reduction, and adaptively restore from the frequency domain to the spatial domain, thus achieving high-sensitivity, high-precision, and wide-field noise reduction.
[0032] In a possible implementation manner of the first aspect, the convolution kernel of each convolution is obtained through training, in which each sample includes a clean video and a video with simulated noise superimposed thereon.
[0033] From the above, an adaptive video denoising network combining time, space and frequency domains is obtained through sample training, thereby achieving accurate denoising.
[0034] In a second aspect, an embodiment of the present application provides a device for video denoising in joint time, space and frequency domains, comprising: a frequency domain denoising module, used to perform frequency domain denoising on images of each frame of a first video, and obtain frequency domain features of each frame of the first video after denoising; an optical flow extraction module, used to extract forward and backward optical flows of each frame of the first video from the frequency domain features of each frame after denoising; a spatial domain deep module, used to obtain spatial domain deep features of each frame of the first video from the image; a feature propagation module, used to obtain propagation features of each frame of the first video based on the spatial domain deep features and the forward and backward optical flows, the propagation features of each frame of the first video including features of the spatial domain deep features of a set number of frames before and after the frame of the first video propagated to the frame; a feature fusion module, used to fuse the frequency domain features, the propagation features and the spatial domain deep features to obtain a denoised image of each frame of the first video.
[0035] Therefore, based on the frequency domain denoising of the video, the propagation characteristics of the video in the time domain are obtained through the front and back optical flows and the deep spatial features. Then, based on the frequency domain characteristics, deep spatial features and propagation characteristics in the time domain of the video, efficient denoising is achieved in the joint time, space and frequency domains.
[0036] In a possible implementation manner of the second aspect, the method further includes: a stripe removal module, configured to obtain a first video by removing stripe noise from an original video acquired from an imaging device.
[0037] From the above, by removing the stripe noise, the subsequent space-time frequency joint noise reduction effect is better.
[0038] In a possible implementation of the second aspect, it also includes: a time expansion module, which is used to copy the second frame to the (1+the set number)th frame of the first video in reverse order before the first frame, and copy the second-to-last frame to the (1+the set number)th frame to the last frame of the first video in reverse order after the last frame before performing frequency domain noise reduction on the images of each frame of the first video.
[0039] From the above, by extending it in the time dimension, there is no need to consider the boundary problem in the time domain.
[0040] In a possible implementation of the second aspect, the spatial deep module is specifically used to obtain spatial deep features of each frame of the first video from an image of the frame through at least one convolutional network and one residual network.
[0041] From the above, the spatial deep features of each frame image are quickly and accurately obtained through the residual network.
[0042] In a possible implementation manner of the second aspect, the propagated features propagated to one frame include features of the frame propagated from spatial deep features of two frames before and after the frame in the first video.
[0043] From the above, the second-order propagation features, that is, the spatial domain deep features of the two frames before and after a frame are propagated to the features of the frame, so as to quickly and accurately obtain the propagation features in the time domain.
[0044] In a possible implementation of the second aspect, when the multi-order propagation module obtains the features of the spatial deep features of the i-1th frame of the first video and propagates them forward to the features of the i-th frame, i is any number greater than 1, and is specifically used for: obtaining the offset parameters and mask parameters of the first deformable convolution of the i-th frame of the first video according to the optical flow from the i-1th frame to the i-th frame of the first video, the spatial deep features of the i-1th frame and the i-th frame of the first video; processing the spatial deep features of the i-1th frame of the first video through the first deformable convolution to obtain the first-order forward propagation features in the first video that are propagated to the i-th frame, and the first-order forward propagation features are the features of the spatial deep features of the i-1th frame of the first video that are propagated forward to the i-th frame.
[0045] From the above, the offset parameters and mask parameters of the first deformable convolution are obtained through the forward optical flow from the i-1th frame to the i-th frame and the spatial deep features of the i-1th frame and the i-th frame, and then the spatial deep features of the i-1th frame are processed by the first deformable convolution, so as to adaptively obtain the first-order forward propagation features propagated to the i-th frame with a large field of view.
[0046] In a possible implementation of the second aspect, when the multi-order propagation module obtains the features of the spatial deep features of the j-2th frame of the first video and propagates forward to the features of the j-th frame, j is any number greater than 2, and is specifically used for: obtaining the offset parameters and mask parameters of the second deformable convolution of the first-order forward propagation features propagated from the first video to the j-1th frame according to the optical flow from the j-1th frame to the j-1th frame of the first video, the first-order forward propagation features propagated from the first video to the j-1th frame, and the spatial deep features of the j-th frame; processing the first-order forward propagation features propagated to the j-1th frame through the second deformable convolution to obtain the second-order forward propagation features of the first video propagated to the j-th frame, wherein the second-order forward propagation features are the features of the spatial deep features of the j-2th frame of the first video forward propagated to the j-th frame.
[0047] From the above, the offset parameters and mask parameters of the second deformable convolution are obtained through the forward optical flow from the j-1th frame to the j-th frame, the first-order forward propagation features propagated to the j-1th frame, and the spatial deep features of the j-th frame. Then, the first-order forward propagation features propagated to the j-1th frame are processed by the second deformable convolution, so as to adaptively obtain the second-order forward propagation features propagated to the j-th frame with a large field of view.
[0048] In a possible implementation of the second aspect, when the multi-order propagation module obtains the features of the spatial deep features of the i+1th frame of the first video and back-propagates to the features of the i-th frame, i is any number greater than 1, and is specifically used for: obtaining the offset parameters and mask parameters of the third deformable convolution of the i-th frame of the first video according to the optical flow from the i+1th frame to the i-th frame of the first video, and the spatial deep features of the i+1th frame and the i-th frame of the first video; processing the spatial deep features of the i+1th frame through the third deformable convolution to obtain the first-order back-propagation features of the first video propagated to the j-th frame, and the first-order back-propagation features are the features of the spatial deep features of the i+1th frame of the first video back-propagated to the i-th frame.
[0049] From the above, the offset parameters and mask parameters of the third deformable convolution are obtained through the reverse optical flow from the i+1th frame to the i-th frame and the spatial deep features of the i+1th frame and the i-th frame, and then the spatial deep features of the i+1th frame are processed by the third deformable convolution, so as to adaptively obtain the first-order back-propagation features propagated to the i-th frame with a large field of view.
[0050] In a possible implementation of the second aspect, when the multi-order propagation module obtains the features of the spatial deep features of the j+2th frame of the first video that are back-propagated to the jth frame, j is any number greater than 2, and is specifically used for: obtaining the offset parameters and mask parameters of the fourth deformable convolution of the first-order back-propagation features propagated from the first video to the j+1th frame according to the optical flow from the j+1th frame to the jth frame of the first video, the first-order back-propagation features propagated from the first video to the j+1th frame, and the spatial deep features of the jth frame; processing the first-order back-propagation features propagated to the j+1th frame through the fourth deformable convolution to obtain the second-order back-propagation features propagated from the first video to the jth frame, wherein the second-order back-propagation features are the features of the spatial deep features of the j+2th frame of the first video that are back-propagated to the jth frame.
[0051] From the above, the offset parameters and mask parameters of the fourth deformable convolution are obtained through the reverse optical flow from the j+1th frame to the jth frame, the first-order back-propagation features propagated to the j+1th frame, and the spatial deep features of the jth frame. Then, the first-order back-propagation features propagated to the j+1th frame are processed by the fourth deformable convolution, so as to adaptively obtain the second-order back-propagation features propagated to the jth frame with a large field of view.
[0052] In a possible implementation of the second aspect, the multi-domain fusion module is specifically used to include: channel stacking of the spatial deep features of the current frame of the first video and the propagation features transmitted from the first video to the current frame, and processing the stacking results through a residual network to obtain the fused propagation features of the current frame of the first video; obtaining the fused spatial features of the current frame of the first video based on the spatial deep features and the fused propagation features of the current frame of the first video; stacking the fused spatial features and frequency domain features of the current frame of the first video at the channel layer, and processing the stack through a single layer of convolution to obtain a denoised image of the current frame of the first video.
[0053] From the above, by fusing frequency domain features, propagation features and spatial domain deep features, noise reduction based on the joint time, space and frequency domains is achieved for each frame of the first video.
[0054] In a possible implementation of the second aspect, when downsampling is performed when obtaining the forward and backward optical flow features and the spatial deep features, the fused spatial features are also upsampled before stacking the fused spatial features and frequency domain features of the current frame of the first video at the channel layer.
[0055] From the above, downsampling is performed when obtaining the forward and backward optical flow features and the spatial deep features, and upsampling is performed after obtaining the fused spatial features, thereby reducing the amount of calculation.
[0056] In a possible implementation of the second aspect, the stripe removal module is specifically used to include: aggregating pixel values of the original video according to the first dimension, removing the second dimension, and obtaining a first space-time image, where the space of the first space-time image is time*first dimension, the first dimension is any one of the height dimension and the width dimension in the image of the original video, and the other dimension is the second dimension; obtaining a first noisy space-time image from the first space-time image through convolution, the first noisy space-time image is an image of the first stripe noise in the space, and the first stripe noise is the stripe noise of the original video in the first dimension; expanding the second dimension of the first noisy space-time image to obtain a first noisy video, which is a video of the first stripe noise; obtaining a first video based on the difference between the original video and the first noisy video, and the first video is the first video with the first stripe noise removed.
[0057] From the above, when the original video is an infrared video, the noise feature extraction is realized through the convolution kernel according to the characteristics of the infrared stripe noise, and finally the video-level spatiotemporal stripe noise removal is completed efficiently and accurately.
[0058] In a possible implementation of the second aspect, the frequency domain denoising module is specifically used to include: extracting a frequency domain array of each frame image of the first video through a first convolutional network, wherein each element of the convolution kernel of the first convolutional network is the product of a non-negative number and a frequency domain conversion value, and the non-negative number and the frequency domain conversion value are obtained through training; processing the frequency domain array through a plurality of cascaded second convolutional networks to obtain the denoised frequency domain features of each frame image of the first video.
[0059] Based on the above, the deep learning network architecture is used to adaptively extract frequency domain features for each frame of the video, cascade frequency domain noise reduction, and adaptively restore from the frequency domain to the spatial domain, thus achieving high-sensitivity, high-precision, and wide-field noise reduction.
[0060] In a possible implementation manner of the second aspect, the convolution kernel of each convolution is obtained through training, in which each sample includes a clean video and a video with simulated noise superimposed thereon.
[0061] From the above, an adaptive video denoising network combining time, space and frequency domains is obtained through sample training, thereby achieving accurate denoising.
[0062] In a third aspect, an embodiment of the present application provides a computing device, including:
[0063] bus;
[0064] A communication interface connected to the bus;
[0065] at least one processor connected to the bus; and
[0066] At least one memory is connected to the bus and stores program instructions, and when the program instructions are executed by the at least one processor, the at least one processor executes any implementation method of the first aspect of the present application.
[0067] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having program instructions stored thereon, wherein when the program instructions are executed by a computer, the computer executes any implementation method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] Figure 1 This is a flow chart of a first embodiment of a video noise reduction method combined with time, space and frequency domains of the present application;
[0069] Figure 2 This is a flow chart of Embodiment 2 of a combined time-space-frequency domain video noise reduction method of the present application;
[0070] Figure 3 This is a schematic diagram of the structure of a spatial domain deep feature extraction module of Embodiment 2 of a video denoising method combined with time, space and frequency domains of the present application;
[0071] Figure 4 This is a schematic diagram of a process of obtaining a first-order forward propagation feature propagated to the i-th frame in a first video according to Embodiment 2 of a combined time-space-frequency domain video denoising method of the present application;
[0072] Figure 5 A schematic diagram of a process of obtaining a second-order forward propagation feature propagated to the i-th frame in a first video according to a second embodiment of a combined time-space-frequency domain video denoising method of the present application;
[0073] Figure 6 This is a structural diagram of a first embodiment of a video noise reduction device combined with time, space and frequency domains of the present application;
[0074] Figure 7 This is a structural diagram of a second embodiment of a video noise reduction device combined with time, space and frequency domains of the present application;
[0075] Figure 8 A schematic diagram of the structure of a computing device according to various embodiments of the present application. DETAILED DESCRIPTION
[0076] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0077] In the following description, the terms "first\second\third, etc." or module A, module B, module C, etc. are only used to distinguish similar objects, or to distinguish different embodiments, and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0078] In the following description, the numbers representing the steps, such as S110, S120, etc., do not necessarily mean that the steps must be executed in this manner. If permitted, the order of the previous and next steps can be interchanged, or they can be executed simultaneously.
[0079] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0080] The embodiments of the present application provide a video denoising method, apparatus, device and storage medium which jointly utilize time, space and frequency domains. The method comprises: performing frequency domain denoising on the images of each frame of a first video to obtain frequency domain features of each frame of the first video after denoising; extracting forward and backward optical flows of each frame of the first video from the frequency domain features of each frame after denoising; obtaining spatial deep features of each frame of the first video from the images; obtaining propagation features propagated to each frame in the first video based on the spatial deep features and the forward and backward optical flows, wherein the propagation features propagated to one frame in the first video include the features propagated from the spatial deep features of a set number of frames before and after the frame of the first video to the frame; and fusing the frequency domain features, the propagation features and the spatial deep features to obtain a denoised image of each frame of the first video.
[0081] The technical solution of the embodiment of the present application realizes efficient denoising in the joint time, space and frequency domains based on the frequency domain denoising of the video according to the front and back optical flows and deep features of the spatial domain.
[0082] The following describes various embodiments of the present application in conjunction with the accompanying drawings. Figure 1 A first embodiment of a video denoising method in the time, space and frequency domains is introduced.
[0083] Figure 1 The flowchart of a first embodiment of a video noise reduction method in time, space and frequency domains is shown, including steps S110 to S150.
[0084] S110: Perform frequency domain noise reduction on the images of each frame of the first video to obtain frequency domain features of each frame of the first video after noise reduction.
[0085] The frequency domain feature is a dot matrix in a two-dimensional space. In some embodiments, the size of the two-dimensional space is the same as the space size of the image of each frame.
[0086] In some embodiments, the first video is obtained by removing stripe noise from the original video acquired from the imaging device. The stripe noise includes: flickering stripe noise, stripe noise in the height domain, and stripe noise in the width domain.
[0087] In some embodiments, before performing frequency domain noise reduction on the images of each frame of the first video, the second frame to the (1+set number)th frame of the first video are copied in reverse order to the front of the first frame, and the penultimate frame to the penultimate (1+set number)th frame of the first video are copied in reverse order to the back of the penultimate frame. The set number is the set number used when obtaining the propagation feature propagated to each frame in step S130.
[0088] S120: Extracting forward and backward optical flows of each frame of the first video from the frequency domain features of each frame of the first video after noise reduction.
[0089] There is no restriction on the method of extracting optical flow, such as PWCnet, Lucas Kanade, etc. In particular, it is necessary to extract bidirectional optical flow.
[0090] In some embodiments, the frequency domain features of each frame of the first video after noise reduction are downsampled before the optical flow is extracted, or the optical flow is downsampled after the optical flow is extracted.
[0091] S130: Obtaining spatial deep features of each frame of the first video from images of each frame of the first video.
[0092] Compared with ordinary convolutional networks, the spatial features extracted by residual networks are deeper, which are called deep spatial features. The larger the k value of the residual network, the deeper the extracted features.
[0093] In some embodiments, the spatial domain deep features of each frame of the first video are obtained from the image of the frame through at least one convolutional network and a residual network. In some embodiments, the convolutional network also performs downsampling before convolution to speed up calculation.
[0094] S140: Obtain propagation features propagated to each frame in the first video according to the spatial deep features and forward and backward optical flows of each frame of the first video.
[0095] The propagation features propagated to one frame in the first video include the features of the spatial deep features of a set number of frames before and after the frame of the first video propagated to the frame.
[0096] In some embodiments, the propagation features propagated to the current frame in the first video include first-order forward propagation features, second-order forward propagation features, first-order reverse propagation features, and second-order reverse propagation features propagated to the current frame. The first-order forward propagation features propagated to the current frame are features of the spatial deep features of the previous frame propagated forward to the current frame, the second-order forward propagation features propagated to the current frame are features of the first-order forward propagation features propagated to the previous frame propagated forward to the current frame, the first-order reverse propagation features propagated to the current frame are features of the spatial deep features of the next frame propagated backward to the current frame, and the second-order reverse propagation features propagated to the current frame are features of the first-order reverse propagation features propagated to the next frame propagated backward to the current frame.
[0097] In some embodiments, the spatial deep features of the i-1th frame of the first video are forward propagated to the features of the i-th frame, where i is any number greater than 1, including: obtaining offset parameters and mask parameters of the first deformable convolution of the i-th frame of the first video according to the optical flow from the i-1th frame to the i-th frame of the first video, the spatial deep features of the i-1th frame and the i-th frame of the first video; processing the spatial deep features of the i-1th frame of the first video through the first deformable convolution to obtain the first-order forward propagation features in the first video that are propagated to the i-th frame, and the first-order forward propagation features are the features of the spatial deep features of the i-1th frame of the first video that are forward propagated to the i-th frame.
[0098] In some embodiments, the features of the spatial deep features of the j-2th frame of the first video that are forward propagated to the j-th frame are obtained, where j is any number greater than 2, including: based on the optical flow from the j-1th frame to the j-th frame of the first video, the first-order forward propagation features in the first video that are propagated to the j-1th frame, and the spatial deep features of the j-th frame, the offset parameters and mask parameters of the second deformable convolution of the first-order forward propagation features in the first video that are propagated to the j-1th frame are obtained; the first-order forward propagation features propagated to the j-1th frame are processed by the second deformable convolution to obtain the second-order forward propagation features of the first video that are propagated to the j-th frame, and the second-order forward propagation features are the features of the spatial deep features of the j-2th frame of the first video that are forward propagated to the j-th frame.
[0099] In some embodiments, the features of the spatial deep features of the i+1th frame of the first video that are back-propagated to the i-th frame are obtained, where i is any number greater than 1, including: obtaining the offset parameters and mask parameters of the third deformable convolution of the i-th frame of the first video according to the optical flow from the i+1th frame to the i-th frame of the first video, and the spatial deep features of the i+1th frame and the i-th frame of the first video; processing the spatial deep features of the i+1th frame through the third deformable convolution to obtain the first-order back-propagation features of the first video propagated to the j-th frame, wherein the first-order back-propagation features are the features of the spatial deep features of the i+1th frame of the first video that are back-propagated to the i-th frame.
[0100] In some embodiments, the features of the spatial deep features of the j+2th frame of the first video that are back-propagated to the jth frame are obtained, where j is any number greater than 2, including: according to the optical flow from the j+1th frame to the jth frame of the first video, the first-order back-propagation features propagated to the j+1th frame in the first video, and the spatial deep features of the jth frame, the offset parameters and mask parameters of the fourth deformable convolution of the first-order back-propagation features propagated to the j+1th frame in the first video are obtained; the first-order back-propagation features propagated to the j+1th frame are processed by the fourth deformable convolution to obtain the second-order back-propagation features of the first video propagated to the jth frame, and the second-order back-propagation features are the features of the spatial deep features of the j+2th frame of the first video that are back-propagated to the jth frame.
[0101] S150: The frequency domain features, spatial domain deep features and propagation features propagated to each frame of the first video are integrated to obtain a denoised image of each frame of the first video.
[0102] In some embodiments, the spatial deep features of the current frame of the first video and the propagation features propagated to the current frame are channel stacked, and the stacking results are processed through a residual network to obtain fused propagation features of the current frame of the first video; based on the spatial deep features and the fused propagation features of the current frame of the first video, the fused spatial features of the current frame of the first video are obtained; the fused spatial features and frequency domain features of the current frame of the first video are stacked at the channel layer, and the stack is processed through a single layer of convolution to obtain a denoised image of the current frame of the first video.
[0103] In some embodiments, when downsampling is performed when obtaining the forward and backward optical flow features and the spatial deep features, the fused spatial features of the current frame of the first video are also upsampled before stacking the fused spatial features and frequency domain features of the current frame of the first video at the channel layer.
[0104] The convolution kernels of the convolution network used in various possible implementations of each step of this embodiment are obtained through training, in which each sample includes a clean video and a video with simulated noise superimposed thereon. For infrared video, the noise includes at least one of the following noises: dot noise, flickering stripe noise, spatial stripe noise, and pot lid noise. From the above, by including a clean video and a video with noise superimposed thereon for each sample, the trained denoising network supports denoising of various noises in multiple scenarios.
[0105] In some embodiments, the noise of the infrared video includes lattice noise in the space-time domain, which is caused by image element differences and / or thermal noise in the focal plane array of the infrared imaging device, wherein the lattice noise varies with values in the row domain, column domain and time domain of the video image.
[0106] In some embodiments, the infrared video noise also includes flickering stripe noise in the space-time domain, which is caused by the electronic thermal noise of the infrared signal analog-to-digital converter of the infrared imaging device, wherein the flickering stripe noise varies with the value of one dimension of the height or width of the video image and the value in the time dimension.
[0107] In some embodiments, the infrared video noise also includes height domain stripe noise in the spatial domain stripe noise, which is caused by the difference of row amplifiers of the signal readout circuit of the infrared imaging device, and each row has a row amplifier, wherein the height domain stripe noise changes with the value of the height domain of the video image. Separating the height domain stripe noise from the flicker stripe noise can achieve more accurate noise simulation.
[0108] In some embodiments, the infrared video noise also includes width domain stripe noise in the spatial domain stripe noise, which is caused by the difference of column amplifiers of the signal readout circuit of the infrared imaging device, and each column has a column amplifier, wherein the width domain stripe noise changes with the value of the width domain of the video image. Separating the width domain stripe noise from the flicker stripe noise can achieve more accurate noise simulation.
[0109] In some embodiments, the infrared video noise also includes a pot lid noise in the airspace, which is caused by the radiation difference of the circuit operating temperature and / or the ambient temperature of the infrared imaging device at each point on the video image, wherein the infrared pot lid noise gradually increases with the distance between the point of the video image and the center of the video image, and the pot lid noise at any point on the video image is related to the distance from the point to the center point of the video image and the distance from the point to the symmetric point of the center point about any edge of the video image. From the above, compared with the existing method of simulating the two-dimensional Gaussian distribution, the pot lid noise of the point can be accurately simulated according to the distance from any point on the video image to the center point and to the symmetric point of the center point about any edge.
[0110] In summary, embodiment 1 of a video denoising method that jointly uses time, space and frequency domains obtains the propagation characteristics of the video in the time domain through the front and back optical flows and the deep features of the spatial domain on the basis of the frequency domain denoising of the video, and then realizes efficient denoising jointly used in time, space and frequency domains based on the frequency domain characteristics, deep features of the spatial domain and the propagation characteristics in the time domain of the video.
[0111] under Figures 2 to 5 A second embodiment of a video denoising method in the time, space and frequency domains is introduced.
[0112] Embodiment 2 of a video denoising method combined in time, space and frequency domains is a detailed implementation method of embodiment 1 of a video denoising method combined in time, space and frequency domains under multiple image channels, and has all its advantages.
[0113] Figure 2The flowchart of Embodiment 2 of a video noise reduction method in the time, space and frequency domains is shown, including steps S210 to S290.
[0114] S210: removing stripe noise, that is, obtaining a first video by processing an original video acquired from an imaging device.
[0115] Among them, the stripe noise is removed from the original video by using the stripe removal module, including:
[0116] Step 1) aggregating pixel values of the original video according to the first dimension, removing the second dimension, and obtaining a first spatiotemporal image, wherein the space of the first spatiotemporal image is time*first dimension, the first dimension is any one of the height dimension and the width dimension in the image of the original video, and the other dimension is the second dimension;
[0117] The original video may be an infrared video or other video. The space of the first spatiotemporal image is the space of time*first dimension. The first dimension is any one of the height dimension and the width dimension in the image in the original video, and the other dimension is the second dimension.
[0118] Among them, the aggregation method is: take the average of the values of each pixel with the same first dimension value in each frame image of the original video as the value of the corresponding pixel point on the first space-time image, the time dimension value of the corresponding pixel point is the time of the image used for the aggregate, and the value of the first dimension is the first dimension value of the pixel point in the original video used for the aggregated image.
[0119] Step 2) Obtain a first noisy spatiotemporal image from the first spatiotemporal image by convolution.
[0120] The first noise space-time image is an image of the first stripe noise of the original video in the space of time*first dimension, and the first stripe noise is the stripe noise of the original video in the first dimension.
[0121] Among them, the first dimensional feature image is obtained from the first space-time image through convolution, and the difference between the first space-time image and the first dimensional feature image is used as the first noise space-time image. The first dimensional feature image is the image of the information of the stripe noise on the non-first dimension of the original video in the space of time*first dimension.
[0122] Among them, the convolution is used to extract the image of the non-noise information in the original video in the space of time*first dimension, which is mainly the relevant information inherent in the original video. The size of the convolution kernel is n*n. For example, when n=3, it means that the feature extraction operation is performed on the first spatiotemporal image with a spatiotemporal adjacent unit of 1.
[0123] The convolution kernel of the convolution is obtained through training, and the training sample set includes several first clean videos (videos with negligible noise), each clean video corresponds to several samples, and each sample includes a clean video and a video with simulated striped noise in the height dimension and / or width dimension superimposed thereon.
[0124] When the original video is an infrared video, the stripe noise in this embodiment includes at least one of the following: flickering stripe noise, height domain stripe noise and width domain stripe noise.
[0125] Step 3) Expand the first noise space-time image by a second dimension to obtain a first noise video.
[0126] The first noise video is a video of stripe noise of the original video in the first dimension.
[0127] Among them, the pixel value of any second dimension of the first dimension m of any frame t of the first noise video is equal to the pixel value of the first noise spatiotemporal image with the frame dimension t and the first dimension m.
[0128] Step 4) Obtain a first dimension denoised video based on the difference between the original video and the first noisy video.
[0129] The first dimension denoised video is the original video after removing the first stripe noise.
[0130] Steps 1) to 4) show a method for removing stripe noise in the height dimension or width dimension of an image. The stripe noise removal in the height and width dimension of a video level can be comprehensively implemented in the following ways.
[0131] In some embodiments, stripe noise removal in the height dimension is performed first, and then stripe noise removal in the width dimension is performed on this basis to obtain the final processing result.
[0132] In some embodiments, stripe noise removal in the width dimension is performed first, and then stripe noise removal in the height dimension is performed on this basis to obtain the final processing result.
[0133] In some embodiments, stripe noise removal in the height dimension and stripe noise removal in the width dimension are performed separately, and these two data are subjected to simple operations, such as averaging, taking the maximum value, etc., or are input into the convolution layer in parallel for data screening to obtain the final processing result.
[0134] For ease of description, the original video frame sequence disturbed by noise is represented as Z∈R C*T*H*W , where H represents the height of the spatial dimension, W represents the width of the spatial dimension, T represents the time dimension, and C represents the number of image channels. In each formula of this embodiment, C, T, H, and W have the same meaning and will not be repeated hereafter.
[0135] The Z input video level stripe removal module pre-processes the stripes in the horizontal and vertical directions of the spatiotemporal domain, removes most of the stripes, and obtains the first video. At this time, the first video is processed by Z. pRe_destripe_0ri express.
[0136] S220: Time dimension expansion, that is, expanding the first video in the time dimension.
[0137] The expansion copies the second frame to the (1+set number)th frame of the first video in reverse order to before the first frame, and copies the second-to-last frame to the (1+set number)th to the last frame of the first video in reverse order to after the last frame.
[0138] In step S260 of this embodiment, the second-order propagation feature is obtained, the number is set to 2, the frame numbers of the expanded first video in the time dimension are 3, 2, 1, 2, 3, 4, 5, ..., T-3, T-2, T-1, T, T-1, T-2, and the expanded first video is represented by Z pre_destripe .
[0139] S230: Frequency domain noise reduction, that is, performing frequency domain noise reduction on the first video to obtain frequency domain features of each frame image of the first video after noise reduction.
[0140] Among them, the frequency domain noise reduction or the joint time-space-frequency noise reduction is more effective after removing the stripe noise.
[0141] The frequency-domain noise reduction is performed on the images of each frame of the first video by the frequency-adaptive video-level noise reduction module, including:
[0142] Step i) extracts the frequency domain feature information array of each frame image of the first video through a first convolutional network.
[0143] In the convolution kernel of the first convolutional network, each element is the product of a coefficient and a frequency domain conversion value, the coefficient and the frequency domain conversion value are obtained through training, and the coefficient is a non-negative number.
[0144] The first convolutional network of this step is obtained through training, and the coefficient of each element of the convolution kernel of the first convolutional network is initially 1 at the beginning of training. When the coefficient of any element of the convolution kernel becomes negative during training, the coefficient of the element is set to 0, thereby adaptively extracting the coefficient of the frequency corresponding to the element, improving the convergence ability of the deep learning module, and improving the algorithm processing effect. The frequency domain conversion value of each element of the convolution kernel of the first convolutional network is initialized by discrete cosine transformation.
[0145] Before extracting the frequency domain feature information array of each frame image of the first video through the first convolutional network, it also includes: expanding each frame image of the first video into images of multiple paths through the fifth convolutional network, the convolution kernel of the fifth convolutional network is 1*1, and its coefficient is obtained through training; the frequency domain feature information array of each frame image of the first video includes the frequency domain information array of each path of each frame image of the first video, and the frequency domain information array of each frame image of the first video is extracted in parallel through the first convolutional network.
[0146] Step ii) processes the frequency domain feature information array through a plurality of cascaded second convolutional networks to obtain the denoised frequency domain features of each frame image of the first video.
[0147] The space of the first frequency domain feature is a two-dimensional frequency domain space, and its size is the same as the size of the spatial domain space of each frame of image.
[0148] Among them, several cascaded second convolutional networks are used to process to improve the sensitivity and accuracy of noise reduction.
[0149] Among them, the convolution kernel of each second convolution network is an expansion convolution kernel to expand the field of view and further improve the accuracy. Each expansion convolution kernel is obtained through training, and the expansion coefficient of each expansion convolution kernel is set in advance. The output of each second convolution network is transformed by the RELU function.
[0150] Among them, when the frequency domain feature information array of each frame image of the first video includes the frequency domain information array of each path of each frame image of the first video, the frequency domain features of denoising of each frame image of the first video include the second frequency domain features of each path of denoising of each frame image of the first video, the frequency domain information array is processed in parallel by the second convolutional network to obtain the second frequency domain features of each frame image of the first video, the second frequency domain features of the feature paths are aggregated to obtain the aggregation coefficient array of each frame image of the first video; the frequency domain features of denoising of each frame image of the first video are obtained according to the aggregation coefficient array and the second frequency domain features.
[0151] The method further includes: stacking the input of each non-last second convolutional network and the output of the second convolutional network in different feature channels, and inputting the inputs into the next second convolutional network to increase the speed of denoising.
[0152] Among them, Z pre_destripe The frequency adaptive video level noise reduction module is input to separate the noise with frequency characteristics in the frequency domain to obtain the frequency domain characteristics of the first video after noise reduction, which is expressed as Z fRequency_feature .
[0153] S240: extracting optical flow, that is, extracting forward and backward optical flow of each frame of the first video.
[0154] The forward and backward optical flows of each frame of the first video are extracted from the frequency domain features of each frame of the first video after noise reduction. fRequency_feature Extract optical flow, such as PWCnet, Lucas Kanade, etc.
[0155] Among them, this step performs 4 times downsampling when extracting the optical flow, which can be one of the following three methods: first downsampling the frequency domain features of each frame of the first video after denoising by 4 times; downsampling by 4 times in the extracted optical flow; first downsampling the frequency domain features of each frame of the first video after denoising by 2 times, and downsampling by 2 times in the extracted optical flow.
[0156] In particular, we need to extract bidirectional optical flow here, and the forward optical flow result is represented by O forward , the reverse optical flow is represented by O backward The forward direction indicates the direction from the 1st frame to the Tth frame, and the reverse direction indicates the direction from the Tth frame to the 1st frame.
[0157] S250: extracting spatial deep features, that is, obtaining spatial deep features of each frame of the first video from images of each frame of the first video.
[0158] Among them, the spatial domain deep features of each frame of the first video are obtained from the images of each frame of the first video through the spatial domain feature extraction module. Figure 3 The structure of the spatial deep feature extraction module is shown, including convolution layer 310, LeakyReLU layer 311, convolution layer 320, LeakyReLU layer 321 and k-layer ResNet module 330. The step size of each convolution layer is set to 2. In order to achieve spatial resolution downsampling, the two convolution layers achieve 4 times downsampling; k is 5. In principle, the larger k is, the deeper features can be extracted, but the calculation time will increase.
[0159] Among them, the calculation of constructing the spatial feature extraction module is M spatial (·) indicates that for Z pRe_destripe The process of deep feature extraction is expressed as Z spatial is the spatial deep feature, and i represents the frame number index of the video sequence.
[0160] S260: multi-order bidirectional propagation, that is, obtaining propagation features propagated to each frame in the first video.
[0161] Among them, according to the spatial domain deep features and forward and backward optical flows of each frame of the first video, the propagation features propagated to each frame in the first video are obtained.
[0162] Among them, this step adopts a two-order processing method, and the propagation features propagated to the current frame of the first video include the first-order forward propagation features, second-order forward propagation features, first-order reverse propagation features, and second-order reverse propagation features propagated from the first video to the current frame.
[0163] Among them, the first-order forward propagation feature, second-order forward propagation feature, first-order reverse propagation feature, and second-order reverse propagation feature propagated to the i-th frame in the first video are respectively expressed as A tail of 1 indicates first order, and a tail of 2 indicates second order.
[0164] Figure 4 The process of obtaining the first-order forward propagation features propagated to the i-th frame in the first video is shown, including steps S410 to S440.
[0165] S410: deformation operation, that is, performing a deformation operation on the spatial deep features of the i-1th frame of the first video according to the optical flow from the i-1th frame to the i-th frame of the first video.
[0166] Among them, the spatial deep feature of the i-1th frame of the first video is expressed as The optical flow from the i-1th frame to the i-th frame is The result after deformation is expressed as express.
[0167] S420: channel layer stacking, that is, stacking the deformed result and the spatial domain deep features of the i-th frame of the first video by channel layer.
[0168] in, Occupies one or a group of channels, spatial deep features of the i-th frame Occupies one channel or a group of channels.
[0169] S430: Calculate the convolution kernel parameters, that is, obtain the bias coefficient and mask parameter of the convolution kernel of the first deformable convolution of the spatial domain deep features of the i-1th frame of the first video according to the stacking result.
[0170] Among them, the bias coefficient and mask parameter of the convolution kernel of the first deformable convolution are respectively and
[0171] S440: deformable convolution, that is, processing the spatial domain deep features of the i-1th frame of the first video through the obtained first deformable convolution to obtain the first-order forward propagation features propagated to the i-th frame in the first video That is, the spatial deep features of the i-1th frame of the first video are forward propagated to the features of the i-th frame.
[0172] Figure 4The method shown can also be used to obtain the first-order back-propagation features propagated to the i-th frame in the first video Replace the “-” in the process with “+”, forward with backward, and the corresponding symbols also change accordingly.
[0173] Figure 5 The process of obtaining the second-order forward propagation features of the i-th frame of the first video is shown, including steps S510 to S540.
[0174] S510: deformation operation, that is, performing a deformation operation on the first-order forward propagation features propagated to the i-1th frame in the first video according to the optical flow from the i-1th frame to the i-th frame of the first video.
[0175] Among them, the first-order forward propagation feature from the first video to the i-1th frame is The result after deformation is express.
[0176] S520: channel layer stacking, that is, stacking the deformed result and the spatial domain deep features of the i-th frame of the first video by channel layer.
[0177] in, Occupies one or a group of channels, spatial deep features of the i-th frame Occupies one channel or a group of channels.
[0178] S530: Calculate the convolution kernel parameters, that is, obtain the bias coefficient and mask parameter of the convolution kernel of the second deformable convolution of the first-order forward propagation feature in the first video propagated to the i-1th frame according to the stacking result.
[0179] Among them, the bias coefficient and mask parameter of the convolution kernel of the second deformable convolution are respectively and
[0180] S540: deformable convolution, that is, processing the first-order forward propagation features propagated to the i-1th frame in the first video through the obtained second deformable convolution to obtain the second-order forward propagation features propagated to the i-th frame in the first video That is, the spatial deep features of the i-2th frame of the first video are forward propagated to the features of the i-th frame.
[0181] Figure 5 The method shown can also be used to obtain the second-order back-propagation features propagated to the i-th frame in the first video Just replace the “-” in the process with “+” and the forward direction with the backward direction.
[0182] S270: Obtain fused propagation features, i.e., channel stacking the spatial deep features of the current frame of the first video and the propagation features propagated from the first video to the current frame, and processing the stacking results through a residual network to obtain fused propagation features of the current frame of the first video.
[0183] Among them, all the features propagated to the current frame and the current frame features are stacked at the channel layer, and the residual network is a k-layer ResNet module, denoted as G temporal (·), process the stacked data, and k is 5. The process is expressed as:
[0184]
[0185] Among them, the current frame is set to the i-th frame, and the fusion propagation feature of the current frame of the first video is
[0186] The fused spatial domain features of the current frame of the first video are also upsampled, and the fused spatial domain features of the current frame of the first video are upsampled by 4 times using the PixelShufflePack operation to restore the original size. The process is expressed by the following formula:
[0187]
[0188] S280: Obtaining fused spatial features, that is, obtaining fused spatial features of the current frame of the first video according to the spatial deep features of the current frame of the first video and the up-sampled fused propagation features.
[0189] Among them, this step is expressed by the following formula, and the fused spatial domain feature of the current frame of the first video is expressed as
[0190]
[0191] S290: feature fusion in the time, space and frequency domains, that is, stacking the fused spatial domain features and frequency domain features of the current frame of the first video at the channel layer, and processing the stack through a single layer of convolution to obtain a denoised image of the current frame of the first video.
[0192] This step is expressed by the following formula: the denoised image of the current frame of the first video is Z denoise , which is the result of joint denoising of time, space and frequency. The single-layer convolution is represented by Conv(·).
[0193] Z denoise =Conv(Z fRequency_featute , Z spatial-temporal )
[0194] The convolution kernels of the convolutional network used in various possible implementations of each step of this embodiment are obtained through training, in which each sample includes a clean video and a video with simulated noise superimposed thereon.
[0195] The convolution kernels of the convolutional network used in various possible implementations of each step of this embodiment are obtained through training, in which each sample includes a clean video and a video with simulated noise superimposed thereon.
[0196] Combine the following Figure 6 A first embodiment of a video noise reduction device combining time, space and frequency domains is introduced.
[0197] An embodiment of a video noise reduction device combined with time, space and frequency domains is used to implement the method of embodiment 1 of a video noise reduction method combined with time, space and frequency domains, and has all its advantages.
[0198] Figure 6 The structure of a first embodiment of a video denoising device combining time, space and frequency domains is shown, including: a frequency domain denoising module 610, an optical flow extraction module 620, a deep layer extraction module 630, a multi-order propagation module 640 and a multi-domain fusion module 650.
[0199] The frequency domain noise reduction module 610 is used for S110: performing frequency domain noise reduction on the images of each frame of the first video to obtain the frequency domain features of each frame of the first video after noise reduction. For its working principle and advantages, please refer to step S110 of the first embodiment of a video noise reduction method combined with time, space and frequency domains.
[0200] The optical flow extraction module 620 is used to extract the forward and backward optical flow of each frame of the first video from the frequency domain features of each frame of the first video after noise reduction. For its working principle and advantages, please refer to step S120 of the first embodiment of a video noise reduction method combined with time, space and frequency domains.
[0201] The deep layer extraction module 630 is used to obtain the spatial deep layer features of each frame of the first video from the images of each frame of the first video. For its working principle and advantages, please refer to step S130 of the first embodiment of a video denoising method combined with time, space and frequency domains.
[0202] The multi-order propagation module 640 is used to obtain the propagation features propagated to each frame in the first video according to the spatial deep features and forward and backward optical flows of each frame of the first video. For its working principle and advantages, please refer to step S140 of the first embodiment of a video denoising method combined with time, space and frequency domains.
[0203] The multi-domain fusion module 650 is used to fuse the frequency domain features, spatial domain deep features and propagation features of each frame of the first video to obtain a denoised image of each frame of the first video. For its working principle and advantages, please refer to step S150 of the first embodiment of a video denoising method combined with time, space and frequency domains.
[0204] In some embodiments, a training module is also included, in which the convolution kernels of various convolutional networks used in Example 1 of a joint time-space-frequency domain video denoising method are obtained through training, and each sample in the training includes a clean video and a video with simulated noise superimposed thereon.
[0205] Combine the following Figure 7 A second embodiment of a video noise reduction device combining time, space and frequency domains is introduced.
[0206] Embodiment 2 of a video denoising device combining time, space and frequency domains is used to implement the method of embodiment 2 of a video denoising method combining time, space and frequency domains, and has all its advantages.
[0207] Figure 7 The structure of a second embodiment of a video denoising device combining time, space and frequency domains is shown, including: a stripe removal module 710, a time expansion module 720, a frequency domain denoising module 730, an optical flow extraction module 740, a deep extraction module 750, a second-order propagation module 760 and a multi-domain fusion module 770.
[0208] The stripe removal module 710 is used to remove stripe noise, that is, to obtain a first video by processing the original video obtained from the imaging device. For its working principle and advantages, please refer to step S210 of the second embodiment of a video denoising method combined with time, space and frequency domains.
[0209] The time expansion module 720 is used for time dimension expansion, that is, to expand the first video in the time dimension. For its working principle and advantages, please refer to step S220 of the second embodiment of a video denoising method combined with time, space and frequency domains.
[0210] The frequency domain noise reduction module 730 is used for frequency domain noise reduction, that is, frequency domain noise reduction is performed on the first video to obtain the frequency domain features of each frame of the first video after noise reduction. For its working principle and advantages, please refer to step S230 of embodiment 2 of a video noise reduction method combined with time, space and frequency domains.
[0211] The optical flow extraction module is used to extract optical flow, that is, to extract the forward and backward optical flow of each frame of the first video. For its working principle and advantages, please refer to step S240 of the second embodiment of a video denoising method combined with time, space and frequency domains.
[0212] The deep layer extraction module 750 is used to extract spatial deep features, that is, to obtain spatial deep features of each frame of the first video from the images of each frame of the first video. For its working principle and advantages, please refer to step S250 of the second embodiment of a video denoising method combined with time, space and frequency domains.
[0213] The second-order propagation module 760 is used for multi-order bidirectional propagation, that is, obtaining the propagation characteristics propagated to each frame in the first video. For its working principle and advantages, please refer to step S260 of the second embodiment of a video denoising method combined with time, space and frequency domains.
[0214] The multi-domain fusion module 770 is used to obtain fused propagation features, that is, channel stacking of the spatial deep features of the current frame of the first video and the propagation features propagated from the first video to the current frame, and processing the stacking results through the residual network to obtain the fused propagation features of the current frame of the first video; it is also used to obtain fused spatial features, that is, according to the spatial deep features of the current frame of the first video and the fused propagation features after upsampling, the fused spatial features of the current frame of the first video are obtained; it is also used for feature fusion in the spatiotemporal frequency domain, that is, stacking the fused spatial features of the current frame of the first video with the frequency domain features at the channel layer, and processing the stacking through a single layer of convolution to obtain the denoised image of the current frame of the first video. For its working principle and advantages, please refer to steps S270, S280, and S290 of Embodiment 2 of a video denoising method combined with spatiotemporal frequency domains.
[0215] In some embodiments, a training module is also included, in which the convolution kernels of various convolutional networks used in Example 1 of a joint time-space-frequency domain video denoising method are obtained through training, and each sample in the training includes a clean video and a video with simulated noise superimposed thereon.
[0216] The present application embodiment also provides a computing device, Figure 8 Detailed introduction.
[0217] The computing device 800 includes a processor 810 , a memory 820 , a communication interface 830 , and a bus 840 .
[0218] It should be understood that the communication interface 830 in the computing device 800 shown in this figure can be used to communicate with other devices.
[0219] The processor 810 may be connected to a memory 820. The memory 820 may be used to store the program code and data. Therefore, the memory 820 may be a storage unit inside the processor 810, or an external storage unit independent of the processor 810, or a component including a storage unit inside the processor 810 and an external storage unit independent of the processor 810.
[0220] Optionally, the computing device 800 may further include a bus 840. The memory 820 and the communication interface 830 may be connected to the processor 810 via the bus 840. The bus 840 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 840 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure is represented by only one line, but it does not mean that there is only one bus or one type of bus.
[0221] It should be understood that in the embodiment of the present application, the processor 810 can adopt a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. Or the processor 810 uses one or more integrated circuits to execute related programs to implement the technical solutions provided in the embodiments of the present application.
[0222] The memory 820 may include a read-only memory and a random access memory, and provides instructions and data to the processor 810. A portion of the processor 810 may also include a nonvolatile random access memory. For example, the processor 810 may also store information on the device type.
[0223] When the computing device 800 is running, the processor 810 executes the computer-executable instructions in the memory 820 to perform the operation steps of each method embodiment.
[0224] It should be understood that the computing device 800 according to the embodiment of the present application can correspond to the corresponding subjects in the methods according to the embodiments of the present application, and the above-mentioned and other operations and / or functions of each module in the computing device 800 are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.
[0225] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0226] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0227] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0228] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0229] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0230] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0231] The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it is used to execute the operating steps of each method embodiment.
[0232] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media.Computer-readable media can be computer-readable signal media or computer-readable storage media.Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above.More specific examples (non-exhaustive lists) of computer-readable storage media include, electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.
[0233] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0234] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0235] Computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0236] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the scope of protection of the present application.
Claims
1. A video denoising method in time, space and frequency domains, characterized in that: include: Performing frequency domain noise reduction on images of each frame of the first video to obtain frequency domain features of each frame of the first video after noise reduction; Extracting forward and backward optical flows of each frame of the first video from the frequency domain features of each frame after noise reduction; Obtaining spatial deep features of each frame of the first video from the image; Obtaining propagation features propagated to each frame in the first video according to the spatial deep features and the forward and backward optical flows, wherein the propagation features propagated to one frame include features propagated to the frame from the spatial deep features of a set number of frames before and after the frame in the first video; The frequency domain features, the propagation features and the spatial domain deep features are integrated to obtain a denoised image of each frame of the first video.
2. The method according to claim 1, characterized in that: Also includes: The first video is obtained by removing stripe noise from the original video obtained from the imaging device.
3. The method according to claim 2, characterized in that: Before performing frequency domain noise reduction on the images of each frame of the first video, the second frame to the (1+the set number)th frame of the first video are copied in reverse order before the first frame, and the second-to-last frame to the (1+the set number)th to-last frame of the first video are copied in reverse order after the first-to-last frame.
4. The method according to claim 1, characterized in that: Obtaining spatial domain deep features of each frame of the first video from the image, specifically including: The spatial domain deep features of each frame of the first video are obtained from the image of the frame through at least one convolutional network and one residual network.
5. The method according to claim 1, characterized in that: The propagated features propagated to one frame include the features of the frame propagated from the spatial domain deep features of the two frames before and after the frame in the first video.
6. The method according to claim 5, characterized in that: Obtain the spatial domain deep features of the i-1th frame of the first video and propagate forward to the features of the i-th frame, where i is any number greater than 1, including: Obtaining an offset parameter and a mask parameter of a first deformable convolution of the i-th frame of the first video according to the optical flow from the i-1th frame to the i-th frame of the first video and the spatial domain deep features of the i-1th frame and the i-th frame of the first video; The spatial deep features of the i-1th frame of the first video are processed by the first deformable convolution to obtain the first-order forward propagation features propagated to the i-th frame in the first video, and the first-order forward propagation features are the features of the spatial deep features of the i-1th frame of the first video forward propagated to the i-th frame.
7. The method according to claim 6, characterized in that: Obtain the spatial domain deep features of the j-2th frame of the first video and propagate them forward to the features of the jth frame, where j is any number greater than 2, including: Obtain an offset parameter and a mask parameter of a second deformable convolution of the first-order forward propagation feature propagated from the first video to the j-1th frame according to the optical flow from the j-1th frame to the j-th frame of the first video, the first-order forward propagation feature propagated from the first video to the j-1th frame, and the spatial domain deep feature of the j-th frame of the first video; The first-order forward propagation features propagated to the j-1th frame are processed by the second deformable convolution to obtain the second-order forward propagation features of the first video propagated to the j-th frame, and the second-order forward propagation features are the features of the spatial domain deep features of the j-2th frame of the first video forward propagated to the j-th frame.
8. The method according to claim 5, characterized in that: Obtain the spatial domain deep features of the i+1th frame of the first video and back-propagate them to the features of the i-th frame, where i is any number greater than 1, including: Obtaining an offset parameter and a mask parameter of a third deformable convolution of the i-th frame of the first video according to the optical flow from the i+1-th frame to the i-th frame of the first video and the spatial domain deep features of the i+1-th frame and the i-th frame of the first video; The spatial deep features of the i+1th frame are processed by the third deformable convolution to obtain the first-order back-propagation features of the first video propagated to the jth frame, and the first-order back-propagation features are the features of the spatial deep features of the i+1th frame of the first video back-propagated to the i-th frame.
9. The method according to claim 8, characterized in that: Obtain the spatial domain deep features of the j+2th frame of the first video and back-propagate them to the features of the jth frame, where j is any number greater than 2, including: Obtain offset parameters and mask parameters of a fourth deformable convolution of the first-order back-propagation features propagated from the first video to the j+1th frame according to the optical flow from the j+1th frame to the j+1th frame of the first video, the first-order back-propagation features propagated from the first video to the j+1th frame, and the spatial domain deep features of the jth frame of the first video; The first-order back-propagation features propagated to the j+1th frame are processed by the fourth deformable convolution to obtain the second-order back-propagation features of the first video propagated to the jth frame, and the second-order back-propagation features are the features of the spatial domain deep features of the j+2th frame of the first video back-propagated to the jth frame.
10. The method according to claim 1, characterized in that: The fusing of the frequency domain features, the propagation features, and the spatial domain deep features to obtain a denoised image of each frame of the first video specifically includes: Channel stacking is performed on the spatial deep features of the current frame of the first video and the propagation features transmitted from the first video to the current frame, and the stacking result is processed through a residual network to obtain a fused propagation feature of the current frame of the first video; Obtaining fused spatial features of the current frame of the first video according to the spatial deep features and fused propagation features of the current frame of the first video; The fused spatial domain features and frequency domain features of the current frame of the first video are stacked at the channel layer, and the stack is processed through a single layer of convolution to obtain a denoised image of the current frame of the first video.
11. The method according to claim 10, characterized in that: When downsampling is performed when obtaining the forward and backward optical flow features and the spatial deep features, the fused spatial features are also upsampled before stacking the fused spatial features and the frequency domain features of the current frame of the first video at the channel layer.
12. The method according to claim 1, characterized in that: The method of removing stripe noise from the original video obtained from the imaging device to obtain the first video specifically includes: Aggregate the pixel values of the original video according to the first dimension, remove the second dimension, and obtain a first spatiotemporal image, where the space of the first spatiotemporal image is time*first dimension, the first dimension is any one of the height dimension and the width dimension in the image of the original video, and the other dimension is the second dimension; Obtaining a first noisy spatiotemporal image from the first spatiotemporal image by using a convolutional network, where the first noisy spatiotemporal image is an image of a first stripe noise in the space, and the first stripe noise is the stripe noise of the original video in a first dimension; Expanding the first noise spatiotemporal image by a second dimension to obtain a first noise video, where the first noise video is a video of the first stripe noise; A first video is obtained according to a difference between the original video and the first noisy video, where the first video is the first video from which the first stripe noise is removed.
13. The method according to claim 2, characterized in that: The removing of stripe noise from the original video to obtain the first video and obtaining the frequency domain features of each frame of the first video after noise reduction specifically includes: Extracting a frequency domain array of each frame image of the first video through a first convolutional network, wherein each element of a convolution kernel of the first convolutional network is a product of a non-negative number and a frequency domain conversion value; The frequency domain array is processed by a plurality of cascaded second convolutional networks to obtain the denoised frequency domain features of each frame image of the first video.
14. The method according to any one of claims 4 or 6 to 13, characterized in that: Each convolutional network is obtained through training, in which each sample includes a clean video and a video with simulated noise superimposed thereon.
15. A device for video noise reduction in time, space and frequency domains, characterized in that: include: A frequency domain noise reduction module, used to perform frequency domain noise reduction on the images of each frame of the first video to obtain frequency domain features of each frame of the first video after noise reduction; An optical flow extraction module, used to extract forward and backward optical flows of each frame of the first video from the frequency domain features of each frame after noise reduction; A spatial deep module, used to obtain spatial deep features of each frame of the first video from the image; A feature propagation module, used to obtain a propagation feature of each frame of the first video according to the spatial deep feature and the forward and backward optical flow, wherein the propagation feature of each frame of the first video includes a feature of the spatial deep features of a set number of frames before and after the frame of the first video propagated to the frame; The feature fusion module is used to fuse the frequency domain features, the propagation features and the spatial domain deep features to obtain a denoised image of each frame of the first video.
16. A computing device, characterized in that include, bus; A communication interface connected to the bus; at least one processor connected to the bus; as well as At least one memory is connected to the bus and stores program instructions, and when the program instructions are executed by the at least one processor, the at least one processor executes the method according to any one of claims 1 to 14.
17. A computer-readable storage medium, characterized in that: Program instructions are stored thereon, and when the program instructions are executed by a computer, the computer is caused to execute the method according to any one of claims 1 to 14.
Citation Information
Cited By
Video restoration detection method and system based on multi-domain feature fusion
CN119444621A
