Electromagnetic interference elimination method, device and equipment for video monitoring image
By combining blind deconvolution and wavelet transformation, the problem of quality loss during electromagnetic interference removal in video surveillance images is solved, effective filtering of electromagnetic interference and retention of high-frequency details is achieved, and image quality is improved.
Patent Information
- Application Number
- CN202411500085.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2024-12-27
AI Technical Summary
When removing electromagnetic interference in video surveillance images, the prior art often fails to completely denoise or loses image quality, and cannot effectively process electromagnetic interference and retain high-frequency details.
Blind deconvolution processing combined with discrete wavelet transformation and frequency domain denoising method based on preset denoising thresholds is used to create point expansion functions and image tiles to accurately filter electromagnetic interference noise and retain video surveillance images high frequency details.
Effectively remove electromagnetic interference noise, improve the quality of video surveillance images, retain high-frequency details, avoid image distortion, and realize accurate filtering of electromagnetic interference and restore enhancement of image quality.
Smart Images

Figure CN119205557A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device and equipment for eliminating electromagnetic interference of video surveillance images. Background Art
[0002] Video surveillance terminals are generally installed at high locations such as poles and towers. These locations are generally close to high-voltage power lines and are exposed to the sun and rain all year round. As a result, the data connection lines and power lines of the video surveillance terminals are prone to damage, the camera's own lines are damaged, and there is electromagnetic leakage from nearby electronic equipment, making the video surveillance system susceptible to electromagnetic interference.
[0003] In terms of manifestation, common electromagnetic interference in video surveillance images mainly includes large-area mesh background, one or several horizontal stripes of interference signals that continuously scroll across the screen. Video surveillance images are also accompanied by large-area salt and pepper snowflake noise, which drowns out normal video surveillance images.
[0004] The current technical solutions for eliminating electromagnetic interference are generally through pixel smoothing filtering in the spatial domain or high-frequency filtering in the frequency domain. These methods either cannot effectively handle electromagnetic interference or easily cause certain damage to the original image information itself. Summary of the invention
[0005] The present invention provides a method, device and equipment for eliminating electromagnetic interference for video surveillance images, so as to solve the defects of the prior art that a single denoising method is either unable to completely denoise or loses image quality, and achieves effective filtering of electromagnetic interference while ensuring the original high-frequency detail content of the video.
[0006] The present invention provides a method for eliminating electromagnetic interference of video surveillance images, comprising the following steps: Obtaining video surveillance images to be processed; Performing blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image; Performing discrete wavelet transform on the spatial domain denoised image to obtain a spectrum image of the spatial domain denoised image; Filter out electromagnetic interference noise in the spectrum image of the spatial domain denoised image based on a preset denoising threshold to obtain a frequency domain denoised image; Performing a two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after electromagnetic interference is removed.
[0007] According to a method for eliminating electromagnetic interference for a video surveillance image provided by the present invention, the blind deconvolution processing is performed on the video surveillance image to be processed to obtain a spatial domain denoised image, including: Based on the optimal electromagnetic fringe moving range and the optimal electromagnetic fringe shaking angle, a point spread function is created; wherein the optimal electromagnetic fringe moving range and the optimal electromagnetic fringe shaking angle are both obtained by optimizing the simulated annealing algorithm; The point spread function is used to perform deconvolution on the video surveillance image to be processed to obtain the spatial domain denoised image.
[0008] According to a method for eliminating electromagnetic interference for video surveillance images provided by the present invention, the electromagnetic interference noise in the spectrum image of the spatial domain denoised image is filtered out based on a preset denoising threshold to obtain a frequency domain denoised image, including: Constructing image tiles of a preset size; the energy mean of the image tiles is used to determine a reference value of the preset denoising threshold; Using the image tiles of the preset size, spatial expansion is performed on the night image in the video surveillance image to be processed to obtain a noisy image equivalent to electromagnetic fringe interference; Performing discrete wavelet transform on the noisy image equivalent to electromagnetic fringe interference to obtain a noisy spectrum image; The frequency domain denoised image is obtained by subtracting the energy in the same frequency domain of the spectrum image of the spatial domain denoised image from the energy in the noisy spectrum image.
[0009] According to a method for eliminating electromagnetic interference for video surveillance images provided by the present invention, before constructing image tiles based on the preset denoising threshold, the method further includes: Determine the images to be processed during the daytime and the images to be processed during the nighttime; Based on a pixel frame diagram of a preset size, a plurality of image tiles are randomly framed from the image to be processed during the daytime period and the image to be processed during the nighttime period; In the image to be processed during the daytime period, the difference between the tile energy means between two tiles in the image is calculated, and a first area with the smallest difference is determined; Finding a target area closest to the first area in the darkest area of the image to be processed during the night time period; The energy mean of the image tiles in the target area is used as a reference value for determining the preset denoising threshold.
[0010] According to a method for eliminating electromagnetic interference for video surveillance images provided by the present invention, after finding the target area closest to the first area in the darkest area of the image to be processed during the night time, the method further includes: In the target area, calculating the difference between the tile energy means between two tiles in the image, and determining a second area with the smallest difference; The taking the energy mean of the image tiles in the target area as a reference value for determining the preset denoising threshold comprises: The energy mean of the second area is used as a reference value for determining the preset denoising threshold.
[0011] According to a method for eliminating electromagnetic interference for a video surveillance image provided by the present invention, after obtaining the video surveillance image to be processed, the method comprises: The video surveillance image to be processed is filtered by using a Gaussian filtering method or a median filtering method to obtain the video surveillance image to be processed after the salt and pepper noise is removed.
[0012] The present invention also provides an electromagnetic interference elimination device for video surveillance images, comprising the following modules: An image acquisition module is used to acquire the video surveillance image to be processed; A spatial domain denoising module, used for performing blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image; A wavelet transform module, used for performing discrete wavelet transform on the spatial domain denoised image to obtain a spectrum image of the spatial domain denoised image; A frequency domain denoising module, used to filter out electromagnetic interference noise in the spectrum image of the spatial domain denoised image based on a preset denoising threshold to obtain a frequency domain denoised image; The image output module is used to perform a two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after electromagnetic interference is removed.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electromagnetic interference elimination method for video surveillance images as described in any one of the above methods is implemented.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for eliminating electromagnetic interference for video surveillance images as described in any one of the above is implemented.
[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for eliminating electromagnetic interference for video surveillance images as described in any one of the above methods.
[0016] The electromagnetic interference elimination method, device and equipment for video surveillance images provided by the present invention obtain the video surveillance image to be processed; perform blind deconvolution processing on the video surveillance image to be processed to obtain a spatial denoised image; perform discrete wavelet transform on the spatial denoised image to obtain a spectrum image of the spatial denoised image; filter out the electromagnetic interference noise in the spectrum image of the spatial denoised image based on a preset denoising threshold to obtain a frequency domain denoised image; perform two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after removing electromagnetic interference. The method associates the spatial domain and the frequency domain, and jointly adopts different denoising methods according to the characteristics of electromagnetic horizontal interference. A blind deconvolution method is used in the spatial domain, and a threshold denoising method based on wavelet transform is used in the frequency domain. According to the energy distribution characteristics of electromagnetic horizontal interference in the video surveillance image, the capacity limit threshold of electromagnetic horizontal interference is accurately formulated, and the electromagnetic interference in the frequency domain is removed based on the threshold, so as to achieve the restoration and enhancement of the quality of the video surveillance image. Compared with the traditional method of using only a single spatial domain denoising or frequency domain denoising, this method can not only effectively filter out electromagnetic interference, but also ensure the original high-frequency components of the video and retain the high-frequency details, so as not to lose image details and cause distortion of the restored image. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is a flow chart of the electromagnetic interference elimination method for video surveillance images provided by the present invention.
[0019] Figure 2 It is a schematic diagram of video monitoring after discrete wavelet inverse transformation provided by the present invention.
[0020] Figure 3 It is a schematic diagram of the optimization process of the simulated annealing algorithm provided by the present invention.
[0021] Figure 4 It is a schematic diagram of the process of frequency domain denoising provided by the present invention.
[0022] Figure 5 It is a schematic diagram of electromagnetic interference after airspace expansion provided by the present invention.
[0023] Figure 6 It is a flow chart of a method for determining a wavelet denoising threshold provided by the present invention.
[0024] Figure 7 It is a schematic diagram of a noisy image during the day provided by the present invention.
[0025] Figure 8 It is a schematic diagram of a noisy image at night provided by the present invention.
[0026] Fig. 9 It is a schematic diagram of the video surveillance image before and after the spatial domain filtering provided by the present invention.
[0027] Fig.10 It is a structural schematic diagram of the electromagnetic interference elimination device for video surveillance images provided by the present invention.
[0028] Fig.11 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0030] Combine the following Figure 1-Figure 11 Specific embodiments of the present invention are described.
[0031] Figure 1 is one of the flow charts of the electromagnetic interference elimination method for video surveillance images provided by the present invention, such as Figure 1 As shown, the method includes the following.
[0032] Step 101: Obtain a video surveillance image I to be processed.
[0033] The video surveillance image to be processed I refers to a video surveillance image with noise due to electromagnetic interference. The video surveillance image to be processed referred to in this application includes daytime images and nighttime images, and both the daytime images and the nighttime images are taken from the same camera position.
[0034] Specifically, images are first collected by a video surveillance device and then input into a processor or a server.
[0035] Optionally, since video surveillance images affected by electromagnetic interference generally contain two forms of noise, one is a large area of salt and pepper snowflake noise, and the other is a large area of reticular background, one or more unequal horizontal stripes that continuously scroll across the screen. First, an effective way to remove salt and pepper snowflake noise is to use a median filter or a Gaussian filter, which can effectively improve the quality of video surveillance images on the one hand, and enhance the processing effect of blind deconvolution filtering, frequency domain discrete wavelet transform and other methods on the other hand. Specifically, this scheme first uses a spatial domain filter to traverse the above-mentioned video surveillance images to be processed (including daytime images and nighttime images) to eliminate the salt and pepper snowflake noise.
[0036] Step 102: perform blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image.
[0037] Among them, blind deconvolution is an image restoration technique that recovers a clear image from a blurred image without knowing the convolution kernel (i.e., point spread function, also known as blur kernel). In image processing, image blur is usually caused by factors such as motion, optical distortion, or atmospheric turbulence in the imaging system, which can be modeled as a convolution kernel. The goal of blind deconvolution is to estimate the convolution kernel using only the blurred image itself and restore the original image without prior knowledge of the convolution kernel.
[0038] Generally speaking, the process of image quality degradation caused by electromagnetic interference can be described by a mathematical model as follows: Assume that the video surveillance image under ideal conditions Point Spread Function , plus various types of electromagnetic interference noise After that, it degenerates into the observed blurred image . Among them, the point spread function Used to describe the process of image degradation, for example, an image is blurred due to camera motion. Motion blur can be described using a motion blur model. Motion blur is usually represented by a linear motion point spread function To simulate, mathematically speaking, the point spread function performs a convolution operation on the image. Correspondingly, if the original ideal image needs to be restored, the point spread function can be used to perform deconvolution on the image.
[0039] The blurring of the image to be processed in this application is caused by the interference stripe jitter caused by electromagnetic interference. The general methods for restoring the blurred image caused by the interference stripe jitter include Wiener filter restoration, regularized filter restoration, and LR restoration. These deconvolution methods belong to inverse filtering in technical implementation. When these deconvolution methods are used for restoration, it is necessary to clearly know the cause of the image blur (i.e., the point spread function). However, in actual engineering, it is not easy to accurately obtain the point spread function, so these methods have limitations. In practical applications, singular points are prone to appear, which causes the solution to be lost and the noise to be non-objectively amplified.
[0040] In the applicable scenario of the present technical solution, since it is impossible to obtain a clear probability density function of electromagnetic transverse interference in advance, a blind deconvolution restoration filtering method that does not require prior estimation of noise probability density is selected.
[0041] In the simulation software MATLAB, the deconvblind function (i.e., blind deconvolution function) is used to implement blind deconvolution (also known as "blind deconvolution") to filter out the electromagnetic interference noise of the video surveillance image. Specifically, when implementing the blind deconvolution filtering method, there are three optional parameters in the function, which are specified in the pre-function (i.e., fspecial function) used in conjunction with the deconvblind function. Among them, one parameter is to select the filter type (type) of blind deconvolution. The filter type selected for blind deconvolution in this application is motion type; the other two parameters are len, which indicates the moving range of electromagnetic stripe interference in the video surveillance image; and theta, which indicates the shaking angle of electromagnetic stripe interference in the video surveillance image in the counterclockwise direction. The fspecial function is expressed as follows.
[0042] ; Among them, the fspecial function returns a two-dimensional filter h, that is, a point spread function, which is used to perform deconvolution on the video surveillance image to be processed, thereby realizing blind deconvolution.
[0043] The deconvblind function uses the maximum likelihood algorithm and the initial estimate of the point spread function (PSF, Point SpreadFunction) psfi, and uses the point spread function (PSF) (that is, the above-mentioned two-dimensional filter h) to deconvolve the video surveillance image to be processed to eliminate electromagnetic interference noise. The deconvblind function returns the deblurred video surveillance image J (that is, the spatial domain denoised image) and the estimated value of the point spread function (PSF) psfr after the video surveillance image to be processed is restored.
[0044] The deconvblind function of this application is expressed as follows.
[0045] ; Among them, I represents the electromagnetic horizontal interference noise image affected by drift, jitter and rotation, that is, the video surveillance image to be processed; J represents the electromagnetic horizontal interference noise image without drift, jitter and rotation obtained after using the blind deconvolution filtering method, that is, the spatial domain denoising image J; psfi is the initial estimated value of the point spread function, and psfr is the estimated value of the point spread function.
[0046] Step 103 , performing discrete wavelet transform on the spatial domain denoised image J to obtain a spectrum image of the spatial domain denoised image J.
[0047] Among them, Discrete Wavelet Transform (DWT) is an image multi-scale analysis method developed based on the localization of Short-time Fourier Transform. It has the characteristics of time-frequency domain correlation. Its multi-resolution characteristics can decompose and peel off the video surveillance image information layer by layer, and it is adaptive to the digital signal of the video surveillance image.
[0048] Discrete wavelet transform (DWT) can decompose video surveillance image signals at different scales, and match the most appropriate scale among the various forms of electromagnetic cross-stripe interference noise according to the different fineness of the video surveillance image.
[0049] The low-frequency components of discrete wavelet transform (DWT) contain the basic characteristics of video surveillance images, and the high-frequency components show the details of video surveillance images. The transformation formula of discrete wavelet transform (DWT) is:
[0050] ; in, is the spectrum image obtained after discrete wavelet transform, is the original input signal, which is the spatial domain denoised image J in this application, is the kernel function of discrete wavelet transform, and They are scale factor and spatial-temporal position information translation factor, which control the scaling and translation of discrete wavelet transform respectively, and can eliminate electromagnetic interference noise in video surveillance images in a targeted manner.
[0051] Kernel function of discrete wavelet transform (DWT) (also called wavelet basis function) can be of different types according to the actual characteristics of video surveillance images, which reflects the flexibility and excellent environmental adaptability of using discrete wavelet transform (DWT) to denoise electromagnetic interference in video surveillance images.
[0052] The various types of wavelet basis functions of discrete wavelet transform that can be used in this scheme are:
[0053] 1. The Haar wavelet basis function is the earliest orthogonal wavelet basis function with compact support used in discrete wavelet transform, and it is also the simplest.
[0054] 2. Meyer wavelet basis function is an orthogonal wavelet with compact support.
[0055] 3. Daubechies wavelet basis function, referred to as dbN. db1 is the wavelet basis function, there is no clear expression for wavelets at other levels, and the dbN function is compactly supported and orthogonal.
[0056] The present application adopts the Haar wavelet basis function. The above-mentioned spatial domain denoised image J is decomposed by discrete wavelet transform to obtain the decomposition coefficients of each level of discrete wavelet transform.
[0057] In the frequency domain, the reason why the discrete wavelet transform method can achieve a good denoising effect is that the key lies in setting a suitable denoising threshold in the processing of wavelet coefficients after discrete wavelet transform.
[0058] Step 104 , filtering out electromagnetic interference noise in the spectrum image of the spatial domain denoised image J based on a preset denoising threshold, to obtain a frequency domain denoised image.
[0059] First of all, it should be explained that the basic idea of threshold denoising based on wavelet transform is that after the signal to be processed is transformed by wavelet, the wavelet coefficients generated by the signal to be processed contain important information of the signal. After the signal to be processed is decomposed by wavelet, the wavelet coefficients are larger, and the wavelet coefficients of the noise are smaller, and the wavelet coefficients of the noise are smaller than the wavelet coefficients of the signal. By selecting a suitable threshold, the wavelet coefficients greater than the threshold are considered to be generated by the signal and should be retained, and those less than the threshold are considered to be generated by the noise and set to zero, thereby achieving the purpose of denoising. The basic steps are as follows.
[0060] (1) Decomposition: Select a wavelet with N layers to perform wavelet decomposition on the signal to be processed.
[0061] (2) Threshold processing: After decomposition, a suitable threshold is selected and the coefficients of each layer are quantized using the threshold function.
[0062] (3) Reconstruction: Reconstruct the signal using the processed wavelet coefficients.
[0063] In this application, a threshold denoising method based on wavelet transform is described as follows.
[0064] First, according to the characteristics of the video surveillance image, a suitable wavelet basis function and the number of decomposition layers N are selected, and the decomposition scales of different levels are then determined to be 1, 2, ..., N. In this application, the number of decomposition layers N=2 is selected.
[0065] After completing the salt and pepper noise median filtering and blind deconvolution in the spatial domain to achieve the deblurring of the video surveillance image, a denoising threshold algorithm based on wavelet transform is used in the frequency domain. Assuming that the video surveillance image is subject to all-weather electromagnetic interference regardless of time and video surveillance image area, the energy distribution of the video surveillance image in all-weather and various spatial areas is basically similar and obeys the statistical normal probability distribution, then the appropriate denoising threshold can be selected according to the energy distribution characteristics.
[0066] The selected denoising threshold is used to filter out noise signals with energy lower than the denoising threshold, leaving only useful signals, thus obtaining a frequency domain denoised image.
[0067] Step 105 , performing a two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after electromagnetic interference is removed.
[0068] Specifically, the video surveillance image after electromagnetic interference is removed is obtained through the inverse conversion function of discrete wavelet transform, that is, the two-dimensional discrete wavelet inverse transform function (that is, idwt2 function).
[0069] The two-dimensional inverse discrete wavelet transform function (i.e., idwt2 function) is expressed as.
[0070] ; in, represents the low-frequency coefficient obtained by wavelet transform, cH represents the horizontal high-frequency coefficient obtained by wavelet transform, cV represents the vertical high-frequency coefficient obtained by wavelet transform, and cD represents the diagonal high-frequency coefficient obtained by wavelet transform; X is the output video surveillance image after removing electromagnetic interference. Figure 2 As shown, Figure 2 It is the image restored by the two-dimensional discrete wavelet inverse transform function (i.e., idwt2 function).
[0071] In the above embodiment, the video surveillance image to be processed is obtained; blind deconvolution is performed on the video surveillance image to be processed to obtain a spatial denoised image; discrete wavelet transform is performed on the spatial denoised image to obtain a spectrum image of the spatial denoised image; electromagnetic interference noise in the spectrum image of the spatial denoised image is filtered out based on a preset denoising threshold to obtain a frequency domain denoised image; two-dimensional discrete wavelet inverse transform is performed on the frequency domain denoised image to obtain a video surveillance image after electromagnetic interference is removed. This method uses different denoising methods in combination according to the characteristics of electromagnetic horizontal interference through spatial and frequency domain associations, using a blind deconvolution method in the spatial domain and a threshold denoising method based on wavelet transform in the frequency domain, and accurately formulates the capacity limit threshold of electromagnetic horizontal interference according to the energy distribution characteristics of electromagnetic horizontal interference in the video surveillance image, removes electromagnetic interference in the frequency domain based on the threshold, and achieves restoration and enhancement of the quality of the video surveillance image. Compared with the traditional method of using only a single spatial domain denoising or frequency domain denoising, this method can not only effectively filter out electromagnetic interference, but also ensure the original high-frequency components of the video and retain the high-frequency details, so as not to lose image details and cause distortion of the restored image.
[0072] In one embodiment, the above step 102 includes: creating a point spread function based on the optimal electromagnetic fringe movement range and the optimal electromagnetic fringe shaking angle; wherein the optimal electromagnetic fringe movement range and the optimal electromagnetic fringe shaking angle are both obtained by optimizing the simulated annealing algorithm; and using the point spread function to deconvolve the video surveillance image to be processed to obtain the spatial domain denoised image.
[0073] Among them, the simulated annealing algorithm is an approximate optimization method based on the Monte Carlo idea. In thermodynamics, annealing refers to the physical phenomenon of a system gradually cooling down. The lower the temperature, the lower the energy level of the system. When the energy level reaches a sufficiently low value, the system begins to condense and crystallize. During crystallization, the system energy level is the lowest. During the slow cooling, that is, the annealing process, the system reaches a crystallized state with the lowest energy level.
[0074] However, if the annealing process is too rapid during the system cooling process, also known as quenching, the rapid cooling of the system will cause the system to reach a non-minimum energy state and amorphous state. Based on the same principle, the blind deconvolution filtering process of video surveillance images cannot achieve the optimal solution for image drift, jitter, and rotation restoration of electromagnetic horizontal interference.
[0075] This technical solution adopts a simulated annealing algorithm to optimize two parameters in the blind deconvolution filtering process, namely, the global optimal solution of the above-mentioned len (indicating the moving range of the electromagnetic fringe interference of the video surveillance image) and theta (indicating the shaking angle of the electromagnetic fringe interference of the video surveillance image along the counterclockwise direction), that is, to optimize the two parameters in the above-mentioned point spread function PSF (also known as the blur kernel).
[0076] like Figure 3 As shown in the figure, the simulated annealing algorithm adopts the Greedy strategy and starts to explore from point A in the solution space. If the evaluation index of the video surveillance image continues to improve, that is, the value of the objective function continues to decrease, the simulated annealing algorithm continues to explore in the same direction. When it reaches point B, the exploration process ends. Because no matter which direction you work hard in, the function result will only get bigger and bigger, and the evaluation index of the video surveillance image will get worse. In the end, the simulated annealing algorithm only finds a local solution B.
[0077] The key point of the simulated annealing algorithm is to introduce random factors into the search process. The simulated annealing algorithm accepts another local solution that is worse than the current local solution with a certain probability, and accepts a random move to the right with a certain amplitude with a certain probability. Figure 3 As shown in the figure, the simulated annealing algorithm may jump out of the local optimal solution. After several random moves that are not locally optimal, it first reaches the peak point between B and C, jumps out of the local optimal solution B, and then starts to try. Finally, the simulated annealing algorithm tries to reach the global optimal solution C.
[0078] According to the Metropolis criterion, the system tends to equilibrium probability at temperature T , where E is the internal energy of the system at temperature T, represents the difference in system internal energy before and after updating the parameters; in this application, E is represented by PSNR and SSIM, the overall quality indicators of video surveillance images. K is the Boltzmann constant, and the Metropolis criterion is expressed as.
[0079] ; At temperature T, the energy difference is The probability of cooling is , expressed as ,and <0, P and T are positively correlated.
[0080] During the trial of the simulated annealing algorithm, the higher the temperature T, the more energy difference will appear. The lower the temperature T, the smaller the probability of cooling. Always less than 0, the fuzzy annealing process keeps the temperature T gradually decreasing .so, The function range is (0, 1). As the temperature T decreases, the function value Gradually decrease.
[0081] In the simulated annealing algorithm, in order to achieve the global optimal solution, the probability The random movement to a worse solution is regarded as a temperature T jump. In the combined optimization strategy of the simulated annealing algorithm, the internal energy E is simulated as the objective function value f, which is represented by the video surveillance image quality indicators PSNR and SSIM. The better the comprehensive objective evaluation index, the lower the internal energy E and the lower the objective function value f. The temperature T evolves into the control parameter t, and the simulated annealing algorithm of the combined optimization strategy is obtained.
[0082] Start with the initial solution i and the initial value t of the control parameter. Repeat the following steps for the current local solution.
[0083] 1. A new solution for the randomly generated simulated annealing algorithm.
[0084] 2. The simulated annealing algorithm calculates the difference of the objective function and determines the adjustment direction of the optimization parameters.
[0085] 3. The system accepts or discards the old solution under the optimization parameter adjustment direction suggested by the simulated annealing algorithm, and continuously iterates with the new solution, gradually decaying the t value.
[0086] 4. When the difference of the objective function calculated by the simulated annealing algorithm is less than the agreed threshold value, it is considered that the algorithm can be terminated. At this time, the current solution obtained by the simulated annealing algorithm is the approximate optimal solution. This is a heuristic random search process based on the Monte Carlo iterative solution method.
[0087] 5. The annealing process of the simulated annealing algorithm is controlled by the Cooling Schedule. The control content includes the initial value t and attenuation factor At of the control parameter, the number of iterations L at each t value, and the stop condition S.
[0088] Based on the simulated annealing algorithm, the global optimal solution of len (indicating the moving range of electromagnetic fringe interference in video surveillance images) and theta (indicating the shaking angle of electromagnetic fringe interference in video surveillance images in the counterclockwise direction) is found in the solution space, that is, the two parameters in the point spread function PSF (also known as the blur kernel) are optimized. Then, the processed video surveillance image is deconvolved based on the point spread function PSF to obtain a spatial denoised image.
[0089] In the above embodiment, the blur kernel of blind deconvolution, that is, the parameters len and theta in the point spread function, are globally optimized through the simulated annealing algorithm, so that the estimated blur kernel in blind deconvolution is more accurate and the deblurring effect of blind deconvolution is improved.
[0090] In one embodiment, if Figure 4As shown, a flow chart of frequency domain denoising is shown. Specifically, the above step 104 includes.
[0091] Step 401, constructing image tiles of a preset size; the energy mean of the image tiles is used to determine a reference value of the preset denoising threshold.
[0092] In this embodiment, the image tile refers to a pixel block with a certain wavelet coefficient, and the energy mean of the pixel block, that is, the mean of the wavelet coefficient of the pixel block after discrete wavelet transformation, can be used as a reference value for determining the preset denoising threshold. Different wavelet coefficients can be selected according to actual conditions, and the wavelet coefficient is also the wavelet amplitude.
[0093] Specifically, an image tile of a preset size is constructed, the image tile size is 56×56 pixels, and its wavelet coefficient is a preset value. There are various methods for determining the preset value, which can be a universal threshold determination method, a minimax threshold method, a heuristic threshold method, etc. The preset denoising threshold should be close to the maximum value of the electromagnetic horizontal stripe interference on the video surveillance image to be processed, so that the denoising effect can be achieved. In fact, since the electromagnetic horizontal stripe interference is global, that is, in all parts of the image, whether it is a daytime image or a night image, the energy distribution of the electromagnetic horizontal stripe interference is roughly the same. Since the night image of the same scene contains much fewer valid pixels than the daytime image, it can be considered that the effective pixel energy of the night image is weaker than that of the daytime image, especially in the darkest part of the night image, the effective pixel energy of the darkest part is the weakest, then it can be considered that the tile energy of the darkest part is the upper limit of the electromagnetic interference energy, therefore, the energy of the darkest part of the night image can be selected as the upper limit of the electromagnetic interference energy, that is, as the denoising threshold.
[0094] Step 402 , using the image tiles of the preset size, spatial expansion is performed on the night image in the video surveillance image to be processed to obtain a noisy image equivalent to electromagnetic fringe interference.
[0095] Specifically, since the night image contains fewer valid pixels than the day image of the same scene, if the spatial domain expansion is performed within the entire image range of the corresponding night image in the video surveillance image based on the above image tiles, it can be considered that the entire electromagnetic interference image is formed on the night image, such as Figure 5 shown.
[0096] Step 403: Perform discrete wavelet transform on the noisy image equivalent to electromagnetic fringe interference to obtain a noisy spectrum image.
[0097] Specifically, the noisy image is subjected to discrete wavelet transform (DWT) to decompose the low-frequency coefficients and the high-frequency coefficients of each layer after being masked by the preset values, that is, converted into energy distribution in different frequency domains, which is called a noisy spectrum image.
[0098] Among them, the decomposition transfer function (dwt2) of the two-dimensional discrete wavelet transform used is.
[0099] ; Among them, X is the input noisy image, wname is the analysis wavelet type, and this method uses Sym4 type wavelet analysis; represents the low-frequency coefficient obtained by wavelet transform, cH represents the horizontal high-frequency coefficient obtained by wavelet transform, cV represents the vertical high-frequency coefficient obtained by wavelet transform, and cD represents the diagonal high-frequency coefficient obtained by wavelet transform.
[0100] Step 404 : Subtract the energy in the same frequency domain of the spectrum image of the spatial domain denoised image from the energy in the noisy spectrum image to obtain the frequency domain denoised image.
[0101] Specifically, the energy of the above-mentioned image expanded by the entire image tile can be regarded as the maximum value of electromagnetic interference noise, that is, the energy of the noisy spectrum image can be regarded as the maximum value of electromagnetic interference. Then, the energy of the original video surveillance image (here refers to the daytime image corresponding to the same scene) is subtracted from the same frequency domain energy of the noisy spectrum image, and the remaining is the frequency domain energy of the normal video surveillance image.
[0102] In the above embodiment, by determining a denoising threshold, the denoising threshold is used to perform spatial expansion in the video surveillance image to be processed to form a noisy image equivalent to electromagnetic stripe interference, and then in the frequency domain, the video surveillance image to be processed and the noisy image are subtracted in the same frequency domain to obtain a normal image after removing the electromagnetic interference noise. This method takes into account the correlation between electromagnetic horizontal stripe interference and the video surveillance image itself, and can greatly retain image details while ensuring the removal of electromagnetic horizontal stripe interference noise.
[0103] In one embodiment, if Figure 6 As shown, Figure 6 The flowchart of how to determine the denoising threshold is shown. That is, before the above step 301, it also includes.
[0104] Step 601, determining images to be processed during the daytime period and images to be processed during the nighttime period.
[0105] Among them, since the daytime image of the same scene is brighter than the nighttime image, and more effective pixels can be distinguished, it is believed that the energy of the daytime image is higher than that of the nighttime image. The daytime period can be the period with the highest energy of the RGB channel of the video surveillance image histogram throughout the day, generally taking the period corresponding to the top 10% of energy, or taking the video surveillance image corresponding to 12:00 to 14:00 according to experience. The video surveillance image of the night period can be taken with energy as low as the bottom 10%, or taking the video surveillance image corresponding to 1:00 to 3:00 in the evening according to experience.
[0106] It should be noted that the selected images to be processed are all images with electromagnetic horizontal stripe interference.
[0107] Step 602 : Based on a pixel frame diagram of a preset size, a plurality of image tiles are randomly framed out from the image to be processed during the daytime period and the image to be processed during the nighttime period.
[0108] Specifically, in the above-mentioned images to be processed during the daytime and the images to be processed during the nighttime, a pixel frame of a preset size, such as a 56×56 pixel frame, is used to randomly frame out image "tiles", which can be understood as windows. The window size is preferably determined to be about 2% of the overall pixels of the video surveillance image, because if the image tile is too small, it is easy to cause the subsequent denoising threshold determined based on it to be too greatly affected by the energy fluctuation of the electromagnetic interference noise, resulting in poor electromagnetic interference removal effect of normal video surveillance images. If the image tile is large, more physical entities of different types of video surveillance are mixed in, and it is not easy to find the actual closest electromagnetic interference area, which is easy to make the calculated electromagnetic interference noise energy mean higher than the actual one.
[0109] Step 603, in the image to be processed during the daytime period, calculate the difference between the tile energy means between two tiles in the image, and determine the first area with the smallest difference.
[0110] The tile energy mean refers to the average measure of image energy distribution obtained by statistically processing the transformed wavelet coefficients after the tile is subjected to discrete wavelet transform (DWT).
[0111] Specifically, among the randomly selected image tiles, firstly, for the image to be processed during the daytime, the difference between the tile energy means between two image tiles is calculated, and the image area corresponding to the minimum difference is found, such as Figure 7 As shown, Figure 7 The area with the smallest tile energy difference found on the image to be processed during the daytime period. Find the area with the smallest tile energy difference to avoid excessive fluctuations in electromagnetic interference energy, which will affect the accuracy of the denoising threshold.
[0112] Step 604: Find a target area that is closest to the first area in the darkest area of the image to be processed during the night time period.
[0113] Specifically, since the video surveillance device is generally fixedly installed in the same position, the scenes captured are also the same scenes. Therefore, the image content of the image to be processed during the night time period is roughly the same as that of the image to be processed during the day time period. The target area closest to the position of the first area can be found in the darkest area of the image to be processed during the night time period, such as Figure 8 As shown, Figure 8 The target area on the image to be processed during the night period is shown. Figure 7 The corresponding position is closest.
[0114] Furthermore, the positions where the energy mean differences between two image tiles are closest are found in the position range and are taken as the target areas.
[0115] Step 605: Using the energy mean of the image tiles in the target area as a reference value for determining the preset denoising threshold.
[0116] Specifically, the energy mean value of the image tiles in the target area is used as a reference value for determining the preset denoising threshold.
[0117] Optionally, after the above-mentioned step 604, that is, after finding the target area on the night image, in order to obtain a more accurate preset denoising threshold, you can continue to look for the area with the smallest energy fluctuation in the target area, that is, in the target area, calculate the difference between the energy means of each tile in the image tile, determine the second area with the smallest difference, and use the energy mean of the second area as the reference value for determining the preset denoising threshold.
[0118] It should be noted that, since the night image itself also carries energy, the energy mean of the noisy tile image of the night image is actually greater than the actual electromagnetic interference energy upper limit value, so the final preset denoising threshold can be flexibly and dynamically adjusted around the baseline value.
[0119] In the above embodiment, the denoising threshold is determined by associating the daytime and nighttime images of the video surveillance images, and the strong correlation between the daytime and nighttime images of the video surveillance images is utilized, which is more accurate in removing electromagnetic horizontal stripe interference.
[0120] In one embodiment, in the process of optimizing len and theta using the simulated annealing algorithm, an evaluation index is required. Currently, the more objective evaluation indexes for video surveillance images are: mean, variance, mean square error, peak signal-to-noise ratio, and structural similarity index. This application uses peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) as evaluation indicators.
[0121] Among them, the calculation formula of peak signal-to-noise ratio PSNR is:
[0122] ; ; Where M is the pixel width of the image, N is the pixel height of the image, (i, j) is the pixel coordinate of the input video surveillance image, Represents the pixel value of the input video surveillance image; represents the pixel value of the output (i.e. processed) video surveillance image; MSE is the mean squared error, is the maximum pixel value, usually 255.
[0123] The calculation method of structural similarity SSIM is as follows.
[0124] SSIM evaluates the quality of video surveillance images based on the brightness, contrast, and structural similarity of two video surveillance images. The input original video surveillance image is x, and the processed video surveillance image is y. The brightness comparison function is defined. , contrast comparison function And the structure comparison function for.
[0125] ; ; ; ; ; ; in, , are the input video surveillance image pixel mean and the output video surveillance image pixel mean respectively; , are the input video surveillance image pixel variance and the output video surveillance image pixel variance respectively; is the covariance between the video surveillance input image and the video surveillance output image; , , is a constant to prevent the denominator from being 0; , L represents the pixel range of the video surveillance image. The SSIM index is defined as.
[0126] ; in, , , Represents brightness, contrast, and structure adjustment parameters.
[0127] The SSIM value is used to represent the similarity between two video surveillance images. The minimum SSIM value is 0 and the maximum SSIM value is 1. The closer the SSIM value is to 1, the more similar the two video surveillance images are.
[0128] In the above embodiment, Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity (SSIM) are used as evaluation indicators in the simulated annealing algorithm, which is conducive to finding accurate parameters len and theta.
[0129] In one embodiment, after the above step 101, it also includes: filtering the video surveillance image to be processed by using a Gaussian filtering method or a median filtering method to obtain the video surveillance image to be processed after removing the salt and pepper noise.
[0130] Specifically, for video surveillance images that are subject to electromagnetic interference, they are often accompanied by salt and pepper noise. Since salt and pepper noise is a high-frequency interference, it is easy to be submerged in the high-frequency band information corresponding to the details of the video surveillance image. In order to improve the restoration quality as much as possible, Gaussian filtering (or median filtering) in the spatial domain is generally used to eliminate the salt and pepper noise, and then blind deconvolution filtering and frequency domain discrete wavelet transform processing are performed.
[0131] This application uses Gaussian filtering or median filtering to remove salt and pepper noise. The specific method is: first, spatial filtering is used to traverse the daytime and nighttime images of video surveillance to eliminate salt and pepper noise. Fig. 9 As shown, Fig. 9 A schematic diagram of a video surveillance image before and after spatial filtering is shown.
[0132] The spatial filters have different spatial templates. The spatial filters are generally divided into two types: smoothing and sharpening filters. The smoothing filter uses grayscale averaging to eliminate the salt and pepper noise interference of the video surveillance blur image. The sharpening filter highlights the edge of the video surveillance image in order to enhance the characteristics of the video surveillance image.
[0133] This application uses an origin-symmetric two-dimensional sharpening filter. The profile weight distribution in the airspace is shown in the figure. According to different video surveillance image characteristics, selecting an appropriate airspace template can achieve the effect of enhancing the edge effect while eliminating salt and pepper noise.
[0134] The implementation principle of spatial domain median filtering is to replace the original value by multiplying the weights of each point in the neighborhood of the point in the video surveillance digital image. The median filter window of this proposal can be square, circular, or cross-shaped, and is generally two-dimensionally symmetrical. The median filter used in this application is a 3×3 window.
[0135] The above embodiment can effectively improve the quality of video surveillance images by first removing the salt and pepper noise, and can also enhance the overall effect of video surveillance image restoration using blind deconvolution filtering and frequency domain discrete wavelet transform technology.
[0136] The electromagnetic interference elimination device for video surveillance images provided by the present invention is described below. The electromagnetic interference elimination device for video surveillance images described below and the electromagnetic interference elimination method for video surveillance images described above can be referred to each other.
[0137] like Fig.10 As shown, a device for eliminating electromagnetic interference for video surveillance images is provided, including.
[0138] The image acquisition module 1001 is used to acquire the video surveillance image to be processed; A spatial domain denoising module 1002 is used to perform blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image; The wavelet transform module 1003 is used to perform discrete wavelet transform on the spatial denoised image to obtain a spectrum image of the spatial denoised image; A frequency domain denoising module 1004 is used to filter out electromagnetic interference noise in the spectrum image of the spatial domain denoised image based on a preset denoising threshold to obtain a frequency domain denoised image; The image output module 1005 is used to perform a two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after electromagnetic interference is removed.
[0139] In one of the embodiments, the spatial denoising module 1002 is further used for.
[0140] Based on the optimal electromagnetic fringe movement range and the optimal electromagnetic fringe shaking angle, a point spread function is created; wherein the optimal electromagnetic fringe movement range and the optimal electromagnetic fringe shaking angle are both obtained by optimizing the simulated annealing algorithm; the point spread function is used to deconvolve the video surveillance image to be processed to obtain the spatial domain denoised image.
[0141] In one embodiment, the frequency domain denoising module 1004 is further used for.
[0142] Construct image tiles of preset size; the energy mean of the image tiles is used to determine the reference value of the preset denoising threshold; use the image tiles of preset size to perform spatial domain expansion on the night image in the video surveillance image to be processed to obtain a noisy image equivalent to electromagnetic fringe interference; perform discrete wavelet transform on the noisy image equivalent to electromagnetic fringe interference to obtain a noisy spectrum image; subtract the spectrum image of the spatial domain denoised image from the energy in the same frequency domain in the noisy spectrum image to obtain the frequency domain denoised image.
[0143] In one embodiment, the frequency domain denoising module 1004 is further used to: determine the images to be processed during the daytime period and the images to be processed during the nighttime period; based on a pixel frame diagram of a preset size, randomly select multiple image tiles from the images to be processed during the daytime period and the images to be processed during the nighttime period; in the images to be processed during the daytime period, calculate the difference between the tile energy means between each two of the image tiles, and determine the first area with the smallest difference; in the darkest area of the images to be processed during the nighttime period, find the target area that is closest to the position of the first area; and use the energy mean of the image tiles in the target area as a reference value for determining the preset denoising threshold.
[0144] In one embodiment, the frequency domain denoising module 1004 is further used to: calculate the difference between the energy means of each tile in the image tiles in the target area, and determine the second area with the smallest difference; and use the energy mean of the second area as a reference value for determining the preset denoising threshold.
[0145] In one embodiment, the spatial domain denoising module 1002 is further used to filter the video surveillance image to be processed by using a Gaussian filtering method or a median filtering method to obtain the video surveillance image to be processed after removing the salt and pepper noise.
[0146] Fig.11 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.11As shown, the electronic device may include: a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120 and the memory 1130 communicate with each other through the communication bus 1140. The processor 1110 may call the logic instructions in the memory 1130 to execute the electromagnetic interference elimination method for the video surveillance image, the method comprising: obtaining the video surveillance image to be processed; performing blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image; performing discrete wavelet transform on the spatial domain denoised image to obtain a spectrum image of the spatial domain denoised image; filtering out the electromagnetic interference noise in the spectrum image of the spatial domain denoised image based on a preset denoising threshold to obtain a frequency domain denoised image; performing two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after the electromagnetic interference is removed.
[0147] In addition, the logic instructions in the above-mentioned memory 1130 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of 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 method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0148] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the electromagnetic interference elimination method for video surveillance images provided by the above methods, and the method includes: obtaining a video surveillance image to be processed; performing blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image; performing discrete wavelet transform on the spatial domain denoised image to obtain a spectrum image of the spatial domain denoised image; filtering out electromagnetic interference noise in the spectrum image of the spatial domain denoised image based on a preset denoising threshold to obtain a frequency domain denoised image; performing a two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after removing electromagnetic interference.
[0149] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the electromagnetic interference elimination method for video surveillance images provided by the above-mentioned methods, the method comprising: obtaining a video surveillance image to be processed; performing blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image; performing discrete wavelet transform on the spatial domain denoised image to obtain a spectrum image of the spatial domain denoised image; filtering out electromagnetic interference noise in the spectrum image of the spatial domain denoised image based on a preset denoising threshold to obtain a frequency domain denoised image; performing a two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after removing electromagnetic interference.
[0150] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0151] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for eliminating electromagnetic interference of video surveillance images, characterized in that: include: Obtaining video surveillance images to be processed; Performing blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image; Performing discrete wavelet transform on the spatial domain denoised image to obtain a spectrum image of the spatial domain denoised image; Filter out electromagnetic interference noise in the spectrum image of the spatial domain denoised image based on a preset denoising threshold to obtain a frequency domain denoised image; Performing a two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after electromagnetic interference is removed.
2. The method for eliminating electromagnetic interference of video surveillance images according to claim 1, characterized in that: The step of performing blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image includes: Based on the optimal electromagnetic fringe moving range and the optimal electromagnetic fringe shaking angle, a point spread function is created; wherein the optimal electromagnetic fringe moving range and the optimal electromagnetic fringe shaking angle are both obtained by optimizing the simulated annealing algorithm; The point spread function is used to perform deconvolution on the video surveillance image to be processed to obtain the spatial domain denoised image.
3. The method for eliminating electromagnetic interference of video surveillance images according to claim 1, characterized in that: The filtering out electromagnetic interference noise in the spectrum image of the spatial domain denoised image based on a preset denoising threshold to obtain a frequency domain denoised image includes: Constructing image tiles of a preset size; the energy mean of the image tiles is used to determine a reference value of the preset denoising threshold; Using the image tiles of the preset size, spatial expansion is performed on the night image in the video surveillance image to be processed to obtain a noisy image equivalent to electromagnetic fringe interference; Performing discrete wavelet transform on the noisy image equivalent to electromagnetic fringe interference to obtain a noisy spectrum image; The frequency domain denoised image is obtained by subtracting the energy in the same frequency domain of the spectrum image of the spatial domain denoised image from the energy in the noisy spectrum image.
4. The method for eliminating electromagnetic interference of video surveillance images according to claim 3, characterized in that: Before constructing the image tile of the preset size, the method further includes: Determine the images to be processed during the daytime and the images to be processed during the nighttime; Based on a pixel frame diagram of a preset size, a plurality of image tiles are randomly framed from the image to be processed during the daytime period and the image to be processed during the nighttime period; In the image to be processed during the daytime period, the difference between the tile energy means between two tiles in the image is calculated, and a first area with the smallest difference is determined; Finding a target area closest to the first area in the darkest area of the image to be processed during the night time period; The energy mean of the image tiles in the target area is used as a reference value for determining the preset denoising threshold.
5. The method for eliminating electromagnetic interference of video surveillance images according to claim 4, characterized in that: After finding the target area closest to the first area in the darkest area of the image to be processed during the night time, the method further includes: In the target area, calculating the difference between the tile energy means between two tiles in the image, and determining a second area with the smallest difference; The taking the energy mean of the image tiles in the target area as a reference value for determining the preset denoising threshold comprises: The energy mean of the second area is used as a reference value for determining the preset denoising threshold.
6. The method for eliminating electromagnetic interference of video surveillance images according to any one of claims 1 to 5, characterized in that: After obtaining the video surveillance image to be processed, the method includes: The video surveillance image to be processed is filtered by using a Gaussian filtering method or a median filtering method to obtain the video surveillance image to be processed after the salt and pepper noise is removed.
7. An electromagnetic interference elimination device for video surveillance images, characterized in that: include: An image acquisition module is used to acquire the video surveillance image to be processed; A spatial domain denoising module, used for performing blind deconvolution processing on the video surveillance image to be processed to obtain a spatial domain denoised image; A wavelet transform module, used for performing discrete wavelet transform on the spatial domain denoised image to obtain a spectrum image of the spatial domain denoised image; A frequency domain denoising module, used to filter out electromagnetic interference noise in the spectrum image of the spatial domain denoised image based on a preset denoising threshold to obtain a frequency domain denoised image; The image output module is used to perform a two-dimensional discrete wavelet inverse transform on the frequency domain denoised image to obtain a video surveillance image after electromagnetic interference is removed.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for eliminating electromagnetic interference for video surveillance images as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for eliminating electromagnetic interference for video surveillance images as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for eliminating electromagnetic interference for video surveillance images as claimed in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Motion blur detection method and system based on deep learning and blind deconvolution
CN119559168A
Coal mining equipment obstacle avoidance method and system based on machine vision
CN120088660A
Obstacle avoidance method and system for coal mining equipment based on machine vision
CN120088660B
